er  dev
ERDetector.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 ERDetector_H
10 #define ERDetector_H
11 
12 #include <map>
13 
14 #include "TString.h"
15 #include "TClonesArray.h"
16 #include "TLorentzVector.h"
17 #include "TArrayI.h"
18 
19 #include "FairVolume.h"
20 #include "FairDetector.h"
21 
22 #include "ERMCTrack.h" //for ExpertTrackingStatus
23 
24 #include "ERPoint.h"
25 
32 class ERDetector : public FairDetector
33 {
34 
35 public:
36 
38  ERDetector();
39 
46  ERDetector(const char* Name, Bool_t Active, Int_t DetId=0);
47 
52  virtual void ConstructGeometry();
53 
54  /*Accessors*/
55 
62  virtual TClonesArray* GetCollection(Int_t iColl) const;
63 
67  void AddSensetive(TString name);
68 public:
74  virtual void Initialize();
75 
79  virtual void Register();
80 
87  virtual Bool_t ProcessHits(FairVolume* vol = 0);
88 
93  virtual void EndOfEvent();
94 
99  virtual void Print(Option_t *option="") const;
100 
104  virtual void Reset();
105 
112  virtual void CopyClones(TClonesArray* cl1, TClonesArray* cl2,
113  Int_t offset);
114 
121  virtual Bool_t CheckIfSensitive(std::string name);
122 private:
124  void StartNewPoint();
125 
127  void FinishNewPoint();
128 
130  ERPoint* AddPoint(TClonesArray* points);
131 protected:
132  //map of sensetive volumes points collection collection, fSenVolumes[senVol] = points
133  std::map<TString,TClonesArray*> fSenVolumes;
134 
135  std::vector<TString> fSenNames;
136 
137  Int_t fVerbose;
138 
139  Float_t fFullEnergy;
140  Float_t fFullLY;
141 
142  /* current step information*/
143  Int_t fEventID;
144  Int_t fTrackID;
145  Int_t fMot0TrackID;
146  Double_t fMass;
147  TLorentzVector fPosIn;
148  TLorentzVector fPosOut;
149  TLorentzVector fCurPosIn;
150  TVector3 fPosInLocal;
151  TLorentzVector fMomIn;
152  TLorentzVector fMomOut;
153  TLorentzVector fCurMomIn;
154  Double32_t fTimeIn;
155  Double32_t fTimeOut;
156  Double32_t fTrackLength;
157  Double32_t fELoss;
158  Double_t fLightYield;
159  Int_t fVolNb;
160  ExpertTrackingStatus fTrackStatus;
161  TArrayI fProcessesID;
162 
163  ClassDef(ERDetector,1)
164 };
165 
166 #endif /* ERDetector_H */
167 
TLorentzVector fMomOut
point start momentum
Definition: ERDetector.h:152
TLorentzVector fMomIn
point start momentum
Definition: ERDetector.h:151
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
Copies the points collection with a given track index offset.
Definition: ERDetector.cxx:156
Int_t fTrackID
track index
Definition: ERDetector.h:144
virtual void Reset()
Clears the point and steps collections Virtual from FairDetector.
Definition: ERDetector.cxx:147
TLorentzVector fCurPosIn
current step position
Definition: ERDetector.h:149
Float_t fFullLY
Sum Light Yield in event in sensetive volume.
Definition: ERDetector.h:140
ExpertTrackingStatus fTrackStatus
curren track stutus (transport, stop, disappeared, ...)
Definition: ERDetector.h:160
virtual void Print(Option_t *option="") const
Screen log Prints NeuRadPoint information Virtual from TObject.
Definition: ERDetector.cxx:137
Double_t fLightYield
light yield
Definition: ERDetector.h:158
Double_t fMass
mass
Definition: ERDetector.h:146
virtual TClonesArray * GetCollection(Int_t iColl) const
Get array of ERNeuRadPoint.
Definition: ERDetector.cxx:60
void StartNewPoint()
Start new point creation. Reinit current point data.
Definition: ERDetector.cxx:183
Float_t fFullEnergy
Sum Edep in event in sensetive volume.
Definition: ERDetector.h:139
void FinishNewPoint()
Finish point creation. Call AddPoint()
Definition: ERDetector.cxx:204
virtual void EndOfEvent()
Action at end of event Short status log and Reset(). Virtual from FairDetector.
Definition: ERDetector.cxx:130
ERDetector()
Default constructor.
Definition: ERDetector.cxx:21
virtual void Initialize()
Initialisation class method FairDetector::Initialize() is called. NeuRadGeoPar init from RuntimeDB Vi...
Definition: ERDetector.cxx:71
TVector3 fPosInLocal
point position in sensetive volume CS
Definition: ERDetector.h:150
Int_t fMot0TrackID
0th mother track index
Definition: ERDetector.h:145
std::vector< TString > fSenNames
Sensetive volumes sustring, that user set.
Definition: ERDetector.h:135
Int_t fEventID
event index
Definition: ERDetector.h:143
Int_t fVerbose
Verbosity level.
Definition: ERDetector.h:137
virtual Bool_t CheckIfSensitive(std::string name)
Check whether a volume is sensitive.
Definition: ERDetector.cxx:172
virtual Bool_t ProcessHits(FairVolume *vol=0)
Virtual method Defines the action to be taken when a step is inside the active volume. Creates a ERNeuRadPoint and adds it to the collection.
Definition: ERDetector.cxx:87
Int_t fVolNb
number of fiber in pixel
Definition: ERDetector.h:159
The data class for storing pieces of charged tracks in sensitive volumes in NeuRad.
Definition: ERPoint.h:23
virtual void ConstructGeometry()
Definition: ERDetector.cxx:37
ERPoint * AddPoint(TClonesArray *points)
Adds a Point to the Point Collection.
Definition: ERDetector.cxx:218
TLorentzVector fPosIn
point start position
Definition: ERDetector.h:147
virtual void Register()
Register output array (NeuRadPoint) to the I/O manager Abstract from FairDetector.
Definition: ERDetector.cxx:77
void AddSensetive(TString name)
Add sensetive volume name. Create new points collection.
Definition: ERDetector.cxx:56
TLorentzVector fCurMomIn
current step momentum
Definition: ERDetector.h:153
Double32_t fTimeOut
point finish time
Definition: ERDetector.h:155
TArrayI fProcessesID
VMC prcess IDs in step.
Definition: ERDetector.h:161
Double32_t fTimeIn
point start time
Definition: ERDetector.h:154
The base class for detector simulation in er sim.
Definition: ERDetector.h:32
Double32_t fELoss
energy loss
Definition: ERDetector.h:157
Double32_t fTrackLength
track length from his origin
Definition: ERDetector.h:156
TLorentzVector fPosOut
point finish position
Definition: ERDetector.h:148