]> git.uio.no Git - u/mrichter/AliRoot.git/blob - JETAN/AliJetFillUnitArrayTracks.h
Code for jet finding using TPC and EMCAL ESD information.
[u/mrichter/AliRoot.git] / JETAN / AliJetFillUnitArrayTracks.h
1 #ifndef ALIJETFILLUNITARRAYTRACKS_H
2 #define ALIJETFILLUNITARRAYTRACKS_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 // Jet Fill Unit Array 
9 // Called by ESD Reader for jet analysis
10 // Author: Magali Estienne (magali.estienne@subatech.in2p3.fr)
11 //---------------------------------------------------------------------
12
13 #ifndef ROOT_TTask
14 #include "TTask.h"
15 #endif
16
17 #include <TMatrixD.h>
18 #include <TArrayD.h>
19
20 class AliEMCALGeometry;
21 class AliJetHadronCorrection;
22 class AliJetReader;
23 class AliJetESDReader;
24 class TClonesArray;
25 class AliJetUnitArray;
26 //class AliJetReaderHeader;
27 class AliJetReader;
28 class AliJetGrid;
29
30 class AliJetFillUnitArrayTracks : public TTask
31 {
32  public: 
33   AliJetFillUnitArrayTracks();
34   virtual ~AliJetFillUnitArrayTracks();
35   
36   // Setter
37   void SetReaderHeader(AliJetReaderHeader *readerHeader) {fReaderHeader = readerHeader;}
38   void SetMomentumArray(TClonesArray *momentumArray) {fMomentumArray = momentumArray;}
39   void SetUnitArray(AliJetUnitArray *unitArray) {fUnitArray = unitArray;}
40   void SetHadCorrection(Int_t flag = 1) {fHCorrection = flag;}
41   void SetHadCorrector(AliJetHadronCorrectionv1* corr) {fHadCorr = corr;}
42   void SetTPCGrid(AliJetGrid *grid) {fTPCGrid = grid;}
43   void SetEMCalGrid(AliJetGrid *grid) {fEMCalGrid = grid;}
44   void SetGrid(Double_t phiMin,Double_t phiMax,Double_t etaMin,Double_t etaMax);
45
46   // Getter
47   AliJetUnitArray* GetUnitArray() {return fUnitArray;}
48   //  Int_t GetIndexFromEtaPhi(Double_t eta,Double_t phi) const;
49   void  GetEtaPhiFromIndex(Int_t index,Float_t &eta,Float_t &phi);
50   Int_t GetNeta() {return fNeta;}
51   Int_t GetNphi() {return fNphi;}
52
53   void Exec(Option_t*);
54
55  protected:
56   Int_t   fNumUnits;      // Number of units in the unit object array (same as num towers in EMCAL)
57   Float_t fEtaMinCal;     // Define EMCal acceptance in Eta
58   Float_t fEtaMaxCal;     // Define EMCal acceptance in Eta
59   Float_t fPhiMinCal;     // Define EMCal acceptance in Phi
60   Float_t fPhiMaxCal;     // Define EMCal acceptance in Phi
61   AliJetHadronCorrectionv1   *fHadCorr;         // Pointer to Hadron Correction Object
62   Int_t                       fHCorrection;     //  Hadron correction flag
63   Int_t                       fNIn;             // Number of Array filled in UnitArray
64   Int_t                       fOpt;             // Detector to be used for jet reconstruction
65   Int_t                       fDebug;           // Debug option
66
67   AliJetReaderHeader          *fReaderHeader;   // ReaderHeader
68   TClonesArray                *fMomentumArray;  // MomentumArray
69   AliJetUnitArray             *fUnitArray;      // UnitArray
70   AliJetGrid                  *fTPCGrid;        // Define filled grid
71   AliJetGrid                  *fEMCalGrid;      // Define filled grid
72
73   // geometry info
74   static AliEMCALGeometry *fGeom;     //!
75
76   Int_t     fNphi;                    // number of points in the grid:   phi
77   Int_t     fNeta;                    //               "                 eta
78   TArrayD*  fPhi2;                    // grid points in phi
79   TArrayD*  fEta2;                    // grid points in eta
80   TArrayD*  fPhi;                     // grid points in phi
81   TArrayD*  fEta;                     // grid points in eta
82   TMatrixD* fIndex;                   // grid points in (phi,eta) 
83   TMatrixD* fParams;                  // matrix of parameters in the grid points  
84   Int_t     fGrid;                    // Select the grid acceptance you want to fill
85                                       // 0 = TPC acceptance, 1 = TPC-EMCal acceptance
86   Float_t   fPhiMin;
87   Float_t   fPhiMax;
88   Float_t   fEtaMin;
89   Float_t   fEtaMax;
90   Int_t     fEtaBinInTPCAcc;
91   Int_t     fPhiBinInTPCAcc;
92   Int_t     fEtaBinInEMCalAcc;
93   Int_t     fPhiBinInEMCalAcc;
94   Int_t     fNbinPhi;
95
96  private:
97   void SetEMCALGeometry();
98   void InitParameters();
99
100   //  Int_t fEvent;
101   
102   ClassDef(AliJetFillUnitArrayTracks,1) // Fill Unit Array with tpc and/or emcal information
103 };
104
105 #endif