MpdEmcHit.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. #ifndef MPDEMCHIT_H
  2. #define MPDEMCHIT_H 1
  3. #include "FairHit.h"
  4. class MpdEmcHit : public FairHit {
  5. public:
  6. /** Default constructor **/
  7. MpdEmcHit();
  8. /** Constructor with hit parameters (1)**/
  9. MpdEmcHit(Int_t detectorID, TVector3 pos, TVector3 dpos, Int_t refIndex, Int_t flag);
  10. /** Constructor with hit parameters (2) [not the flag]**/
  11. MpdEmcHit(Int_t detectorID, TVector3 pos, TVector3 dpos, Int_t refIndex);
  12. MpdEmcHit(UInt_t sec, UInt_t row, UInt_t supMod, UInt_t mod, Float_t e) {} //TEMPORARY FIX: was not implemented -> undefined reference
  13. MpdEmcHit(UInt_t sec, UInt_t row, UInt_t supMod, UInt_t mod, Float_t e, Float_t time);
  14. virtual ~MpdEmcHit();
  15. void Print(const Option_t* opt = 0) const;
  16. Int_t GetFlag() const {
  17. return fFlag;
  18. };
  19. Int_t GetSec() const {
  20. return fSecId;
  21. };
  22. Int_t GetMod() const {
  23. return fModId;
  24. };
  25. Int_t GetRow() const {
  26. return fRowId;
  27. };
  28. Float_t GetE() const {
  29. return fE;
  30. };
  31. Float_t GetTime() const {
  32. return fTime;
  33. };
  34. Int_t GetSupMod() const {
  35. return fSupModId;
  36. };
  37. Float_t GetRhoCenter() const {
  38. return fRhoCenter;
  39. }
  40. Float_t GetZCenter() const {
  41. return fZCenter;
  42. }
  43. Float_t GetPhiCenter() const {
  44. return fPhiCenter;
  45. }
  46. Float_t GetThetaCenter() const {
  47. return fThetaCenter;
  48. }
  49. Int_t GetTrackId() const {
  50. return fTrackID;
  51. }
  52. Int_t GetPdg() const {
  53. return fPDG;
  54. }
  55. Int_t GetNumTracks() const {
  56. return fNumTracks;
  57. }
  58. Float_t GetZ() const {
  59. return fZ;
  60. }
  61. void SetFlag(Int_t flag) {
  62. fFlag = flag;
  63. };
  64. void SetEnergy(Float_t e) {
  65. fE = e;
  66. };
  67. void SetTime(Float_t time) {
  68. fTime = time;
  69. };
  70. void IncreaseEnergy(Float_t e) {
  71. fE += e;
  72. };
  73. void IncreaseEnergyTime(Float_t timeEnergy) {
  74. fTime += timeEnergy;
  75. };
  76. void SetTrackId(Int_t id) {
  77. fTrackID = id;
  78. };
  79. void SetPdg(Int_t pdg) {
  80. fPDG = pdg;
  81. };
  82. void SetNumTracks(Int_t n) {
  83. fNumTracks = n;
  84. };
  85. void SetRhoCenter(Float_t rho) {
  86. fRhoCenter = rho;
  87. };
  88. void SetZCenter(Float_t z) {
  89. fZCenter = z;
  90. };
  91. void SetPhiCenter(Float_t phi) {
  92. fPhiCenter = phi;
  93. };
  94. void SetThetaCenter(Float_t theta) {
  95. fThetaCenter = theta;
  96. };
  97. void SetSecId(UInt_t id) {
  98. fSecId = id;
  99. };
  100. void SetRowId(UInt_t row) {
  101. fRowId = row;
  102. };
  103. void SetModId(UInt_t id) {
  104. fModId = id;
  105. };
  106. protected:
  107. UInt_t fSecId;
  108. UInt_t fRowId;
  109. UInt_t fModId;
  110. UInt_t fSupModId; // super module = square of modules (3x3) (only)
  111. Float_t fE; //energy
  112. Float_t fTime; // hit mean time
  113. Int_t fTrackID; // -1 if more than one track in module
  114. Int_t fFlag; // Flag for general purposes [TDC, event tagging...]
  115. Int_t fPDG; // code of particle if only one track presented in module
  116. UInt_t fNumTracks; // number of tracks, which have contribution in module
  117. Float_t fRhoCenter;// rho-coordinate of the center of module
  118. Float_t fZCenter; // z-coordinate of the center of module
  119. Float_t fPhiCenter; // phi-angle of the center of module
  120. Float_t fThetaCenter; // theta-angle of the center of module
  121. ClassDef(MpdEmcHit, 1)
  122. };
  123. #endif