3 #include <fwk/CentralConfig.h>
4 #include <fwk/CoordinateSystemRegistry.h>
6 #include <utl/ErrorLogger.h>
7 #include <utl/Reader.h>
8 #include <utl/config.h>
10 #include <utl/TraceAlgorithm.h>
11 #include <utl/TimeStamp.h>
12 #include <utl/TimeInterval.h>
13 #include <utl/AugerUnits.h>
14 #include <utl/AugerException.h>
15 #include <utl/FFTDataContainerAlgorithm.h>
17 #include <utl/Vector.h>
18 #include <utl/AxialVector.h>
19 #include <utl/AugerCoordinateSystem.h>
20 #include <utl/CoordinateSystemPtr.h>
21 #include <utl/UTMPoint.h>
23 #include <evt/Event.h>
24 #include <revt/REvent.h>
25 #include <revt/Header.h>
26 #include <evt/ShowerRecData.h>
27 #include <evt/ShowerSimData.h>
28 #include <evt/ShowerRRecData.h>
29 #include <evt/ShowerFRecData.h>
30 #include <evt/ShowerSRecData.h>
31 #include <revt/Channel.h>
33 #include <rdet/RDetector.h>
34 #include <rdet/Station.h>
36 #include <fwk/LocalCoordinateSystem.h>
39 #define OUT(x) if ((x) <= fInfoLevel) cerr << " "
50 fOnlyForVariedEvents(0),
51 fZenithalAlignmentError(0),
52 fAzimuthalAlignmentError(0),
55 normalRandom(0.0, 1.0),
56 normalRandomGenerator(randgen, normalRandom),
57 uniformRandom(0.0,
kPi),
58 uniformRandomGenerator(randgen, uniformRandom)
61 RdStationSimAntennaAlignmentError::~RdStationSimAntennaAlignmentError() {}
65 INFO(
"RdStationSimAntennaAlignmentError::Init()");
69 CentralConfig::GetInstance()->
GetTopBranch(
"RdStationSimAntennaAlignmentError");
77 OUT(0) <<
"Seeding the random generator with " <<
fRandomSeed << endl;
86 d[0] = cos(ang)*c[0] - sin(ang)*c[1] ;
87 d[1] = sin(ang)*c[0] + cos(ang)*c[1] ;
95 d[1] = cos(ang)*c[1] - sin(ang)*c[2];
96 d[2] = sin(ang)*c[1] + cos(ang)*c[2];
108 INFO(
"RdStationSimAntennaAlignmentError::Run()");
112 WARNING(
"No radio event found!");
116 REvent& rEvent =
event.GetREvent();
118 det::Detector::GetInstance().GetRDetector();
130 OUT(2) <<
"Not adding a random rotation: the SD event ID is below 99999999 and the antenna orientation will not be randomized." << endl;
143 OUT(3) <<
"Rotating the trace slightly to account for the error in the alignment of the antenna with the earth magnetic field..." << endl;
145 OUT(3) <<
"Rotation2: about the Z-axis with " << angZ2/
degree <<
" deg drawn from a uniform distribution between 0 and Pi." << endl;
147 OUT(3) <<
"Rotation4: back around the Z-axis with " << -angZ2/
degree <<
" deg (inverse of rotation2)." << endl;
150 for (
unsigned int i = 0; i < TimeSeries.
GetSize(); ++i) {
159 RdStationSimAntennaAlignmentError::Finish()
162 INFO(
"RdStationSimAntennaAlignmentError::Finish()");
Branch GetTopBranch() const
Vector3D RotateZ(Vector3D c, double ang)
Report success to RunController.
double fAzimuthalAlignmentError
evt::Header & GetHeader()
Interface class to access to the Radio part of an event.
Skip remaining modules in the current loop and continue with next iteration of the loop...
#define INFO(message)
Macro for logging informational messages.
StationIterator StationsEnd()
StationIterator StationsBegin()
void Init()
Initialise the registry.
Branch GetChild(const std::string &childName) const
Get child of this Branch by child name.
boost::filter_iterator< StationFilter, AllStationIterator > StationIterator
Iterator over all (non-exculded) stations.
Vector3D RotateX(Vector3D c, double ang)
Detector description interface for RDetector-related data.
boost::variate_generator< boost::mt19937, boost::uniform_real< double > > uniformRandomGenerator
Class representing a document branch.
Vector3D ApplyAlignmentError(Vector3D c, double angZ1, double angZ2, double angX)
bool fOnlyForVariedEvents
Header & GetHeader()
access to REvent Header
#define WARNING(message)
Macro for logging warning messages.
void GetData(bool &b) const
Overloads of the GetData member template function.
ResultFlag
Flag returned by module methods to the RunController.
Template class for a FADC data or calibrated data container. Use the typedefs (TraceD, TraceI, etc.) defined in Trace-fwd.h.
double fZenithalAlignmentError
boost::variate_generator< boost::mt19937, boost::normal_distribution< double > > normalRandomGenerator