BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnDch.h
Go to the documentation of this file.
1
// -------------------------------------------------------------------------
2
// ----- BmnDch header file -----
3
// -------------------------------------------------------------------------
4
5
/** DCH.h
6
**
7
** Defines the active detector DCH. Constructs the geometry and
8
** registers MCPoints.
9
**/
10
11
#ifndef BMNDCH_H
12
#define BMNDCH_H
13
14
#include "
BmnDchPoint.h
"
15
#include "FairDetector.h"
16
#include "
TClonesArray.h
"
17
#include "
TGeoMedium.h
"
18
#include "
TLorentzVector.h
"
19
#include "
TString.h
"
20
#include "
TVector3.h
"
21
22
#include <map>
23
24
class
BmnDch
:
public
FairDetector
25
{
26
public
:
27
// *@param name detector name
28
// *@param active sensitivity flag
29
BmnDch
(
const
char
* name,
Bool_t
active);
30
31
BmnDch
();
32
virtual
~BmnDch
();
33
34
// Defines the action to be taken when a step is inside the
35
// active volume. Creates BmnDchPoints and adds them to the collection.
36
// @param vol Pointer to the active volume
37
virtual
Bool_t
ProcessHits
(FairVolume* vol = 0);
38
39
// If verbosity level is set, print hit collection at the
40
// end of the event and resets it afterwards.
41
virtual
void
EndOfEvent
();
42
43
// Registers the hit collection in the ROOT manager.
44
virtual
void
Register
();
45
46
// Accessor to the hit collection
47
virtual
TClonesArray
*
GetCollection
(
Int_t
iColl)
const
;
48
49
// Screen output of hit collection.
50
virtual
void
Print
(
Option_t
*)
const
;
51
52
// Clears the hit collection
53
virtual
void
Reset
();
54
55
// *@param cl1 Origin
56
// *@param cl2 Target
57
// *@param offset Index offset
58
virtual
void
CopyClones
(
TClonesArray
* cl1,
TClonesArray
* cl2,
Int_t
offset);
59
60
// Constructs the DCH geometry
61
virtual
void
ConstructGeometry
();
62
// Construct the geometry from an ASCII geometry file
63
virtual
void
ConstructAsciiGeometry
();
64
// Construct the geometry from a GDML geometry file
65
virtual
void
ConstructGDMLGeometry
(
TGeoMatrix
*);
66
void
ExpandNodeForGdml
(
TGeoNode
* node);
67
map<TString, TGeoMedium*>
fFixedMedia
;
// List of media "repaired" after importing GMDL
68
69
// Check whether a volume is sensitive.
70
// The decision is based on the volume name. Only used in case
71
// of GDML and ROOT geometry.
72
// @param name Volume name
73
// @value kTRUE if volume is sensitive, else kFALSE
74
virtual
Bool_t
CheckIfSensitive
(std::string name);
75
76
// static Int_t GetWheel(Int_t uid){ return ((uid-1) >>3); }; //lsp [0-1] == [inner,outer]
77
// static Int_t GetProj(Int_t uid){ return ((uid-1) & 6)>>1; }; //lsp [0-3] == [x,y,u,v]
78
// static Int_t GetGasGap(Int_t uid){ return ((uid-1) & 0x0001); }; //lsp [0-1] == [inner,outer]
79
80
private
:
81
// Track information to be stored until the track leaves the active volume.
82
Int_t
fTrackID
;
//! track index
83
Int_t
fVolumeID
;
//! volume id
84
Int_t
fPlaneNumber
;
//! plane number
85
TVector3
fPos
;
//! position
86
TVector3
fPosLocal
;
//! position local to gas chamber
87
TLorentzVector
fMom
;
//! momentum
88
Double32_t
fTime
;
//! time
89
Double32_t
fLength
;
//! length
90
Double32_t
fELoss
;
//! energy loss
91
Int_t
fIsPrimary
;
//! is track primary?
92
Double_t
fCharge
;
//! track charge
93
Double_t
fRadius
;
//! hit radius
94
Int_t
fPdgId
;
//! pdg id of particle
95
Int_t
fwheel
;
96
TVector3
fPosIn
;
//! entry position in global frame
97
TVector3
fPosOut
;
//! exit position in global frame
98
99
TVector3
fPosInTmp
;
//! entry position in global frame
100
Int_t
fTrackIDTmp
;
//! track index
101
Int_t
fwheelTmp
;
102
103
Int_t
fPosIndex
;
//!
104
TClonesArray
*
fPointCollection
;
//! Hit collection
105
106
int
DistAndPoints
(
TVector3
p3,
TVector3
p4,
TVector3
& pa,
TVector3
& pb);
107
TVector3
GlobalToLocal
(
TVector3
& global);
108
TVector3
LocalToGlobal
(
TVector3
& local);
109
110
// Adds a BmnDchPoint to the HitCollection
111
BmnDchPoint
*
AddHit
(
Int_t
trackID,
112
Int_t
detID,
113
TVector3
pos,
114
Double_t
radius,
115
TVector3
mom,
116
Double_t
time,
117
Double_t
length,
118
Double_t
eLoss,
119
Int_t
isPrimary,
120
Double_t
charge,
121
Int_t
fPdgId
,
122
TVector3
trackPos);
123
124
// Resets the private members for the track parameters
125
void
ResetParameters
();
126
BmnDch
(
const
BmnDch
&) =
delete
;
127
BmnDch
operator=
(
const
BmnDch
&) =
delete
;
128
129
ClassDef
(
BmnDch
, 1)
130
};
131
132
//------------------------------------------------------------------------------------------------------------------------
133
inline
void
BmnDch::ResetParameters
()
134
{
135
fTrackID
= -1;
136
fVolumeID
=
fwheel
= 0;
137
fPos
.
SetXYZ
(0.0, 0.0, 0.0);
138
fMom
.
SetXYZM
(0.0, 0.0, 0.0, 0.0);
139
fTime
=
fLength
=
fELoss
= 0;
140
fPosIndex
= 0;
141
142
fPosInTmp
.
SetXYZ
(0.0, 0.0, 0.0);
143
fTrackIDTmp
= -1;
144
fwheelTmp
= -1;
145
};
146
147
#endif
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
TLorentzVector.h
TString.h
TVector3.h
BmnDchPoint
Definition
BmnDchPoint.h:20
BmnDch
DCH.h.
Definition
BmnDch.h:25
BmnDch::fPos
TVector3 fPos
plane number
Definition
BmnDch.h:85
BmnDch::AddHit
BmnDchPoint * AddHit(Int_t trackID, Int_t detID, TVector3 pos, Double_t radius, TVector3 mom, Double_t time, Double_t length, Double_t eLoss, Int_t isPrimary, Double_t charge, Int_t fPdgId, TVector3 trackPos)
BmnDch::ProcessHits
virtual Bool_t ProcessHits(FairVolume *vol=0)
BmnDch::fMom
TLorentzVector fMom
position local to gas chamber
Definition
BmnDch.h:87
BmnDch::ConstructGeometry
virtual void ConstructGeometry()
BmnDch::fVolumeID
Int_t fVolumeID
track index
Definition
BmnDch.h:83
BmnDch::fPosLocal
TVector3 fPosLocal
position
Definition
BmnDch.h:86
BmnDch::fwheelTmp
Int_t fwheelTmp
track index
Definition
BmnDch.h:101
BmnDch::fTrackIDTmp
Int_t fTrackIDTmp
entry position in global frame
Definition
BmnDch.h:100
BmnDch::ConstructAsciiGeometry
virtual void ConstructAsciiGeometry()
BmnDch::LocalToGlobal
TVector3 LocalToGlobal(TVector3 &local)
BmnDch::fIsPrimary
Int_t fIsPrimary
energy loss
Definition
BmnDch.h:91
BmnDch::Print
virtual void Print(Option_t *) const
BmnDch::operator=
BmnDch operator=(const BmnDch &)=delete
BmnDch::Register
virtual void Register()
BmnDch::CopyClones
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
BmnDch::DistAndPoints
int DistAndPoints(TVector3 p3, TVector3 p4, TVector3 &pa, TVector3 &pb)
Hit collection.
BmnDch::BmnDch
BmnDch()
BmnDch::fPosInTmp
TVector3 fPosInTmp
exit position in global frame
Definition
BmnDch.h:99
BmnDch::fPdgId
Int_t fPdgId
hit radius
Definition
BmnDch.h:94
BmnDch::fwheel
Int_t fwheel
pdg id of particle
Definition
BmnDch.h:95
BmnDch::fRadius
Double_t fRadius
track charge
Definition
BmnDch.h:93
BmnDch::ResetParameters
void ResetParameters()
BmnDch::fLength
Double32_t fLength
time
Definition
BmnDch.h:89
BmnDch::fPlaneNumber
Int_t fPlaneNumber
volume id
Definition
BmnDch.h:84
BmnDch::GlobalToLocal
TVector3 GlobalToLocal(TVector3 &global)
BmnDch::BmnDch
BmnDch(const BmnDch &)=delete
BmnDch::~BmnDch
virtual ~BmnDch()
BmnDch::Reset
virtual void Reset()
BmnDch::BmnDch
BmnDch(const char *name, Bool_t active)
BmnDch::fPosOut
TVector3 fPosOut
entry position in global frame
Definition
BmnDch.h:97
BmnDch::GetCollection
virtual TClonesArray * GetCollection(Int_t iColl) const
BmnDch::fELoss
Double32_t fELoss
length
Definition
BmnDch.h:90
BmnDch::fPosIndex
Int_t fPosIndex
Definition
BmnDch.h:103
BmnDch::CheckIfSensitive
virtual Bool_t CheckIfSensitive(std::string name)
BmnDch::fTrackID
Int_t fTrackID
Definition
BmnDch.h:82
BmnDch::fCharge
Double_t fCharge
is track primary?
Definition
BmnDch.h:92
BmnDch::ExpandNodeForGdml
void ExpandNodeForGdml(TGeoNode *node)
BmnDch::ConstructGDMLGeometry
virtual void ConstructGDMLGeometry(TGeoMatrix *)
BmnDch::fPointCollection
TClonesArray * fPointCollection
Definition
BmnDch.h:104
BmnDch::EndOfEvent
virtual void EndOfEvent()
BmnDch::fPosIn
TVector3 fPosIn
Definition
BmnDch.h:96
BmnDch::fFixedMedia
map< TString, TGeoMedium * > fFixedMedia
Definition
BmnDch.h:67
BmnDch::fTime
Double32_t fTime
momentum
Definition
BmnDch.h:88
FairDetector
TClonesArray
TGeoMatrix
TGeoNode
TLorentzVector
TLorentzVector::SetXYZM
void SetXYZM(Double_t x, Double_t y, Double_t z, Double_t m)
TVector3
TVector3::SetXYZ
void SetXYZ(Double_t x, Double_t y, Double_t z)
BmnDchPoint.h
install
include
BmnDch.h
Generated on
for BmnRoot by
1.17.0