BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnSiBT.h
Go to the documentation of this file.
1
#ifndef BMNSiBT_H
2
#define BMNSiBT_H
3
4
#include "
BmnSiBTPoint.h
"
5
#include "FairDetector.h"
6
#include "
TClonesArray.h
"
7
#include "
TGeoMedium.h
"
8
#include "
TVector3.h
"
9
10
#include <map>
11
12
class
BmnSiBT
:
public
FairDetector
13
{
14
public
:
15
// *@param name detector name
16
// *@param active sensitivity flag
17
BmnSiBT
(
const
char
* name,
Bool_t
active);
18
19
BmnSiBT
();
20
virtual
~BmnSiBT
();
21
22
// Defines the action to be taken when a step is inside the
23
// active volume. Creates BmnSiBTPoints and adds them to the collection.
24
// @param vol Pointer to the active volume
25
virtual
Bool_t
ProcessHits
(FairVolume* vol = 0);
26
27
// If verbosity level is set, print hit collection at the
28
// end of the event and resets it afterwards.
29
virtual
void
EndOfEvent
();
30
31
// Registers the hit collection in the ROOT manager.
32
virtual
void
Register
();
33
34
// Accessor to the hit collection
35
virtual
TClonesArray
*
GetCollection
(
Int_t
iColl)
const
;
36
37
// Screen output of hit collection.
38
virtual
void
Print
(
Option_t
*)
const
;
39
40
// Clears the hit collection
41
virtual
void
Reset
();
42
43
// *@param cl1 Origin
44
// *@param cl2 Target
45
// *@param offset Index offset
46
virtual
void
CopyClones
(
TClonesArray
* cl1,
TClonesArray
* cl2,
Int_t
offset);
47
48
// Constructs the SiBT geometry
49
virtual
void
ConstructGeometry
();
50
51
// Construct the geometry from a GDML geometry file
52
virtual
void
ConstructGDMLGeometry
(
TGeoMatrix
*);
53
54
void
ExpandNodeForGdml
(
TGeoNode
* node);
55
56
// Check whether a volume is sensitive.
57
// The decision is based on the volume name. Only used in case
58
// of GDML and ROOT geometry.
59
// @param name Volume name
60
// @value kTRUE if volume is sensitive, else kFALSE
61
virtual
Bool_t
CheckIfSensitive
(std::string name);
62
63
private
:
64
// Track information to be stored until the track leaves the active volume.
65
Int_t
fTrackID
;
//! track index
66
Int_t
fVolumeID
;
//! volume id
67
TVector3
fPosIn
;
//! position (in)
68
TVector3
fPosOut
;
//! position (out)
69
TVector3
fMomIn
;
//! momentum (in)
70
TVector3
fMomOut
;
//! momentum (out)
71
Double32_t
fTime
;
//! time
72
Double32_t
fLength
;
//! length
73
Double32_t
fELoss
;
//! energy loss
74
Int_t
fIsPrimary
;
//! is track primary?
75
Double_t
fCharge
;
//! track charge
76
Int_t
fPdgId
;
//! pdg id of particle
77
78
Int_t
fPosIndex
;
//!
79
TClonesArray
*
fPointCollection
;
//! Hit collection
80
81
std::map<TString, TGeoMedium*>
fFixedMedia
;
//! List of media "repaired" after importing GMDL
82
83
// Adds a BmnSiBTPoint to the HitCollection
84
BmnSiBTPoint
*
AddHit
(
Int_t
trackID,
85
Int_t
detID,
86
TVector3
posIn,
87
TVector3
posOut,
88
TVector3
momIn,
89
TVector3
momOut,
90
Double_t
time,
91
Double_t
length,
92
Double_t
eLoss,
93
Int_t
isPrimary,
94
Double_t
charge,
95
Int_t
pdgId,
96
Int_t
stationNum,
97
Int_t
moduleNum);
98
99
// Resets the private members for the track parameters
100
void
ResetParameters
();
101
BmnSiBT
(
const
BmnSiBT
&) =
delete
;
102
BmnSiBT
operator=
(
const
BmnSiBT
&) =
delete
;
103
104
ClassDef
(
BmnSiBT
, 1)
105
};
106
107
//------------------------------------------------------------------------------
108
inline
void
BmnSiBT::ResetParameters
()
109
{
110
fTrackID
= -1;
111
fVolumeID
= 0;
112
fPosIn
.SetXYZ(0.0, 0.0, 0.0);
113
fPosOut
.SetXYZ(0.0, 0.0, 0.0);
114
fMomIn
.SetXYZ(0.0, 0.0, 0.0);
115
fMomOut
.SetXYZ(0.0, 0.0, 0.0);
116
fTime
=
fLength
=
fELoss
= 0.0;
117
fPosIndex
= 0;
118
};
119
//------------------------------------------------------------------------------
120
121
#endif
/* BMNSiBT_H */
Bool_t
bool Bool_t
Int_t
int Int_t
Double32_t
double Double32_t
Double_t
double Double_t
Option_t
const char Option_t
ClassDef
#define ClassDef(name, id)
TClonesArray.h
TGeoMedium.h
TVector3.h
BmnSiBTPoint
Definition
BmnSiBTPoint.h:7
BmnSiBT::CopyClones
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
Definition
BmnSiBT.cxx:178
BmnSiBT::fTrackID
Int_t fTrackID
Definition
BmnSiBT.h:65
BmnSiBT::~BmnSiBT
virtual ~BmnSiBT()
Definition
BmnSiBT.cxx:40
BmnSiBT::AddHit
BmnSiBTPoint * AddHit(Int_t trackID, Int_t detID, TVector3 posIn, TVector3 posOut, TVector3 momIn, TVector3 momOut, Double_t time, Double_t length, Double_t eLoss, Int_t isPrimary, Double_t charge, Int_t pdgId, Int_t stationNum, Int_t moduleNum)
List of media "repaired" after importing GMDL.
Definition
BmnSiBT.cxx:385
BmnSiBT::fFixedMedia
std::map< TString, TGeoMedium * > fFixedMedia
Hit collection.
Definition
BmnSiBT.h:81
BmnSiBT::CheckIfSensitive
virtual Bool_t CheckIfSensitive(std::string name)
Definition
BmnSiBT.cxx:374
BmnSiBT::BmnSiBT
BmnSiBT()
Definition
BmnSiBT.cxx:22
BmnSiBT::ProcessHits
virtual Bool_t ProcessHits(FairVolume *vol=0)
Definition
BmnSiBT.cxx:50
BmnSiBT::fLength
Double32_t fLength
time
Definition
BmnSiBT.h:72
BmnSiBT::fPosIndex
Int_t fPosIndex
pdg id of particle
Definition
BmnSiBT.h:78
BmnSiBT::fPosOut
TVector3 fPosOut
position (in)
Definition
BmnSiBT.h:68
BmnSiBT::fPdgId
Int_t fPdgId
track charge
Definition
BmnSiBT.h:76
BmnSiBT::fCharge
Double_t fCharge
is track primary?
Definition
BmnSiBT.h:75
BmnSiBT::fIsPrimary
Int_t fIsPrimary
energy loss
Definition
BmnSiBT.h:74
BmnSiBT::ConstructGDMLGeometry
virtual void ConstructGDMLGeometry(TGeoMatrix *)
Definition
BmnSiBT.cxx:218
BmnSiBT::BmnSiBT
BmnSiBT(const char *name, Bool_t active)
Definition
BmnSiBT.cxx:31
BmnSiBT::fMomIn
TVector3 fMomIn
position (out)
Definition
BmnSiBT.h:69
BmnSiBT::BmnSiBT
BmnSiBT(const BmnSiBT &)=delete
BmnSiBT::Register
virtual void Register()
Definition
BmnSiBT.cxx:148
BmnSiBT::fPointCollection
TClonesArray * fPointCollection
Definition
BmnSiBT.h:79
BmnSiBT::fELoss
Double32_t fELoss
length
Definition
BmnSiBT.h:73
BmnSiBT::fMomOut
TVector3 fMomOut
momentum (in)
Definition
BmnSiBT.h:70
BmnSiBT::GetCollection
virtual TClonesArray * GetCollection(Int_t iColl) const
Definition
BmnSiBT.cxx:153
BmnSiBT::Print
virtual void Print(Option_t *) const
Definition
BmnSiBT.cxx:160
BmnSiBT::Reset
virtual void Reset()
Definition
BmnSiBT.cxx:172
BmnSiBT::fPosIn
TVector3 fPosIn
volume id
Definition
BmnSiBT.h:67
BmnSiBT::operator=
BmnSiBT operator=(const BmnSiBT &)=delete
BmnSiBT::ExpandNodeForGdml
void ExpandNodeForGdml(TGeoNode *node)
Definition
BmnSiBT.cxx:263
BmnSiBT::ConstructGeometry
virtual void ConstructGeometry()
Definition
BmnSiBT.cxx:196
BmnSiBT::EndOfEvent
virtual void EndOfEvent()
Definition
BmnSiBT.cxx:140
BmnSiBT::fVolumeID
Int_t fVolumeID
track index
Definition
BmnSiBT.h:66
BmnSiBT::fTime
Double32_t fTime
momentum (out)
Definition
BmnSiBT.h:71
BmnSiBT::ResetParameters
void ResetParameters()
Definition
BmnSiBT.h:108
FairDetector
TClonesArray
TGeoMatrix
TGeoNode
TVector3
BmnSiBTPoint.h
detectors
SiBT
BmnSiBT.h
Generated on
for BmnRoot by
1.17.0