ShowerInventor.h
Go to the documentation of this file.
1 #ifndef _ShowerInventor_h_
2 #define _ShowerInventor_h_
3 
4 #include <fwk/VModule.h>
5 #include <evt/Event.h>
6 
7 #include <utl/VShowerFileParticleIterator.h>
8 #include <utl/Particle.h>
9 
10 #include <utl/RandomEngine.h>
11 #include <utl/VRandomSampler.h>
12 #include <utl/AugerCoordinateSystem.h>
13 
14 #include <vector>
15 #include <list>
16 
17 
18 namespace utl {
19  class Particle;
20  class Plane;
21  class Branch;
22 }
23 
24 namespace evt {
25  class Event;
26  class ShowerSimData;
27 }
28 
29 class TH1;
30 class TH2;
31 
32 namespace ShowerInventorNS {
33 
35 
46  class ShowerInventor : public fwk::VModule {
47 
48  public:
50  virtual ~ShowerInventor() { }
51 
55 
57 
58  unsigned int GetNumRequestedParticles() const
59  { return fTotalNumRequestedParticles; }
60 
62  { return fShowerLocalCS; }
63 
64  private:
66 
67  void FillCaches();
68 
70 
71  std::vector<double> fZeniths;
72  double fAzimuth;
73  double fCoreNorthing;
74  double fCoreEasting;
75  double fCoreAltitude;
76 
79 
81 
84 
87 
88  typedef std::vector<double> RandomCacheContainer;
89 
90  // Contains various random distributions for each
91  // particle type.
92 
94 
95  // Number of particles requested
96  unsigned int numRequestedParticles;
97 
98  // Number of particles generated
99  unsigned int numGeneratedParticles;
100 
101  // Cache pointer. Not necessarily the same as numGeneratedParticles
102  // depending on details of the caching
103  unsigned int cachePosition;
104 
105  // What kind of particle do these distributions correspond to
107 
108  // Samplers used to produce various random distributions
113 
114  // Caches of random numbers for various distributions.
115  // The caches are used in an attempt to increase speed a bit.
120  };
121 
122  std::vector<ParticleDistInfo> fParticleDistros;
123 
125  unsigned int fCurrentZenithIndex;
126 
128  unsigned int fCurrentDistIndex;
129 
130  unsigned int fRandomCacheMaxSize;
131 
132  // Stuff for diagnostic plots
133 
135  std::string fDiagnosticsFileName;
136 
138 
140 
148  };
149 
150  std::map<int, DiagnosticHistos> fDiagnosticHistos;
151 
152  REGISTER_MODULE("ShowerInventorNEU", ShowerInventor);
153 
154  };
155 
156 }
157 
158 
159 #endif
std::vector< double > RandomCacheContainer
utl::VRandomSampler * GetSampler(const utl::Branch &b)
double Plane(const utl::Point &point, const utl::Vector &normal, const utl::Photon &photonIn, utl::Photon &photonOut)
Definition: RTFunctions.cc:41
fwk::VModule::ResultFlag Finish()
Finish: invoked at end of the run (NOT end of the event)
Point object.
Definition: Point.h:32
REGISTER_MODULE("ShowerInventorNEU", ShowerInventor)
Describes a particle for Simulation.
Definition: Particle.h:26
fwk::VModule::ResultFlag Run(evt::Event &event)
Run: invoked once per event.
utl::CoordinateSystemPtr fShowerLocalCS
unsigned int GetNumRequestedParticles() const
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
Class representing a document branch.
Definition: Branch.h:107
Class describing a Plane object.
Definition: Plane.h:17
utl::RandomEngine::RandomEngineType * fRandomEngine
Module interface.
Definition: VModule.h:53
Iterator that generates particles &quot;on-the-fly&quot; . This uses the machinery in ShowerInventor to fetch p...
std::vector< ParticleDistInfo > fParticleDistros
utl::CoordinateSystemPtr fShowerCS
ResultFlag
Flag returned by module methods to the RunController.
Definition: VModule.h:60
CLHEP::HepRandomEngine RandomEngineType
Definition: RandomEngine.h:30
std::map< int, DiagnosticHistos > fDiagnosticHistos
fwk::VModule::ResultFlag Init()
Initialize: invoked at beginning of run (NOT beginning of event)
Generate hypothetical particle distributions in the shower plane.
std::vector< double > fZeniths
utl::CoordinateSystemPtr GetExternalCS() const
Class to shoot random numbers given by a user-defined distribution function.
ShowerInventorParticleIterator * fFileIterator

, generated on Tue Sep 26 2023.