BmnRoot
26.10.0-19-g6979a6c6
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
CbmSts.h
Go to the documentation of this file.
1
// -------------------------------------------------------------------------
2
// ----- CbmSts header file -----
3
// ----- Created 26/07/04 by V. Friese -----
4
// -------------------------------------------------------------------------
5
6
/** CbmSts.h
7
*@author V.Friese <v.friese@gsi.de>
8
**
9
** Defines the active detector STS. Constructs the geometry and
10
** registeres MCPoints.
11
**/
12
13
#ifndef CBMSTS_H
14
#define CBMSTS_H
15
16
#include "
CbmStsPoint.h
"
17
#include "FairDetector.h"
18
#include "
TLorentzVector.h
"
19
20
#include <map>
21
22
class
CbmSts
:
public
FairDetector
23
{
24
public
:
25
/** Default constructor **/
26
CbmSts
();
27
28
/** Standard constructor.
29
*@param name detetcor name
30
*@param active sensitivity flag
31
**/
32
CbmSts
(
const
char
* name,
Bool_t
active);
33
34
/** Destructor **/
35
virtual
~CbmSts
();
36
37
/** Virtual method ProcessHits
38
**
39
** Defines the action to be taken when a step is inside the
40
** active volume. Creates a CbmStsPoint and adds it to the
41
** collection.
42
*@param vol Pointer to the active volume
43
**/
44
virtual
Bool_t
ProcessHits
(FairVolume* vol = 0);
45
46
/** Virtual method BeginEvent
47
**
48
** If verbosity level is set, print hit collection at the
49
** end of the event and resets it afterwards.
50
**/
51
52
virtual
void
BeginEvent
();
53
54
/** Virtual method EndOfEvent
55
**
56
** If verbosity level is set, print hit collection at the
57
** end of the event and resets it afterwards.
58
**/
59
60
virtual
void
EndOfEvent
();
61
62
/** Virtual method Register
63
**
64
** Registers the hit collection in the ROOT manager.
65
**/
66
virtual
void
Register
();
67
68
/** Accessor to the hit collection **/
69
virtual
TClonesArray
*
GetCollection
(
Int_t
iColl)
const
;
70
71
/** Virtual method Print
72
**
73
** Screen output of hit collection.
74
**/
75
virtual
void
Print
(
Option_t
*)
const
;
76
77
/** Virtual method Reset
78
**
79
** Clears the hit collection
80
**/
81
virtual
void
Reset
();
82
83
/** Virtual method CopyClones
84
**
85
** Copies the hit collection with a given track index offset
86
*@param cl1 Origin
87
*@param cl2 Target
88
*@param offset Index offset
89
**/
90
virtual
void
CopyClones
(
TClonesArray
* cl1,
TClonesArray
* cl2,
Int_t
offset);
91
92
/** Construct the STS geometry.
93
** Depending on the geometry file extension, the base class method
94
** ConstructRootGeometry is called (.root), or the ASCII geometry
95
** file is read by the FairGeoLoader (.geo).
96
** @since 11.06.2012
97
**/
98
virtual
void
ConstructGeometry
();
99
100
/** Construct the geometry from an ASCII geometry file **/
101
virtual
void
ConstructAsciiGeometry
();
102
103
/** Construct the geometry from a GDML geometry file **/
104
virtual
void
ConstructGDMLGeometry
(
TGeoMatrix
*);
105
106
/** Check whether a volume is sensitive.
107
** The decision is based on the volume name. Only used in case
108
** of ROOT geometry.
109
** @since 11.06.2012
110
** @param(name) Volume name
111
** @value kTRUE if volume is sensitive, else kFALSE
112
**/
113
virtual
Bool_t
CheckIfSensitive
(std::string name);
114
115
// void SaveGeoParams();
116
117
private
:
118
/** Track information to be stored until the track leaves the active volume. **/
119
Int_t
fTrackID
;
//! track index
120
Int_t
fVolumeID
;
//! volume id
121
Int_t
fDetectorId
;
// ! Unique detector ID
122
TVector3
fPosIn
,
fPosOut
;
//! position
123
TVector3
fMomIn
,
fMomOut
;
//! momentum
124
Double32_t
fTime
;
//! time
125
Double32_t
fLength
;
//! length
126
Double32_t
fELoss
;
//! energy loss
127
128
Int_t
fPosIndex
;
//!
129
TClonesArray
*
fStsCollection
;
//! The hit collection
130
131
/** Private method AddHit
132
**
133
** Adds a StsPoint to the HitCollection
134
**/
135
CbmStsPoint
*
AddHit
(
Int_t
trackID,
136
Int_t
detID,
137
TVector3
posIn,
138
TVector3
pos_out,
139
TVector3
momIn,
140
TVector3
momOut,
141
Double_t
time,
142
Double_t
length,
143
Double_t
eLoss,
144
Int_t
stationNum,
145
Int_t
moduleNum);
146
147
// Int_t GetCurrentDetectorId();
148
149
/** Private method ResetParameters
150
**
151
** Resets the private members for the track parameters
152
**/
153
void
ResetParameters
();
154
CbmSts
(
const
CbmSts
&) =
delete
;
155
CbmSts
operator=
(
const
CbmSts
&) =
delete
;
156
157
ClassDef
(
CbmSts
, 1);
158
};
159
160
inline
void
CbmSts::ResetParameters
()
161
{
162
fTrackID
=
fVolumeID
= 0;
163
fPosIn
.SetXYZ(0.0, 0.0, 0.0);
164
fPosOut
.SetXYZ(0.0, 0.0, 0.0);
165
fMomIn
.SetXYZ(0.0, 0.0, 0.0);
166
fMomOut
.SetXYZ(0.0, 0.0, 0.0);
167
fTime
=
fLength
=
fELoss
= 0;
168
fPosIndex
= 0;
169
};
170
171
#endif
CbmStsPoint.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)
TLorentzVector.h
CbmStsPoint
Definition
CbmStsPoint.h:23
CbmSts::Reset
virtual void Reset()
Virtual method Reset.
Definition
CbmSts.cxx:227
CbmSts::fMomOut
TVector3 fMomOut
Definition
CbmSts.h:123
CbmSts::CbmSts
CbmSts()
Default constructor.
Definition
CbmSts.cxx:39
CbmSts::fLength
Double32_t fLength
time
Definition
CbmSts.h:125
CbmSts::ConstructAsciiGeometry
virtual void ConstructAsciiGeometry()
Construct the geometry from an ASCII geometry file.
Definition
CbmSts.cxx:272
CbmSts::fStsCollection
TClonesArray * fStsCollection
Definition
CbmSts.h:129
CbmSts::GetCollection
virtual TClonesArray * GetCollection(Int_t iColl) const
Accessor to the hit collection.
Definition
CbmSts.cxx:209
CbmSts::fTime
Double32_t fTime
momentum
Definition
CbmSts.h:124
CbmSts::Print
virtual void Print(Option_t *) const
Virtual method Print.
Definition
CbmSts.cxx:219
CbmSts::ProcessHits
virtual Bool_t ProcessHits(FairVolume *vol=0)
Virtual method ProcessHits.
Definition
CbmSts.cxx:98
CbmSts::fVolumeID
Int_t fVolumeID
track index
Definition
CbmSts.h:120
CbmSts::ConstructGDMLGeometry
virtual void ConstructGDMLGeometry(TGeoMatrix *)
Construct the geometry from a GDML geometry file.
Definition
CbmSts.cxx:311
CbmSts::Register
virtual void Register()
Virtual method Register.
Definition
CbmSts.cxx:202
CbmSts::fPosIn
TVector3 fPosIn
Definition
CbmSts.h:122
CbmSts::fPosIndex
Int_t fPosIndex
energy loss
Definition
CbmSts.h:128
CbmSts::ConstructGeometry
virtual void ConstructGeometry()
Construct the STS geometry.
Definition
CbmSts.cxx:254
CbmSts::fDetectorId
Int_t fDetectorId
volume id
Definition
CbmSts.h:121
CbmSts::BeginEvent
virtual void BeginEvent()
Virtual method BeginEvent.
Definition
CbmSts.cxx:187
CbmSts::fMomIn
TVector3 fMomIn
position
Definition
CbmSts.h:123
CbmSts::AddHit
CbmStsPoint * AddHit(Int_t trackID, Int_t detID, TVector3 posIn, TVector3 pos_out, TVector3 momIn, TVector3 momOut, Double_t time, Double_t length, Double_t eLoss, Int_t stationNum, Int_t moduleNum)
The hit collection.
Definition
CbmSts.cxx:416
CbmSts::CbmSts
CbmSts(const CbmSts &)=delete
CbmSts::fTrackID
Int_t fTrackID
Track information to be stored until the track leaves the active volume.
Definition
CbmSts.h:119
CbmSts::fPosOut
TVector3 fPosOut
Definition
CbmSts.h:122
CbmSts::operator=
CbmSts operator=(const CbmSts &)=delete
CbmSts::CheckIfSensitive
virtual Bool_t CheckIfSensitive(std::string name)
Check whether a volume is sensitive.
Definition
CbmSts.cxx:405
CbmSts::~CbmSts
virtual ~CbmSts()
Destructor.
Definition
CbmSts.cxx:88
CbmSts::EndOfEvent
virtual void EndOfEvent()
Virtual method EndOfEvent.
Definition
CbmSts.cxx:189
CbmSts::ResetParameters
void ResetParameters()
Private method ResetParameters.
Definition
CbmSts.h:160
CbmSts::CopyClones
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
Virtual method CopyClones.
Definition
CbmSts.cxx:236
CbmSts::fELoss
Double32_t fELoss
length
Definition
CbmSts.h:126
FairDetector
TClonesArray
TGeoMatrix
TVector3
detectors
sts
CbmSts.h
Generated on
for BmnRoot by
1.17.0