EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EventSmear.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file EventSmear.h
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;
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 
188 
189 #endif // INCLUDE_EICSMEAR_SMEAR_EVENTSMEAR_H_