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