CbmRoot
CbmTof.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- CbmTof header file -----
3 // ----- Created 28/07/04 by V. Friese -----
4 // -------------------------------------------------------------------------
5 
14 #ifndef CBMTOF_H
15 #define CBMTOF_H
16 
17 
18 #include "FairDetector.h"
19 
20 #include "TLorentzVector.h"
21 
22 #include <map>
23 #include <set>
24 #include <tuple>
25 
26 
27 class CbmTofPoint;
28 class CbmTofGeoHandler;
29 class FairVolume;
30 class TClonesArray;
31 class TVector3;
32 class TGeoCombiTrans;
33 class TGeoPhysicalNode;
34 
35 class CbmTof : public FairDetector {
36 
37 public:
39  CbmTof();
40 
41 
46  CbmTof(const char* name, Bool_t active);
47 
48 
50  virtual ~CbmTof();
51 
52  virtual void PreTrack();
53  virtual void FinishEvent();
54 
62  virtual Bool_t ProcessHits(FairVolume* vol = 0);
63 
64 
70  virtual void EndOfEvent();
71 
72 
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, Int_t offset);
106 
107 
112  virtual void ConstructGeometry();
113 
115  virtual void Initialize();
116 
117  void GenerateOnePointPerTrack(Bool_t bOnePointPerTrack = kTRUE) {
118  fbOnePointPerTrack = bOnePointPerTrack;
119  }
120  void SetProcessAnyTrack(Bool_t bProcess = kTRUE) {
121  fbProcessAnyTrack = bProcess;
122  }
123  void SetAllCountersInactive(Bool_t bInactive = kTRUE) {
124  fbAllCountersInactive = bInactive;
125  }
126 
127  void
128  SetCounterActive(Int_t iModuleType, Int_t iModuleIndex, Int_t iCounterIndex);
129 
138  void SetCounterInactive(Int_t iModuleType,
139  Int_t iModuleIndex,
140  Int_t iCounterIndex);
141 
151  void
152  SetCounterInBeam(Int_t iModuleType, Int_t iModuleIndex, Int_t iCounterIndex);
153 
154 private:
157  Int_t fTrackID;
158  Int_t fVolumeID;
159  TLorentzVector fPos;
160  TLorentzVector fMom;
161  Double32_t fTime;
162  Double32_t fLength;
163  Double32_t fELoss;
164 
165  Int_t fPosIndex;
166  TClonesArray* fTofCollection;
168 
169  TGeoCombiTrans*
171 
172  std::string fVolumeName;
173 
175  Bool_t fbIsNewTrack;
176 
177  TString fTofNodePath;
182 
183  std::set<std::tuple<Int_t, Int_t, Int_t>>
185  std::set<std::tuple<Int_t, Int_t, Int_t>>
187  std::set<Int_t> fInactiveCounterIDs;
188 
189  std::map<std::tuple<Int_t, Int_t, Int_t>,
190  std::pair<TString, TGeoPhysicalNode*>>
192 
194 
196 
198 
203  CbmTofPoint* AddHit(Int_t trackID,
204  Int_t detID,
205  TVector3 pos,
206  TVector3 mom,
207  Double_t time,
208  Double_t length,
209  Double_t eLoss);
210 
215  void ResetParameters();
216 
217  Bool_t CheckIfSensitive(std::string name);
218 
219  virtual void ConstructRootGeometry(TGeoMatrix* shift = NULL);
220 
221  void CreateInBeamNodes();
222 
223  CbmTof(const CbmTof&);
225 
226 
227  ClassDef(CbmTof, 6)
228 };
229 
230 
231 inline void CbmTof::ResetParameters() {
232  fTrackID = fVolumeID = 0;
233  fPos.SetXYZM(0.0, 0.0, 0.0, 0.0);
234  fMom.SetXYZM(0.0, 0.0, 0.0, 0.0);
235  fTime = fLength = fELoss = 0;
236  fPosIndex = 0;
237 };
238 
239 
240 #endif
CbmTof::fLength
Double32_t fLength
time
Definition: CbmTof.h:162
CbmTof::GetCollection
virtual TClonesArray * GetCollection(Int_t iColl) const
Definition: CbmTof.cxx:466
CbmTof::SetProcessAnyTrack
void SetProcessAnyTrack(Bool_t bProcess=kTRUE)
Definition: CbmTof.h:120
CbmTof::fInactiveCounterIDs
std::set< Int_t > fInactiveCounterIDs
Set of inactive counters.
Definition: CbmTof.h:187
CbmTof::fTrackID
Int_t fTrackID
Definition: CbmTof.h:157
CbmTof
Definition: CbmTof.h:35
CbmTof::AddHit
CbmTofPoint * AddHit(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Double_t eLoss)
Definition: CbmTof.cxx:593
CbmTof::fOutputTreeEntry
Int_t fOutputTreeEntry
Map of counters in beam.
Definition: CbmTof.h:193
CbmTof::CreateInBeamNodes
void CreateInBeamNodes()
Definition: CbmTof.cxx:562
CbmTof::fTofCollection
TClonesArray * fTofCollection
Definition: CbmTof.h:166
CbmTof::fCurrentModuleType
Int_t fCurrentModuleType
Path to current physical node.
Definition: CbmTof.h:179
CbmTof::fELoss
Double32_t fELoss
length
Definition: CbmTof.h:163
CbmTof::ProcessHits
virtual Bool_t ProcessHits(FairVolume *vol=0)
Definition: CbmTof.cxx:292
CbmTof::SetCounterActive
void SetCounterActive(Int_t iModuleType, Int_t iModuleIndex, Int_t iCounterIndex)
Definition: CbmTof.cxx:533
CbmTof::fbProcessAnyTrack
Bool_t fbProcessAnyTrack
Definition: CbmTof.h:195
CbmTof::CbmTof
CbmTof()
Definition: CbmTof.cxx:38
CbmTof::GenerateOnePointPerTrack
void GenerateOnePointPerTrack(Bool_t bOnePointPerTrack=kTRUE)
Definition: CbmTof.h:117
CbmTof::operator=
CbmTof & operator=(const CbmTof &)
CbmTof::fVolumeID
Int_t fVolumeID
track index
Definition: CbmTof.h:158
CbmTof::fPos
TLorentzVector fPos
volume id
Definition: CbmTof.h:159
CbmTof::fCurrentNodePath
TString fCurrentNodePath
Path to physical ToF node.
Definition: CbmTof.h:178
CbmTof::Initialize
virtual void Initialize()
Definition: CbmTof.cxx:119
CbmTof::fTofNodePath
TString fTofNodePath
Definition: CbmTof.h:177
CbmTof::fCombiTrans
TGeoCombiTrans * fCombiTrans
Interface to gMC and gGeoManager.
Definition: CbmTof.h:170
CbmTofGeoHandler
Definition: CbmTofGeoHandler.h:30
CbmTof::ResetParameters
void ResetParameters()
Definition: CbmTof.h:231
CbmTof::fActiveCounters
std::set< std::tuple< Int_t, Int_t, Int_t > > fActiveCounters
Current counter index.
Definition: CbmTof.h:184
CbmTof::fCountersInBeam
std::map< std::tuple< Int_t, Int_t, Int_t >, std::pair< TString, TGeoPhysicalNode * > > fCountersInBeam
Set of inactive counter IDs.
Definition: CbmTof.h:191
CbmTof::fbOnePointPerTrack
Bool_t fbOnePointPerTrack
Name of Volume to be imported.
Definition: CbmTof.h:174
CbmTof::fPosIndex
Int_t fPosIndex
energy loss
Definition: CbmTof.h:165
CbmTof::CopyClones
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
Definition: CbmTof.cxx:496
CbmTof::fbAllCountersInactive
Bool_t fbAllCountersInactive
Definition: CbmTof.h:197
CbmTof::ConstructGeometry
virtual void ConstructGeometry()
Definition: CbmTof.cxx:511
CbmTof::fTime
Double32_t fTime
momentum
Definition: CbmTof.h:161
CbmTof::fCurrentModuleIndex
Int_t fCurrentModuleIndex
Current module type.
Definition: CbmTof.h:180
CbmTof::fMom
TLorentzVector fMom
position
Definition: CbmTof.h:160
CbmTof::SetCounterInactive
void SetCounterInactive(Int_t iModuleType, Int_t iModuleIndex, Int_t iCounterIndex)
Definition: CbmTof.cxx:543
CbmTof::fGeoHandler
CbmTofGeoHandler * fGeoHandler
Hit collection.
Definition: CbmTof.h:167
CbmTof::CheckIfSensitive
Bool_t CheckIfSensitive(std::string name)
Definition: CbmTof.cxx:571
CbmTof::ConstructRootGeometry
virtual void ConstructRootGeometry(TGeoMatrix *shift=NULL)
Definition: CbmTof.cxx:522
CbmTof::Print
virtual void Print(Option_t *="") const
Definition: CbmTof.cxx:476
CbmTof::Register
virtual void Register()
Definition: CbmTof.cxx:458
CbmTof::FinishEvent
virtual void FinishEvent()
Definition: CbmTof.cxx:161
pos
TVector3 pos
Definition: CbmMvdSensorDigiToHitTask.cxx:60
CbmTofPoint
Geometric intersection of a MC track with a TOFb detector.
Definition: CbmTofPoint.h:40
CbmTof::fVolumeName
std::string fVolumeName
Transformation matrix for geometry positioning.
Definition: CbmTof.h:172
CbmTof::fInactiveCounters
std::set< std::tuple< Int_t, Int_t, Int_t > > fInactiveCounters
Set of active counters.
Definition: CbmTof.h:186
CbmTof::fbIsNewTrack
Bool_t fbIsNewTrack
Definition: CbmTof.h:175
CbmTof::Reset
virtual void Reset()
Definition: CbmTof.cxx:488
CbmTof::EndOfEvent
virtual void EndOfEvent()
Definition: CbmTof.cxx:449
CbmTof::SetCounterInBeam
void SetCounterInBeam(Int_t iModuleType, Int_t iModuleIndex, Int_t iCounterIndex)
Definition: CbmTof.cxx:553
CbmTof::~CbmTof
virtual ~CbmTof()
Definition: CbmTof.cxx:106
CbmTof::CbmTof
CbmTof(const CbmTof &)
CbmTof::SetAllCountersInactive
void SetAllCountersInactive(Bool_t bInactive=kTRUE)
Definition: CbmTof.h:123
CbmTof::PreTrack
virtual void PreTrack()
Definition: CbmTof.cxx:157
CbmTof::fCurrentCounterIndex
Int_t fCurrentCounterIndex
Current module index.
Definition: CbmTof.h:181