FairRoot/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 
10 #include "TClonesArray.h"
11 #include "TVector3.h"
12 #include "TString.h"
13 #include "TLorentzVector.h"
14 #include "FairDetector.h"
15 
16 class TClonesArray;
17 class PndEmcPoint;
18 class FairVolume;
19 class TGeoNode;
20 
26 class PndEmc : public FairDetector
27 {
28 public:
29 
31  PndEmc();
32 
37  PndEmc(const char* name, Bool_t active, Bool_t fast = kFALSE, Bool_t storepnts = kTRUE);
38 
39 
41  virtual ~PndEmc();
42 
43 
47  virtual void Initialize();
48 
49 
57  virtual Bool_t ProcessHits(FairVolume* vol = 0);
58 
59 
65  virtual void EndOfEvent();
66 
67 
68  virtual void BeginEvent();
73  virtual void Register();
74 
75 
77  virtual TClonesArray* GetCollection(Int_t iColl) const;
78 
79 
84  virtual void Print() const;
85 
86 
91  virtual void Reset();
92 
93 
101  virtual void CopyClones(TClonesArray* cl1, TClonesArray* cl2,
102  Int_t offset);
103 
104 
108  virtual void ConstructGeometry();
109 
110  // construct detector from .dat file
111  void ConstructASCIIGeometry();
112 
113  // construct detector from .root file
114  void ConstructRootGeometry();
115 
116  // construct detector -Barrel- from .root file
117  void ConstructRootGeomMod12();
118 
119  // construct detector -BwEndCap- from .root file
120  void ConstructRootGeomMod4();
121 
122  // construct detector -Fsc- from .root file
123  void ConstructRootGeomMod5();
124 
125  // recursively add volumes to the geoManager
126  void ExpandNode(TGeoVolume *fVol, TGeoVolume *Cave);
127 
128 // virtual Bool_t CheckIfSensitive(std::string name);
129 
130  // general function for chosing the combination of EMC geometry
131  virtual void SetGeometryVersion(const Int_t GeoNumber);
132  //
133  virtual void SetGeometryFileNameDouble(TString fname, TString fname2, Int_t fwbwchoice=0, TString geoVer="0");
134  //
135  virtual void SetGeometryFileNameTriple(TString fname, TString fname2, TString fname3, TString geoVer="0");
136 
137  virtual void SetGeometryFileNameQuadruple(TString fname, TString fname2, TString fname3, TString fname4, TString geoVer="0");
138 
139  PndEmcPoint* AddHit(Int_t trackID, Int_t detID, Int_t evtID, TVector3 pos, TVector3 mom,
140  Double_t tof, Double_t length, Double_t eLoss,
141  Short_t mod, Short_t row, Short_t crys, Short_t copy,
142  Bool_t enterning, Bool_t exiting);
143 
144  void SetStorageOfData(Bool_t val); // Method to specify whether points are stored or not.
145 
146  // replaces G3 initialisation via g3Config.C
147  virtual void SetSpecialPhysicsCuts();
148 
149 
150 private:
151 
152  Int_t fTrackID;
153  Int_t fVolumeID;
154  Int_t fEventID;
155  TLorentzVector fPos;
156  TLorentzVector fMom;
157  Double32_t fTime;
158  Double32_t fLength;
159  Double32_t fELoss;
160  Int_t fPosIndex;
161  TClonesArray* fEmcCollection;
162  //Int_t volDetector; //! MC volume ID of MUO
164  Bool_t fStoreData; // Flag which specify whether points are stored or not
167 
168 
172 
174 
175  // reset all parameters
176  void ResetParameters();
177 
178  PndEmc(const PndEmc& L);
179  PndEmc& operator= (const PndEmc&) {return *this;};
180 
181  ClassDef(PndEmc,1)
182 };
183 
184 
185 #endif
represents a mc hit in an emc crystal
Definition: PndEmcPoint.h:19
int row
Definition: anaLmdDigi.C:67
TVector3 pos
Bool_t bwendcap
Flag for the new FwEndCap geometry.
Definition: PndEmc.h:166
void ConstructRootGeomMod4()
Definition: PndEmc.cxx:1322
TString fgeoName3
Definition: PndEmc.h:170
Int_t fVolumeID
track index
Definition: PndEmc.h:153
Double_t val[nBoxes][nFEBox]
Definition: createCalib.C:11
void ConstructRootGeometry()
Definition: PndEmc.cxx:1240
virtual TClonesArray * GetCollection(Int_t iColl) const
Definition: PndEmc.cxx:910
virtual void ConstructGeometry()
Definition: PndEmc.cxx:1164
Double32_t fTime
momentum
Definition: PndEmc.h:157
Double_t mom
Definition: plot_dirc.C:14
void SetStorageOfData(Bool_t val)
Definition: PndEmc.cxx:941
TVector3 offset(2, 0, 0)
virtual void SetGeometryFileNameQuadruple(TString fname, TString fname2, TString fname3, TString fname4, TString geoVer="0")
Definition: PndEmc.cxx:1137
TString fgeoName4
Definition: PndEmc.h:171
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
Definition: PndEmc.cxx:950
virtual void EndOfEvent()
Definition: PndEmc.cxx:895
Simulation of EMC.
Definition: PndEmc.h:26
virtual void Register()
Definition: PndEmc.cxx:902
void ConstructRootGeomMod5()
Definition: PndEmc.cxx:1382
Int_t fPosIndex
energy loss
Definition: PndEmc.h:160
Bool_t bIsFastFsc
Hit collection.
Definition: PndEmc.h:163
void ExpandNode(TGeoVolume *fVol, TGeoVolume *Cave)
Definition: PndEmc.cxx:1424
Double_t
FairModule * Cave
Definition: sim_emc_apd.C:32
Int_t fTrackID
Definition: PndEmc.h:152
void ResetParameters()
Definition: PndEmc.cxx:1735
TLorentzVector fMom
position
Definition: PndEmc.h:156
virtual void SetGeometryVersion(const Int_t GeoNumber)
Definition: PndEmc.cxx:966
virtual void Initialize()
Definition: PndEmc.cxx:95
Double32_t fELoss
length
Definition: PndEmc.h:159
TString fgeoName2
Flag for the new BwEndCap geometry.
Definition: PndEmc.h:169
PndEmc & operator=(const PndEmc &)
Definition: PndEmc.h:179
virtual ~PndEmc()
Definition: PndEmc.cxx:83
TString name
Int_t fEventID
volume id
Definition: PndEmc.h:154
virtual void SetGeometryFileNameTriple(TString fname, TString fname2, TString fname3, TString geoVer="0")
Definition: PndEmc.cxx:1116
Bool_t fwendcap
Definition: PndEmc.h:165
virtual void Print() const
Definition: PndEmc.cxx:918
TLorentzVector fPos
event id
Definition: PndEmc.h:155
virtual Bool_t ProcessHits(FairVolume *vol=0)
Definition: PndEmc.cxx:113
PndEmc()
Definition: PndEmc.cxx:59
virtual void BeginEvent()
Definition: PndEmc.cxx:106
void ConstructRootGeomMod12()
Definition: PndEmc.cxx:1296
void ConstructASCIIGeometry()
Definition: PndEmc.cxx:1481
virtual void SetGeometryFileNameDouble(TString fname, TString fname2, Int_t fwbwchoice=0, TString geoVer="0")
Definition: PndEmc.cxx:1096
virtual void Reset()
Definition: PndEmc.cxx:931
virtual void SetSpecialPhysicsCuts()
Definition: PndEmc.cxx:1746
Int_t MapperVersion
Definition: PndEmc.h:173
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)
Definition: PndEmc.cxx:1721
TClonesArray * fEmcCollection
Definition: PndEmc.h:161
Double32_t fLength
time
Definition: PndEmc.h:158
Bool_t fStoreData
Flag for fast fsc geometry.
Definition: PndEmc.h:164