BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnBC.h
Go to the documentation of this file.
1/*************************************************************************************
2 *
3 * Class BmnBC
4 *
5 * Adopted for BMN by: Nikita Lashmanov, Andrey Dryuk
6 * e-mail: nikita10630@mail.ru, andredryuk@gmail.com
7 * Version: 20.12.2020
8 *
9 ************************************************************************************/
10
11#ifndef BMNBC_H
12#define BMNBC_H
13
14#include "BmnBCGeoPar.h"
15#include "BmnBCPoint.h"
16#include "FairDetector.h"
17#include "TClonesArray.h"
18#include "TLorentzVector.h"
19#include "TParticle.h"
20#include "TVector3.h"
21#include "TVirtualMC.h"
22
23class BmnBC : public FairDetector
24{
25 public:
26 /** Default constructor **/
28
29 /** Standard constructor.
30 *@param name detetcor name
31 *@param active sensitivity flag
32 **/
33 BmnBC(const char* name, Bool_t active);
34
35 /** Destructor **/
36 virtual ~BmnBC();
37
38 /** Virtual method Initialize
39 ** Initialises detector. Stores volume IDs for MUO detector and mirror.
40 **/
41 virtual void Initialize();
42
43 /** Virtual method ProcessHits
44 **
45 ** Defines the action to be taken when a step is inside the
46 ** active volume. Creates BmnBdPoints and BmnBdMirrorPoints and adds
47 ** them to the collections.
48 *@param vol Pointer to the active volume
49 **/
50 virtual Bool_t ProcessHits(FairVolume* vol = 0);
51
52 /** Virtual method EndOfEvent
53 **
54 ** If verbosity level is set, print hit collection at the
55 ** end of the event and resets it afterwards.
56 **/
57 virtual void EndOfEvent();
58
59 virtual void BeginEvent();
60
61 /** Virtual method Register
62 **
63 ** Registers the hit collection in the ROOT manager.
64 **/
65 virtual void Register();
66
67 /** Accessor to the hit collection **/
68 virtual TClonesArray* GetCollection(Int_t iColl) const;
69
70 /** Virtual method Print
71 **
72 ** Screen output of hit collection.
73 **/
74 virtual void Print(Option_t*) const;
75
76 /** Virtual method Reset
77 **
78 ** Clears the hit collection
79 **/
80 virtual void Reset();
81
82 /** Virtual method CopyClones
83 **
84 ** Copies the hit collection with a given track index offset
85 *@param cl1 Origin
86 *@param cl2 Target
87 *@param offset Index offset
88 **/
89 virtual void CopyClones(TClonesArray* cl1, TClonesArray* cl2, Int_t offset);
90
91 /** Virtual method Construct geometry **/
92 virtual void ConstructGeometry();
93
94 virtual void ConstructAsciiGeometry();
95 virtual Bool_t CheckIfSensitive(std::string name);
96
98 Int_t detID,
99 Int_t copyNo,
100 TVector3 posIn,
101 TVector3 posOut,
102 TVector3 momIn,
103 TVector3 momOut,
104 Double_t tof,
105 Double_t length,
106 Double_t eLoss,
107 Int_t fStat,
108 Bool_t isPrimary,
109 Double_t charge,
110 Int_t pdgId,
111 Double_t lightYield,
112 Double_t timeIn,
113 Double_t timeOut,
114 Double_t lengthtrack);
115
116 private:
117 Int_t fTrackID; //! track index
118 Int_t fVolumeID; //! volume id
119 // Int_t fEventID; //! event id
120 TVector3 fPosIn; //! position (in)
121 TVector3 fPosOut; //! position (out)
122 TVector3 fMomIn; //! momentum (in)
124 Double32_t fTime; //! time
125 Double32_t fLength; //! length
126 Double32_t fELoss; //! energy loss
127 Int_t fPosIndex; //!
128 Int_t volDetector; //! MC volume ID of MUO
129 Int_t fIsPrimary; //! is track primary?
130 Double_t fCharge; //! track charge
131 Int_t fPdgId; //! pdg id of particle
134 TClonesArray* fBCCollection; //! Hit collection
135 Double32_t fTimeIn; //! time
136 Double32_t fTimeOut; //! time
137 Double32_t fLengthtrack; //! length
138
139 // reset all parameters
141 BmnBC(const BmnBC&) = delete;
142 BmnBC operator=(const BmnBC&) = delete;
143
144 ClassDef(BmnBC, 2)
145};
146
147//------------------------------------------------------------------------------------------------------------------------
148inline void BmnBC::ResetParameters()
149{
150 fTrackID = fVolumeID = 0;
151 fPosIn.SetXYZ(0.0, 0.0, 0.0);
152 fPosOut.SetXYZ(0.0, 0.0, 0.0);
153 fMomIn.SetXYZ(0.0, 0.0, 0.0);
154 fMomOut.SetXYZ(0.0, 0.0, 0.0);
155 fTime = fLength = fELoss = 0;
156 fTimeIn = fTimeOut = 0;
157 fLengthtrack = 0;
158 fPosIndex = 0;
159 fLightYield = 0;
160};
161//------------------------------------------------------------------------------------------------------------------------
162
163#endif
bool Bool_t
int Int_t
double Double32_t
float Float_t
double Double_t
const char Option_t
#define ClassDef(name, id)
Definition BmnBC.h:24
virtual void EndOfEvent()
Virtual method EndOfEvent.
Int_t fVolumeID
track index
Definition BmnBC.h:118
virtual void Print(Option_t *) const
Virtual method Print.
virtual Bool_t ProcessHits(FairVolume *vol=0)
Virtual method ProcessHits.
void ResetParameters()
length
Int_t volDetector
Definition BmnBC.h:128
Int_t fIsPrimary
MC volume ID of MUO.
Definition BmnBC.h:129
virtual ~BmnBC()
Destructor.
virtual void Register()
Virtual method Register.
TVector3 fPosIn
volume id
Definition BmnBC.h:120
Int_t fPosIndex
energy loss
Definition BmnBC.h:127
BmnBC()
Default constructor.
Int_t fTrackID
Definition BmnBC.h:117
virtual TClonesArray * GetCollection(Int_t iColl) const
Accessor to the hit collection.
TVector3 fPosOut
position (in)
Definition BmnBC.h:121
Float_t fLightYield
Definition BmnBC.h:133
virtual void ConstructAsciiGeometry()
virtual void Initialize()
Virtual method Initialize Initialises detector.
Double32_t fTimeIn
Hit collection.
Definition BmnBC.h:135
Double32_t fELoss
length
Definition BmnBC.h:126
virtual void ConstructGeometry()
Virtual method Construct geometry.
Int_t fStation
pdg id of particle
Definition BmnBC.h:132
virtual void Reset()
Virtual method Reset.
TClonesArray * fBCCollection
Definition BmnBC.h:134
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
Virtual method CopyClones.
Double32_t fTime
Definition BmnBC.h:124
BmnBC(const char *name, Bool_t active)
Standard constructor.
Double32_t fLength
time
Definition BmnBC.h:125
Double_t fCharge
is track primary?
Definition BmnBC.h:130
Double32_t fLengthtrack
time
Definition BmnBC.h:137
TVector3 fMomOut
momentum (in)
Definition BmnBC.h:123
Double32_t fTimeOut
time
Definition BmnBC.h:136
virtual Bool_t CheckIfSensitive(std::string name)
BmnBC operator=(const BmnBC &)=delete
TVector3 fMomIn
position (out)
Definition BmnBC.h:122
virtual void BeginEvent()
BmnBCPoint * AddHit(Int_t trackID, Int_t detID, Int_t copyNo, TVector3 posIn, TVector3 posOut, TVector3 momIn, TVector3 momOut, Double_t tof, Double_t length, Double_t eLoss, Int_t fStat, Bool_t isPrimary, Double_t charge, Int_t pdgId, Double_t lightYield, Double_t timeIn, Double_t timeOut, Double_t lengthtrack)
BmnBC(const BmnBC &)=delete
Int_t fPdgId
track charge
Definition BmnBC.h:131
void SetXYZ(Double_t x, Double_t y, Double_t z)