]> git.uio.no Git - u/mrichter/AliRoot.git/blob - JETAN/AliJetDummyGeo.h
Ignoring smell subdet
[u/mrichter/AliRoot.git] / JETAN / AliJetDummyGeo.h
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 // Author: Magali Estienne
11 // Magali.Estienne@cern.ch
12
13
14 #include <TObject.h>
15 #include <TArrayD.h>
16 #include <TMath.h>
17 #include <TVector3.h>
18
19 class TGeoMatrix;
20
21 class AliJetDummyGeo : public TObject 
22 {
23  public: 
24   AliJetDummyGeo();
25   AliJetDummyGeo(const AliJetDummyGeo& geom);
26   virtual ~AliJetDummyGeo();
27   static AliJetDummyGeo* GetInstance() {return new AliJetDummyGeo();}
28   static AliJetDummyGeo* GetInstance(char* /*name*/, char* /*title*/)
29     {return new AliJetDummyGeo();}
30   Char_t* GetNameOfEMCALEnvelope() const {return "XEN1";}
31   Float_t GetEnvelop(Int_t index) const { return fEnvelop[index];}
32   Float_t AngleFromEta(Float_t eta) const { 
33     // returns theta in radians for a given pseudorapidity
34     return 2.0*TMath::ATan(TMath::Exp(-eta));
35   }
36   Float_t ZFromEtaR(Float_t r,Float_t eta) const { 
37     // returns z in for a given
38     // pseudorapidity and r=sqrt(x*x+y*y).
39     return r/TMath::Tan(AngleFromEta(eta));
40   }
41   Int_t   GetNCells()               const {return fNCells;}
42   Float_t GetPhiModuleSize()        const {return fPhiModuleSize;}
43   Float_t GetEtaModuleSize()        const {return fEtaModuleSize;}
44   Float_t GetShellThickness()       const {return fShellThickness;}
45   Int_t   GetNPhi()                 const {return fNPhi;}
46   Int_t   GetNumberOfSuperModules() const {return fNumberOfSuperModules;}
47   Float_t GetArm1EtaMin()           const {return fArm1EtaMin;}
48   Float_t GetArm1EtaMax()           const {return fArm1EtaMax;}
49   Float_t GetArm1PhiMin()           const {return fArm1PhiMin;}
50   Float_t GetArm1PhiMax()           const {return fArm1PhiMax;}
51   void    EtaPhiFromIndex(Int_t id, Float_t& eta, Float_t& phi);
52   void    GetGlobal(const Double_t *loc, Double_t *glob, int ind) const;
53   void    GetGlobal(Int_t absId, Double_t glob[3]) const;
54   void    GetGlobal(Int_t absId, TVector3 &vglob) const;
55   Bool_t  RelPosCellInSModule(Int_t absId, Double_t loc[3]) const;
56   Bool_t  RelPosCellInSModule(Int_t absId, Double_t &xr, Double_t &yr, Double_t &zr) const;
57   Bool_t  CheckAbsCellId(Int_t absId) const;
58   Bool_t  GetCellIndex(Int_t absId,Int_t &nSupMod,Int_t &nModule,Int_t &nIphi,Int_t &nIeta) const;
59   void    GetCellPhiEtaIndexInSModule(Int_t nSupMod, Int_t nModule, Int_t nIphi, Int_t nIeta, int &iphi, int &ieta) const;
60   void    GetModulePhiEtaIndexInSModule(Int_t nSupMod, Int_t nModule,  int &iphim, int &ietam) const;
61   Bool_t  GetAbsCellIdFromEtaPhi(Double_t eta,Double_t phi, Int_t &absId) const;
62   Bool_t  SuperModuleNumberFromEtaPhi(Double_t eta, Double_t phi, Int_t &nSupMod) const;
63   Int_t   GetAbsCellIdFromCellIndexes(Int_t nSupMod, Int_t iphi, Int_t ieta) const;
64   void    GetModuleIndexesFromCellIndexesInSModule(Int_t nSupMod, Int_t iphi, Int_t ieta, 
65                                                    Int_t &iphim, Int_t &ietam, Int_t &nModule) const;
66   Int_t   GetAbsCellId(Int_t nSupMod, Int_t nModule, Int_t nIphi, Int_t nIeta) const;
67   Int_t   GetNumberOfModuleInPhiDirection(Int_t nSupMod)  const
68   {
69     // inline function
70     if(nSupMod>=10) return fNPhi/2;
71     else            return fNPhi;
72   }
73   Bool_t  GetPhiBoundariesOfSMGap(Int_t nPhiSec, Double_t &phiMin, Double_t &phiMax) const;
74   void    GetTransformationForSM();
75   Float_t GetSampling() const {return fSampling;}
76
77  protected:
78   Float_t fArm1PhiMin;                  // Minimum angular position of EMCAL in Phi (degrees)
79   Float_t fArm1PhiMax;                  // Maximum angular position of EMCAL in Phi (degrees)
80   Float_t fArm1EtaMin;                  // Minimum pseudorapidity position of EMCAL in Eta
81   Float_t fArm1EtaMax;                  // Maximum pseudorapidity position of EMCAL in Eta
82   Int_t   fNumberOfSuperModules;        // Number of super modules
83   Float_t fSteelFrontThick;             // Thickness of the front stell face of the support box - 9-sep-04
84   Float_t fEnvelop[3];                  // the GEANT TUB for the detector 
85   Float_t fIPDistance;                  // Radial Distance of the inner surface of the EMCAL
86   Float_t fZLength;                     // Total length in z direction
87   Float_t fPhiGapForSM;                 // Gap betweeen supermodules in phi direction
88   Int_t   fNPhi;                        // Number of Towers in the PHI direction  
89   Int_t   fNZ;                          // Number of Towers in the Z direction
90   Float_t fPhiModuleSize;               // Phi -> X
91   Float_t fEtaModuleSize;               // Eta -> Y
92   Int_t   fNPHIdiv;                     // number phi divizion of module
93   Int_t   fNETAdiv;                     // number eta divizion of module
94   Int_t   fNECLayers;                   // number of scintillator layers
95   Float_t fECScintThick;                // cm, Thickness of the scintillators
96   Float_t fECPbRadThickness;            // cm, Thickness of the Pb radiators
97   Float_t fSampling;                    // Sampling factor
98   Float_t fTrd1Angle;                   // angle in x-z plane (in degree) 
99   Int_t   fNCellsInModule;              // number cell in module
100   Int_t   fNCellsInSupMod;              // number cell in super module
101   Int_t   fNCells;                      // number of cells in calo
102   Float_t fLongModuleSize;              // Size of long module
103   Float_t f2Trd1Dx2;                    // 2*dx2 for TRD1
104   Float_t fShellThickness;              // Total thickness in (x,y) direction
105   Float_t fEtaMaxOfTRD1;                // max eta in case of TRD1 geometry (see AliEMCALShishKebabTrd1Module)
106   Float_t fParSM[3];                    // SM sizes as in GEANT (TRD1)
107   TArrayD fPhiBoundariesOfSM;           // phi boundaries of SM in rad; size is fNumberOfSuperModules;
108   TArrayD fPhiCentersOfSM;              // phi of centers of SMl size is fNumberOfSuperModules/2
109   TGeoMatrix* fMatrixOfSM[12];          //![fNumberOfSuperModules]; get from gGeoManager;
110   TArrayD fCentersOfCellsEtaDir;        // size fNEta*fNETAdiv (for TRD1 only) (eta or z in SM, in cm)
111   TArrayD fCentersOfCellsXDir;          // size fNEta*fNETAdiv (for TRD1 only) (       x in SM, in cm)
112   TArrayD fCentersOfCellsPhiDir;        // size fNPhi*fNPHIdiv (for TRD1 only) (phi or y in SM, in cm)
113   TArrayD fEtaCentersOfCells;           // [fNEta*fNETAdiv*fNPhi*fNPHIdiv], positive direction (eta>0); 
114                                         // eta depend from phi position; 
115   TArrayD fPhiCentersOfCells;           // [fNPhi*fNPHIdiv] from center of SM (-10. < phi < +10.)
116
117   ClassDef(AliJetDummyGeo,1)
118 };
119  
120 #endif