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 virtual ~AliJetGrid();
29 TArrayD* GetArrayEta();
30 TArrayD* GetArrayPhi();
31 TMatrixD* GetIndexObject();
32 void InitParams(Double_t phiMinCal,Double_t phiMaxCal,Double_t etaMinCal,Double_t etaMaxCal);
33 Int_t GetIndexFromEtaPhi(Double_t phi,Double_t eta) const;
34 void GetEtaPhiFromIndex(Int_t index,Float_t &eta,Float_t &phi);
35 Int_t GetBinsEta() const {return fNeta+1;}
36 Int_t GetBinsPhi() const {return fNphi+1;}
37 Int_t GetTotBins() const {return (fNeta+1)*(fNphi+1);}
38 Int_t GetPointsEta() const {return fNeta;}
39 Int_t GetPointsPhi() const {return fNphi;}
40 Int_t GetTotPoints() const {return fNeta*fNphi;}
41 Int_t GetMatrixIndex(Int_t iphi,Int_t ieta) {return static_cast<Int_t>((*fIndex)(iphi,ieta));}
42 Int_t GetIndexIFromPhi(Double_t phi);
43 Int_t GetIndexJFromEta(Double_t eta);
44 Int_t GetIndex(Double_t phi,Double_t eta);
45 void GetAccParam(Int_t &nphi, Int_t &neta, Float_t &minphi,
46 Float_t &maxphi, Float_t &mineta, Float_t &maxeta) const ;
47 void GetBinParam(Int_t &phibintpc, Int_t &etabintpc,
48 Int_t &phibinemc, Int_t &etabinemc, Int_t &nbinphi) const;
49 void GetIJFromIndex(Int_t index, Int_t i, Int_t j) const;
50 void GetEtaPhiFromIndex2(Int_t index, Float_t &phi, Float_t &eta);
53 Int_t GetDeta() const {return static_cast<Int_t>((fEtaMax-fEtaMin)/fNeta);
54 if(fDebug>21) cout << "static_cast<Int_t>((fEtaMax-fEtaMin)/fNeta) : " <<
55 static_cast<Int_t>((fEtaMax-fEtaMin)/fNeta);}
56 Int_t GetDphi() const {return static_cast<Int_t>((fPhiMax-fPhiMin)/fNphi);
57 if(fDebug>21) cout << "static_cast<Int_t>((fPhiMax-fPhiMin)/fNphi) : " <<
58 static_cast<Int_t>((fPhiMax-fPhiMin)/fNphi);}
59 Int_t GetGridType() const {return fGrid;}
62 void SetEtaRange(Double_t etaMin, Double_t etaMax) {fEtaMin = etaMin; fEtaMax = etaMax;}
63 void SetPhiRange(Double_t phiMin, Double_t phiMax) {fPhiMin = phiMin; fPhiMax = phiMax;}
64 void SetNeta(Int_t neta) {fNeta = neta;}
65 void SetNphi(Int_t nphi) {fNphi = nphi;}
66 void SetMatrixIndexes();
67 void SetMatrixIndex(Int_t i,Double_t par);
68 void SetMatrixIndex(Int_t iphi,Int_t ieta,Double_t par) {
69 (*fIndex)(iphi,ieta)=par; return; }
70 void SetGridType(Int_t type) {fGrid = type;}
74 Int_t fGrid; // Close the type of grid you want to fill
75 // 0 = grid in tpc acceptance, 1 = grid in (tpc-emcal) acceptance
76 Int_t fNphi; // number of points in the grid in phi
78 TArrayD* fPhi; // grid points in phi
79 TArrayD* fEta; // grid points in eta
80 TMatrixD* fIndex; // matrix of indexes in the grid points
81 TArrayI* fIndexI; // grid points in phi
82 TArrayI* fIndexJ; // grid points in eta
83 Double_t fPhiMin; // phi acceptance min
84 Double_t fPhiMax; // phi acceptance max
85 Double_t fEtaMin; // eta acceptance min
86 Double_t fEtaMax; // eta acceptance max
87 Int_t fEtaBinInTPCAcc; // number of points in TPC acceptance in eta
88 Int_t fPhiBinInTPCAcc; // number of points in TPC acceptance in phi
89 Int_t fEtaBinInEMCalAcc; // number of points in EMCal acceptance in eta
90 Int_t fPhiBinInEMCalAcc; // number of points in EMCal acceptance in phi
91 Int_t fNbinEta; // number of bins in eta
92 Int_t fNbinPhi; // number of bins in phi
93 Double_t fMaxPhi; // maximum phi
94 Double_t fMinPhi; // minimum phi
95 Double_t fMaxEta; // maximum eta
96 Double_t fMinEta; // minimum eta
97 Int_t fDebug; // debug flag
99 ClassDef(AliJetGrid,1) // Parameters used by AliTPCtrackerParam