er  dev
ERNeuRad.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 ERNeuRad_H
10 #define ERNeuRad_H
11 
12 #include "TClonesArray.h"
13 #include "TLorentzVector.h"
14 #include "TArrayI.h"
15 
16 #include "FairVolume.h"
17 
18 #include "ERDetector.h"
19 #include "ERMCTrack.h" //for ExpertTrackingStatus
20 
21 class TClonesArray;
22 class TLorentzVector;
23 class TArrayI;
24 
25 class FairVolume;
26 
27 class ERNeuRadStep;
28 class ERNeuRadPoint;
29 
39 class ERNeuRad : public ERDetector
40 {
41 
42 public:
43 
45  ERNeuRad();
46 
54  ERNeuRad(const char* name, Bool_t active, Int_t verbose);
55 
57  virtual ~ERNeuRad();
58 
59  /* Modifiers */
60 
65 
69  void SetStoreAllSteps() {fStoreAllSteps = kTRUE;}
70 
74  void SetMaxStep(Double_t step) {fStep = step;}
75 
76  /*Accessors*/
77 
84  virtual TClonesArray* GetCollection(Int_t iColl) const;
85 
86 public:
87 
93  virtual void Initialize();
94 
98  virtual void Register();
99 
106  virtual Bool_t ProcessHits(FairVolume* vol = 0);
107 
112  virtual void EndOfEvent();
113 
118  virtual void Print(Option_t *option="") const;
119 
123  virtual void Reset();
124 
131  virtual void CopyClones(TClonesArray* cl1, TClonesArray* cl2, Int_t offset);
132 
139  virtual Bool_t CheckIfSensitive(std::string name);
140 
141 private:
142 
144  void StartNewPoint();
145 
147  void FinishNewPoint();
148 
151 
154 
157 
159  Double_t CurPointLen(TLorentzVector& posIn);
160 
161 private:
162 
163  TClonesArray* fNeuRadPoints;
164  TClonesArray* fNeuRadFirstStep;
165  TClonesArray* fNeuRadSteps;
166 
168  Bool_t fStoreAllSteps;
169  Int_t fVerbose;
170 
171  Float_t fFullEnergy;
172  Float_t fFullLY;
173 
174  Float_t fStep;
175 
176  /* current step information*/
177 
178  Int_t fEventID;
179  Int_t fTrackID;
180  Int_t fMot0TrackID;
181  Double_t fMass;
182  TLorentzVector fPosIn;
183  TLorentzVector fPosOut;
184  TLorentzVector fCurPosIn;
185  TVector3 fPosInLocal;
186  TLorentzVector fMomIn;
187  TLorentzVector fMomOut;
188  TLorentzVector fCurMomIn;
189  Double32_t fTimeIn;
190  Double32_t fTimeOut;
191  Double32_t fTrackLength;
192  Double32_t fELoss;
193  Double_t fLightYield;
194  Int_t fFiberNb;
195  Int_t fPixelNb;
196  Int_t fModuleNb;
197  Int_t fStepNb;
198  ExpertTrackingStatus fTrackStatus;
199  TArrayI fProcessesID;
200 
201  ClassDef(ERNeuRad,1)
202 };
203 
204 #endif // ERNeuRad_H
ExpertTrackingStatus fTrackStatus
curren track stutus (transport, stop, disappeared, ...)
Definition: ERNeuRad.h:198
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
Copies the points collection with a given track index offset.
Definition: ERNeuRad.cxx:192
ERNeuRadStep * AddStep()
Adds a NeuRadStep to the Steps Collection.
Definition: ERNeuRad.cxx:297
TLorentzVector fMomOut
point start momentum
Definition: ERNeuRad.h:187
Double_t fLightYield
light yield
Definition: ERNeuRad.h:193
Float_t fFullEnergy
Sum Edep in event in sensetive volume.
Definition: ERNeuRad.h:171
Double_t fMass
mass
Definition: ERNeuRad.h:181
Double_t CurPointLen(TLorentzVector &posIn)
return current point length
Definition: ERNeuRad.cxx:310
void FinishNewPoint()
Finish point creation. Call AddPoint()
Definition: ERNeuRad.cxx:263
Int_t fMot0TrackID
0th mother track index
Definition: ERNeuRad.h:180
virtual void Register()
Register output array (NeuRadPoint) to the I/O manager Abstract from FairDetector.
Definition: ERNeuRad.cxx:85
TClonesArray * fNeuRadPoints
The point collection.
Definition: ERNeuRad.h:163
void SetStorePrimarySteps()
Method for switch on storing of first geant steps in sensetive volume. It is necessary to determine t...
Definition: ERNeuRad.h:64
Int_t fFiberNb
number of fiber in pixel
Definition: ERNeuRad.h:194
virtual void EndOfEvent()
Action at end of event Short status log and Reset(). Virtual from FairDetector.
Definition: ERNeuRad.cxx:161
Int_t fPixelNb
number of pixel in module
Definition: ERNeuRad.h:195
TClonesArray * fNeuRadSteps
The steps collection.
Definition: ERNeuRad.h:165
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: ERNeuRad.cxx:96
TLorentzVector fPosOut
point finish position
Definition: ERNeuRad.h:183
virtual Bool_t CheckIfSensitive(std::string name)
Check whether a volume is sensitive.
Definition: ERNeuRad.cxx:207
ERNeuRadStep * AddFirstStep()
Adds a NeuRadStep to the PrimaryStep Collection.
Definition: ERNeuRad.cxx:285
Bool_t fStoreAllSteps
Flag to storing all steps in sensetive volume.
Definition: ERNeuRad.h:168
ERNeuRadPoint * AddPoint()
Adds a NeuRadPoint to the Point Collection.
Definition: ERNeuRad.cxx:276
virtual void Print(Option_t *option="") const
Screen log Prints NeuRadPoint information Virtual from TObject.
Definition: ERNeuRad.cxx:175
virtual void Initialize()
Initialisation class method FairDetector::Initialize() is called. NeuRadGeoPar init from RuntimeDB Vi...
Definition: ERNeuRad.cxx:78
Double32_t fTrackLength
track length from his origin
Definition: ERNeuRad.h:191
TLorentzVector fMomIn
point start momentum
Definition: ERNeuRad.h:186
Double32_t fTimeIn
point start time
Definition: ERNeuRad.h:189
virtual TClonesArray * GetCollection(Int_t iColl) const
Get array of ERNeuRadPoint.
Definition: ERNeuRad.cxx:70
virtual ~ERNeuRad()
Destructor.
Definition: ERNeuRad.cxx:62
Double32_t fELoss
energy loss
Definition: ERNeuRad.h:192
virtual void Reset()
Clears the point and steps collections Virtual from FairDetector.
Definition: ERNeuRad.cxx:183
Float_t fStep
Step length in sensetive volumes.
Definition: ERNeuRad.h:174
ERNeuRad()
Default constructor.
Definition: ERNeuRad.cxx:29
Int_t fStepNb
current step numb in this active volumes
Definition: ERNeuRad.h:197
Float_t fFullLY
Sum Light Yield in event in sensetive volume.
Definition: ERNeuRad.h:172
Class for the MC transport of the NeuRad.
Definition: ERNeuRad.h:39
TLorentzVector fPosIn
point start position
Definition: ERNeuRad.h:182
void SetMaxStep(Double_t step)
Set propagation step in sensetive volumes. Special process stepLimiter must be in TG4RunConfiguration...
Definition: ERNeuRad.h:74
TArrayI fProcessesID
VMC prcess IDs in step.
Definition: ERNeuRad.h:199
TLorentzVector fCurMomIn
current step momentum
Definition: ERNeuRad.h:188
void SetStoreAllSteps()
Method for switch on storing of all geant steps in sensetive volume. It is necessary to determine gea...
Definition: ERNeuRad.h:69
The data class for storing pieces of charged tracks in sensitive volumes in NeuRad.
Definition: ERNeuRadPoint.h:22
TVector3 fPosInLocal
point position in sensetive volume CS
Definition: ERNeuRad.h:185
void StartNewPoint()
Start new point creation. Reinit current point data.
Definition: ERNeuRad.cxx:216
Int_t fModuleNb
number of module in NeuRad
Definition: ERNeuRad.h:196
TClonesArray * fNeuRadFirstStep
The first step collection.
Definition: ERNeuRad.h:164
Bool_t fStorePrimarySteps
Flag to storing firs step in sensetive volume.
Definition: ERNeuRad.h:167
Int_t fTrackID
track index
Definition: ERNeuRad.h:179
Int_t fEventID
event index
Definition: ERNeuRad.h:178
Double32_t fTimeOut
point finish time
Definition: ERNeuRad.h:190
The base class for detector simulation in er sim.
Definition: ERDetector.h:32
Int_t fVerbose
Verbosity level.
Definition: ERNeuRad.h:169
TLorentzVector fCurPosIn
current step position
Definition: ERNeuRad.h:184