MpdFfdPoint.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. //------------------------------------------------------------------------------------------------------------------------
  2. /// \class MpdFfdPoint
  3. ///
  4. /// \brief
  5. /// \author Sergei Lobastov (LHE, JINR, Dubna)
  6. //------------------------------------------------------------------------------------------------------------------------
  7. #ifndef __HH_MPDFFDPOINT_H
  8. #define __HH_MPDFFDPOINT_H 1
  9. #include <TVector3.h>
  10. #include <TLorentzVector.h>
  11. #include "FairMCPoint.h"
  12. //------------------------------------------------------------------------------------------------------------------------
  13. class MpdFfdPoint : public FairMCPoint
  14. {
  15. public:
  16. enum FFDPointMode { kCherenkovPhoton = 0, kPhotoElectron};
  17. typedef std::vector< std::pair<double, double> > TOpContainer;
  18. static FFDPointMode fCurrentMode;
  19. /**
  20. *@param tid Index of MCTrack
  21. *@param duid Detector ID
  22. *@param pos Coordinates at entrance to active volume [cm]
  23. *@param mom Momentum of track at entrance [GeV]
  24. *@param tof Time since event start [ns]
  25. *@param length Track length since creation [cm]
  26. *@param eLoss Energy deposit [GeV]
  27. **/
  28. MpdFfdPoint(Int_t tid, Int_t duid);
  29. MpdFfdPoint();
  30. virtual ~MpdFfdPoint();
  31. virtual void Print(const Option_t* opt) const;
  32. bool AddOp(double energy, double time) { fData.push_back(std::make_pair(energy,time)); return isClosed;};
  33. void SaveParentTrackParams(const TVector3& posIn, const TVector3& posOut, const TLorentzVector& P, Double_t time, Double_t length);
  34. bool IsSame(Int_t tid, Int_t duid) const {return (GetTrackID() == tid && GetDetectorID() == duid);}
  35. bool IsClosed() const {return isClosed;}
  36. void GetPosition(TVector3& enter, TVector3& exit) { enter = TVector3(fX, fY, fZ); exit = fPositionOut;}
  37. double GetBeta() const {return fBeta;}
  38. size_t GetEntries() const {return fData.size();}
  39. const TOpContainer& GetData() const {return fData;}
  40. FFDPointMode GetMode() const {return fMode;}
  41. private:
  42. FFDPointMode fMode = kPhotoElectron;
  43. TOpContainer fData = {}; // pair<energy, time> [eV, ns] parameters for cherenkov photon or photo electron(dependent from fMode flag)
  44. TVector3 fPositionOut = {}; // [cm]
  45. Double_t fBeta = 0.;
  46. bool isClosed = false;
  47. ClassDef(MpdFfdPoint,2)
  48. };
  49. //------------------------------------------------------------------------------------------------------------------------
  50. #endif