BmnRoot
26.10.0-19-g6979a6c6
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
CbmMCTrack.h
Go to the documentation of this file.
1
// -------------------------------------------------------------------------
2
// ----- CbmMCTrack header file -----
3
// ----- should be replaced by BmnMCTrack -----
4
// -------------------------------------------------------------------------
5
6
/** CbmMCTrack.h
7
*@author V.Friese <v.friese@gsi.de>
8
**
9
** Data class for storing Monte Carlo tracks processed by the CbmStack.
10
** A MCTrack can be a primary track put into the simulation or a
11
** secondary one produced by the transport through decay or interaction.
12
**
13
**/
14
15
#ifndef CBMMCTRACK_H
16
#define CBMMCTRACK_H 1
17
18
#include "
BmnDetectorList.h
"
19
#include "
TLorentzVector.h
"
20
#include "
TMath.h
"
21
#include "
TObject.h
"
22
#include "
TParticle.h
"
23
#include "
TVector3.h
"
24
25
class
CbmMCTrack
:
public
TObject
26
{
27
public
:
28
/** Default constructor **/
29
CbmMCTrack
();
30
31
/** Standard constructor **/
32
CbmMCTrack
(
Int_t
pdgCode,
33
Int_t
motherID,
34
Double_t
px,
35
Double_t
py,
36
Double_t
pz,
37
Double_t
x,
38
Double_t
y,
39
Double_t
z,
40
Double_t
t,
41
Long64_t
nPoints);
42
43
/** Copy constructor **/
44
CbmMCTrack
(
const
CbmMCTrack
& track);
45
46
/** Constructor from TParticle **/
47
CbmMCTrack
(
TParticle
* particle);
48
49
/** Destructor **/
50
virtual
~CbmMCTrack
();
51
52
/** Output to screen **/
53
void
Print
(
Int_t
iTrack = 0)
const
;
54
55
/** Accessors **/
56
Int_t
GetPdgCode
()
const
{
return
fPdgCode
; }
57
Int_t
GetMotherId
()
const
{
return
fMotherId
; }
58
Double_t
GetPx
()
const
{
return
fPx
; }
59
Double_t
GetPy
()
const
{
return
fPy
; }
60
Double_t
GetPz
()
const
{
return
fPz
; }
61
Double_t
GetStartX
()
const
{
return
fStartX
; }
62
Double_t
GetStartY
()
const
{
return
fStartY
; }
63
Double_t
GetStartZ
()
const
{
return
fStartZ
; }
64
Double_t
GetStartT
()
const
{
return
fStartT
; }
65
Double_t
GetMass
()
const
;
66
Double_t
GetEnergy
()
const
;
67
Double_t
GetPt
()
const
{
return
TMath::Sqrt
(
fPx
*
fPx
+
fPy
*
fPy
); }
68
Double_t
GetP
()
const
{
return
TMath::Sqrt
(
fPx
*
fPx
+
fPy
*
fPy
+
fPz
*
fPz
); }
69
Double_t
GetRapidity
()
const
;
70
void
GetMomentum
(
TVector3
& momentum)
const
;
71
void
Get4Momentum
(
TLorentzVector
& momentum)
const
;
72
void
GetStartVertex
(
TVector3
& vertex)
const
;
73
74
/** Accessors to the number of MCPoints in the detectors **/
75
Long64_t
GetNPoints
(
DetectorId
detId)
const
;
76
/**AZ-310822 Get polarization **/
77
Double_t
GetPolar
(
Int_t
indx) {
return
fPolar
[indx]; }
78
79
/** Modifiers **/
80
void
SetMotherId
(
Int_t
id
) {
fMotherId
= id; }
81
void
SetNPoints
(
Int_t
iDet,
Long64_t
np);
82
void
SetPolar
(
Int_t
indx,
Double_t
polar) {
fPolar
[indx] = polar; }
// AZ-310822
83
84
private
:
85
/** PDG particle code **/
86
Int_t
fPdgCode
;
87
88
/** Index of mother track. -1 for primary particles. **/
89
Int_t
fMotherId
;
90
91
/** Momentum components at start vertex [GeV] **/
92
Double32_t
fPx
,
fPy
,
fPz
;
93
94
/** Coordinates of start vertex [cm, ns] **/
95
Double32_t
fStartX
,
fStartY
,
fStartZ
,
fStartT
;
96
97
/** Bitvector representing the number of MCPoints for this track in each subdetector.
98
** The detectors are represented by
99
** REF: Bit 0 (1 bit, max. value 1)
100
** BD: Bit 1 (1 bit, max. value 1)
101
** GEM: Bit 2 - 4 (3 bits, max. value 7) /7
102
** TOF1: Bit 5 - 6 (2 bit, max. value 3) /1 (3)
103
** DCH: Bit 7 - 11 (5 bits, max. value 31) /16
104
** TOF: Bit 12 - 13 (2 bit, max. value 3) /1 (3)
105
** ZDC: Bit 14 - 20 (7 bit, max. value 127) /64
106
** VSP: Bit 21 - 23 (3 bit, max. value 7) /4
107
** MWPC: Bit 24 - 28 (5 bit, max. value 31) /24
108
** ECAL: Bit 29 - 35 (7 bits, max. value 127) /110
109
** CSC: Bit 36 - 38 (3 bit, max. value 7) /6
110
** SILICON: Bit 39 - 41 (3 bit, max. value 7) /4
111
** LAND: Bit 42 - 47 (6 bit, max. value 63) /60
112
** FD: Bit 48 (1 bit, max. value 1)
113
** ARMTRIG: Bit 49 - 50 (2 bit, max. value 3) /2
114
** BC: Bit 51 (1 bit, max. value 1)
115
** SCWALL: Bit 52 (1 bit, max. value 1)
116
** HODO: Bit 53 (1 bit, max. value 1)
117
** SiMD: Bit 54 (1 bit, max. value 1)
118
** SiBT: Bit 55 - 56 (2 bit, max. value 3)
119
** FHCAL: Bit 57 (1 bit, max. value 1)
120
** NDET: Bit 58 (1 bit, max. value 1)
121
** SiProf Bit 59 - 60 (2 bit, max. value 3)
122
** VACWALL: Bit 61 (1 bit, max. value 1)
123
** The respective point numbers can be accessed and modified with the inline functions.
124
**/
125
Long64_t
fNPoints
;
126
Double32_t
fPolar
[3];
// AZ-310822 - polarization
127
128
// AZ-310822 ClassDef(CbmMCTrack,2);
129
ClassDef
(
CbmMCTrack
, 3);
// AZ-310822
130
};
131
132
// ========== Inline functions ========================================
133
inline
Double_t
CbmMCTrack::GetEnergy
()
const
134
{
135
Double_t
mass =
GetMass
();
136
return
TMath::Sqrt
(mass * mass +
fPx
*
fPx
+
fPy
*
fPy
+
fPz
*
fPz
);
137
}
138
139
inline
void
CbmMCTrack::GetMomentum
(
TVector3
& momentum)
const
140
{
141
momentum.
SetXYZ
(
fPx
,
fPy
,
fPz
);
142
}
143
144
inline
void
CbmMCTrack::Get4Momentum
(
TLorentzVector
& momentum)
const
145
{
146
momentum.
SetXYZT
(
fPx
,
fPy
,
fPz
,
GetEnergy
());
147
}
148
149
inline
void
CbmMCTrack::GetStartVertex
(
TVector3
& vertex)
const
150
{
151
vertex.
SetXYZ
(
fStartX
,
fStartY
,
fStartZ
);
152
}
153
154
#endif
BmnDetectorList.h
Defines unique identifiers (enum) for all BM@N detector systems.
DetectorId
DetectorId
BM@N DetectorID enumerator.
Definition
BmnDetectorList.h:12
Int_t
int Int_t
Double32_t
double Double32_t
Double_t
double Double_t
Long64_t
long long Long64_t
ClassDef
#define ClassDef(name, id)
TLorentzVector.h
TMath.h
TObject.h
TParticle.h
TVector3.h
CbmMCTrack::CbmMCTrack
CbmMCTrack()
Default constructor.
Definition
CbmMCTrack.cxx:17
CbmMCTrack::GetMass
Double_t GetMass() const
Definition
CbmMCTrack.cxx:127
CbmMCTrack::fPolar
Double32_t fPolar[3]
Definition
CbmMCTrack.h:126
CbmMCTrack::GetPy
Double_t GetPy() const
Definition
CbmMCTrack.h:59
CbmMCTrack::GetEnergy
Double_t GetEnergy() const
Definition
CbmMCTrack.h:133
CbmMCTrack::fNPoints
Long64_t fNPoints
Bitvector representing the number of MCPoints for this track in each subdetector.
Definition
CbmMCTrack.h:125
CbmMCTrack::GetNPoints
Long64_t GetNPoints(DetectorId detId) const
Accessors to the number of MCPoints in the detectors.
Definition
CbmMCTrack.cxx:151
CbmMCTrack::fPx
Double32_t fPx
Momentum components at start vertex [GeV].
Definition
CbmMCTrack.h:92
CbmMCTrack::fPy
Double32_t fPy
Definition
CbmMCTrack.h:92
CbmMCTrack::GetPt
Double_t GetPt() const
Definition
CbmMCTrack.h:67
CbmMCTrack::fStartZ
Double32_t fStartZ
Definition
CbmMCTrack.h:95
CbmMCTrack::fStartT
Double32_t fStartT
Definition
CbmMCTrack.h:95
CbmMCTrack::GetPz
Double_t GetPz() const
Definition
CbmMCTrack.h:60
CbmMCTrack::GetPx
Double_t GetPx() const
Definition
CbmMCTrack.h:58
CbmMCTrack::GetRapidity
Double_t GetRapidity() const
Definition
CbmMCTrack.cxx:141
CbmMCTrack::GetStartZ
Double_t GetStartZ() const
Definition
CbmMCTrack.h:63
CbmMCTrack::fMotherId
Int_t fMotherId
Index of mother track.
Definition
CbmMCTrack.h:89
CbmMCTrack::GetStartY
Double_t GetStartY() const
Definition
CbmMCTrack.h:62
CbmMCTrack::~CbmMCTrack
virtual ~CbmMCTrack()
Destructor.
Definition
CbmMCTrack.cxx:108
CbmMCTrack::GetMomentum
void GetMomentum(TVector3 &momentum) const
Definition
CbmMCTrack.h:139
CbmMCTrack::GetMotherId
Int_t GetMotherId() const
Definition
CbmMCTrack.h:57
CbmMCTrack::fStartY
Double32_t fStartY
Definition
CbmMCTrack.h:95
CbmMCTrack::fPdgCode
Int_t fPdgCode
PDG particle code.
Definition
CbmMCTrack.h:86
CbmMCTrack::SetNPoints
void SetNPoints(Int_t iDet, Long64_t np)
Definition
CbmMCTrack.cxx:210
CbmMCTrack::GetP
Double_t GetP() const
Definition
CbmMCTrack.h:68
CbmMCTrack::SetMotherId
void SetMotherId(Int_t id)
Modifiers.
Definition
CbmMCTrack.h:80
CbmMCTrack::SetPolar
void SetPolar(Int_t indx, Double_t polar)
Definition
CbmMCTrack.h:82
CbmMCTrack::GetPolar
Double_t GetPolar(Int_t indx)
AZ-310822 Get polarization.
Definition
CbmMCTrack.h:77
CbmMCTrack::fPz
Double32_t fPz
Definition
CbmMCTrack.h:92
CbmMCTrack::GetStartX
Double_t GetStartX() const
Definition
CbmMCTrack.h:61
CbmMCTrack::GetStartT
Double_t GetStartT() const
Definition
CbmMCTrack.h:64
CbmMCTrack::Get4Momentum
void Get4Momentum(TLorentzVector &momentum) const
Definition
CbmMCTrack.h:144
CbmMCTrack::fStartX
Double32_t fStartX
Coordinates of start vertex [cm, ns].
Definition
CbmMCTrack.h:95
CbmMCTrack::GetStartVertex
void GetStartVertex(TVector3 &vertex) const
Definition
CbmMCTrack.h:149
CbmMCTrack::Print
void Print(Int_t iTrack=0) const
Output to screen.
Definition
CbmMCTrack.cxx:111
CbmMCTrack::GetPdgCode
Int_t GetPdgCode() const
Accessors.
Definition
CbmMCTrack.h:56
TLorentzVector
TLorentzVector::SetXYZT
void SetXYZT(Double_t x, Double_t y, Double_t z, Double_t t)
TObject::TObject
TObject()
TParticle
TVector3
TVector3::SetXYZ
void SetXYZ(Double_t x, Double_t y, Double_t z)
TMath::Sqrt
Double_t Sqrt(Double_t x)
base
data
CbmMCTrack.h
Generated on
for BmnRoot by
1.17.0