BmnRoot
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
15#include "TClonesArray.h"
16#include "TVector3.h"
17#include "TLorentzVector.h"
18#include "FairDetector.h"
19#include "BmnZdcGeoPar.h"
20
21using namespace std;
22
23
24class TClonesArray;
25class BmnZdcPoint;
26class FairVolume;
27
28class BmnZdc : public FairDetector
29{
30
31 public:
32
35
36
41 BmnZdc(const char* name, Bool_t active);
42
43
45 virtual ~BmnZdc();
46
47
51 virtual void Initialize();
52
53
61 virtual Bool_t ProcessHits(FairVolume* vol = 0);
62
63
69 virtual void EndOfEvent();
70
71
72 virtual void BeginEvent();
77 virtual void Register();
78
79
81 virtual TClonesArray* GetCollection(Int_t iColl) const;
82
83
88 virtual void Print(Option_t*) const;
89
90
95 virtual void Reset();
96
97
105 virtual void CopyClones(TClonesArray* cl1, TClonesArray* cl2,
106 Int_t offset);
107
108
112 virtual void ConstructGeometry();
113
114
115 // Check whether a volume is sensitive.
116 // The decision is based on the volume name. Only used in case
117 // of GDML and ROOT geometry.
118 // @param name Volume name
119 // @value kTRUE if volume is sensitive, else kFALSE
120 virtual Bool_t CheckIfSensitive(std::string name);
121
122
123 //BmnZdcPoint* AddHit(Int_t trackID, Int_t module_groupID, Int_t copyNo, Int_t copyNoMother,
124 BmnZdcPoint* AddHit(Int_t trackID, Int_t detID, Int_t copyNo, Int_t copyNoMother,
125 TVector3 pos, TVector3 mom,
126 Double_t tof, Double_t length, Double_t eLoss);
127
128 private:
129 Int_t fTrackID;
130 Int_t fVolumeID;
131 Int_t fEventID;
132 TLorentzVector fPos;
133 TLorentzVector fMom;
134 Double32_t fTime;
135 Double32_t fLength;
136 Double32_t fELoss;
137 Int_t fVSCVolId;
138 Int_t fVSCVolId_after;
139 Int_t fPosIndex;
140 Int_t volDetector;
141
142 TClonesArray* fZdcCollection;
143
144 // reset all parameters
145 void ResetParameters();
146
147 ClassDef(BmnZdc,2)
148
149};
150
151
152//------------------------------------------------------------------------------------------------------------------------
153inline void BmnZdc::ResetParameters()
154{
155 fTrackID = fVolumeID = 0;
156 fPos.SetXYZM(0.0, 0.0, 0.0, 0.0);
157 fMom.SetXYZM(0.0, 0.0, 0.0, 0.0);
158 fTime = fLength = fELoss = 0;
159 fPosIndex = 0;
160};
161//------------------------------------------------------------------------------------------------------------------------
162
163#endif
virtual void EndOfEvent()
virtual void Initialize()
virtual Bool_t CheckIfSensitive(std::string name)
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
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 Bool_t ProcessHits(FairVolume *vol=0)
virtual void Register()
virtual void Print(Option_t *) const
virtual void BeginEvent()
BmnZdc(const char *name, Bool_t active)
virtual ~BmnZdc()
virtual void ConstructGeometry()
virtual TClonesArray * GetCollection(Int_t iColl) const
STL namespace.