er  dev
ERGadast.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 
10 #ifndef ERGadast_H
11 #define ERGadast_H
12 
13 
14 #include "TVector3.h"
15 
16 #include "ERDetector.h"
17 #include "ERGadastCsIPoint.h"
18 #include "ERGadastLaBrPoint.h"
19 #include "ERGadastStep.h"
20 #include "ERDetectorList.h"
21 #include "ERSupport.h"
22 
33 class ERGadast : public ERDetector
34 {
35 
36 public:
37 
39  ERGadast();
40 
48  ERGadast(const char* name, Bool_t active, Int_t verbose);
49 
51  virtual ~ERGadast();
52 
53  /* Modifiers */
54 
58  void SetStoreSteps() {fStoreSteps = kTRUE;}
59 
60  /*Accessors*/
61 
68  virtual TClonesArray* GetCollection(Int_t iColl) const;
69 
70 public:
71 
77  virtual void Initialize();
78 
82  virtual void Register();
83 
90  virtual Bool_t ProcessHits(FairVolume* vol = 0);
91 
96  virtual void EndOfEvent();
97 
102  virtual void Print(Option_t *option="") const;
103 
107  virtual void Reset();
108 
115  virtual void CopyClones(TClonesArray* cl1, TClonesArray* cl2, Int_t offset);
116 
124  virtual Bool_t CheckIfSensitive(std::string name);
125 
126 private:
127 
130 
133 
136 
138  void StartPoint();
139 
141  void FinishPoint();
142 
143 private:
144 
145  TClonesArray* fCsIPoints;
146  TClonesArray* fLaBrPoints;
147  TClonesArray* fGadastSteps;
148 
149  Bool_t fStoreSteps;
150 
151  /* current point information*/
152 
153  Int_t fEventID;
154  Int_t fTrackID;
155  Int_t fMot0TrackID;
156  Double_t fMass;
157  TVector3 fPosIn;
158  TVector3 fPosOut;
159  TVector3 fMomIn;
160  TVector3 fMomOut;
161  Double32_t fTime;
162  Double32_t fLength;
163  Double32_t fELoss;
164  Int_t fPDG;
165  Int_t fStepNr;
166  SensetiveType fDetectorType;
167  Int_t fCsIWall;
168  Int_t fCsIBlock;
169  Int_t fCsICell;
170  Int_t fLaBrCell;
171 
172  ClassDef(ERGadast,1);
173 };
174 
175 #endif
void FinishPoint()
Finish point creation. Call AddCsIPoint() or AddLaBrPoint()
Definition: ERGadast.cxx:128
Class for the MC transport of the Gadast.
Definition: ERGadast.h:33
Int_t fStepNr
current step numb in this active volumes
Definition: ERGadast.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 ERGadastPoint and adds it to the collection.
Definition: ERGadast.cxx:73
Int_t fCsIBlock
CsI Block number.
Definition: ERGadast.h:168
Int_t fCsICell
CsI Cell number.
Definition: ERGadast.h:169
TClonesArray * fLaBrPoints
The LaBr point collection.
Definition: ERGadast.h:146
virtual void EndOfEvent()
Action at end of event Short status log and Reset(). Virtual from FairDetector.
Definition: ERGadast.cxx:145
void StartPoint()
Start new point creation. Reinit current point data.
Definition: ERGadast.cxx:93
virtual void Initialize()
Initialisation class method FairDetector::Initialize() is called. GadastGeoPar init from RuntimeDB Vi...
Definition: ERGadast.cxx:66
TClonesArray * fGadastSteps
The all steps collection.
Definition: ERGadast.h:147
virtual void Print(Option_t *option="") const
Screen log Prints GadastPoint information Virtual from TObject.
Definition: ERGadast.cxx:173
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
Copies the points collection with a given track index offset.
Definition: ERGadast.cxx:199
SensetiveType fDetectorType
CsI or LaBr point.
Definition: ERGadast.h:166
Double32_t fLength
track length from his origin
Definition: ERGadast.h:162
void SetStoreSteps()
Method for switch on storing of all geant steps in sensetive volume. It is necessary to determine gea...
Definition: ERGadast.h:58
Int_t fTrackID
track index
Definition: ERGadast.h:154
The data class for storing pieces of charged tracks in sensitive volumes in CsI crystall.
virtual Bool_t CheckIfSensitive(std::string name)
Check whether a volume is sensitive.
Definition: ERGadast.cxx:263
Int_t fLaBrCell
laBr Cell number
Definition: ERGadast.h:170
virtual void Reset()
Clears the point and steps collections Virtual from FairDetector.
Definition: ERGadast.cxx:192
ERGadastStep * AddStep()
Adds a GadastStep to the Step Collection.
Definition: ERGadast.cxx:241
Int_t fEventID
event index
Definition: ERGadast.h:153
Int_t fPDG
particle PDG
Definition: ERGadast.h:164
TClonesArray * fCsIPoints
The CsI point collection.
Definition: ERGadast.h:145
Double_t fMass
mass
Definition: ERGadast.h:156
TVector3 fPosIn
point start position
Definition: ERGadast.h:157
Bool_t fStoreSteps
Flag to storing all steps in sensetive volume.
Definition: ERGadast.h:149
TVector3 fMomOut
point finish momentum
Definition: ERGadast.h:160
Int_t fMot0TrackID
0th mother track index
Definition: ERGadast.h:155
virtual ~ERGadast()
Destructor.
Definition: ERGadast.cxx:50
Double32_t fELoss
energy loss
Definition: ERGadast.h:163
ERGadastLaBrPoint * AddLaBrPoint()
Adds a GadastLaBrPoint to the Point Collection.
Definition: ERGadast.cxx:227
ERGadastCsIPoint * AddCsIPoint()
Adds a GadastCsIPoint to the Point Collection.
Definition: ERGadast.cxx:214
TVector3 fPosOut
point finish position
Definition: ERGadast.h:158
virtual TClonesArray * GetCollection(Int_t iColl) const
Get array of ERGadastPoint.
Definition: ERGadast.cxx:164
TVector3 fMomIn
point start momentum
Definition: ERGadast.h:159
ERGadast()
Default constructor.
Definition: ERGadast.cxx:24
The base class for detector simulation in er sim.
Definition: ERDetector.h:32
virtual void Register()
Register output array (NeuRadPoint) to the I/O manager Abstract from FairDetector.
Definition: ERGadast.cxx:154
Double32_t fTime
point start time
Definition: ERGadast.h:161
Int_t fCsIWall
CsI Wall number.
Definition: ERGadast.h:167