er  dev
ERTelescope.h
1 /********************************************************************************
2  * Copyright (C) Joint Institute for Nuclear Research *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence version 3 (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 
9 #ifndef ERTelescope_H
10 #define ERTelescope_H
11 
12 #include "ERDetector.h"
13 #include "ERTelescopeSetup.h"
14 
15 #include "TLorentzVector.h"
16 
17 class TClonesArray;
18 class FairVolume;
19 class TF1;
20 
21 class ERTelescope : public ERDetector {
22  using BranchName = TString;
23  using ComponentPoints = std::map<BranchName, TClonesArray*>;
24  using PointsPerComponent = std::map<TString, ComponentPoints>;
25 public:
27  ERTelescope();
33  ERTelescope(const char* name, Bool_t active, Int_t verbose);
35  virtual ~ERTelescope();
43  virtual Bool_t ProcessHits(FairVolume* vol = 0);
47  virtual void BeginEvent();
53  virtual void EndOfEvent();
58  virtual void Register();
60  virtual TClonesArray* GetCollection(Int_t iColl) const;
65  virtual void Print(Option_t *option="") const;
70  virtual void Reset();
78  virtual void CopyClones(TClonesArray* cl1, TClonesArray* cl2,
79  Int_t offset);
84  virtual void Initialize();
89  virtual void ConstructGeometry();
97  virtual Bool_t CheckIfSensitive(std::string name);
100  void SetGeomVersion(Int_t vers ) { fVersion = vers; }
101 private:
102  ERTelescopeSetup* fQTelescopeSetup = nullptr;
103  PointsPerComponent fPoints;
104  Int_t fVersion = -1;
105  Int_t fEventID = -1;
106  Int_t fTrackID = -2;
107  Int_t fMot0TrackID = -2;
108  Double_t fMass = 0.;
109  TLorentzVector fPosIn, fPosOut;
110  TLorentzVector fMomIn, fMomOut;
111  Double32_t fTime = 0.;
112  Double32_t fLength = 0.;
113  Double32_t fEloss = 0.;
114  Int_t fChannel = -1;
115  Int_t fPDG = -1;
116 private:
121  void AddPoint(TClonesArray& clref);
126  void ResetParameters();
127 
128  ClassDef(ERTelescope, 1);
129 };
130 
131 #endif
Int_t fMot0TrackID
track index
Definition: ERTelescope.h:107
Int_t fChannel
energy loss
Definition: ERTelescope.h:114
virtual void Print(Option_t *option="") const
virtual void ConstructGeometry()
Builds geometry and writes it to temporary file trough parameters from ERBeamDetSetup class object...
Definition: ERTelescope.cxx:81
TLorentzVector fMomIn
position
Definition: ERTelescope.h:110
virtual void Register()
TLorentzVector fPosIn
mass
Definition: ERTelescope.h:109
virtual void BeginEvent()
Double32_t fEloss
length
Definition: ERTelescope.h:113
virtual Bool_t ProcessHits(FairVolume *vol=0)
Definition: ERTelescope.cxx:87
Int_t fEventID
geometry version
Definition: ERTelescope.h:105
Double32_t fTime
momentum
Definition: ERTelescope.h:111
virtual void Reset()
Int_t fTrackID
event index
Definition: ERTelescope.h:106
virtual TClonesArray * GetCollection(Int_t iColl) const
void ResetParameters()
void AddPoint(TClonesArray &clref)
Definition: ERTelescope.cxx:63
virtual void Initialize()
Definition: ERTelescope.cxx:59
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
Double32_t fLength
time
Definition: ERTelescope.h:112
virtual ~ERTelescope()
Definition: ERTelescope.cxx:47
void SetGeomVersion(Int_t vers)
Definition: ERTelescope.h:100
virtual void EndOfEvent()
Double_t fMass
0th mother track index
Definition: ERTelescope.h:108
virtual Bool_t CheckIfSensitive(std::string name)
The base class for detector simulation in er sim.
Definition: ERDetector.h:32