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