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