PandaRoot
PndGemDetector.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 // -------------------------------------------------------------------------
14 // ----- PndGemDetector header file -----
15 // ----- Created 27/10/08 by R.Kliemt -----
16 // -------------------------------------------------------------------------
17 
25 #ifndef PNDGEMDETECTOR_H
26 #define PNDGEMDETECTOR_H
27 
28 #include "TLorentzVector.h"
29 #include "FairDetector.h"
30 #include "TString.h"
31 
32 #include <vector>
33 
34 class TClonesArray;
35 class TGeoNode;
36 class PndGemMCPoint;
37 class FairVolume;
38 
39 class PndGemDetector : public FairDetector {
40 
41  public:
44 
49  PndGemDetector(const char *name, Bool_t active);
50 
52  virtual ~PndGemDetector();
53 
54  virtual void Initialize();
55 
63  virtual Bool_t ProcessHits(FairVolume *vol = 0);
64 
70  virtual void EndOfEvent();
71 
72  virtual void FinishRun();
73 
78  virtual void Register();
79 
81  virtual TClonesArray *GetCollection(Int_t iColl) const;
82 
87  virtual void Print() const;
88 
93  virtual void Reset();
94 
102  virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset);
103 
108  virtual void ConstructGeometry();
109  // void ConstructRootGeometry();
110  // void ConstructASCIIGeometry();
111  // void ExpandNode(TGeoNode *fN);
112 
113  void MisalignDetector();
114 
115  void SetExclusiveSensorType(const TString sens);
116  void SetRadDamOption(bool val) { fUseRadDamOption = val; };
117  bool GetRadDamOption() { return fUseRadDamOption; }
118 
119  private:
120  Int_t GetSensorId(TString detName);
121 
124  Int_t fTrackID;
125  Int_t fVolumeID;
126  TLorentzVector fPosIn;
127  TLorentzVector fPosOut;
128  TLorentzVector fMomIn;
129  TLorentzVector fMomOut;
130  Double32_t fTime;
131  Double32_t fLength;
132  Double32_t fELoss;
133  // std::map<TString, Int_t> fVolumeIDMap; //! map to create a unique Detector ID
134  // PndGemGeoHandling* fGeoH; //! Gives Access to the Path info of a hit
135  Int_t fPosIndex;
136  TClonesArray *fPndGemCollection;
137  bool fUseRadDamOption;
138 
139  std::vector<std::string> fListOfSensitives;
140 
141  bool CheckIfSensitive(std::string name);
142 
147  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);
148 
153  void ResetParameters();
154 
155  ClassDef(PndGemDetector, 5);
156 };
157 
158 inline void PndGemDetector::ResetParameters()
159 {
160  fTrackID = 0;
161  fVolumeID = 1;
162  fPosIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
163  fPosOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
164  fMomIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
165  fMomOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
166  fTime = fLength = fELoss = 0;
167  fPosIndex = 0;
168 }
169 
170 #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