EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EicRcEvent.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file EicRcEvent.h
1 //
2 // AYK (ayk@bnl.gov), 2014/07/09
3 //
4 // EIC code reconstructed event class; consider to reuse eic-smear codes;
5 //
6 // A good fraction of this code is cut'n'paste from EventSmear.h (eic-smear
7 // package);
8 
10 
11 #include <EicRcParticle.h>
12 
13 #ifndef _EIC_RC_EVENT_
14 #define _EIC_RC_EVENT_
15 
16 class EicRcEvent : public erhic::EventDis {
17  friend class EicEventAssembler;
18 
19  public:
20 
22  EicRcEvent(): mScatteredLeptonID(-1)/*, femc(0.0), fhac(0.0)*/ {};
23 
25  virtual ~EicRcEvent() { ClearParticles(); };
26 
27 #if _LATER_
28 
29  virtual void Reset();
30 #endif
31 
33  virtual void ClearParticles();
34 
36  virtual UInt_t GetNTracks() const { return mParticles.size(); };
37 
43  virtual const EicRcParticle* GetTrack(UInt_t u) const {
44  return (u < mParticles.size() ? mParticles.at(u) : NULL);
45  };
46  virtual EicRcParticle* GetTrack(UInt_t u) {
47  return (u < mParticles.size() ? mParticles.at(u) : NULL);
48  };
49 
50 #if _LATER_
51  virtual void SetQ2(double Q2) { QSquared = Q2; }
52  virtual void SetX(double xB) { x = xB; }
53  virtual void SetY(double inelasticity) { y = inelasticity; }
54  virtual void SetW2(double W2) { WSquared = W2; }
55  virtual void SetNu(double Nu) { nu = Nu; }
56 #endif
57 
58  // Basically wrappers for EicRootManager calls; yet it is convenient to have
59  // them here to easily access original generator event(track) classes (for
60  // instance to see which of the simulated particles have no reconstructed
61  // counterparts -> so were not detected/reconstructed);
62  const erhic::EventMC* GetGenMcEvent() const;
63  // NB: numbering scheme here and in the below call follows ERHIC convention
64  // rather than PANDA one (so indices 0,1 correspond to beam particles);
65  const erhic::ParticleMC* GetGenMcTrack(int genMcIndex) const;
66  // Find this MC track in array of reconstructed particles;
67  EicRcParticle* GetRcParticleMatchingGenMcTrack(unsigned genMcIndex) const;
68 
69  // The only source of information for these two guys is original EventMC;
70  // assume that beam lepton is #0 and beam hadron is #1 in respective
71  // EventMC internal array; 2016/11/15: use erhic::EventMC-inherited class methods instead;
72  //const erhic::ParticleMC* BeamLepton() const { return GetGenMcTrack(0); };
73  const erhic::ParticleMC* BeamLepton() const { return GetGenMcEvent()->BeamLepton(); };
74  //const erhic::ParticleMC* BeamHadron() const { return GetGenMcTrack(1); };
75  const erhic::ParticleMC* BeamHadron() const { return GetGenMcEvent()->BeamHadron(); };
76  const erhic::ParticleMC* ExchangeBoson() const {return NULL; };
77 
78  virtual const EicRcParticle* ScatteredLepton() const {
79  // Just return the stored pointer; its assignment is a different story;
81  };
82 
89 
90 
91 #if _LATER_
92 
97  virtual void AddLast(ParticleMCS*);
98 
99 
105  std::vector<const erhic::VirtualParticle*> GetTracks() const;
106 
110  virtual void SetScattered(int);
111 
116  virtual void Print(Option_t* = "") const;
117 #endif
118 
119  private:
120  Int_t mScatteredLeptonID; // scattered lepton ID in mParticles[]
121  std::vector<EicRcParticle*> mParticles;
122 
123  public:
124  // Clearly a hack for now;
125  //double femc, fhac;
126 
127  ClassDef(EicRcEvent, 7);
128 };
129 
130 #endif