EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EicMoCaPoint.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file EicMoCaPoint.h
1 //
2 // AYK (ayk@bnl.gov), 2013/06/13
3 //
4 // EIC Monte-Carlo point (hit); assume it can be done generic enough
5 // to be the same for all types of detectors; if this becomes too
6 // restrictive at some point, consider to introduce derived classes;
7 //
8 
9 #ifndef _EIC_MC_POINT_
10 #define _EIC_MC_POINT_
11 
12 #include "FairMCPoint.h"
13 
14 #include <ostream>
15 
16 class EicMoCaPoint : public FairMCPoint {
17 public:
20  EicMoCaPoint(Int_t trackID, Int_t primaryMotherId, Int_t secondaryMotherId, Int_t detID,
21  ULong64_t multiIndex,
22  const TVector3 &PosIn, const TVector3 &PosOut,
23  const TVector3 &MomIn, const TVector3 &MomOut,
24  Double_t tof, Double_t length, Double_t eLoss, Double_t step);
25  virtual ~EicMoCaPoint() {};
26 
27  virtual void Print(const Option_t* opt="") const;
28 
29  void SetStep(Double_t step) { mStep = step; }
30  Double_t GetStep() const { return mStep; }
31 
32  // Make life a bit easier; yes, this call is not much efficient;
33  TVector3 GetPosIn() const { TVector3 vv; Position(vv); return vv;}
34  const TVector3 &GetPosOut() const { return mPosOut;}
35  TVector3 GetPosAvg() const { return 0.5*(GetPosIn() + GetPosOut()); };
36  TVector3 GetMomAvg() const {
37  return 0.5*(TVector3(fPx, fPy, fPz) + mMomOut);
38  };
39 
40  Int_t GetPrimaryMotherID() const { return mPrimaryMotherID; };
41  Int_t GetSecondaryMotherID() const { return mSecondaryMotherID; };
42 
43  void SetPointID(int id) { mPointID = id; };
44  Int_t GetPointID() const { return mPointID; };
45 
46  ULong64_t GetMultiIndex() const { return mMultiIndex; };
47 
48 private:
49  Double32_t mStep; // step length
50 
51  // Yes, want to store exit coordinates and momenta as well;
52  TVector3 mPosOut, mMomOut; // "out" position and momentum of this hit
53 
54  // Back door to help EicRawHitProducer::Exec() be a bit more generic;
55  // perhaps remove this stuff later, depending on how complicated
56  // detector hit producer codes are;
57  Int_t mPointID; // index in fMoCaPointArray array
58 
59  ULong64_t mMultiIndex; // encoded volume copy IDs of this hit in the geometry tree
60 
61  Int_t mPrimaryMotherID; // "true" primary mother ID
62  // If either no "black hole" volumes defined in the setup or neither of the parent
63  // particles entered such a volue, this ID is equal to mPrimaryMotherID;
64  // Otherwise this will be ID of the very first parent which entered any of the "black
65  // hole" volumes; see comments in EicGeoParData.h for further details;
66  Int_t mSecondaryMotherID; // guessed "most useful" parent further in the parent list
67 
68  //std::vector<Int_t> mMeaningfulParents;
69 
71 };
72 
73 #endif