MpdEmcPointKI.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #ifndef MPDEMCDETPOINTKI_H
  2. #define MPDEMCDETPOINTKI_H 1
  3. #include "FairMCPoint.h"
  4. #include "TObject.h"
  5. #include "TVector3.h"
  6. using namespace std;
  7. class MpdEmcPointKI : public FairMCPoint
  8. {
  9. public:
  10. /** Default constructor **/
  11. /** Constructor with arguments
  12. *@param trackID Index of MCTrack
  13. *@param detID Detector ID
  14. *@param pos Ccoordinates at entrance to active volume [cm]
  15. *@param mom Momentum of track at entrance [GeV]
  16. *@param tof Time since event start [ns]
  17. *@param length Track length since creation [cm]
  18. *@param ELoss Energy deposit [GeV]
  19. **/
  20. MpdEmcPointKI(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t tof, Double_t length, Double_t ELoss);
  21. /** Copy constructor **/
  22. MpdEmcPointKI(const MpdEmcPointKI& point) { *this = point; };
  23. /** Destructor **/
  24. MpdEmcPointKI();
  25. virtual ~MpdEmcPointKI();
  26. /// \brief Check whether the points are from the same SuperParent and in the same detector volume
  27. /// \return True if points are the same (origin and detector), false otherwise
  28. Bool_t operator==(const MpdEmcPointKI& rhs) const;
  29. /// \brief Copy rhs to this MpdEmcPointKI
  30. Bool_t operator=(const MpdEmcPointKI& rhs) const;
  31. /// \brief Sorting points according to parent particle and detector volume
  32. /// \return True if this MpdEmcPointKI is smaller, false otherwise
  33. Bool_t operator<(const MpdEmcPointKI& rhs) const;
  34. /// \brief Adds energy loss from the other MpdEmcPointKI to this MpdEmcPointKI
  35. /// \param rhs phos::MpdEmcPointKI to add to this MpdEmcPointKI
  36. /// \return This MpdEmcPointKI with the summed energy loss
  37. MpdEmcPointKI& operator+=(const MpdEmcPointKI& rhs);
  38. /// \brief Creates a new MpdEmcPointKI based on this MpdEmcPointKI but adding the energy loss of the right hand side
  39. /// \param
  40. /// \return New MpdEmcPointKI based on this MpdEmcPointKI
  41. MpdEmcPointKI operator+(const MpdEmcPointKI& rhs) const;
  42. /// \brief To allow sorting
  43. Bool_t IsSortable() const { return kTRUE; }
  44. /// \brief Mathod ised for sorting Hits
  45. // \param Another ModEmcPoint
  46. // \return
  47. Int_t Compare(const TObject* obj) const;
  48. void AddEnergyLoss(Float_t eloss) { fELoss += eloss; }
  49. /** Output to screen **/
  50. virtual void Print(const Option_t* opt) const;
  51. ClassDef(MpdEmcPointKI, 1)
  52. };
  53. #endif