3 /* Copyright(c) 2001-2002, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 // Author : Magali Estienne, IPHC Strasbourg - e-mail: magali.estienne@ires.in2p3.fr
10 // --- Standard library ---
11 #include <Riostream.h>
19 class AliJetGrid : public TNamed {
24 AliJetGrid(Int_t nphi,Int_t neta,Double_t phiMin,Double_t etaMin,Double_t phiMax,Double_t etaMax);
25 AliJetGrid(const AliJetGrid& grid);
26 AliJetGrid& operator=(const AliJetGrid& other);
27 virtual ~AliJetGrid();
30 TArrayD* GetArrayEta();
31 TArrayD* GetArrayPhi();
32 TMatrixD* GetIndexObject();
33 void InitParams(Double_t phiMinCal,Double_t phiMaxCal,Double_t etaMinCal,Double_t etaMaxCal);
34 Int_t GetIndexFromEtaPhi(Double_t phi,Double_t eta) const;
35 void GetEtaPhiFromIndex(Int_t index,Float_t &eta,Float_t &phi);
36 Int_t GetBinsEta() const {return fNeta+1;}
37 Int_t GetBinsPhi() const {return fNphi+1;}
38 Int_t GetTotBins() const {return (fNeta+1)*(fNphi+1);}
39 Int_t GetPointsEta() const {return fNeta;}
40 Int_t GetPointsPhi() const {return fNphi;}
41 Int_t GetTotPoints() const {return fNeta*fNphi;}
42 Int_t GetMatrixIndex(Int_t iphi,Int_t ieta) {return static_cast<Int_t>((*fIndex)(iphi,ieta));}
43 Int_t GetIndexIFromPhi(Double_t phi);
44 Int_t GetIndexJFromEta(Double_t eta);
45 Int_t GetIndex(Double_t phi,Double_t eta);
46 void GetAccParam(Int_t &nphi, Int_t &neta, Float_t &minphi,
47 Float_t &maxphi, Float_t &mineta, Float_t &maxeta) const ;
48 void GetBinParam(Int_t &phibintpc, Int_t &etabintpc,
49 Int_t &phibinemc, Int_t &etabinemc, Int_t &nbinphi) const;
50 void GetIJFromIndex(Int_t index, Int_t i, Int_t j) const;
51 void GetEtaPhiFromIndex2(Int_t index, Float_t &phi, Float_t &eta);
54 Int_t GetDeta() const {return static_cast<Int_t>((fEtaMax-fEtaMin)/fNeta);
55 if(fDebug>21) cout << "static_cast<Int_t>((fEtaMax-fEtaMin)/fNeta) : " <<
56 static_cast<Int_t>((fEtaMax-fEtaMin)/fNeta);}
57 Int_t GetDphi() const {return static_cast<Int_t>((fPhiMax-fPhiMin)/fNphi);
58 if(fDebug>21) cout << "static_cast<Int_t>((fPhiMax-fPhiMin)/fNphi) : " <<
59 static_cast<Int_t>((fPhiMax-fPhiMin)/fNphi);}
60 Int_t GetGridType() const {return fGrid;}
63 void SetEtaRange(Double_t etaMin, Double_t etaMax) {fEtaMin = etaMin; fEtaMax = etaMax;}
64 void SetPhiRange(Double_t phiMin, Double_t phiMax) {fPhiMin = phiMin; fPhiMax = phiMax;}
65 void SetNeta(Int_t neta) {fNeta = neta;}
66 void SetNphi(Int_t nphi) {fNphi = nphi;}
67 void SetMatrixIndexes();
68 void SetMatrixIndex(Int_t i,Double_t par);
69 void SetMatrixIndex(Int_t iphi,Int_t ieta,Double_t par) {
70 (*fIndex)(iphi,ieta)=par; return; }
71 void SetGridType(Int_t type) {fGrid = type;}
75 Int_t fGrid; // Close the type of grid you want to fill
76 // 0 = grid in tpc acceptance, 1 = grid in (tpc-emcal) acceptance
77 Int_t fNphi; // number of points in the grid in phi
79 TArrayD* fPhi; // grid points in phi
80 TArrayD* fEta; // grid points in eta
81 TMatrixD* fIndex; // matrix of indexes in the grid points
82 TArrayI* fIndexI; // grid points in phi
83 TArrayI* fIndexJ; // grid points in eta
84 Double_t fPhiMin; // phi acceptance min
85 Double_t fPhiMax; // phi acceptance max
86 Double_t fEtaMin; // eta acceptance min
87 Double_t fEtaMax; // eta acceptance max
88 Int_t fEtaBinInTPCAcc; // number of points in TPC acceptance in eta
89 Int_t fPhiBinInTPCAcc; // number of points in TPC acceptance in phi
90 Int_t fEtaBinInEMCalAcc; // number of points in EMCal acceptance in eta
91 Int_t fPhiBinInEMCalAcc; // number of points in EMCal acceptance in phi
92 Int_t fNbinEta; // number of bins in eta
93 Int_t fNbinPhi; // number of bins in phi
94 Double_t fMaxPhi; // maximum phi
95 Double_t fMinPhi; // minimum phi
96 Double_t fMaxEta; // maximum eta
97 Double_t fMinEta; // minimum eta
98 Int_t fDebug; // debug flag
100 ClassDef(AliJetGrid,1) // Parameters used by AliTPCtrackerParam