PandaRoot
PndEmc.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndEmc header file -----
3 // ----- Created 14/08/06 by S.Spataro -----
4 // -------------------------------------------------------------------------
5 //#pragma once
6 #ifndef PNDEMC_H
7 #define PNDEMC_H
8 
9 #include "TClonesArray.h"
10 #include "TVector3.h"
11 #include "TString.h"
12 #include "TLorentzVector.h"
13 #include "FairDetector.h"
14 
15 class TClonesArray;
16 class PndEmcPoint;
17 class FairVolume;
18 class TGeoNode;
19 
25 class PndEmc : public FairDetector {
26  public:
28  PndEmc();
29 
34  PndEmc(const char *name, Bool_t active, Bool_t fast = kFALSE, Bool_t storepnts = kTRUE);
35 
37  virtual ~PndEmc();
38 
42  virtual void Initialize();
43 
51  virtual Bool_t ProcessHits(FairVolume *vol = 0);
52 
58  virtual void EndOfEvent();
59 
60  virtual void BeginEvent();
65  virtual void Register();
66 
68  virtual TClonesArray *GetCollection(Int_t iColl) const;
69 
74  virtual void Print() const;
75 
80  virtual void Reset();
81 
89  virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset);
90 
94  virtual void ConstructGeometry();
95 
96  // construct detector from .dat file
98 
99  // construct detector from .root file
100  void ConstructRootGeometry();
101 
102  // construct detector -Barrel- from .root file
103  void ConstructRootGeomMod12();
104 
105  // construct detector -BwEndCap- from .root file
106  void ConstructRootGeomMod4();
107 
108  // construct detector -Fsc- from .root file
109  void ConstructRootGeomMod5();
110 
111  // recursively add volumes to the geoManager
112  void ExpandNode(TGeoVolume *fVol, TGeoVolume *Cave);
113 
114  // virtual Bool_t CheckIfSensitive(std::string name);
115 
116  // general function for chosing the combination of EMC geometry
117  virtual void SetGeometryVersion(const Int_t GeoNumber);
118  //
119  virtual void SetGeometryFileNameDouble(TString fname, TString fname2, Int_t fwbwchoice = 0, TString geoVer = "0");
120  //
121  virtual void SetGeometryFileNameTriple(TString fname, TString fname2, TString fname3, TString geoVer = "0");
122 
123  virtual void SetGeometryFileNameQuadruple(TString fname, TString fname2, TString fname3, TString fname4, TString geoVer = "0");
124 
125  PndEmcPoint *AddHit(Int_t trackID, Int_t detID, Int_t evtID, TVector3 pos, TVector3 mom, Double_t tof, Double_t length, Double_t eLoss, Short_t mod, Short_t row, Short_t crys,
126  Short_t copy, Bool_t enterning, Bool_t exiting);
127 
128  void SetStorageOfData(Bool_t val); // Method to specify whether points are stored or not.
129 
130  // replaces G3 initialisation via g3Config.C
131  virtual void SetSpecialPhysicsCuts();
132 
133  private:
134  Int_t fTrackID;
135  Int_t fVolumeID;
136  Int_t fEventID;
137  TLorentzVector fPos;
138  TLorentzVector fMom;
139  Double32_t fTime;
140  Double32_t fLength;
141  Double32_t fELoss;
142  Int_t fPosIndex;
143  TClonesArray *fEmcCollection;
144  // Int_t volDetector; //! MC volume ID of MUO
145  Bool_t bIsFastFsc;
146  Bool_t fStoreData; // Flag which specify whether points are stored or not
147  Bool_t fwendcap;
148  Bool_t bwendcap;
149 
150  TString fgeoName2;
151  TString fgeoName3;
152  TString fgeoName4;
153 
154  Int_t MapperVersion;
155 
156  // reset all parameters
157  void ResetParameters();
158 
159  PndEmc(const PndEmc &L);
160  PndEmc &operator=(const PndEmc &) { return *this; };
161 
162  ClassDef(PndEmc, 1)
163 };
164 
165 #endif
represents a mc hit in an emc crystal
Definition: PndEmcPoint.h:19
virtual void SetGeometryVersion(const Int_t GeoNumber)
void ConstructRootGeomMod4()
void ConstructRootGeometry()
virtual void ConstructGeometry()
virtual Bool_t ProcessHits(FairVolume *vol=0)
virtual void Reset()
virtual void SetGeometryFileNameQuadruple(TString fname, TString fname2, TString fname3, TString fname4, TString geoVer="0")
void SetStorageOfData(Bool_t val)
virtual void Register()
Simulation of EMC.
Definition: PndEmc.h:25
void ConstructRootGeomMod5()
void ExpandNode(TGeoVolume *fVol, TGeoVolume *Cave)
virtual void Initialize()
virtual void SetSpecialPhysicsCuts()
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
virtual void Print() const
void ConstructRootGeomMod12()
void ConstructASCIIGeometry()
PndEmcPoint * AddHit(Int_t trackID, Int_t detID, Int_t evtID, TVector3 pos, TVector3 mom, Double_t tof, Double_t length, Double_t eLoss, Short_t mod, Short_t row, Short_t crys, Short_t copy, Bool_t enterning, Bool_t exiting)
virtual TClonesArray * GetCollection(Int_t iColl) const
virtual void BeginEvent()
virtual void SetGeometryFileNameDouble(TString fname, TString fname2, Int_t fwbwchoice=0, TString geoVer="0")
virtual void EndOfEvent()
virtual void SetGeometryFileNameTriple(TString fname, TString fname2, TString fname3, TString geoVer="0")
virtual ~PndEmc()