// ------------------------------------------------------------------------- // ----- CbmStsPoint header file ----- // ----- Created 26/07/04 by V. Friese ----- // ------------------------------------------------------------------------- /** CbmStsPoint.h *@author V.Friese * * Interception of MC track with a STS detetcor. Holds in addition * to the base class the coordinates and momentum at the exit from * the active volume. **/ #ifndef MVDPOINT_H #define MVDPOINT_H #include "TObject.h" #include "TVector3.h" #include "CbmMCPoint.h" #include "TString.h" using namespace std; class MvdPoint : public CbmMCPoint { public: /** Default constructor **/ MvdPoint(); /** Constructor with arguments *@param trackID Index of MCTrack *@param detID Detector ID *@param detName Full name of the detector *@param posIn Coordinates of ingoing point[cm] *@param posOut Coordinates of outgoing point[cm] *@param momIn Momentum of track at entrance [GeV] *@param momOut Momentum of track at exit [GeV] *@param tof Time since event start [ns] *@param length Track length since creation [cm] *@param eLoss Energy deposit [GeV] **/ MvdPoint(Int_t trackID, Int_t detID, TString detName, TVector3 posIn, TVector3 posOut, TVector3 momIn, TVector3 momOut, Double_t tof, Double_t length, Double_t eLoss); /** Copy constructor **/ MvdPoint(const MvdPoint& point) { *this = point; }; /** Destructor **/ virtual ~MvdPoint(); /** Accessors **/ Double_t GetXOut() const { return fX_out;}; Double_t GetYOut() const { return fY_out;}; Double_t GetZOut() const { return fZ_out;}; Double_t GetPxOut() const { return fPx_out; } Double_t GetPyOut() const { return fPy_out; } Double_t GetPzOut() const { return fPz_out; } TString GetDetName() const { return fDetName;} void PositionOut(TVector3& pos) { pos.SetXYZ(fX_out, fY_out, fZ_out);}; void MomentumOut(TVector3& mom) { mom.SetXYZ(fPx_out,fPy_out,fPz_out); } /** Modifiers **/ void SetPositionOut(TVector3 pos); void SetMomentumOut(TVector3 mom); /** Output to screen **/ virtual void Print(const Option_t* opt) const; protected: Double32_t fX_out, fY_out, fZ_out; Double32_t fPx_out, fPy_out, fPz_out; TString fDetName; ClassDef(MvdPoint,2) }; inline void MvdPoint::SetPositionOut(TVector3 pos) { fX_out = pos.X(); fY_out = pos.Y(); fZ_out = pos.Z(); } inline void MvdPoint::SetMomentumOut(TVector3 mom) { fPx_out = mom.Px(); fPy_out = mom.Py(); fPz_out = mom.Pz(); } #endif