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