]>
Commit | Line | Data |
---|---|---|
1 | #ifndef ALIJETDUMMYGEO_H | |
2 | #define ALIJETDUMMYGEO_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | // | |
8 | // Temporarily added to define part of the EMCal geometry | |
9 | // necessary for the jet finder | |
10 | // Magali.Estienne@cern.ch | |
11 | // | |
12 | #include <TObject.h> | |
13 | #include <TArrayD.h> | |
14 | #include <TMath.h> | |
15 | #include <TVector3.h> | |
16 | ||
17 | class TGeoMatrix; | |
18 | class AliJetDummyShishKebabTrd1Module; | |
19 | ||
20 | class AliJetDummyGeo : public TObject | |
21 | { | |
22 | public: | |
23 | AliJetDummyGeo(); | |
24 | AliJetDummyGeo(const AliJetDummyGeo& geom); | |
25 | virtual ~AliJetDummyGeo(); | |
26 | static AliJetDummyGeo* GetInstance() {return new AliJetDummyGeo();} | |
27 | static AliJetDummyGeo* GetInstance(const char* /*name*/, const char* /*title*/) | |
28 | {return new AliJetDummyGeo();} | |
29 | const Char_t* GetNameOfEMCALEnvelope() const {return "XEN1";} | |
30 | Float_t GetEnvelop(Int_t index) const { return fEnvelop[index];} | |
31 | Float_t AngleFromEta(Float_t eta) const { | |
32 | // returns theta in radians for a given pseudorapidity | |
33 | return 2.0*TMath::ATan(TMath::Exp(-eta)); | |
34 | } | |
35 | Float_t ZFromEtaR(Float_t r,Float_t eta) const { | |
36 | // returns z in for a given | |
37 | // pseudorapidity and r=sqrt(x*x+y*y). | |
38 | return r/TMath::Tan(AngleFromEta(eta)); | |
39 | } | |
40 | Int_t GetNCells() const {return fNCells;} | |
41 | Float_t GetPhiModuleSize() const {return fPhiModuleSize;} | |
42 | Float_t GetEtaModuleSize() const {return fEtaModuleSize;} | |
43 | Float_t GetShellThickness() const {return fShellThickness;} | |
44 | Float_t GetSteelFrontThickness() const {return fSteelFrontThick;} | |
45 | Float_t GetLongModuleSize() const {return fLongModuleSize;} | |
46 | Float_t GetTrd1Angle() const {return fTrd1Angle;} | |
47 | Float_t Get2Trd1Dx2() const {return f2Trd1Dx2;} | |
48 | Int_t GetNPhi() const {return fNPhi;} | |
49 | Int_t GetNZ() const {return fNZ ;} | |
50 | Int_t GetNumberOfSuperModules() const {return fNumberOfSuperModules;} | |
51 | Float_t GetArm1EtaMin() const {return fArm1EtaMin;} | |
52 | Float_t GetArm1EtaMax() const {return fArm1EtaMax;} | |
53 | Float_t GetArm1PhiMin() const {return fArm1PhiMin;} | |
54 | Float_t GetArm1PhiMax() const {return fArm1PhiMax;} | |
55 | Float_t GetIPDistance() const {return fIPDistance;} | |
56 | void EtaPhiFromIndex(Int_t id, Float_t& eta, Float_t& phi) const; | |
57 | void GetGlobal(const Double_t *loc, Double_t *glob, Int_t ind) const; | |
58 | void GetGlobal(Int_t absId, Double_t glob[3]) const; | |
59 | void GetGlobal(Int_t absId, TVector3 &vglob) const; | |
60 | Bool_t RelPosCellInSModule(Int_t absId, Double_t loc[3]) const; | |
61 | Bool_t RelPosCellInSModule(Int_t absId, Double_t &xr, Double_t &yr, Double_t &zr) const; | |
62 | Bool_t CheckAbsCellId(Int_t absId) const; | |
63 | Bool_t GetCellIndex(Int_t absId,Int_t &nSupMod,Int_t &nModule,Int_t &nIphi,Int_t &nIeta) const; | |
64 | void GetCellPhiEtaIndexInSModule(Int_t nSupMod, Int_t nModule, Int_t nIphi, Int_t nIeta, Int_t &iphi, Int_t &ieta) const; | |
65 | void GetModulePhiEtaIndexInSModule(Int_t nSupMod, Int_t nModule, Int_t &iphim, Int_t &ietam) const; | |
66 | Bool_t GetAbsCellIdFromEtaPhi(Double_t eta,Double_t phi, Int_t &absId) const; | |
67 | Bool_t SuperModuleNumberFromEtaPhi(Double_t eta, Double_t phi, Int_t &nSupMod) const; | |
68 | Int_t GetAbsCellIdFromCellIndexes(Int_t nSupMod, Int_t iphi, Int_t ieta) const; | |
69 | void GetModuleIndexesFromCellIndexesInSModule(Int_t nSupMod, Int_t iphi, Int_t ieta, | |
70 | Int_t &iphim, Int_t &ietam, Int_t &nModule) const; | |
71 | Int_t GetAbsCellId(Int_t nSupMod, Int_t nModule, Int_t nIphi, Int_t nIeta) const; | |
72 | Int_t GetNumberOfModuleInPhiDirection(Int_t nSupMod) const | |
73 | { | |
74 | // inline function | |
75 | if(nSupMod>=10) return fNPhi/2; | |
76 | else return fNPhi; | |
77 | } | |
78 | ||
79 | void CreateListOfTrd1Modules(); | |
80 | TList *GetShishKebabTrd1Modules() const {return fShishKebabTrd1Modules;} | |
81 | AliJetDummyShishKebabTrd1Module *GetShishKebabModule(Int_t neta); | |
82 | ||
83 | Bool_t GetPhiBoundariesOfSMGap(Int_t nPhiSec, Double_t &phiMin, Double_t &phiMax) const; | |
84 | void GetTransformationForSM(); | |
85 | Float_t GetSampling() const {return fSampling;} | |
86 | private: | |
87 | AliJetDummyGeo &operator=(const AliJetDummyGeo &det); | |
88 | ||
89 | protected: | |
90 | Float_t fArm1EtaMin; // Minimum pseudorapidity position of EMCAL in Eta | |
91 | Float_t fArm1EtaMax; // Maximum pseudorapidity position of EMCAL in Eta | |
92 | Float_t fArm1PhiMin; // Minimum angular position of EMCAL in Phi (degrees) | |
93 | Float_t fArm1PhiMax; // Maximum angular position of EMCAL in Phi (degrees) | |
94 | Int_t fNumberOfSuperModules; // Number of supermodules | |
95 | Float_t fSteelFrontThick; // Thickness of the front stell face of the support box - 9-sep-04 | |
96 | Float_t fLateralSteelStrip; // 13-may-05 | |
97 | Float_t fEnvelop[3]; // the GEANT TUB for the detector | |
98 | Float_t fIPDistance; // Radial Distance of the inner surface of the EMCAL | |
99 | Float_t fPhiGapForSM; // Gap betweeen supermodules in phi direction | |
100 | Int_t fNPhi; // Number of Towers in the PHI direction | |
101 | Int_t fNZ; // Number of Towers in the Z direction | |
102 | Float_t fPhiModuleSize; // Phi -> X | |
103 | Float_t fEtaModuleSize; // Eta -> Y | |
104 | Int_t fNPHIdiv; // number phi divizion of module | |
105 | Int_t fNETAdiv; // number eta divizion of module | |
106 | Float_t fPhiTileSize; // Size of phi tile | |
107 | Float_t fEtaTileSize; // Size of eta tile | |
108 | Int_t fNECLayers; // number of scintillator layers | |
109 | Float_t fECScintThick; // cm, Thickness of the scintillators | |
110 | Float_t fECPbRadThickness; // cm, Thickness of the Pb radiators | |
111 | Float_t fSampling; // Sampling factor | |
112 | Float_t fTrd1Angle; // angle in x-z plane (in degree) | |
113 | Int_t fNCellsInModule; // number cell in module | |
114 | Int_t fNCellsInSupMod; // number cell in super module | |
115 | Int_t fNCells; // number of cells in calo | |
116 | Float_t fLongModuleSize; // Size of long module | |
117 | Float_t f2Trd1Dx2; // 2*dx2 for TRD1 | |
118 | Float_t fShellThickness; // Total thickness in (x,y) direction | |
119 | Float_t fZLength; // Total length in z direction | |
120 | Float_t fEtaMaxOfTRD1; // max eta in case of TRD1 geometry (see AliEMCALShishKebabTrd1Module) | |
121 | Float_t fParSM[3]; // SM sizes as in GEANT (TRD1) | |
122 | TArrayD fPhiBoundariesOfSM; // phi boundaries of SM in rad; size is fNumberOfSuperModules; | |
123 | TArrayD fPhiCentersOfSM; // phi of centers of SMl size is fNumberOfSuperModules/2 | |
124 | TGeoMatrix* fMatrixOfSM[12]; //![fNumberOfSuperModules]; get from gGeoManager; | |
125 | TArrayD fCentersOfCellsEtaDir; // size fNEta*fNETAdiv (for TRD1 only) (eta or z in SM, in cm) | |
126 | TArrayD fCentersOfCellsXDir; // size fNEta*fNETAdiv (for TRD1 only) ( x in SM, in cm) | |
127 | TArrayD fCentersOfCellsPhiDir; // size fNPhi*fNPHIdiv (for TRD1 only) (phi or y in SM, in cm) | |
128 | TArrayD fEtaCentersOfCells; // [fNEta*fNETAdiv*fNPhi*fNPHIdiv], positive direction (eta>0); | |
129 | // eta depend from phi position; | |
130 | TArrayD fPhiCentersOfCells; // [fNPhi*fNPHIdiv] from center of SM (-10. < phi < +10.) | |
131 | TList *fShishKebabTrd1Modules; // List of modules | |
132 | Int_t fDebug; // Debug flag | |
133 | ClassDef(AliJetDummyGeo,1) | |
134 | }; | |
135 | ||
136 | #endif |