MpdZdcPoint.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. // ------------------------------------------------------------------------
  2. // ----- MpdZdcPoint header file -----
  3. // ----- litvin@nf.jinr.ru -----
  4. // ----- Last updated 22-Feb-2012 -----
  5. // ------------------------------------------------------------------------
  6. #ifndef MPDZDCPOINT_H
  7. #define MPDZDCPOINT_H
  8. #include "TObject.h"
  9. #include "TVector3.h"
  10. #include "TLorentzVector.h"
  11. #include "FairMCPoint.h"
  12. using namespace std;
  13. class MpdZdcPoint : public FairMCPoint
  14. {
  15. public:
  16. /** Default constructor **/
  17. MpdZdcPoint();
  18. /** Constructor with arguments
  19. *@param trackID Index of MCTrack
  20. *@param detID Detector ID (at present, volume MC number)
  21. *@param copyNo Number of active layer inside ZDC module
  22. *@param copyNoMother ZDC module number
  23. *@param pos Coordinates [cm]
  24. *@param mom Momentum of track [GeV]
  25. *@param tof Time since event start [ns]
  26. *@param length Track length since creation [cm]
  27. *@param eLoss Energy deposit [GeV]
  28. **/
  29. MpdZdcPoint(Int_t trackID, Int_t detID,
  30. Int_t copyNo, Int_t copyNoMother, Int_t copyNoZdc,
  31. //Int_t copyNo_h, Int_t copyNoMother_h,
  32. TVector3 pos, TVector3 mom,
  33. Double_t tof, Double_t length,
  34. Double_t eLoss, UInt_t EventId=0 );
  35. /** Copy constructor **/
  36. MpdZdcPoint(const MpdZdcPoint& point) { *this = point; };
  37. /** Destructor **/
  38. virtual ~MpdZdcPoint();
  39. /** Accessors **/
  40. Short_t GetCopy() const {return nCopy; };
  41. Short_t GetCopyMother() const {return nCopyMother; };//module
  42. Short_t GetCopyZdc() const {return nCopyZdc; };//zdc (left, right)
  43. //Short_t GetCopyH() const {return nCopy_h; };
  44. //Short_t GetCopyMotherH() const {return nCopyMother_h; };//module with hole
  45. /** Modifiers **/
  46. void SetCopy(Short_t i) { nCopy = i; };
  47. void SetCopyMother(Short_t i) { nCopyMother = i; };
  48. void SetCopyZdc(Short_t i) { nCopyZdc = i; };
  49. //void SetCopyH(Short_t i) { nCopy_h = i; };
  50. //void SetCopyMotherH(Short_t i) { nCopyMother_h = i; };
  51. /** Output to screen **/
  52. virtual void Print(const Option_t* opt) const;
  53. // fTrackID = trackID;
  54. // fDetectorID = detID;
  55. // fX = pos.X();
  56. // fY = pos.Y();
  57. // fZ = pos.Z();
  58. // fPx = mom.Px();
  59. // fPy = mom.Py();
  60. // fPz = mom.Pz();
  61. // fTime = tof;
  62. // fLength = length;
  63. // fELoss = eLoss;
  64. // fEventId
  65. void AddVSC(Int_t trackID, Int_t detID, Int_t idvsc, Int_t idmod, Int_t idzdc, TVector3 pos,TVector3 mom,Double_t dt, Double_t dl, Double_t de) {
  66. if(nCopy != idvsc)
  67. cerr << "Warning: idvsc not equal in NA61VetoHit::AddVSC";
  68. if(nCopyMother != idmod)
  69. cerr << "Warning: idmod not equal in NA61VetoHit::AddVSC";
  70. if(nCopyZdc != idzdc)
  71. cerr << "Warning: idzdc not equal in NA61VetoHit::AddVSC";
  72. fTrackID=trackID; fDetectorID=detID;
  73. fX=pos.X(); fY=pos.Y(); fZ=pos.Z();
  74. fPx=mom.Px(); fPy=mom.Py(); fPz=mom.Pz();
  75. nCopy=idvsc; nCopyMother=idmod; nCopyZdc=idzdc; fELoss += de; fLength += dl; fTime+=dt;
  76. }
  77. /*
  78. void AddVSCH(Int_t trackID, Int_t detID, Int_t idvsc, Int_t idmod,TVector3 pos,TVector3 mom,Double_t dt, Double_t dl, Double_t de) {
  79. if(nCopy_h != idvsc)
  80. cerr << "Warning: idvsc not equal in NA61VetoHit::AddVSCH";
  81. if(nCopyMother_h != idmod)
  82. cerr << "Warning: idmod not equal in NA61VetoHit::AddVSCH";
  83. fTrackID=trackID; fDetectorID=detID;
  84. fX=pos.X(); fY=pos.Y(); fZ=pos.Z();
  85. fPx=mom.Px(); fPy=mom.Py(); fPz=mom.Pz();
  86. nCopy_h=idvsc; nCopyMother_h=idmod; fELoss += de; fLength += dl; fTime+=dt;
  87. }
  88. */
  89. protected:
  90. Short_t nCopy; // Copy number
  91. Short_t nCopyMother; // Copy number of mother volume
  92. Short_t nCopyZdc; // Copy number of zdc (left, right)
  93. //Short_t nCopy_h; // Copy number
  94. //Short_t nCopyMother_h; // Copy number of mother volume
  95. ClassDef(MpdZdcPoint,4)
  96. };
  97. #endif