BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnZdc.h
Go to the documentation of this file.
1/*************************************************************************************
2 *
3 * Class BmnZdc
4 *
5 * Adopted for BMN by: Elena Litvinenko
6 * e-mail: litvin@nf.jinr.ru
7 * Version: 06-11-2015
8 *
9 ************************************************************************************/
10
11#ifndef BMNZDC_H
12#define BMNZDC_H
13
14#include "BmnZdcGeoPar.h"
15#include "FairDetector.h"
16#include "TClonesArray.h"
17#include "TLorentzVector.h"
18#include "TVector3.h"
19
20using namespace std;
21
22class TClonesArray;
23class BmnZdcPoint;
24class FairVolume;
25
26class BmnZdc : public FairDetector
27{
28
29 public:
30 /** Default constructor **/
32
33 /** Standard constructor.
34 *@param name detetcor name
35 *@param active sensitivity flag
36 **/
37 BmnZdc(const char* name, Bool_t active);
38
39 /** Destructor **/
40 virtual ~BmnZdc();
41
42 /** Virtual method Initialize
43 ** Initialises detector. Stores volume IDs for MUO detector and mirror.
44 **/
45 virtual void Initialize();
46
47 /** Virtual method ProcessHits
48 **
49 ** Defines the action to be taken when a step is inside the
50 ** active volume. Creates BmnZdcPoints and BmnZdcMirrorPoints and adds
51 ** them to the collections.
52 *@param vol Pointer to the active volume
53 **/
54 virtual Bool_t ProcessHits(FairVolume* vol = 0);
55
56 /** Virtual method EndOfEvent
57 **
58 ** If verbosity level is set, print hit collection at the
59 ** end of the event and resets it afterwards.
60 **/
61 virtual void EndOfEvent();
62
63 virtual void BeginEvent();
64 /** Virtual method Register
65 **
66 ** Registers the hit collection in the ROOT manager.
67 **/
68 virtual void Register();
69
70 /** Accessor to the hit collection **/
71 virtual TClonesArray* GetCollection(Int_t iColl) const;
72
73 /** Virtual method Print
74 **
75 ** Screen output of hit collection.
76 **/
77 virtual void Print(Option_t*) const;
78
79 /** Virtual method Reset
80 **
81 ** Clears the hit collection
82 **/
83 virtual void Reset();
84
85 /** Virtual method CopyClones
86 **
87 ** Copies the hit collection with a given track index offset
88 *@param cl1 Origin
89 *@param cl2 Target
90 *@param offset Index offset
91 **/
92 virtual void CopyClones(TClonesArray* cl1, TClonesArray* cl2, Int_t offset);
93
94 /** Virtual method Construct geometry
95 **
96 **/
97 virtual void ConstructGeometry();
98
99 // Check whether a volume is sensitive.
100 // The decision is based on the volume name. Only used in case
101 // of GDML and ROOT geometry.
102 // @param name Volume name
103 // @value kTRUE if volume is sensitive, else kFALSE
104 virtual Bool_t CheckIfSensitive(std::string name);
105
106 // BmnZdcPoint* AddHit(Int_t trackID, Int_t module_groupID, Int_t copyNo, Int_t copyNoMother,
108 Int_t detID,
109 Int_t copyNo,
110 Int_t copyNoMother,
111 TVector3 pos,
112 TVector3 mom,
113 Double_t tof,
114 Double_t length,
115 Double_t eLoss);
116
117 private:
118 Int_t fTrackID; //! track index
119 Int_t fVolumeID; //! volume id
120 Int_t fEventID; //! event id
121 TLorentzVector fPos; //! position
122 TLorentzVector fMom; //! momentum
123 Double32_t fTime; //! time
124 Double32_t fLength; //! length
125 Double32_t fELoss; //! energy loss
128 Int_t fPosIndex; //!
129 Int_t volDetector; //! MC volume ID of MUO
130
131 TClonesArray* fZdcCollection; //! Hit collection
132
133 // reset all parameters
135
136 ClassDef(BmnZdc, 2)
137};
138
139//------------------------------------------------------------------------------------------------------------------------
140inline void BmnZdc::ResetParameters()
141{
142 fTrackID = fVolumeID = 0;
143 fPos.SetXYZM(0.0, 0.0, 0.0, 0.0);
144 fMom.SetXYZM(0.0, 0.0, 0.0, 0.0);
145 fTime = fLength = fELoss = 0;
146 fPosIndex = 0;
147};
148//------------------------------------------------------------------------------------------------------------------------
149
150#endif
bool Bool_t
int Int_t
double Double32_t
double Double_t
const char Option_t
#define ClassDef(name, id)
Double32_t fELoss
length
Definition BmnZdc.h:125
Int_t fEventID
volume id
Definition BmnZdc.h:120
void ResetParameters()
Hit collection.
TClonesArray * fZdcCollection
MC volume ID of MUO.
Definition BmnZdc.h:131
Int_t volDetector
Definition BmnZdc.h:129
virtual void EndOfEvent()
Virtual method EndOfEvent.
Double32_t fTime
momentum
Definition BmnZdc.h:123
virtual void Initialize()
Virtual method Initialize Initialises detector.
TLorentzVector fPos
event id
Definition BmnZdc.h:121
Double32_t fLength
time
Definition BmnZdc.h:124
BmnZdc()
Default constructor.
Int_t fVolumeID
track index
Definition BmnZdc.h:119
Int_t fVSCVolId
energy loss
Definition BmnZdc.h:126
virtual Bool_t CheckIfSensitive(std::string name)
Int_t fTrackID
Definition BmnZdc.h:118
Int_t fPosIndex
Definition BmnZdc.h:128
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
Virtual method CopyClones.
BmnZdcPoint * AddHit(Int_t trackID, Int_t detID, Int_t copyNo, Int_t copyNoMother, TVector3 pos, TVector3 mom, Double_t tof, Double_t length, Double_t eLoss)
virtual void Reset()
Virtual method Reset.
virtual Bool_t ProcessHits(FairVolume *vol=0)
Virtual method ProcessHits.
virtual void Register()
Virtual method Register.
Int_t fVSCVolId_after
Definition BmnZdc.h:127
TLorentzVector fMom
position
Definition BmnZdc.h:122
virtual void Print(Option_t *) const
Virtual method Print.
virtual void BeginEvent()
BmnZdc(const char *name, Bool_t active)
Standard constructor.
virtual ~BmnZdc()
Destructor.
virtual void ConstructGeometry()
Virtual method Construct geometry.
virtual TClonesArray * GetCollection(Int_t iColl) const
Accessor to the hit collection.
void SetXYZM(Double_t x, Double_t y, Double_t z, Double_t m)
Definition json.hpp:4446