/** FairMCPoint.h * This is the base class for all MC Points generated by the transport of * tracks through active detectors. **/ #ifndef FAIRMCPOINT_H #define FAIRMCPOINT_H #include "FairBasePoint.h" #include "TVector3.h" class FairMCPoint : public FairBasePoint { public: /** Default constructor **/ FairMCPoint(); /** Constructor with arguments *@param trackID Index of MCTrack *@param detID Detector ID *@param pos Point coordinates [cm] *@param mom Momentum of track at MCPoint [GeV] *@param tof Time since event start [ns] *@param length Track length since creation [cm] *@param eLoss Energy deposit [GeV] *@param EventId MC event id **/ FairMCPoint(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t tof, Double_t length, Double_t eLoss, UInt_t EventId=0); /** Destructor **/ virtual ~FairMCPoint(); /** Accessors */ UInt_t GetEventID() const { return fEventId; } /// event identifier Int_t GetTrackID() const { return fTrackID; } Double_t GetPx() const { return fPx; } Double_t GetPy() const { return fPy; } Double_t GetPz() const { return fPz; } Double_t GetTime() const { return fTime; } Double_t GetLength() const { return fLength; } Double_t GetEnergyLoss() const { return fELoss; } void Momentum(TVector3& mom) { mom.SetXYZ(fPx, fPy, fPz); } /** Modifiers **/ void SetEventID(UInt_t eventId) { fEventId = eventId; } virtual void SetTrackID(Int_t id) { fTrackID = id;} void SetTime(Double_t time) { fTime = time; } void SetLength(Double_t length) { fLength = length; } void SetEnergyLoss(Double_t eLoss) { fELoss = eLoss; } void SetMomentum(const TVector3& mom); /** Output to screen **/ virtual void Print(const Option_t* opt = 0) const = 0; protected: Int_t fTrackID; /// Track index UInt_t fEventId; /// MC Event id Double32_t fPx, fPy, fPz; /// Momentum components [GeV] Double32_t fTime; /// Time since event start [ns] Double32_t fLength; /// Track length since creation [cm] Double32_t fELoss; /// Energy loss at this point [GeV] ClassDef(FairMCPoint,3) }; inline void FairMCPoint::SetMomentum(const TVector3& mom) { fPx = mom.Px(); fPy = mom.Py(); fPz = mom.Pz(); } #endif