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