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