SND@LHC Software
Loading...
Searching...
No Matches
ecal.h
Go to the documentation of this file.
1
8#ifndef ECALDETAILED_H
9#define ECALDETAILED_H
10
11
12#include "ecalPoint.h"
13#include "ecalStructure.h"
14#include "ecalInf.h"
15
16#include "FairDetector.h"
17
18#include "TClonesArray.h"
19#include "TLorentzVector.h"
20#include "TVector3.h"
21
22#include <list>
23
24class ecalPoint;
25class FairVolume;
26class TGeoTranslation;
27class ecalLightMap;
28
29#define kNumberOfECALSensitiveVolumes 6
30const Int_t cMaxModuleType=5;
31
32class ecal : public FairDetector
33{
34
35public:
36
38 ecal();
39
40
45 ecal(const char* name, Bool_t active,
46 const char* fileGeo="ecal_Detailed.geo");
47
48
50 virtual ~ecal();
51
52
60 virtual Bool_t ProcessHits(FairVolume* vol = NULL);
61
62
67 virtual void ConstructGeometry();
68
69 virtual void EndOfEvent();
70 virtual void BeginEvent();
71 virtual void Reset();
72 virtual void Print() const;
73 virtual void CopyClones(TClonesArray* cl1, TClonesArray* cl2, Int_t offset);
74 virtual void Register();
75 virtual void ChangeHit(ecalPoint* oldHit=NULL);
76 virtual void FinishPrimary();
77
78 virtual void Initialize();
79
81 virtual TClonesArray* GetCollection(Int_t iColl) const;
82 virtual void SetSpecialPhysicsCuts();
83
86 static Bool_t GetCellCoord(Int_t fVolumeID, Float_t &x, Float_t &y, Int_t& tenergy);
89 static Bool_t GetCellCoordInf(Int_t fVolumeID, Float_t &x, Float_t &y, Int_t& tenergy);
90 // Get cell for python
91 static Bool_t GetCellCoordForPy(Int_t fVolID, TVector3 &all);
92protected:
93 ecalPoint* AddHit(Int_t trackID, Int_t detID, TVector3 pos,
94 TVector3 mom, Double_t time, Double_t length,
95 Double_t eLoss, Int_t pdgcode);
96 ecalPoint* AddLiteHit(Int_t trackID, Int_t detID, Double32_t time, Double32_t eLoss);
97
98private:
99 Bool_t FillLitePoint(Int_t volnum);
100 void FillWallPoint();
105 void ResetParameters();
106 void SetEcalCuts(Int_t medium);
107 ecalPoint* FindHit(Int_t VolId, Int_t TrackId);
108
109private:
111 Option_t* fDebug;
112
114 Int_t GetVolType(Int_t volnum);
118 Int_t fTrackID;
120 Int_t fVolumeID;
122 TLorentzVector fPos;
124 TLorentzVector fMom;
126 Double32_t fTime;
128 Double32_t fLength;
130 Double32_t fELoss;
132 Int_t fPosIndex;
133
135 TClonesArray* fEcalCollection;
137 TClonesArray* fLiteCollection;
140 Float_t fEcalSize[3];
145 Int_t fXSize;
146 Int_t fYSize;
148 Float_t fDX;
149 Float_t fDY;
151 Float_t fModuleSize;
153 Float_t fZEcal;
155 Float_t fSemiX;
156 Float_t fSemiY;
168 Float_t fEdging;
170 Float_t fHoleRad;
172 Float_t fFiberRad;
184 Int_t fNLayers;
188 Float_t fGeoScale;
192 Int_t fNRows1;
196 Int_t fNRows2;
198 Int_t fNColumns;
200 Int_t fNRows;
202 Int_t fVolIdMax;
214
216 TGeoVolume* ConstructRaw(Int_t number);
218 void ConstructModule(Int_t type);
220 void ConstructCell(Int_t type);
222 void ConstructTile(Int_t type, Int_t material);
225 void ConstructModuleSimple(Int_t type);
227 void ConstructCellSimple(Int_t type);
229 void ConstructTileSimple(Int_t type, Int_t material);
231 TGeoVolume* fCells[cMaxModuleType];
236 TGeoVolume* fHoleVol[3];
237 TGeoVolume* fFiberVol[3];
238 TGeoVolume* fSteelTapes[2];
239 TGeoTranslation** fHolePos[cMaxModuleType];
241 std::list<std::pair<Int_t, TGeoVolume*> > fRawNumber;
242
246 Int_t InitMedium(const char* name);
248 void InitMedia();
249
250 ecal(const ecal&);
252
253 ClassDef(ecal,1)
254
255};
256
258{
259 fTrackID = fVolumeID = 0;
260 fPos.SetXYZM(0.0, 0.0, 0.0, 0.0);
261 fMom.SetXYZM(0.0, 0.0, 0.0, 0.0);
262 fTime = fLength = fELoss = 0;
263 fPosIndex = 0;
264};
265
266
267#endif
Definition ecal.h:33
Bool_t FillLitePoint(Int_t volnum)
Definition ecal.cxx:564
Double32_t fELoss
Definition ecal.h:130
virtual void Print() const
Definition ecal.cxx:635
virtual void Initialize()
Definition ecal.cxx:289
virtual void SetSpecialPhysicsCuts()
Definition ecal.cxx:355
Int_t fCF[cMaxModuleType]
Definition ecal.h:178
ecal & operator=(const ecal &)
Int_t fYSize
Definition ecal.h:146
virtual void FinishPrimary()
Definition ecal.cxx:338
virtual void BeginEvent()
Definition ecal.cxx:819
Double32_t fLength
Definition ecal.h:128
Float_t fThicknessLayer
Definition ecal.h:164
std::list< std::pair< Int_t, TGeoVolume * > > fRawNumber
Number of mudules with type.
Definition ecal.h:241
Int_t InitMedium(const char *name)
Definition ecal.cxx:1009
void ConstructTile(Int_t type, Int_t material)
Definition ecal.cxx:1048
Float_t fEdging
Definition ecal.h:168
ecalLightMap * fLightMaps[cMaxModuleType]
Definition ecal.h:182
ecalInf * fInf
Definition ecal.h:110
TGeoVolume * fHoleVol[3]
Tyvek sheets.
Definition ecal.h:236
Int_t fSimpleGeo
Definition ecal.h:143
Option_t * fDebug
Definition ecal.h:111
Float_t fGeoScale
Definition ecal.h:188
Float_t fYCell[cMaxModuleType]
Definition ecal.h:175
Int_t fNColumns2
Definition ecal.h:194
Float_t fSemiY
Definition ecal.h:156
Float_t fThicknessTyvk
Definition ecal.h:162
Int_t fPosIndex
Definition ecal.h:132
Int_t fXSize
Definition ecal.h:145
void FillWallPoint()
Definition ecal.cxx:527
virtual Bool_t ProcessHits(FairVolume *vol=NULL)
Definition ecal.cxx:384
void ConstructCellSimple(Int_t type)
Definition ecal.cxx:975
TClonesArray * fLiteCollection
Definition ecal.h:137
virtual void Register()
Definition ecal.cxx:694
Int_t GetVolType(Int_t volnum)
Definition ecal.cxx:516
Float_t fModuleSize
Definition ecal.h:151
void ConstructCell(Int_t type)
Definition ecal.cxx:941
TGeoVolume * fTileEdging[cMaxModuleType]
Pb tiles.
Definition ecal.h:233
Float_t fFiberRad
Definition ecal.h:172
Float_t fEcalSize[3]
Definition ecal.h:140
virtual void ChangeHit(ecalPoint *oldHit=NULL)
Definition ecal.cxx:344
TGeoVolume * fSteelTapes[2]
Fiber volume.
Definition ecal.h:238
Float_t fThicknessLead
Definition ecal.h:158
TLorentzVector fMom
Definition ecal.h:124
Int_t fFirstNumber
Definition ecal.h:204
virtual void ConstructGeometry()
Definition ecal.cxx:703
Int_t fVolArr[kNumberOfECALSensitiveVolumes]
Definition ecal.h:213
TGeoTranslation ** fHolePos[cMaxModuleType]
Steel tapes.
Definition ecal.h:239
ecalPoint * AddHit(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Double_t eLoss, Int_t pdgcode)
Definition ecal.cxx:829
Int_t fVolumeID
Definition ecal.h:120
Float_t fHoleRad
Definition ecal.h:170
Int_t fNLayers
Definition ecal.h:184
void InitMedia()
Definition ecal.cxx:1032
ecal(const ecal &)
TGeoVolume * ConstructRaw(Int_t number)
Definition ecal.cxx:776
Int_t fNRows
Definition ecal.h:200
Int_t fNRows1
Definition ecal.h:192
Float_t fZEcal
Definition ecal.h:153
Float_t fXCell[cMaxModuleType]
Definition ecal.h:174
TGeoVolume * fCells[cMaxModuleType]
Calorimeter Modules.
Definition ecal.h:231
Float_t fSemiX
Definition ecal.h:155
void ResetParameters()
Definition ecal.h:257
Int_t fVolIdMax
Definition ecal.h:202
Int_t fNRows2
Definition ecal.h:196
virtual void Reset()
Definition ecal.cxx:625
static Bool_t GetCellCoord(Int_t fVolumeID, Float_t &x, Float_t &y, Int_t &tenergy)
Definition ecal.cxx:1299
TString fLightMapNames[cMaxModuleType]
Definition ecal.h:180
void ConstructModule(Int_t type)
Definition ecal.cxx:850
Float_t fThicknessScin
Definition ecal.h:160
void SetEcalCuts(Int_t medium)
Definition ecal.cxx:318
TGeoVolume * fPbTiles[cMaxModuleType]
Edging of scintillator tiles.
Definition ecal.h:234
TGeoVolume * fScTiles[cMaxModuleType]
Calorimeter Cells.
Definition ecal.h:232
Int_t fNH[cMaxModuleType]
Definition ecal.h:177
void ConstructTileSimple(Int_t type, Int_t material)
Definition ecal.cxx:1195
virtual ~ecal()
Definition ecal.cxx:302
Double32_t fTime
Definition ecal.h:126
Float_t fThicknessSteel
Definition ecal.h:166
Float_t fModuleLenght
Definition ecal.h:186
ecalPoint * AddLiteHit(Int_t trackID, Int_t detID, Double32_t time, Double32_t eLoss)
Definition ecal.cxx:841
TGeoVolume * fTvTiles[cMaxModuleType]
Scintillator tiles.
Definition ecal.h:235
virtual void EndOfEvent()
Definition ecal.cxx:605
Int_t fStructureId
List of constructed raws.
Definition ecal.h:244
TGeoVolume * fModules[cMaxModuleType]
Definition ecal.h:230
TGeoVolume * fFiberVol[3]
Hole volume.
Definition ecal.h:237
ecal()
Definition ecal.cxx:46
ecalPoint * FindHit(Int_t VolId, Int_t TrackId)
Definition ecal.cxx:553
Int_t fNColumns1
Definition ecal.h:190
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
Definition ecal.cxx:659
Float_t fDX
Definition ecal.h:148
static Bool_t GetCellCoordInf(Int_t fVolumeID, Float_t &x, Float_t &y, Int_t &tenergy)
Definition ecal.cxx:1264
void ConstructModuleSimple(Int_t type)
Definition ecal.cxx:905
Float_t fDY
Definition ecal.h:149
TClonesArray * fEcalCollection
Definition ecal.h:135
Int_t fTrackID
Definition ecal.h:118
Int_t fModulesWithType[cMaxModuleType]
Positions of holes.
Definition ecal.h:240
virtual TClonesArray * GetCollection(Int_t iColl) const
Definition ecal.cxx:616
static Bool_t GetCellCoordForPy(Int_t fVolID, TVector3 &all)
Definition ecal.cxx:1304
TLorentzVector fPos
Definition ecal.h:122
Int_t fNColumns
Definition ecal.h:198
const Int_t cMaxModuleType
Definition ecal.h:30
#define kNumberOfECALSensitiveVolumes
Definition ecal.h:29