EventGenerator.h
Go to the documentation of this file.
1 #ifndef _EventGeneratorOG_EventGenerator_h_
2 #define _EventGeneratorOG_EventGenerator_h_
3 
4 #include <fwk/VModule.h>
5 #include <sdet/Station.h>
6 #include <utl/TimeStamp.h>
7 #include <utl/UTMPoint.h>
8 #include <evt/ShowerSimData.h>
9 #include <evt/RadioSimulation.h>
10 #include <utl/config.h>
11 #include <boost/tuple/tuple.hpp>
12 #include <string>
13 #include <list>
14 #include <TH2.h>
15 
16 
17 namespace utl {
18  class RandomEngine;
19  class Branch;
20 }
21 
22 namespace evt {
23  class Event;
24 }
25 
26 namespace EventGeneratorOG {
27 
28  class EventGenerator : public fwk::VModule {
29 
30  enum EMode {
32  eSD,
33  eFD,
34  eHy,
35  eMD, // MD only
36  eXD, // SD+MD (stands for eXtended SD)
37  eXH // SD+MD+FD (stands for eXtended Hy)
38  };
39 
40  public:
42  virtual ~EventGenerator() { }
43 
47 
48  private:
49  boost::tuple<double, double> GenerateArrayCentricRandomizedCore();
50  boost::tuple<double, double> GenerateArrayCentricRandomizedCoreAroundRandomStation();
51  boost::tuple<double, double, double> GenerateArrayCentricListedCore();
52  boost::tuple<double, double> GenerateEyeCentricCore(const double energy);
53  boost::tuple<double, double, double> GenerateSphereCentricCore(evt::ShowerSimData& shower);
54 
56  boost::tuple<double, double> GenerateCoreAroundStation();
57 
58  double Rcutoff(const double lgE);
59  double RcutoffCherenkovHECO(const double lgE);
60  double MaximumRp(const double lgE);
61  void FlagHoleStations(evt::Event& event) const;
62 
65 
66  // Returns id of clostest station to a given point
67  int FindClosestStationFromPoint(const utl::Point& pt, const rdet::RDetector& rDet, const double maxDistanceFactor);
68 
70 
71  bool fUseRandomStation = false;
73  int fStationId = 0;
74  double fDeltaNorthing = 0;
75  double fDeltaEasting = 0; // Shifts in N and E over the array
76  double fNorthing = 0;
77  double fEasting = 0;
78  double fAltitude = 0; // Core location of the shower in UTM
79  int fZone = -1; // UTM zone
80  char fBand = '\0'; // UTM band
81 
82  typedef std::list<boost::tuple<double, double, double, int, char>> CoreList;
84  CoreList::iterator fCorePositionsIt;
85 
86  // TimeStamp variables
87  int fNEvents = 0;
88  bool fTimeOrdered = false;
89  bool fTimeRandomized = false;
92  bool fSampleTimes = false;
93  std::list<double> fTimeList;
94 
95  std::string fLibraryIdentifier;
96  std::string fFormat;
97  std::vector<unsigned int> fSdIdFormat;
98  unsigned int fEventNumber = 0;
99 
100  // Slice mode variables
101  bool fUseSimCores = false;
102  int fSimCoreCount = 0;
103  bool fEyeCentric = false;
104  bool fInSphere = false;
105  double fSphereRadius = 0;
106  bool fSkipUpgoing = false;
107  bool fLimitRp = false;
108  bool fUpgoingShower = false;
109  bool fRpTooLarge = false;
110  boost::tuple<double, double, double, int, char> fSphereCenter;
111  int fEyeid = 0;
112  double fTelid = 0;
113  double fMinDist = 0;
114  double fMaxDist = 0;
115  bool fRMaxEnergyDependent = false;
116  double fDeltaPhi = 0;
118  TH2D* fMaxVA = nullptr;
119 
120  // Updating behaviour.
121  bool fInvalidateData = false;
122  bool fInvalidateComponents = false;
123 
124  bool fUseRadioCorePosition = false;
125  bool fUseRadioEventTime = false;
127 
129 
130  REGISTER_MODULE("EventGeneratorOG", EventGenerator);
131 
132  };
133 
134 }
135 
136 
137 #endif
double Rcutoff(const double lgE)
energy dependent trigger surface
int FindClosestStationFromPoint(const utl::Point &pt, const rdet::RDetector &rDet, const double maxDistanceFactor)
Set the core position, time and event ID for Monte Carlo events.
boost::tuple< double, double, double, int, char > fSphereCenter
Point object.
Definition: Point.h:32
utl::RandomEngine * fRandomEngine
Detector description interface for Station-related data.
REGISTER_MODULE("EventGeneratorOG", EventGenerator)
boost::tuple< double, double > GenerateArrayCentricRandomizedCoreAroundRandomStation()
boost::tuple< double, double > GenerateCoreAroundStation()
Data structure for a radio simulation (including several SimRadioPulses)
double RcutoffCherenkovHECO(const double lgE)
utl::Vector GetCoreShiftForRadioSimulation(evt::RadioSimulation &radioSim)
Calculates average offset between the locations of sim. radio pulses and the position of the RDetecto...
boost::tuple< double, double, double > GenerateArrayCentricListedCore()
fwk::VModule::ResultFlag Run(evt::Event &event)
Run: invoked once per event.
boost::tuple< double, double > GenerateEyeCentricCore(const double energy)
A TimeStamp holds GPS second and nanosecond for some event.
Definition: TimeStamp.h:110
Detector description interface for RDetector-related data.
Definition: RDetector.h:46
Interface class to access Shower Simulated parameters.
Definition: ShowerSimData.h:49
double MaximumRp(const double lgE)
boost::tuple< double, double, double > GenerateSphereCentricCore(evt::ShowerSimData &shower)
std::vector< int > StationIdCollection
Wraps the random number engine used to generate distributions.
Definition: RandomEngine.h:27
std::list< boost::tuple< double, double, double, int, char > > CoreList
CoreList::iterator fCorePositionsIt
Module interface.
Definition: VModule.h:53
fwk::VModule::ResultFlag Init()
Initialize: invoked at beginning of run (NOT beginning of event)
boost::tuple< double, double > GenerateArrayCentricRandomizedCore()
ResultFlag
Flag returned by module methods to the RunController.
Definition: VModule.h:60
fwk::VModule::ResultFlag Finish()
Finish: invoked at end of the run (NOT end of the event)
Vector object.
Definition: Vector.h:30
void FlagHoleStations(evt::Event &event) const
std::vector< unsigned int > fSdIdFormat
sdet::Station::StationIdCollection GetInfillCrown(const sdet::Station &centralStation)

, generated on Tue Sep 26 2023.