eic-smear  1.0.3
A collection of ROOT classes for Monte Carlo events and a fast-smearing code simulating detector effects for the Electron-Ion Collider task force
EventSmear.h
Go to the documentation of this file.
1 
10 #ifndef INCLUDE_EICSMEAR_SMEAR_EVENTSMEAR_H_
11 #define INCLUDE_EICSMEAR_SMEAR_EVENTSMEAR_H_
12 
13 #include <cmath>
14 #include <list>
15 #include <vector>
16 
17 #include <TObject.h>
18 
23 
24 namespace Smear {
25 
26 /*
27  A generator-independent DIS event with smeared kinematics and particles.
28  */
29 class Event : public erhic::EventDis {
30  public:
34  Event();
35 
39  virtual ~Event();
40 
44  virtual void Reset();
45 
49  virtual void ClearParticles();
50 
54  virtual UInt_t GetNTracks() const;
55 
61  virtual const ParticleMCS* GetTrack(UInt_t) const;
62 
68  virtual ParticleMCS* GetTrack(UInt_t);
69 
70  virtual void SetQ2(double Q2) { QSquared = Q2; }
71 
72  virtual void SetX(double xB) { x = xB; }
73 
74  virtual void SetY(double inelasticity) { y = inelasticity; }
75 
76  virtual void SetW2(double W2) { WSquared = W2; }
77 
78  virtual void SetNu(double Nu) { nu = Nu; }
79 
91  virtual const ParticleMCS* BeamLepton() const;
92 
100  virtual const ParticleMCS* BeamHadron() const;
101 
109  virtual const ParticleMCS* ExchangeBoson() const;
110 
119  virtual const ParticleMCS* ScatteredLepton() const;
120 
126  virtual void AddLast(ParticleMCS* particle);
127 
133  void HadronicFinalState(ParticlePtrList&) const;
134 
140  std::vector<const erhic::VirtualParticle*> GetTracks() const;
141 
145  virtual void SetScattered(int index);
146 
151  virtual void Print(Option_t* = "") const;
152 
153  protected:
154  Int_t nTracks;
155  std::vector<ParticleMCS*> particles;
156  Int_t mScatteredIndex;
157 
158  ClassDef(Smear::Event, 1)
159 };
160 
161 inline UInt_t Event::GetNTracks() const {
162  return particles.size();
163 }
164 
165 inline const Smear::ParticleMCS* Event::GetTrack(UInt_t u) const {
166  return (u < particles.size() ? particles.at(u) : NULL);
167 }
168 
170  return (u < particles.size() ? particles.at(u) : NULL);
171 }
172 
173 inline const ParticleMCS* Event::BeamLepton() const {
174  return (particles.empty() ? NULL : particles.front());
175 }
176 
177 inline const ParticleMCS* Event::BeamHadron() const {
178  return (particles.size() > 1 ? particles.at(1) : NULL);
179 }
180 
181 inline const ParticleMCS* Event::ExchangeBoson() const {
182  return NULL;
183 }
184 
185 } // namespace Smear
186 
187 typedef Smear::Event EventS;
188 
189 #endif // INCLUDE_EICSMEAR_SMEAR_EVENTSMEAR_H_
void HadronicFinalState(ParticlePtrList &) const
Definition: EventSmear.cxx:55
std::vector< ParticleMCS * > particles
The smeared particle list.
Definition: EventSmear.h:155
Double32_t QSquared
Q2 calculated from scattered electron.
Definition: EventDis.h:182
std::vector< const erhic::VirtualParticle * > ParticlePtrList
Definition: VirtualEvent.h:52
std::vector< const erhic::VirtualParticle * > GetTracks() const
Definition: EventSmear.cxx:67
Double32_t nu
Energy transfer from the electron.
Definition: EventDis.h:185
Double32_t y
Inelasticity.
Definition: EventDis.h:183
virtual const ParticleMCS * BeamLepton() const
Definition: EventSmear.h:173
virtual UInt_t GetNTracks() const
Definition: EventSmear.h:161
virtual void Reset()
Definition: EventSmear.cxx:34
virtual void ClearParticles()
Definition: EventSmear.cxx:26
virtual const ParticleMCS * BeamHadron() const
Definition: EventSmear.h:177
Double32_t WSquared
Invariant mass of the hadronic system.
Definition: EventDis.h:184
virtual void AddLast(ParticleMCS *particle)
Definition: EventSmear.cxx:39
virtual const ParticleMCS * ScatteredLepton() const
Definition: EventSmear.cxx:44
virtual void SetScattered(int index)
Definition: EventSmear.cxx:75
virtual const ParticleMCS * ExchangeBoson() const
Definition: EventSmear.h:181
virtual void Print(Option_t *="") const
Definition: EventSmear.cxx:80
virtual const ParticleMCS * GetTrack(UInt_t) const
Definition: EventSmear.h:165
virtual ~Event()
Definition: EventSmear.cxx:22
Int_t nTracks
Number of particles (intermediate + final)
Definition: EventSmear.h:154
Double32_t x
Bjorken scaling variable.
Definition: EventDis.h:181