MpdEmcHit.cxx 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. //--------------------------------------------------------------------------
  2. //---- MpdEmcHit ----
  3. //--------------------------------------------------------------------------
  4. ////////////////////////////////////////////////////////////////
  5. // //
  6. // Updated : Martemianov M., ITEP, 2017 //
  7. // //
  8. ////////////////////////////////////////////////////////////////
  9. #include "MpdEmcHit.h"
  10. #include <iostream>
  11. using namespace std;
  12. // ----- Default constructor -------------------------------------------
  13. MpdEmcHit::MpdEmcHit() :
  14. fSecId(-1),
  15. fRowId(-1),
  16. fModId(-1),
  17. fE(-1.0),
  18. fTime(-1.0),
  19. fTrackID(-1),
  20. fFlag(0),
  21. fPDG(0),
  22. fNumTracks(0),
  23. fRhoCenter(0.0),
  24. fZCenter(0.0),
  25. fPhiCenter(0.0),
  26. fThetaCenter(0.0)
  27. {}
  28. // ----- Standard constructor ------------------------------------------
  29. MpdEmcHit::MpdEmcHit(Int_t detID, TVector3 pos, TVector3 dpos, Int_t index, Int_t flag)
  30. : FairHit(detID, pos, dpos, index) {
  31. fFlag = flag;
  32. }
  33. // ----- Constructor without flag ------------------------------------------
  34. MpdEmcHit::MpdEmcHit(Int_t detID, TVector3 pos, TVector3 dpos, Int_t index)
  35. : FairHit(detID, pos, dpos, index) {
  36. }
  37. MpdEmcHit::MpdEmcHit(UInt_t sec, UInt_t row, UInt_t supMod, UInt_t mod, Float_t e, Float_t time) :
  38. fSecId(sec),
  39. fRowId(row),
  40. fModId(mod),
  41. fE(e),
  42. fTime(time),
  43. fTrackID(-1),
  44. fFlag(kFALSE),
  45. fPDG(0),
  46. fNumTracks(0) {
  47. }
  48. // ----- Destructor ----------------------------------------------------
  49. MpdEmcHit::~MpdEmcHit() {
  50. }
  51. // ----- Print -----------------------------------------------------------
  52. void MpdEmcHit::Print(const Option_t* opt) const {
  53. cout << "MpdEmcHit: " << endl;
  54. cout << "\tSec: " << fSecId << " Row: " << fRowId << " Module:" << fModId << endl;
  55. cout << "\tDeposited energy: " << fE << "\tMean time: " << fTime <<
  56. " RhoCenter: " << fRhoCenter << " ZCenter: " << fZCenter << " PhiCenter: " << fPhiCenter <<
  57. " ThetaCenter: " << fThetaCenter << endl;
  58. cout << "\tNumber of tracks in module: " << fNumTracks << endl;
  59. if (fNumTracks == 1) cout << "PDG code: " << fPDG << " Track ID: " << fTrackID << endl;
  60. }
  61. // -------------------------------------------------------------------------
  62. ClassImp(MpdEmcHit)