]> git.uio.no Git - u/mrichter/AliRoot.git/blame - JETAN/AliJetGrid.h
Updating macro to check the various methods of the AliMUONMCDataInterface
[u/mrichter/AliRoot.git] / JETAN / AliJetGrid.h
CommitLineData
4a01bb2c 1#ifndef ALIJETGRID_H
2#define ALIJETGRID_H
3/* Copyright(c) 2001-2002, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6// Class description :
7//
8// Author : Magali Estienne, IPHC Strasbourg - e-mail: magali.estienne@ires.in2p3.fr
9//
10// --- Standard library ---
11#include <Riostream.h>
12//-- Root headers ---
13#include <TNamed.h>
14#include <TMatrixD.h>
15#include <TArrayD.h>
16#include <TArrayI.h>
17//-------------------
18
19class AliJetGrid : public TNamed {
20
21 public:
22
23 AliJetGrid();
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();
27
28 // Getter
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,
d980dfdb 46 Float_t &maxphi, Float_t &mineta, Float_t &maxeta) const ;
4a01bb2c 47 void GetBinParam(Int_t &phibintpc, Int_t &etabintpc,
d980dfdb 48 Int_t &phibinemc, Int_t &etabinemc, Int_t &nbinphi) const;
49 void GetIJFromIndex(Int_t index, Int_t i, Int_t j) const;
4a01bb2c 50 void GetEtaPhiFromIndex2(Int_t index, Float_t &phi, Float_t &eta);
51 Int_t GetNEntries();
52 Int_t GetNEntries2();
d980dfdb 53 Int_t GetDeta() const {return static_cast<Int_t>((fEtaMax-fEtaMin)/fNeta);
4a01bb2c 54 if(fDebug>21) cout << "static_cast<Int_t>((fEtaMax-fEtaMin)/fNeta) : " <<
55 static_cast<Int_t>((fEtaMax-fEtaMin)/fNeta);}
d980dfdb 56 Int_t GetDphi() const {return static_cast<Int_t>((fPhiMax-fPhiMin)/fNphi);
4a01bb2c 57 if(fDebug>21) cout << "static_cast<Int_t>((fPhiMax-fPhiMin)/fNphi) : " <<
58 static_cast<Int_t>((fPhiMax-fPhiMin)/fNphi);}
d980dfdb 59 Int_t GetGridType() const {return fGrid;}
4a01bb2c 60
61 // Setter
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;}
71 void SetIndexIJ();
72
73 private:
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
77 Int_t fNeta; // " eta
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
d980dfdb 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
4a01bb2c 98
99 ClassDef(AliJetGrid,1) // Parameters used by AliTPCtrackerParam
100};
101
102
103#endif
104
105
106
107