ParticleInjectorOG/ParticleInjector.h
Go to the documentation of this file.
1 #ifndef _ParticleInjectorOG_ParticleInjector_h_
2 #define _ParticleInjectorOG_ParticleInjector_h_
3 
4 #include <fwk/VModule.h>
5 
6 #include <utl/Particle.h>
7 
8 #include <string>
9 #include <vector>
10 
11 
12 class TF1;
13 namespace sdet {
14  class Station;
15 }
16 namespace evt {
17  class Event;
18 }
19 namespace sevt {
20  class SEvent;
21 }
22 namespace utl {
23  class RandomEngine;
24 }
25 
26 namespace ParticleInjectorOG {
27 
38  class ParticleInjector : public fwk::VModule {
39 
40  public:
42  virtual ~ParticleInjector();
43 
47 
48  private:
49  // switches
56 
57  unsigned int fNumberOfParticles;
58  unsigned int fSingleTankID;
59 
60  double fX, fY, fZ;
61 
62  std::vector<double> fDiscreteAzimuth;
63  std::vector<double> fDiscreteZenith;
64  std::vector<double> fDiscreteParticleTime;
65  std::vector<double> fDiscreteMuonFlux;
66  std::vector<double> fDiscreteElectronFlux;
67  std::vector<double> fDiscretePhotonFlux;
68  std::vector<double> fDiscreteMuonEnergy;
69  std::vector<double> fDiscreteElectronEnergy;
70  std::vector<double> fDiscretePhotonEnergy;
71 
74  std::string fContinuousTimeString;
75  std::string fMuonSpectrumString;
77  std::string fPhotonSpectrumString;
78 
85 
95 
97 
99 
100  void InjectParticles();
101 
102  double GetAzimuth();
103  double GetZenith();
104  double GetEnergy();
105  double GetTime();
106 
107  void SetPosition(double& x, double& y, double& z);
108  double GetDiscreteEnergy(std::vector<double>& flux,
109  std::vector<double>& energy,
110  double max);
111 
114 
115  REGISTER_MODULE("ParticleInjectorOG", ParticleInjector);
116 
117  };
118 
119 }
120 
121 
122 #endif // _ParticleInjectorOG_ParticleInjector_h_
123 
124 // Configure (x)emacs for this file ...
125 // Local Variables:
126 // mode: c++
127 // compile-command: "make -C .. -k"
128 // End:
REGISTER_MODULE("ParticleInjectorOG", ParticleInjector)
Detector description interface for Station-related data.
fwk::VModule::ResultFlag Finish()
Finish: invoked at end of the run (NOT end of the event)
Interface class to access to the SD part of an event.
Definition: SEvent.h:39
fwk::VModule::ResultFlag Run(evt::Event &theEvent)
Run: invoked once per event.
fwk::VModule::ResultFlag Init()
Initialize: invoked at beginning of run (NOT beginning of event)
Type
Particle types.
Definition: Particle.h:48
#define max(a, b)
Wraps the random number engine used to generate distributions.
Definition: RandomEngine.h:27
Module interface.
Definition: VModule.h:53
double GetDiscreteEnergy(std::vector< double > &flux, std::vector< double > &energy, double max)
Module to inject particles into a tank.
ResultFlag
Flag returned by module methods to the RunController.
Definition: VModule.h:60
void SetPosition(double &x, double &y, double &z)
Definition: XbArray.h:7

, generated on Tue Sep 26 2023.