FairRoot/PandaRoot
PndSciT.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // ----- PndSciT header file -----
3 // ----- created by A. Sanchez -----
4 // ----- modified by D. Steinschaden -----
5 // ----- last update 06.2015 -----
6 // --------------------------------------------------------------------------
7 
8 #ifndef PNDSCIT_H
9 #define PNDSCIT_H
10 
11 
12 #include "PndGeoSciTPar.h"
13 #include "PndGeoHandling.h"
14 
15 #include "FairDetector.h"
16 
17 //#include "TClonesArray.h"
18 #include "TVector3.h"
19 #include "TLorentzVector.h"
20 
21 #include <string>
22 #include <vector>
23 
24 class TClonesArray;
25 class PndSciTPoint;
26 class FairVolume;
27 
28 class PndSciT : public FairDetector
29 {
30 
31  public:
32 
34  PndSciT();
35 
36 
41  PndSciT(const char* name, Bool_t active);
42 
43 
45  virtual ~PndSciT();
46 
47 
51  virtual void Initialize();
52 
53 
61  virtual Bool_t ProcessHits(FairVolume* vol = 0);
62 
63 
69  virtual void EndOfEvent();
70 
71 
72  virtual void BeginEvent();
77  virtual void Register();
78 
79 
81  virtual TClonesArray* GetCollection(Int_t iColl) const;
82 
83 
88  virtual void Print() const;
89 
90 
95  virtual void Reset();
96 
97 
105  virtual void CopyClones(TClonesArray* cl1, TClonesArray* cl2,
106  Int_t offset);
107 
108 
112  virtual void ConstructGeometry();
113 
114  //void ConstructASCIIGeometry();
115 
116  void SetThreshold(Double_t val) {fThreshold = val;}; //default value is 0.0001 GeV
117 
118 
119 
120  PndSciTPoint* AddHit( Int_t eventID, Int_t trackID,
121  Int_t sensorID, TString detName,
122  TVector3 posin,
123  TVector3 momin,
124  TVector3 posout,
125  TVector3 momout,
126  Double_t tof,
127  Double_t length,
128  Double_t eLoss);
129 
130  private:
131 
132  std::vector<std::string> fListOfSensitives;
133  bool CheckIfSensitive(std::string name);
134 
135 
136  Int_t fEventID; // event id
137  Int_t fTrackID; // track index
138  Int_t fSensorID; // used as volume ID/ detector ID coming from PndGeoHandling
140 
141  TLorentzVector fPosIn; // position
142  TLorentzVector fMomIn; // momentum
143  TLorentzVector fPosOut; // position
144  TLorentzVector fMomOut; // momentum
145 
146  Double32_t fTime; // time
147  Double32_t fLength; // length
148  Double_t fELoss; // energy loss
149  Double_t fThreshold; // energy loss threshold
150 
153  Int_t fPosIndex; // Used when Copying the TCloneArrays
154  TClonesArray* fSciTCollection; // Hit collection
155 
156  // reset all parameters
157  void ResetParameters();
158 
159  ClassDef(PndSciT,4)
160 
161 };
162 
163 
165  fTrackID = fSensorID = fEventID = -1;
166  fPosIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
167  fPosOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
168  fMomIn.SetPxPyPzE(0.0, 0.0, 0.0, 0.0);
169  fMomOut.SetPxPyPzE(0.0, 0.0, 0.0, 0.0);
170 
171  fTime = fLength = fELoss = 0;
172 
173 };
174 
175 
176 
177 #endif
Int_t fPosIndex
for saving parameters, although not mandatory, may someone can make use out of the stored parameters ...
Definition: PndSciT.h:153
virtual void Print() const
Definition: PndSciT.cxx:220
void SetThreshold(Double_t val)
Definition: PndSciT.h:116
Double_t fThreshold
Definition: PndSciT.h:149
virtual void Reset()
Definition: PndSciT.cxx:233
virtual void Initialize()
Definition: PndSciT.cxx:103
Double_t val[nBoxes][nFEBox]
Definition: createCalib.C:11
virtual TClonesArray * GetCollection(Int_t iColl) const
Definition: PndSciT.cxx:211
TLorentzVector fMomIn
Definition: PndSciT.h:142
TVector3 offset(2, 0, 0)
TLorentzVector fMomOut
Definition: PndSciT.h:144
PndGeoHandling * fGeoH
Definition: PndSciT.h:151
virtual void EndOfEvent()
Definition: PndSciT.cxx:195
Class to access the naming information of the MVD.
Double_t
TString fdetPath
Definition: PndSciT.h:139
Int_t fSensorID
Definition: PndSciT.h:138
virtual void BeginEvent()
Definition: PndSciT.cxx:127
virtual ~PndSciT()
Definition: PndSciT.cxx:91
Int_t fEventID
Definition: PndSciT.h:136
PndSciT()
Definition: PndSciT.cxx:52
virtual Bool_t ProcessHits(FairVolume *vol=0)
Definition: PndSciT.cxx:134
TString name
virtual void Register()
Definition: PndSciT.cxx:203
std::vector< std::string > fListOfSensitives
Definition: PndSciT.h:132
Double_t fELoss
Definition: PndSciT.h:148
virtual void ConstructGeometry()
Definition: PndSciT.cxx:261
TLorentzVector fPosOut
Definition: PndSciT.h:143
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
Definition: PndSciT.cxx:244
TLorentzVector fPosIn
Definition: PndSciT.h:141
Double32_t fLength
Definition: PndSciT.h:147
bool CheckIfSensitive(std::string name)
Definition: PndSciT.cxx:274
PndSciTPoint * AddHit(Int_t eventID, Int_t trackID, Int_t sensorID, TString detName, TVector3 posin, TVector3 momin, TVector3 posout, TVector3 momout, Double_t tof, Double_t length, Double_t eLoss)
Definition: PndSciT.cxx:286
Int_t fTrackID
Definition: PndSciT.h:137
PndGeoSciTPar * par
Gives Access to the Path info of a hit.
Definition: PndSciT.h:152
TClonesArray * fSciTCollection
Definition: PndSciT.h:154
void ResetParameters()
Definition: PndSciT.h:164
Double32_t fTime
Definition: PndSciT.h:146