CachedDirectInjector.h
Go to the documentation of this file.
1 #ifndef _CachedDirectInjectorOG_CachedDirectInjector_h_
2 #define _CachedDirectInjectorOG_CachedDirectInjector_h_
3 
4 #include <fwk/VModule.h>
5 #include <utl/Particle.h>
6 #include <utl/ShadowPtr.h>
7 #include <utl/ShowerParticleIterator.h>
8 #include <map>
9 
10 
11 namespace CachedDirectInjectorOG {
12 
30 
32 
33  InjectedParticle(const int id, const double r, const double phi, const double height, const double stime,
34  const int type, const int source, const double posx, const double posy, const double posz,
35  const double dirx, const double diry, const double dirz, const double time,
36  const double weight, const double ek) :
37  fId(id),
38  fR(r),
39  fPhi(phi),
40  fHeight(height),
41  fSTime(stime),
42  fType(type),
43  fSource(source),
44  fPosX(posx),
45  fPosY(posy),
46  fPosZ(posz),
47  fDirX(dirx),
48  fDirY(diry),
49  fDirZ(dirz),
50  fTime(time),
51  fWeight(weight),
52  fEk(ek)
53  { }
54 
55  int fId = 0;
56  double fR = 0;
57  double fPhi = 0;
58  double fHeight = 0;
59  double fSTime = 0;
60  int fType = 0;
61  int fSource = 0;
62  double fPosX = 0;
63  double fPosY = 0;
64  double fPosZ = 0;
65  double fDirX = 0;
66  double fDirY = 0;
67  double fDirZ = 0;
68  double fTime = 0;
69  double fWeight = 0;
70  double fEk = 0;
71 
72  friend std::istream& operator>>(std::istream& is, InjectedParticle& part);
73 
74  };
75 
76 
78 
79  public:
81 
82  VModule::ResultFlag Init();
83  VModule::ResultFlag Run(evt::Event& event);
84  VModule::ResultFlag Finish();
85 
86  private:
88  unsigned int fMaxParticles = 10000;
89  bool fUseDenseOnly = false;
90  bool fUseDense = false;
91 
93  std::map<int, utl::TimeInterval> fEarliestTime;
94  std::map<int, std::vector<InjectedParticle>> fTankToInjectedParticles;
95 
96  REGISTER_MODULE("CachedDirectInjector", CachedDirectInjector);
97 
98  };
99 
100 }
101 
102 
103 #endif
VModule::ResultFlag Init()
Initialize: invoked at beginning of run (NOT beginning of event)
VModule::ResultFlag Run(evt::Event &event)
Run: invoked once per event.
Iterator to retrieve particles from utl::VShowerParticlList.
InjectedParticle(const int id, const double r, const double phi, const double height, const double stime, const int type, const int source, const double posx, const double posy, const double posz, const double dirx, const double diry, const double dirz, const double time, const double weight, const double ek)
constexpr double km
Definition: AugerUnits.h:125
std::map< int, utl::TimeInterval > fEarliestTime
REGISTER_MODULE("CachedDirectInjector", CachedDirectInjector)
VModule::ResultFlag Finish()
Finish: invoked at end of the run (NOT end of the event)
bool is(const double a, const double b)
Definition: testlib.cc:113
std::map< int, std::vector< InjectedParticle > > fTankToInjectedParticles
friend std::istream & operator>>(std::istream &is, InjectedParticle &part)
Module interface.
Definition: VModule.h:53
Inject an unthinned shower into the array.

, generated on Tue Sep 26 2023.