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 
13 #ifndef PNDGEMDETECTOR_H
14 #define PNDGEMDETECTOR_H
15 
16 #include "TLorentzVector.h"
17 #include "FairDetector.h"
18 #include "TString.h"
19 
20 #include <vector>
21 
22 class TClonesArray;
23 class TGeoNode;
24 class PndGemMCPoint;
25 class FairVolume;
26 
27 class PndGemDetector : public FairDetector {
28 
29  public:
32 
37  PndGemDetector(const char *name, Bool_t active);
38 
40  virtual ~PndGemDetector();
41 
42  virtual void Initialize();
43 
51  virtual Bool_t ProcessHits(FairVolume *vol = 0);
52 
58  virtual void EndOfEvent();
59 
60  virtual void FinishRun();
61 
66  virtual void Register();
67 
69  virtual TClonesArray *GetCollection(Int_t iColl) const;
70 
75  virtual void Print() const;
76 
81  virtual void Reset();
82 
90  virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset);
91 
96  virtual void ConstructGeometry();
97  // void ConstructRootGeometry();
98  // void ConstructASCIIGeometry();
99  // void ExpandNode(TGeoNode *fN);
100 
101  void MisalignDetector();
102 
103  void SetExclusiveSensorType(const TString sens);
104  void SetRadDamOption(bool val) { fUseRadDamOption = val; };
105  bool GetRadDamOption() { return fUseRadDamOption; }
106 
107  private:
108  Int_t GetSensorId(TString detName);
109 
112  Int_t fTrackID;
113  Int_t fVolumeID;
114  TLorentzVector fPosIn;
115  TLorentzVector fPosOut;
116  TLorentzVector fMomIn;
117  TLorentzVector fMomOut;
118  Double32_t fTime;
119  Double32_t fLength;
120  Double32_t fELoss;
121  // std::map<TString, Int_t> fVolumeIDMap; //! map to create a unique Detector ID
122  // PndGemGeoHandling* fGeoH; //! Gives Access to the Path info of a hit
123  Int_t fPosIndex;
124  TClonesArray *fPndGemCollection;
125  bool fUseRadDamOption;
126 
127  std::vector<std::string> fListOfSensitives;
128 
129  bool CheckIfSensitive(std::string name);
130 
135  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);
136 
141  void ResetParameters();
142 
143  ClassDef(PndGemDetector, 5);
144 };
145 
146 inline void PndGemDetector::ResetParameters()
147 {
148  fTrackID = 0;
149  fVolumeID = 1;
150  fPosIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
151  fPosOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
152  fMomIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
153  fMomOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
154  fTime = fLength = fELoss = 0;
155  fPosIndex = 0;
156 }
157 
158 #endif
virtual TClonesArray * GetCollection(Int_t iColl) const
virtual void ConstructGeometry()
virtual void EndOfEvent()
virtual ~PndGemDetector()
virtual void Register()
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
virtual void Reset()
bool GetRadDamOption()
void SetRadDamOption(bool val)
virtual void FinishRun()
void SetExclusiveSensorType(const TString sens)
virtual void Initialize()
void MisalignDetector()
virtual Bool_t ProcessHits(FairVolume *vol=0)
virtual void Print() const