correcting baryon mass subtraction for visible energy in MC
[u/mrichter/AliRoot.git] / JETAN / AliJetReader.h
CommitLineData
99e5fe42 1#ifndef ALIJETREADER_H
2#define ALIJETREADER_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
99e5fe42 7// Jet reader base class
8// manages the reading of input for jet algorithms
b45b0c92 9// Authors: jgcn@mda.cinvestav.mx
8838ab7a 10// Magali Estienne <magali.estienne@subatech.in2p3.fr>
b45b0c92 11
99e5fe42 12#include <TObject.h>
13#include <TChain.h>
8011d399 14#include <TArrayI.h>
b45b0c92 15
7d0f353c 16class TTree;
ee7de0dd 17class TChain;
8838ab7a 18class TTask;
99e5fe42 19class TClonesArray;
c8f39c57 20class TRefArray;
99e5fe42 21class AliJetReaderHeader;
ee7de0dd 22class AliESDEvent;
23class AliHeader;
b45b0c92 24class AliJetUnitArray;
be6e5811 25class AliJetHadronCorrection;
7d0f353c 26class AliJet;
be6e5811 27class AliJetFillUnitArray;
99e5fe42 28
99e5fe42 29class AliJetReader : public TObject
30{
31 public:
32 AliJetReader();
33 virtual ~AliJetReader();
34
35 // Getters
8838ab7a 36 virtual TClonesArray* GetMomentumArray() const {return fMomentumArray;}
37 virtual TRefArray* GetReferences() const {return 0;}
38 virtual TClonesArray *GetUnitArray() const {return fUnitArray;}
ee7de0dd 39 virtual AliJetReaderHeader* GetReaderHeader() const {return fReaderHeader;}
8838ab7a 40 virtual AliHeader *GetAliHeader() const {return fAliHeader;}
ee7de0dd 41 virtual Int_t GetSignalFlag(Int_t i) const {return fSignalFlag[i];}
42 virtual Int_t GetCutFlag(Int_t i) const {return fCutFlag[i];}
43 virtual Int_t GetArrayInitialised() const {return fArrayInitialised;}
44 virtual Int_t GetNumCandidate() const {return fNumCandidate;}
45 virtual Int_t GetNumCandidateCut() const {return fNumCandidateCut;}
7d0f353c 46
99e5fe42 47 // Setters
ae24a5a1 48 virtual Bool_t FillMomentumArray() {return kTRUE;}
8838ab7a 49 virtual Bool_t ReadEventLoader(Int_t) {return kTRUE;}
b45b0c92 50 virtual void InitUnitArray() {}
ee7de0dd 51 virtual void InitParameters() {}
8838ab7a 52 virtual void CreateTasks(TChain* /*tree*/) {}
53 virtual Bool_t ExecTasks(Bool_t /*procid*/, TRefArray* /*refArray*/) {return kFALSE;}
54 // Correction of hadronic energy
be6e5811 55 virtual void SetHadronCorrector(AliJetHadronCorrection*) {;}
56 virtual void SetApplyMIPCorrection(Bool_t /*val*/){;}
57 virtual void SetApplyFractionHadronicCorrection(Bool_t /*val*/){;}
58 virtual void SetFractionHadronicCorrection(Double_t /*val*/){;}
59 virtual void SetApplyElectronCorrection(Int_t /*flag*/) {;}
7d0f353c 60 virtual void SetReaderHeader(AliJetReaderHeader* header)
8838ab7a 61 {fReaderHeader = header;}
ee7de0dd 62 virtual void SetESD(AliESDEvent* esd) { fESD = esd;}
ee7de0dd 63
7d0f353c 64 // Others
65 virtual void OpenInputFiles() {}
f5c22dad 66 virtual void SetInputEvent(const TObject* /*esd*/, const TObject* /*aod*/, const TObject* /*mc*/) {;}
f3f3617d 67 virtual void ConnectTree(TTree* /*tree*/, TObject* /*data*/) {}
7d0f353c 68 virtual Bool_t GetGenJets(AliJet* /*genJets*/) {return kFALSE;}
69
99e5fe42 70 void ClearArray();
71
72 protected:
1b7d5d7e 73 AliJetReader(const AliJetReader& rJetReader);
74 AliJetReader& operator = (const AliJetReader& rhsr);
8838ab7a 75
76 TChain *fChain; // chain for reconstructed tracks
77 TChain *fTree; // tree for reconstructed tracks
78 TClonesArray *fMomentumArray; // array of particle momenta
79 TClonesArray *fArrayMC; //! array of mc particles
80 TTask *fFillUnitArray; //! task list for filling the UnitArray
81 AliESDEvent *fESD; // pointer to esd
82 AliJetReaderHeader *fReaderHeader; // pointer to header
83 AliHeader *fAliHeader; // AliHeader
84 TArrayI fSignalFlag; // to flag if a particle comes from pythia or
85 // from the underlying event
86 TArrayI fCutFlag; // to flag if a particle passed the pt cut or not
87 TClonesArray *fUnitArray; // array of digit position and energy
8838ab7a 88 Bool_t fArrayInitialised; // To check that array of units is initialised
be6e5811 89 AliJetFillUnitArray *fFillUAFromTracks; // For charged particle task
90 AliJetFillUnitArray *fFillUAFromEMCalDigits; // For neutral particle task
8838ab7a 91 Int_t fNumCandidate; // Number of entries different from zero in unitarray
92 Int_t fNumCandidateCut; // Number of entries different from zero in unitarray
93 // which pass pt cut
be6e5811 94 AliJetHadronCorrection *fHadronCorrector; //! Pointer to hadronic correction
8838ab7a 95 Int_t fHCorrection; // Hadron correction flag
96 Int_t fECorrection; // Electron correction flag
97 Bool_t fEFlag; // Electron correction flag
98
99
99e5fe42 100 ClassDef(AliJetReader,1)
101};
102
103#endif