BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnMwpc.h
Go to the documentation of this file.
1
//------------------------------------------------------------------------------------------------------------------------
2
// -------------------------------------------------------------------------
3
// ----- BmnMWPC header file -----
4
// -------------------------------------------------------------------------
5
6
/*
7
** Defines the active detector MWPC. Constructs the geometry and
8
** registeres MCPoints.
9
**/
10
11
#ifndef BMNMWPC_H
12
#define BMNMWPC_H
13
14
#include "
BmnMwpcPoint.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
BmnMwpc
:
public
FairDetector
25
{
26
public
:
27
// *@param name detector name
28
// *@param active sensitivity flag
29
BmnMwpc
(
const
char
* name,
Bool_t
active);
30
31
BmnMwpc
();
32
virtual
~BmnMwpc
();
33
34
// Defines the action to be taken when a step is inside the
35
// active volume. Creates BmnMWPC1Points 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 MWPC1 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
TVector3
fPos
;
//! position
85
TVector3
fPosLocal
;
//! position local to gas chamber
86
TLorentzVector
fMom
;
//! momentum
87
Double32_t
fTime
;
//! time
88
Double32_t
fLength
;
//! length
89
Double32_t
fELoss
;
//! energy loss
90
Int_t
fIsPrimary
;
//! is track primary?
91
Double_t
fCharge
;
//! track charge
92
Double_t
fRadius
;
//! hit radius
93
Int_t
fPdgId
;
//! pdg id of particle
94
Int_t
fwheel
;
95
TVector3
fPosIn
;
//! entry position in global frame
96
TVector3
fPosOut
;
//! exit position in global frame
97
98
TVector3
fPosInTmp
;
//! entry position in global frame
99
Int_t
fTrackIDTmp
;
//! track index
100
Int_t
fwheelTmp
;
101
102
Int_t
fPosIndex
;
//!
103
TClonesArray
*
fPointCollection
;
//! Hit collection
104
105
int
DistAndPoints
(
TVector3
p3,
TVector3
p4,
TVector3
& pa,
TVector3
& pb);
106
TVector3
GlobalToLocal
(
TVector3
& global);
107
TVector3
LocalToGlobal
(
TVector3
& local);
108
109
// Adds a BmnMWPC1Point to the HitCollection
110
BmnMwpcPoint
*
AddHit
(
Int_t
trackID,
111
Int_t
detID,
112
TVector3
pos,
113
Double_t
radius,
114
TVector3
mom,
115
Double_t
time,
116
Double_t
length,
117
Double_t
eLoss,
118
Int_t
isPrimary,
119
Double_t
charge,
120
Int_t
fPdgId
,
121
TVector3
trackPos);
122
123
// Resets the private members for the track parameters
124
void
ResetParameters
();
125
BmnMwpc
(
const
BmnMwpc
&) =
delete
;
126
BmnMwpc
operator=
(
const
BmnMwpc
&) =
delete
;
127
128
ClassDef
(
BmnMwpc
, 1)
129
};
130
131
//------------------------------------------------------------------------------------------------------------------------
132
inline
void
BmnMwpc::ResetParameters
()
133
{
134
fTrackID
= -1;
135
fVolumeID
=
fwheel
= 0;
136
fPos
.SetXYZ(0.0, 0.0, 0.0);
137
fMom
.SetXYZM(0.0, 0.0, 0.0, 0.0);
138
fTime
=
fLength
=
fELoss
= 0;
139
fPosIndex
= 0;
140
141
fPosInTmp
.SetXYZ(0.0, 0.0, 0.0);
142
fTrackIDTmp
= -1;
143
fwheelTmp
= -1;
144
}
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
BmnMwpcPoint
Definition
BmnMwpcPoint.h:17
BmnMwpc::fPdgId
Int_t fPdgId
hit radius
Definition
BmnMwpc.h:93
BmnMwpc::fIsPrimary
Int_t fIsPrimary
energy loss
Definition
BmnMwpc.h:90
BmnMwpc::BmnMwpc
BmnMwpc(const BmnMwpc &)=delete
BmnMwpc::fPosOut
TVector3 fPosOut
entry position in global frame
Definition
BmnMwpc.h:96
BmnMwpc::DistAndPoints
int DistAndPoints(TVector3 p3, TVector3 p4, TVector3 &pa, TVector3 &pb)
Hit collection.
Definition
BmnMwpc.cxx:63
BmnMwpc::CopyClones
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
Definition
BmnMwpc.cxx:194
BmnMwpc::BmnMwpc
BmnMwpc(const char *name, Bool_t active)
Definition
BmnMwpc.cxx:46
BmnMwpc::GlobalToLocal
TVector3 GlobalToLocal(TVector3 &global)
Definition
BmnMwpc.cxx:73
BmnMwpc::fMom
TLorentzVector fMom
position local to gas chamber
Definition
BmnMwpc.h:86
BmnMwpc::fPointCollection
TClonesArray * fPointCollection
Definition
BmnMwpc.h:103
BmnMwpc::Register
virtual void Register()
Definition
BmnMwpc.cxx:165
BmnMwpc::fPosInTmp
TVector3 fPosInTmp
exit position in global frame
Definition
BmnMwpc.h:98
BmnMwpc::ConstructGDMLGeometry
virtual void ConstructGDMLGeometry(TGeoMatrix *)
Definition
BmnMwpc.cxx:371
BmnMwpc::GetProj
static Int_t GetProj(Int_t uid)
Definition
BmnMwpc.h:77
BmnMwpc::Reset
virtual void Reset()
Definition
BmnMwpc.cxx:188
BmnMwpc::fCharge
Double_t fCharge
is track primary?
Definition
BmnMwpc.h:91
BmnMwpc::fLength
Double32_t fLength
time
Definition
BmnMwpc.h:88
BmnMwpc::GetCollection
virtual TClonesArray * GetCollection(Int_t iColl) const
Definition
BmnMwpc.cxx:170
BmnMwpc::fELoss
Double32_t fELoss
length
Definition
BmnMwpc.h:89
BmnMwpc::ResetParameters
void ResetParameters()
Definition
BmnMwpc.h:132
BmnMwpc::Print
virtual void Print(Option_t *) const
Definition
BmnMwpc.cxx:178
BmnMwpc::fVolumeID
Int_t fVolumeID
track index
Definition
BmnMwpc.h:83
BmnMwpc::fwheel
Int_t fwheel
pdg id of particle
Definition
BmnMwpc.h:94
BmnMwpc::BmnMwpc
BmnMwpc()
Definition
BmnMwpc.cxx:37
BmnMwpc::ProcessHits
virtual Bool_t ProcessHits(FairVolume *vol=0)
Definition
BmnMwpc.cxx:91
BmnMwpc::fTime
Double32_t fTime
momentum
Definition
BmnMwpc.h:87
BmnMwpc::fwheelTmp
Int_t fwheelTmp
track index
Definition
BmnMwpc.h:100
BmnMwpc::fPosIn
TVector3 fPosIn
Definition
BmnMwpc.h:95
BmnMwpc::GetWheel
static Int_t GetWheel(Int_t uid)
Definition
BmnMwpc.h:76
BmnMwpc::LocalToGlobal
TVector3 LocalToGlobal(TVector3 &local)
Definition
BmnMwpc.cxx:82
BmnMwpc::fPos
TVector3 fPos
volume id
Definition
BmnMwpc.h:84
BmnMwpc::GetGasGap
static Int_t GetGasGap(Int_t uid)
Definition
BmnMwpc.h:78
BmnMwpc::operator=
BmnMwpc operator=(const BmnMwpc &)=delete
BmnMwpc::CheckIfSensitive
virtual Bool_t CheckIfSensitive(std::string name)
Definition
BmnMwpc.cxx:526
BmnMwpc::ExpandNodeForGdml
void ExpandNodeForGdml(TGeoNode *node)
Definition
BmnMwpc.cxx:415
BmnMwpc::ConstructAsciiGeometry
virtual void ConstructAsciiGeometry()
Definition
BmnMwpc.cxx:231
BmnMwpc::~BmnMwpc
virtual ~BmnMwpc()
Definition
BmnMwpc.cxx:55
BmnMwpc::EndOfEvent
virtual void EndOfEvent()
Definition
BmnMwpc.cxx:157
BmnMwpc::fPosIndex
Int_t fPosIndex
Definition
BmnMwpc.h:102
BmnMwpc::fFixedMedia
map< TString, TGeoMedium * > fFixedMedia
Definition
BmnMwpc.h:67
BmnMwpc::fTrackIDTmp
Int_t fTrackIDTmp
entry position in global frame
Definition
BmnMwpc.h:99
BmnMwpc::fPosLocal
TVector3 fPosLocal
position
Definition
BmnMwpc.h:85
BmnMwpc::AddHit
BmnMwpcPoint * 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)
Definition
BmnMwpc.cxx:542
BmnMwpc::fRadius
Double_t fRadius
track charge
Definition
BmnMwpc.h:92
BmnMwpc::fTrackID
Int_t fTrackID
Definition
BmnMwpc.h:82
BmnMwpc::ConstructGeometry
virtual void ConstructGeometry()
Definition
BmnMwpc.cxx:212
FairDetector
TClonesArray
TGeoMatrix
TGeoNode
TLorentzVector
TVector3
BmnMwpcPoint.h
detectors
mwpc
BmnMwpc.h
Generated on
for BmnRoot by
1.17.0