// ------------------------------------------------------------------------- // ----- FairMCPoint header file ----- // ----- Created 26/07/04 by V. Friese ----- // ------------------------------------------------------------------------- /** FairMCPoint.h *@author V.Friese * * This is the base class for all MC Points generated by the transport of * tracks through active detectors. All variables are stored at the * entrance of the track in the active volume. **/ #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] **/ FairMCPoint(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t tof, Double_t length, Double_t eLoss); /** Destructor **/ virtual ~FairMCPoint(); /** Accessors **/ 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 **/ 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 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,2) }; inline void FairMCPoint::SetMomentum(const TVector3& mom) { fPx = mom.Px(); fPy = mom.Py(); fPz = mom.Pz(); } #endif