Compatibility with ROOT trunk
[u/mrichter/AliRoot.git] / JETAN / AliJetFillUnitArray.h
CommitLineData
be6e5811 1#ifndef ALIJETFILLUNITARRAY_H
2#define ALIJETFILLUNITARRAY_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// Base class used to fill Unit Array
9// Called by ESD Reader for jet analysis
10// Author: Magali Estienne (magali.estienne@subatech.in2p3.fr)
11//---------------------------------------------------------------------
12
13//#include <Riostream.h>
14#include <TMath.h>
15#include <TTask.h>
16
17#include <TArrayD.h>
e36a3f22 18#include <TArrayI.h>
be6e5811 19#include <TRefArray.h>
20#include <TClonesArray.h>
21
22#include "AliJetReaderHeader.h"
23#include "AliJetAODReaderHeader.h"
f445ed00 24#include "AliEMCALGeometry.h"
be6e5811 25#include "AliJetGrid.h"
26#include "AliESDEvent.h"
27#include "AliAODEvent.h"
28#include "AliJetHadronCorrection.h"
29
30class Riostream;
31
f445ed00 32class AliEMCALGeometry;
be6e5811 33class AliJetReader;
34class AliJetESDReader;
35
36class AliJetFillUnitArray : public TTask
37{
38 public:
39 AliJetFillUnitArray();
40 virtual ~AliJetFillUnitArray();
41 AliJetFillUnitArray(const AliJetFillUnitArray &det);
42 AliJetFillUnitArray &operator=(const AliJetFillUnitArray &det);
43
44 // Setter
45 virtual void SetReaderHeader(AliJetReaderHeader* const readerHeader) {fReaderHeader = readerHeader;}
f445ed00 46 virtual void SetGeom(AliEMCALGeometry* const geom) {fGeom = geom;}
be6e5811 47 virtual void SetMomentumArray(TClonesArray* const momentumArray) {fMomentumArray = momentumArray;}
48 virtual void SetUnitArray(TClonesArray* const unitArray) {fUnitArray = unitArray;}
49 virtual void SetRefArray(TRefArray* const refArray) {fRefArray = refArray;}
e36a3f22 50 virtual void SetReferences(TRefArray *refArray) {fRef = refArray;}
51 virtual void SetSignalFlag(TArrayI sflag) {fSignalFlag = sflag;}
52 virtual void SetCutFlag(TArrayI cflag) {fCutFlag = cflag;}
be6e5811 53 virtual void SetTPCGrid(AliJetGrid* const grid) {fTPCGrid = grid;}
54 virtual void SetEMCalGrid(AliJetGrid* const grid) {fEMCalGrid = grid;}
55 virtual void SetProcId(Bool_t id) {fProcId = id;}
56 virtual void SetGrid0(AliJetGrid */*grid0*/) {;}
57 virtual void SetGrid1(AliJetGrid */*grid1*/) {;}
58 virtual void SetGrid2(AliJetGrid */*grid2*/) {;}
59 virtual void SetGrid3(AliJetGrid */*grid3*/) {;}
60 virtual void SetGrid4(AliJetGrid */*grid4*/) {;}
61 virtual void SetHadCorrector(AliJetHadronCorrection* /*corr*/) {;}
62 virtual void SetApplyMIPCorrection(Bool_t /*val*/) {;}
63 virtual void SetESD(AliESDEvent */*esd*/) {;}
64 virtual void SetAOD(AliAODEvent */*aod*/) {;}
65 virtual void SetApplyElectronCorrection(Int_t /*flag*/) {;}
66 virtual void SetApplyFractionHadronicCorrection(Bool_t /*val*/) {;}
67 virtual void SetFractionHadronicCorrection(Double_t /*val*/) {;}
68 virtual void SetInitMult(Int_t /*mult*/) {;}
69 virtual void SetInitMultCut(Int_t /*multcut*/) {;}
70
71 // Getter
72 virtual TClonesArray* GetUnitArray() const {return fUnitArray;}
73 virtual TRefArray* GetRefArray() const {return fRefArray;}
74 virtual void GetEtaPhiFromIndex(Int_t index,Float_t &eta,Float_t &phi);
75 virtual Int_t GetNeta() const {return fNeta;}
76 virtual Int_t GetNphi() const {return fNphi;}
77 virtual Int_t GetMult() const {return 0;} // To be checked
78 virtual Int_t GetMultCut() const {return 0;} // To be checked
79 virtual Bool_t GetProcId() const {return fProcId;}
e36a3f22 80 virtual TArrayI GetSignalFlag() const {return fSignalFlag;}
81 virtual TArrayI GetCutFlag() const {return fCutFlag;}
be6e5811 82
83 // Other
84 virtual void Exec(Option_t* const /*option*/) {;}
85 virtual Float_t EtaToTheta(Float_t arg);
86 virtual void InitParameters() {;}
87
88 protected:
89 Int_t fNTracks; // Number of tracks stored in UnitArray
90 Int_t fNTracksCut; // Number of tracks stored in UnitArray with a pt cut
91 Int_t fOpt; // Detector to be used for jet reconstruction
92 Bool_t fDZ; // Use or not dead zones
93 Int_t fDebug; // Debug option
94
95 AliJetReaderHeader *fReaderHeader; // ReaderHeader
96 TClonesArray *fMomentumArray; // MomentumArray
97 TClonesArray *fUnitArray; // UnitArray
98 TRefArray *fRefArray; // UnitArray
e36a3f22 99 TRefArray *fRef; // ref Array to aod tracks
100 TArrayI fSignalFlag; // to flag if a particle comes from pythia or
101 // from the underlying event
102 TArrayI fCutFlag; // to flag if a particle passed the pt cut or not
103
be6e5811 104 Bool_t fProcId; // Bool_t for TProcessID synchronization
105 AliJetGrid *fTPCGrid; // Define filled grid
106 AliJetGrid *fEMCalGrid; // Define filled grid
f445ed00 107 AliEMCALGeometry *fGeom; // Define EMCal geometry
be6e5811 108
109 Int_t fNphi; // number of points in the grid: phi
110 Int_t fNeta; // " eta
111 Int_t fGrid; // Select the grid acceptance you want to fill
112 // 0 = TPC acceptance, 1 = TPC-EMCal acceptance
113 TArrayD *fPhi2; // grid points in phi
114 TArrayD *fEta2; // grid points in eta
115 TMatrixD *fIndex; // grid points in (phi,eta)
116 TMatrixD *fParams; // matrix of parameters in the grid points
117 Float_t fPhiMin; // EMCal acceptance
118 Float_t fPhiMax; // EMCal acceptance
119 Float_t fEtaMin; // EMCal acceptance
120 Float_t fEtaMax; // EMCal acceptance
121 Int_t fEtaBinInTPCAcc; // Number of bins in Eta in TPC acceptance
122 Int_t fPhiBinInTPCAcc; // Number of bins in phi in TPC acceptance
123 Int_t fEtaBinInEMCalAcc;// Number of bins in Eta in EMCal acceptance
124 Int_t fPhiBinInEMCalAcc;// Number of bins in phi in EMCal acceptance
125 Int_t fNbinPhi; // Number of phi bins
126
127 private:
128
129
130 ClassDef(AliJetFillUnitArray,1) // Fill Unit Array with tpc and/or emcal information
131};
132
133#endif