Added one parameter to function Fit, to avoid searching objects via gROOT
[u/mrichter/AliRoot.git] / JETAN / AliJetDummyGeo.h
CommitLineData
5ad5f558 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
ee7de0dd 7//
8// Temporarily added to define part of the EMCal geometry
9// necessary for the jet finder
3e147bc8 10//
ee7de0dd 11
5ad5f558 12#include <TObject.h>
ee7de0dd 13#include <TArrayD.h>
14#include <TMath.h>
15#include <TVector3.h>
16
17class TGeoMatrix;
3e147bc8 18class AliJetDummyShishKebabTrd1Module;
5ad5f558 19
20class AliJetDummyGeo : public TObject
21{
22 public:
ee7de0dd 23 AliJetDummyGeo();
24 AliJetDummyGeo(const AliJetDummyGeo& geom);
25 virtual ~AliJetDummyGeo();
26 static AliJetDummyGeo* GetInstance() {return new AliJetDummyGeo();}
27 static AliJetDummyGeo* GetInstance(char* /*name*/, char* /*title*/)
28 {return new AliJetDummyGeo();}
29 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 }
3e147bc8 40 Int_t GetNCells() {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 ;}
ee7de0dd 50 Int_t GetNumberOfSuperModules() const {return fNumberOfSuperModules;}
3e147bc8 51 Float_t GetArm1EtaMin() {return fArm1EtaMin;}
52 Float_t GetArm1EtaMax() {return fArm1EtaMax;}
53 Float_t GetArm1PhiMin() {return fArm1PhiMin;}
54 Float_t GetArm1PhiMax() {return fArm1PhiMax;}
55 Float_t GetIPDistance() const { return fIPDistance;}
56 void EtaPhiFromIndex(Int_t /*id*/, Float_t& /*eta*/, Float_t& /*phi*/);
57 void GetGlobal(const Double_t *loc, Double_t *glob, Int_t ind) const;
ee7de0dd 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;
3e147bc8 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;
ee7de0dd 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 }
3e147bc8 78
79 void CreateListOfTrd1Modules();
80 TList *GetShishKebabTrd1Modules() const {return fShishKebabTrd1Modules;}
81 AliJetDummyShishKebabTrd1Module *GetShishKebabModule(Int_t neta);
82
ee7de0dd 83 Bool_t GetPhiBoundariesOfSMGap(Int_t nPhiSec, Double_t &phiMin, Double_t &phiMax) const;
84 void GetTransformationForSM();
3e147bc8 85 Float_t GetSampling() {return fSampling;}
ee7de0dd 86
87 protected:
ee7de0dd 88 Float_t fArm1EtaMin; // Minimum pseudorapidity position of EMCAL in Eta
89 Float_t fArm1EtaMax; // Maximum pseudorapidity position of EMCAL in Eta
3e147bc8 90 Float_t fArm1PhiMin; // Minimum angular position of EMCAL in Phi (degrees)
91 Float_t fArm1PhiMax; // Maximum angular position of EMCAL in Phi (degrees)
92 Int_t fNumberOfSuperModules;
ee7de0dd 93 Float_t fSteelFrontThick; // Thickness of the front stell face of the support box - 9-sep-04
3e147bc8 94 Float_t fLateralSteelStrip; // 13-may-05
ee7de0dd 95 Float_t fEnvelop[3]; // the GEANT TUB for the detector
96 Float_t fIPDistance; // Radial Distance of the inner surface of the EMCAL
ee7de0dd 97 Float_t fPhiGapForSM; // Gap betweeen supermodules in phi direction
98 Int_t fNPhi; // Number of Towers in the PHI direction
99 Int_t fNZ; // Number of Towers in the Z direction
100 Float_t fPhiModuleSize; // Phi -> X
101 Float_t fEtaModuleSize; // Eta -> Y
102 Int_t fNPHIdiv; // number phi divizion of module
103 Int_t fNETAdiv; // number eta divizion of module
3e147bc8 104 Float_t fPhiTileSize; // Size of phi tile
105 Float_t fEtaTileSize; // Size of eta tile
ee7de0dd 106 Int_t fNECLayers; // number of scintillator layers
107 Float_t fECScintThick; // cm, Thickness of the scintillators
108 Float_t fECPbRadThickness; // cm, Thickness of the Pb radiators
109 Float_t fSampling; // Sampling factor
110 Float_t fTrd1Angle; // angle in x-z plane (in degree)
111 Int_t fNCellsInModule; // number cell in module
112 Int_t fNCellsInSupMod; // number cell in super module
113 Int_t fNCells; // number of cells in calo
114 Float_t fLongModuleSize; // Size of long module
115 Float_t f2Trd1Dx2; // 2*dx2 for TRD1
116 Float_t fShellThickness; // Total thickness in (x,y) direction
3e147bc8 117 Float_t fZLength; // Total length in z direction
ee7de0dd 118 Float_t fEtaMaxOfTRD1; // max eta in case of TRD1 geometry (see AliEMCALShishKebabTrd1Module)
119 Float_t fParSM[3]; // SM sizes as in GEANT (TRD1)
120 TArrayD fPhiBoundariesOfSM; // phi boundaries of SM in rad; size is fNumberOfSuperModules;
121 TArrayD fPhiCentersOfSM; // phi of centers of SMl size is fNumberOfSuperModules/2
122 TGeoMatrix* fMatrixOfSM[12]; //![fNumberOfSuperModules]; get from gGeoManager;
123 TArrayD fCentersOfCellsEtaDir; // size fNEta*fNETAdiv (for TRD1 only) (eta or z in SM, in cm)
124 TArrayD fCentersOfCellsXDir; // size fNEta*fNETAdiv (for TRD1 only) ( x in SM, in cm)
125 TArrayD fCentersOfCellsPhiDir; // size fNPhi*fNPHIdiv (for TRD1 only) (phi or y in SM, in cm)
126 TArrayD fEtaCentersOfCells; // [fNEta*fNETAdiv*fNPhi*fNPHIdiv], positive direction (eta>0);
127 // eta depend from phi position;
128 TArrayD fPhiCentersOfCells; // [fNPhi*fNPHIdiv] from center of SM (-10. < phi < +10.)
3e147bc8 129 TList *fShishKebabTrd1Modules; //! list of modules
130 Int_t fDebug; // Debug flag
ee7de0dd 131 ClassDef(AliJetDummyGeo,1)
5ad5f558 132};
133
134#endif