BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnFD.h
Go to the documentation of this file.
1
2
#ifndef BMNFD_H
3
#define BMNFD_H
4
5
#include "
BmnFDGeoPar.h
"
6
#include "FairDetector.h"
7
#include "
TClonesArray.h
"
8
#include "
TLorentzVector.h
"
9
#include "
TParticle.h
"
10
#include "
TVector3.h
"
11
#include "TVirtualMC.h"
12
13
using namespace
std
;
14
15
class
TClonesArray
;
16
class
BmnFDPoint
;
17
class
FairVolume;
18
19
class
BmnFD
:
public
FairDetector
20
{
21
22
public
:
23
/** Default constructor **/
24
BmnFD
();
25
26
/** Standard constructor.
27
*@param name detetcor name
28
*@param active sensitivity flag
29
**/
30
BmnFD
(
const
char
* name,
Bool_t
active);
31
32
/** Destructor **/
33
virtual
~BmnFD
();
34
35
/** Virtual method Initialize
36
** Initialises detector. Stores volume IDs for MUO detector and mirror.
37
**/
38
virtual
void
Initialize
();
39
40
/** Virtual method ProcessHits
41
**
42
** Defines the action to be taken when a step is inside the
43
** active volume. Creates BmnFDPoints adds
44
** them to the collections.
45
*@param vol Pointer to the active volume
46
**/
47
virtual
Bool_t
ProcessHits
(FairVolume* vol = 0);
48
49
/** Virtual method EndOfEvent
50
**
51
** If verbosity level is set, print hit collection at the
52
** end of the event and resets it afterwards.
53
**/
54
virtual
void
EndOfEvent
();
55
56
virtual
void
BeginEvent
();
57
/** Virtual method Register
58
**
59
** Registers the hit collection in the ROOT manager.
60
**/
61
virtual
void
Register
();
62
63
/** Accessor to the hit collection **/
64
virtual
TClonesArray
*
GetCollection
(
Int_t
iColl)
const
;
65
66
/** Virtual method Print
67
**
68
** Screen output of hit collection.
69
**/
70
virtual
void
Print
(
Option_t
*)
const
;
71
72
/** Virtual method Reset
73
**
74
** Clears the hit collection
75
**/
76
virtual
void
Reset
();
77
78
/** Virtual method CopyClones
79
**
80
** Copies the hit collection with a given track index offset
81
*@param cl1 Origin
82
*@param cl2 Target
83
*@param offset Index offset
84
**/
85
virtual
void
CopyClones
(
TClonesArray
* cl1,
TClonesArray
* cl2,
Int_t
offset);
86
87
/** Virtual method Construct geometry
88
**
89
**/
90
virtual
void
ConstructGeometry
();
91
92
virtual
void
ConstructAsciiGeometry
();
93
virtual
Bool_t
CheckIfSensitive
(std::string name);
94
95
BmnFDPoint
*
AddHit
(
Int_t
trackID,
96
Int_t
detID,
97
Int_t
copyNo,
98
TVector3
posIn,
99
TVector3
posOut,
100
TVector3
momIn,
101
TVector3
momOut,
102
Double_t
tof,
103
Double_t
length,
104
Double_t
eLoss,
105
Bool_t
isPrimary,
106
Double_t
charge,
107
Int_t
pdgId,
108
Double_t
lightYield,
109
Double_t
timeIn,
110
Double_t
timeOut,
111
Double_t
lengthtrack);
112
113
private
:
114
Int_t
fTrackID
;
//! track index
115
Int_t
fVolumeID
;
//! volume id
116
// Int_t fEventID; //! event id
117
TVector3
fPosIn
;
//! position (in)
118
TVector3
fPosOut
;
//! position (out)
119
TVector3
fMomIn
;
//! momentum (in)
120
TVector3
fMomOut
;
121
Double32_t
fTime
;
//! time
122
Double32_t
fLength
;
//! length
123
Double32_t
fELoss
;
//! energy loss
124
Int_t
fPosIndex
;
//!
125
Int_t
volDetector
;
//! MC volume ID of MUO
126
Int_t
fIsPrimary
;
//! is track primary?
127
Double_t
fCharge
;
//! track charge
128
Int_t
fPdgId
;
//! pdg id of particle
129
Float_t
fLightYield
;
130
TClonesArray
*
fFDCollection
;
//! Hit collection
131
Double32_t
fTimeIn
;
//! time
132
Double32_t
fTimeOut
;
//! time
133
Double32_t
fLengthtrack
;
//! length
134
135
// reset all parameters
136
void
ResetParameters
();
137
138
ClassDef
(
BmnFD
, 2)
139
};
140
141
//------------------------------------------------------------------------------------------------------------------------
142
inline
void
BmnFD::ResetParameters
()
143
{
144
fTrackID
=
fVolumeID
= 0;
145
fPosIn
.
SetXYZ
(0.0, 0.0, 0.0);
146
fPosOut
.
SetXYZ
(0.0, 0.0, 0.0);
147
fMomIn
.
SetXYZ
(0.0, 0.0, 0.0);
148
fMomOut
.
SetXYZ
(0.0, 0.0, 0.0);
149
fTime
=
fLength
=
fELoss
= 0;
150
fTimeIn
=
fTimeOut
= 0;
151
fLengthtrack
= 0;
152
fPosIndex
= 0;
153
fLightYield
= 0;
154
};
155
//------------------------------------------------------------------------------------------------------------------------
156
157
#endif
Bool_t
bool Bool_t
Int_t
int Int_t
Double32_t
double Double32_t
Float_t
float Float_t
Double_t
double Double_t
Option_t
const char Option_t
ClassDef
#define ClassDef(name, id)
TClonesArray.h
TLorentzVector.h
TParticle.h
TVector3.h
BmnFDPoint
Definition
BmnFDPoint.h:16
BmnFD
Definition
BmnFD.h:20
BmnFD::BmnFD
BmnFD()
Default constructor.
BmnFD::Register
virtual void Register()
Virtual method Register.
BmnFD::fELoss
Double32_t fELoss
length
Definition
BmnFD.h:123
BmnFD::fLength
Double32_t fLength
time
Definition
BmnFD.h:122
BmnFD::fMomOut
TVector3 fMomOut
momentum (in)
Definition
BmnFD.h:120
BmnFD::CopyClones
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
Virtual method CopyClones.
BmnFD::Print
virtual void Print(Option_t *) const
Virtual method Print.
BmnFD::CheckIfSensitive
virtual Bool_t CheckIfSensitive(std::string name)
BmnFD::EndOfEvent
virtual void EndOfEvent()
Virtual method EndOfEvent.
BmnFD::fLightYield
Float_t fLightYield
pdg id of particle
Definition
BmnFD.h:129
BmnFD::fPosIndex
Int_t fPosIndex
energy loss
Definition
BmnFD.h:124
BmnFD::Initialize
virtual void Initialize()
Virtual method Initialize Initialises detector.
BmnFD::fLengthtrack
Double32_t fLengthtrack
time
Definition
BmnFD.h:133
BmnFD::ProcessHits
virtual Bool_t ProcessHits(FairVolume *vol=0)
Virtual method ProcessHits.
BmnFD::fTime
Double32_t fTime
Definition
BmnFD.h:121
BmnFD::volDetector
Int_t volDetector
Definition
BmnFD.h:125
BmnFD::fFDCollection
TClonesArray * fFDCollection
Definition
BmnFD.h:130
BmnFD::fVolumeID
Int_t fVolumeID
track index
Definition
BmnFD.h:115
BmnFD::fTrackID
Int_t fTrackID
Definition
BmnFD.h:114
BmnFD::ConstructGeometry
virtual void ConstructGeometry()
Virtual method Construct geometry.
BmnFD::fMomIn
TVector3 fMomIn
position (out)
Definition
BmnFD.h:119
BmnFD::fCharge
Double_t fCharge
is track primary?
Definition
BmnFD.h:127
BmnFD::BmnFD
BmnFD(const char *name, Bool_t active)
Standard constructor.
BmnFD::ConstructAsciiGeometry
virtual void ConstructAsciiGeometry()
BmnFD::fPosOut
TVector3 fPosOut
position (in)
Definition
BmnFD.h:118
BmnFD::fIsPrimary
Int_t fIsPrimary
MC volume ID of MUO.
Definition
BmnFD.h:126
BmnFD::fPdgId
Int_t fPdgId
track charge
Definition
BmnFD.h:128
BmnFD::Reset
virtual void Reset()
Virtual method Reset.
BmnFD::~BmnFD
virtual ~BmnFD()
Destructor.
BmnFD::fPosIn
TVector3 fPosIn
volume id
Definition
BmnFD.h:117
BmnFD::fTimeIn
Double32_t fTimeIn
Hit collection.
Definition
BmnFD.h:131
BmnFD::fTimeOut
Double32_t fTimeOut
time
Definition
BmnFD.h:132
BmnFD::BeginEvent
virtual void BeginEvent()
BmnFD::ResetParameters
void ResetParameters()
length
BmnFD::AddHit
BmnFDPoint * AddHit(Int_t trackID, Int_t detID, Int_t copyNo, TVector3 posIn, TVector3 posOut, TVector3 momIn, TVector3 momOut, Double_t tof, Double_t length, Double_t eLoss, Bool_t isPrimary, Double_t charge, Int_t pdgId, Double_t lightYield, Double_t timeIn, Double_t timeOut, Double_t lengthtrack)
BmnFD::GetCollection
virtual TClonesArray * GetCollection(Int_t iColl) const
Accessor to the hit collection.
FairDetector
TClonesArray
TVector3
TVector3::SetXYZ
void SetXYZ(Double_t x, Double_t y, Double_t z)
BmnFDGeoPar.h
std
Definition
json.hpp:4446
install
include
BmnFD.h
Generated on
for BmnRoot by
1.17.0