FairRoot/PandaRoot
PndGemDetector.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndGemDetector header file -----
3 // ----- Created 27/10/08 by R.Kliemt -----
4 // -------------------------------------------------------------------------
5 
15 #ifndef PNDGEMDETECTOR_H
16 #define PNDGEMDETECTOR_H
17 
18 
19 #include "TLorentzVector.h"
20 #include "FairDetector.h"
21 #include "TString.h"
22 
23 #include <vector>
24 
25 class TClonesArray;
26 class TGeoNode;
27 class PndGemMCPoint;
28 class FairVolume;
29 
30 class PndGemDetector : public FairDetector
31 {
32 
33  public:
34 
37 
38 
43  PndGemDetector(const char* name, Bool_t active);
44 
45 
47  virtual ~PndGemDetector();
48 
49  virtual void Initialize();
50 
51 
59  virtual Bool_t ProcessHits(FairVolume* vol = 0);
60 
61 
67  virtual void EndOfEvent();
68 
69  virtual void FinishRun();
70 
71 
76  virtual void Register();
77 
78 
80  virtual TClonesArray* GetCollection(Int_t iColl) const;
81 
82 
87  virtual void Print() const;
88 
89 
94  virtual void Reset();
95 
96 
104  virtual void CopyClones(TClonesArray* cl1, TClonesArray* cl2,
105  Int_t offset);
106 
107 
112  virtual void ConstructGeometry();
113  // void ConstructRootGeometry();
114 // void ConstructASCIIGeometry();
115  // void ExpandNode(TGeoNode *fN);
116 
117  void MisalignDetector();
118 
119  void SetExclusiveSensorType(const TString sens);
122 
123 
124  private:
125 
126  Int_t GetSensorId(TString detName);
127 
130  Int_t fTrackID;
131  Int_t fVolumeID;
132  TLorentzVector fPosIn;
133  TLorentzVector fPosOut;
134  TLorentzVector fMomIn;
135  TLorentzVector fMomOut;
136  Double32_t fTime;
137  Double32_t fLength;
138  Double32_t fELoss;
139 // std::map<TString, Int_t> fVolumeIDMap; //! map to create a unique Detector ID
140 // PndGemGeoHandling* fGeoH; //! Gives Access to the Path info of a hit
141  Int_t fPosIndex;
142  TClonesArray* fPndGemCollection;
144 
145  std::vector<std::string> fListOfSensitives;
146 
147  bool CheckIfSensitive(std::string name);
148 
153  PndGemMCPoint* AddHit(Int_t trackID, Int_t detID, Int_t sensID,
154  TVector3 posIn, TVector3 posOut,
155  TVector3 momIn, TVector3 momOut,
156  Double_t time, Double_t length, Double_t eLoss);
157 
158 
163  void ResetParameters();
164 
165 
167 
168 };
169 
170 
172  fTrackID = 0;
173  fVolumeID = 1;
174  fPosIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
175  fPosOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
176  fMomIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
177  fMomOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
178  fTime = fLength = fELoss = 0;
179  fPosIndex = 0;
180 }
181 
182 
183 #endif
184 
virtual void Register()
virtual TClonesArray * GetCollection(Int_t iColl) const
void ResetParameters()
TLorentzVector fMomIn
exit position in global frame
virtual void Print() const
std::vector< std::string > fListOfSensitives
enables the detection of neutral particles
Double32_t fELoss
length
Double_t val[nBoxes][nFEBox]
Definition: createCalib.C:11
bool fUseRadDamOption
Hit collection.
TVector3 offset(2, 0, 0)
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
Int_t fVolumeID
track index
bool CheckIfSensitive(std::string name)
virtual void EndOfEvent()
bool GetRadDamOption()
Double_t
Int_t GetSensorId(TString detName)
virtual void Initialize()
TClonesArray * fPndGemCollection
virtual void Reset()
TLorentzVector fPosIn
Det id.
PndGemMCPoint * AddHit(Int_t trackID, Int_t detID, Int_t sensID, TVector3 posIn, TVector3 posOut, TVector3 momIn, TVector3 momOut, Double_t time, Double_t length, Double_t eLoss)
void SetRadDamOption(bool val)
void SetExclusiveSensorType(const TString sens)
TString name
virtual void ConstructGeometry()
virtual void FinishRun()
TLorentzVector fMomOut
momentum
Double32_t fLength
time
ClassDef(PndGemDetector, 5)
Int_t fPosIndex
energy loss
virtual ~PndGemDetector()
TLorentzVector fPosOut
entry position in global frame
virtual Bool_t ProcessHits(FairVolume *vol=0)
Double32_t fTime
momentum