#ifndef DCHPOINT_H #define DCHPOINT_H #include "TObject.h" #include "TVector3.h" #include "CbmMCPoint.h" using namespace std; class DchPoint : public CbmMCPoint { public: /** Default constructor **/ DchPoint(); /** Constructor with arguments *@param trackID Index of MCTrack *@param detID Detector ID *@param posIn Ccoordinates at entrance to active volume [cm] *@param posOut Coordinates at exit of active volume [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] **/ DchPoint(Int_t trackID, Int_t detID, Int_t moduleID, TVector3 posIn, TVector3 posOut, TVector3 momIn, TVector3 momOut, Double_t tof, Double_t length, Double_t eLoss); /** Copy constructor **/ DchPoint(const DchPoint& point) { *this = point; }; /** Destructor **/ virtual ~DchPoint(); /** 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; } Double_t GetXIn() const { return fX_in; } Double_t GetYIn() const { return fY_in; } Double_t GetZIn() const { return fZ_in; } Double_t GetPxIn() const { return fPx_in; } Double_t GetPyIn() const { return fPy_in; } Double_t GetPzIn() const { return fPz_in; } Int_t GetTrackID() const { return ftrackID; } Int_t GetEventID() const { return feventID; } Int_t GetCopyNo() const { return fCopyNo; } Int_t GetModuleNo() const { return fModuleNo; } 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); void SetPositionIn(TVector3 posin); void SetMomentumIn(TVector3 momin); /** Output to screen **/ virtual void Print(const Option_t* opt) const; protected: Double32_t fX_in, fY_in, fZ_in; // in position Double32_t fPx_in, fPy_in, fPz_in; // in momentum Double32_t fX_out, fY_out, fZ_out; // out position Double32_t fPx_out, fPy_out, fPz_out; // out momentum Int_t fCopyNo; // copy number = plane number Int_t fModuleNo; // module number = dch number Int_t ftrackID; Int_t feventID; ClassDef(DchPoint,1) }; inline void DchPoint::SetPositionOut(TVector3 pos) { fX_out = pos.X(); fY_out = pos.Y(); fZ_out = pos.Z(); } inline void DchPoint::SetMomentumOut(TVector3 mom) { fPx_out = mom.Px(); fPy_out = mom.Py(); fPz_out = mom.Pz(); } inline void DchPoint::SetPositionIn(TVector3 posin) { fX_in = posin.X(); fY_in = posin.Y(); fZ_in = posin.Z(); } inline void DchPoint::SetMomentumIn(TVector3 momin) { fPx_in = momin.Px(); fPy_in = momin.Py(); fPz_in = momin.Pz(); } #endif