BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnVSP.h
Go to the documentation of this file.
1
#ifndef BMNVSP_H
2
#define BMNVSP_H
3
4
#include "
BmnVSPPoint.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
BmnVSP
:
public
FairDetector
14
{
15
public
:
16
// *@param name detector name
17
// *@param active sensitivity flag
18
BmnVSP
(
const
char
* name,
Bool_t
active);
19
BmnVSP
();
20
virtual
~BmnVSP
();
21
22
// Defines the action to be taken when a step is inside the
23
// active volume. Creates BmnVSPPoints 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 VSP 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 BmnVSPPoint to the HitCollection
84
BmnVSPPoint
*
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
97
// Resets the private members for the track parameters
98
void
ResetParameters
();
99
BmnVSP
(
const
BmnVSP
&) =
delete
;
100
BmnVSP
operator=
(
const
BmnVSP
&) =
delete
;
101
102
ClassDef
(
BmnVSP
, 1)
103
};
104
105
//------------------------------------------------------------------------------
106
inline
void
BmnVSP::ResetParameters
()
107
{
108
fTrackID
= -1;
109
fVolumeID
= 0;
110
fPosIn
.SetXYZ(0.0, 0.0, 0.0);
111
fPosOut
.SetXYZ(0.0, 0.0, 0.0);
112
fMomIn
.SetXYZ(0.0, 0.0, 0.0);
113
fMomOut
.SetXYZ(0.0, 0.0, 0.0);
114
fTime
=
fLength
=
fELoss
= 0.0;
115
fPosIndex
= 0;
116
};
117
//------------------------------------------------------------------------------
118
119
#endif
/* BMNVSP_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
BmnVSPPoint
Definition
BmnVSPPoint.h:7
BmnVSP::GetCollection
virtual TClonesArray * GetCollection(Int_t iColl) const
Definition
BmnVSP.cxx:166
BmnVSP::Print
virtual void Print(Option_t *) const
Definition
BmnVSP.cxx:173
BmnVSP::Reset
virtual void Reset()
Definition
BmnVSP.cxx:185
BmnVSP::BmnVSP
BmnVSP()
Definition
BmnVSP.cxx:21
BmnVSP::fPdgId
Int_t fPdgId
track charge
Definition
BmnVSP.h:76
BmnVSP::fPosOut
TVector3 fPosOut
position (in)
Definition
BmnVSP.h:68
BmnVSP::CopyClones
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
Definition
BmnVSP.cxx:191
BmnVSP::fPointCollection
TClonesArray * fPointCollection
Definition
BmnVSP.h:79
BmnVSP::ExpandNodeForGdml
void ExpandNodeForGdml(TGeoNode *node)
Definition
BmnVSP.cxx:276
BmnVSP::ConstructGDMLGeometry
virtual void ConstructGDMLGeometry(TGeoMatrix *)
Definition
BmnVSP.cxx:231
BmnVSP::operator=
BmnVSP operator=(const BmnVSP &)=delete
BmnVSP::fTrackID
Int_t fTrackID
Definition
BmnVSP.h:65
BmnVSP::EndOfEvent
virtual void EndOfEvent()
Definition
BmnVSP.cxx:153
BmnVSP::fMomIn
TVector3 fMomIn
position (out)
Definition
BmnVSP.h:69
BmnVSP::fPosIndex
Int_t fPosIndex
pdg id of particle
Definition
BmnVSP.h:78
BmnVSP::fTime
Double32_t fTime
momentum (out)
Definition
BmnVSP.h:71
BmnVSP::fVolumeID
Int_t fVolumeID
track index
Definition
BmnVSP.h:66
BmnVSP::CheckIfSensitive
virtual Bool_t CheckIfSensitive(std::string name)
Definition
BmnVSP.cxx:387
BmnVSP::fMomOut
TVector3 fMomOut
momentum (in)
Definition
BmnVSP.h:70
BmnVSP::BmnVSP
BmnVSP(const char *name, Bool_t active)
Definition
BmnVSP.cxx:30
BmnVSP::fFixedMedia
std::map< TString, TGeoMedium * > fFixedMedia
Hit collection.
Definition
BmnVSP.h:81
BmnVSP::fIsPrimary
Int_t fIsPrimary
energy loss
Definition
BmnVSP.h:74
BmnVSP::fCharge
Double_t fCharge
is track primary?
Definition
BmnVSP.h:75
BmnVSP::~BmnVSP
virtual ~BmnVSP()
Definition
BmnVSP.cxx:39
BmnVSP::fPosIn
TVector3 fPosIn
volume id
Definition
BmnVSP.h:67
BmnVSP::AddHit
BmnVSPPoint * 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)
Definition
BmnVSP.cxx:398
BmnVSP::ResetParameters
void ResetParameters()
Definition
BmnVSP.h:106
BmnVSP::BmnVSP
BmnVSP(const BmnVSP &)=delete
BmnVSP::ProcessHits
virtual Bool_t ProcessHits(FairVolume *vol=0)
Definition
BmnVSP.cxx:49
BmnVSP::Register
virtual void Register()
Definition
BmnVSP.cxx:161
BmnVSP::ConstructGeometry
virtual void ConstructGeometry()
Definition
BmnVSP.cxx:209
BmnVSP::fELoss
Double32_t fELoss
length
Definition
BmnVSP.h:73
BmnVSP::fLength
Double32_t fLength
time
Definition
BmnVSP.h:72
FairDetector
TClonesArray
TGeoMatrix
TGeoNode
TVector3
BmnVSPPoint.h
detectors
vsp
BmnVSP.h
Generated on
for BmnRoot by
1.17.0