PandaRoot
PndMdt.h
Go to the documentation of this file.
1 
2 #ifndef PNDMDT_H
3 #define PNDMDT_H 1
4 
5 #include "TROOT.h"
6 #include "TClonesArray.h"
7 #include "TLorentzVector.h"
8 #include "TString.h"
9 
10 #include "TGeoManager.h"
11 #include "TGeoVolume.h"
12 
13 #include "FairRootManager.h"
14 #include "FairDetector.h"
15 #include "FairVolume.h"
16 
17 #include "PndGeoMdtPar.h"
18 //#include "PndMdtPoint.h"
19 
20 class PndMdt : public FairDetector {
21  public:
22  PndMdt();
23  PndMdt(const char *name, Bool_t active);
24  ~PndMdt();
25 
26  inline void SetMdtMagnet(bool opt = false)
27  {
28  mdtMagnet = opt;
29  return;
30  };
31  inline void SetMdtCoil(bool opt = false)
32  {
33  mdtCoil = opt;
34  return;
35  };
36  inline void SetMdtMFIron(bool opt = false)
37  {
38  mdtMFI = opt;
39  return;
40  };
41 
42  void SetBarrel(TString name) { fBarrel = name; };
43  void SetEndcap(TString name) { fEndcap = name; };
44  void SetMuonFilter(TString name) { fMuonFilter = name; };
45  void SetForward(TString name) { fForward = name; };
46  // hit
47  inline void Register() { FairRootManager::Instance()->Register("MdtPoint", "Mdt", fMdtCollection, kTRUE); };
48 
49  void ResetParameters();
50  void Print() const;
51  void Reset();
52 
54  TClonesArray *GetCollection(Int_t iColl) const;
55 
56  // detector
57  inline void SetVerbosity(Bool_t verbosity) { fVerboseLevel = verbosity; };
58 
59  void ConstructGeometry();
60  void Initialize();
61  void BeginEvent();
62  Bool_t ProcessHits(FairVolume *vol);
63  Bool_t ProcessHitsFast(FairVolume *vol);
64  Bool_t ProcessHitsRoot(FairVolume *vol);
65  void EndOfEvent();
66 
67  private:
68  Bool_t CheckIfSensitive(std::string name);
69  Int_t PdgToIndex(Int_t pdg);
70 
71  void PndMdtMagnet();
72  void PndMdtMuonFilter();
73  void PndMdtMFIron();
74  void PndMdtForward();
75  void PndMdtCoil();
76  void ConstructGeometryTo();
77  void ConstructGeometryFast();
78  void ConstructGeometryRoot();
79  void ConstructGeometryDu();
80 
81  // hit
82  TClonesArray *fMdtCollection;
83  Int_t fTrkIn;
84  Float_t fELoss;
85  Float_t fTime;
86  TLorentzVector fPos_In;
87  TLorentzVector fMom_In;
88 
89  // detector
90  Bool_t fVerboseLevel;
91 
92  bool mdtMagnet;
93  bool mdtCoil;
94  bool mdtMFI;
95 
96  TString fBarrel;
97  TString fEndcap;
98  TString fMuonFilter;
99  TString fForward;
100 
101  ClassDef(PndMdt, 1)
102 };
103 
104 #endif /* !PNDMDT_H */
void Initialize()
void SetForward(TString name)
Definition: PndMdt.h:45
Bool_t ProcessHitsFast(FairVolume *vol)
void Print() const
void SetMdtCoil(bool opt=false)
Definition: PndMdt.h:31
void ResetParameters()
void BeginEvent()
void SetMdtMFIron(bool opt=false)
Definition: PndMdt.h:36
void Reset()
void SetMdtMagnet(bool opt=false)
Definition: PndMdt.h:26
void Register()
Definition: PndMdt.h:47
Bool_t ProcessHits(FairVolume *vol)
void SetBarrel(TString name)
Definition: PndMdt.h:42
void EndOfEvent()
Bool_t ProcessHitsRoot(FairVolume *vol)
void SetEndcap(TString name)
Definition: PndMdt.h:43
void SetMuonFilter(TString name)
Definition: PndMdt.h:44
void SetVerbosity(Bool_t verbosity)
Definition: PndMdt.h:57
Definition: PndMdt.h:20
void ConstructGeometry()
TClonesArray * GetCollection(Int_t iColl) const