BmnRoot 26.10.0-19-g6979a6c6
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
CbmStsPoint.h
Go to the documentation of this file.
1// -------------------------------------------------------------------------
2// ----- CbmStsPoint header file -----
3// ----- Created 26/07/04 by V. Friese -----
4// -------------------------------------------------------------------------
5
6/** CbmStsPoint.h
7 *@author V.Friese <v.friese@gsi.de>
8 *
9 * Interception of MC track with a STS detetcor. Holds in addition
10 * to the base class the coordinates and momentum at the exit from
11 * the active volume.
12 **/
13
14#ifndef CBMSTSPOINT_H
15#define CBMSTSPOINT_H
16
17#include "FairLogger.h"
18#include "FairMCPoint.h"
19
20class TVector3;
21
23{
24
25 public:
26 /** Default constructor **/
28
29 /** Constructor with arguments
30 *@param trackID Index of MCTrack
31 *@param detID Detector ID
32 *@param posIn Ccoordinates at entrance to active volume [cm]
33 *@param posOut Coordinates at exit of active volume [cm]
34 *@param momIn Momentum of track at entrance [GeV]
35 *@param momOut Momentum of track at exit [GeV]
36 *@param tof Time since event start [ns]
37 *@param length Track length since creation [cm]
38 *@param eLoss Energy deposit [GeV]
39 *@param eventId MC event identifier
40 **/
41 CbmStsPoint(Int_t trackID,
42 Int_t detID,
43 TVector3 posIn,
44 TVector3 posOut,
45 TVector3 momIn,
46 TVector3 momOut,
47 Double_t tof,
48 Double_t length,
49 Double_t eLoss,
50 Int_t eventId = 0);
51
52 /** Copy constructor with event and epoch time
53 ** Re-calculates time w.r.t. epoch time start
54 *@param eventId MC event identifier (negative values keep original event ID)
55 *@param eventTime MC event time [ns]
56 *@param epochTime epoch start time [ns]
57 **/
58 CbmStsPoint(const CbmStsPoint& point, Int_t eventId = -1, Double_t eventTime = 0., Double_t epochTime = 0.);
59
60 /** Destructor **/
61 virtual ~CbmStsPoint();
62
63 /** Accessors **/
64 Double_t GetXIn() const { return fX; }
65 Double_t GetYIn() const { return fY; }
66 Double_t GetZIn() const { return fZ; }
67 Double_t GetXOut() const { return fX_out; }
68 Double_t GetYOut() const { return fY_out; }
69 Double_t GetZOut() const { return fZ_out; }
70 Double_t GetPxOut() const { return fPx_out; }
71 Double_t GetPyOut() const { return fPy_out; }
72 Double_t GetPzOut() const { return fPz_out; }
73 void PositionIn(TVector3& pos) { pos.SetXYZ(fX, fY, fZ); }
76 Int_t GetStation() const { return fStation; }
77 Int_t GetModule() const { return fModule; }
78
79 /** Point coordinates at given z from linear extrapolation **/
80 Double_t GetX(Double_t z) const;
81 Double_t GetY(Double_t z) const;
82
83 /** Check for distance between in and out **/
84 Bool_t IsUsable() const;
85
86 /** Modifiers **/
87 void SetPositionOut(TVector3 pos);
88 void SetMomentumOut(TVector3 mom);
89 virtual void SetTrackID(Int_t id)
90 {
91 // SetLink(kMCTrack, id);
92 FairMCPoint::SetTrackID(id);
93 };
94 void SetStation(Int_t station) { fStation = station; }
95 void SetModule(Int_t module) { fModule = module; }
96
97 /** Output to screen **/
98 virtual void Print(const Option_t* opt = "") const {}
99 void Info() const;
100
101 protected:
106
108};
109
111{
112 fX_out = pos.X();
113 fY_out = pos.Y();
114 fZ_out = pos.Z();
115}
116
118{
119 fPx_out = mom.Px();
120 fPy_out = mom.Py();
121 fPz_out = mom.Pz();
122}
123
124#endif
bool Bool_t
int Int_t
double Double32_t
double Double_t
const char Option_t
#define ClassDef(name, id)
Double32_t fPy_out
void SetPositionOut(TVector3 pos)
Modifiers.
Double_t GetPzOut() const
Definition CbmStsPoint.h:72
void PositionOut(TVector3 &pos)
Definition CbmStsPoint.h:74
void SetStation(Int_t station)
Definition CbmStsPoint.h:94
Double32_t fPz_out
Bool_t IsUsable() const
Check for distance between in and out.
Double_t GetY(Double_t z) const
Double_t GetX(Double_t z) const
Point coordinates at given z from linear extrapolation.
Int_t GetModule() const
Definition CbmStsPoint.h:77
virtual ~CbmStsPoint()
Destructor.
Double32_t fX_out
Double_t GetXIn() const
Accessors.
Definition CbmStsPoint.h:64
Double_t GetPxOut() const
Definition CbmStsPoint.h:70
virtual void Print(const Option_t *opt="") const
Output to screen.
Definition CbmStsPoint.h:98
Int_t GetStation() const
Definition CbmStsPoint.h:76
void SetModule(Int_t module)
Definition CbmStsPoint.h:95
void MomentumOut(TVector3 &mom)
Definition CbmStsPoint.h:75
void PositionIn(TVector3 &pos)
Definition CbmStsPoint.h:73
Double32_t fZ_out
Double_t GetPyOut() const
Definition CbmStsPoint.h:71
Double_t GetZOut() const
Definition CbmStsPoint.h:69
Double32_t fY_out
Double32_t fPx_out
Double_t GetYOut() const
Definition CbmStsPoint.h:68
virtual void SetTrackID(Int_t id)
Definition CbmStsPoint.h:89
void SetMomentumOut(TVector3 mom)
Double_t GetZIn() const
Definition CbmStsPoint.h:66
Double_t GetYIn() const
Definition CbmStsPoint.h:65
Double_t GetXOut() const
Definition CbmStsPoint.h:67
void Info() const
CbmStsPoint()
Default constructor.
Double_t Z() const
void SetXYZ(Double_t x, Double_t y, Double_t z)
Double_t Px() const
Double_t Y() const
Double_t Py() const
Double_t X() const
Double_t Pz() const