-add new features to the histoarray
[u/mrichter/AliRoot.git] / PWGJE / EMCALJetTasks / AliJetEmbeddingFromAODTask.h
CommitLineData
b16bb001 1#ifndef ALIJETEMBEDDINGFROMAODTASK_H
2#define ALIJETEMBEDDINGFROMAODTASK_H
3
4// $Id: AliJetEmbeddingFromAODTask.h $
5
6class TFile;
7class TObjArray;
8class TClonesArray;
9class TString;
10class AliVCaloCells;
11class AliVHeader;
12class TH2;
6a20534a 13class TH1;
4358e58a 14class TLorentzVector;
b16bb001 15
16#include "AliJetModelBaseTask.h"
17
18class AliJetEmbeddingFromAODTask : public AliJetModelBaseTask {
19 public:
20 AliJetEmbeddingFromAODTask();
21 AliJetEmbeddingFromAODTask(const char *name, Bool_t drawqa=kFALSE);
22 virtual ~AliJetEmbeddingFromAODTask();
23
24 void UserCreateOutputObjects();
25 Bool_t UserNotify();
26
27 void SetFileList(TObjArray *list) { fFileList = list ; }
28 void SetAODTreeName(const char *t) { fAODTreeName = t ; }
29 void SetAODHeaderName(const char *t) { fAODHeaderName = t ; }
30 void SetAODTracksName(const char *n) { fAODTrackName = n ; }
31 void SetAODClusName(const char *n) { fAODClusName = n ; }
32 void SetAODCellsName(const char *n) { fAODCellsName = n ; }
787a3c4f 33 void SetAODMCParticlesName(const char *n) { fAODMCParticlesName = n ; }
b16bb001 34 void SetCentralityRange(Double_t min, Double_t max) { fMinCentrality = min ; fMaxCentrality = max ; }
35 void SetTriggerMask(UInt_t mask) { fTriggerMask = mask ; }
36 void SetAODfilterBits(Int_t b0 = 0, Int_t b1 = 0) { fAODfilterBits[0] = b0 ; fAODfilterBits[1] = b1 ; }
37 void SetIncludeNoITS(Bool_t f) { fIncludeNoITS = f ; }
5ce8ae64 38 void SetUseNegativeLabels(Bool_t f) { fUseNegativeLabels = f ; }
39 void SetTrackEfficiency(Double_t eff = 0.95) { fTrackEfficiency = eff ; }
b16bb001 40 void SetTotalFiles(Int_t n) { fTotalFiles = n ; }
6a20534a 41 void SetAttempts(Int_t n) { fAttempts = n ; }
42 void SetRandomAccess(Bool_t r=kTRUE) { fRandomAccess = r ; }
4358e58a 43 void SetAODMC(Bool_t a) { fIsAODMC = a ; }
44 void SetJetMinPt(Double_t pt) { fJetMinPt = pt ; }
45 void SetJetEtaRange(Double_t emi, Double_t ema) { fJetMinEta = emi; fJetMaxEta = ema; }
46 void SetJetPhiRange(Double_t pmi, Double_t pma) { fJetMinPhi = pmi; fJetMaxPhi = pma; }
05077f28 47 void SetJetConstituentMinPt(Double_t pt) { fJetConstituentMinPt= pt ; }
4358e58a 48 void SetJetType(Byte_t t) { fJetType = t ; }
49 void SetJetAlgo(Byte_t t) { fJetAlgo = t ; }
fde82e42 50 void SetZVertexCut(Double_t z) { fZVertexCut = z ; }
b16bb001 51
52 protected:
6a20534a 53 Bool_t ExecOnce() ;// intialize task
54 void Run() ;// do jet model action
2103dc6a 55 virtual TFile *GetNextFile() ;// get next file from fFileList
6a20534a 56 virtual Bool_t OpenNextFile() ;// open next file
57 virtual Bool_t GetNextEntry() ;// get next entry in current tree
58 virtual Bool_t IsAODEventSelected() ;// AOD event trigger/centrality selection
4358e58a 59 TLorentzVector GetLeadingJet(TClonesArray *tracks, TClonesArray *clusters=0); // get the leading jet
b16bb001 60
6a20534a 61 TObjArray *fFileList ;// List of AOD files
62 Bool_t fRandomAccess ;// Random access to file number and event
787a3c4f 63 TString fAODTreeName ;// Name of the tree in the AOD file
64 TString fAODHeaderName ;// Name of the header in the AOD tree
65 TString fAODVertexName ;// Name of the vertex branch in the AOD tree
66 TString fAODTrackName ;// Name of the track collection branch in the AOD tree
67 TString fAODClusName ;// Name of the cluster collection branch in the AOD tree
68 TString fAODCellsName ;// Name of the cell collection branch in the AOD tree
69 TString fAODMCParticlesName ;// Name of the cell collection branch in the AOD tree
70 Double_t fMinCentrality ;// Minimum centrality
71 Double_t fMaxCentrality ;// Maximum centrality
72 UInt_t fTriggerMask ;// Trigger selection mask
73 Double_t fZVertexCut ;// Z vertex cut
4358e58a 74 Double_t fJetMinPt ;// Select events with a minimum jet pt
75 Double_t fJetMinEta ;// Min eta for jets
76 Double_t fJetMaxEta ;// Max eta for jets
77 Double_t fJetMinPhi ;// Min phi for jets
78 Double_t fJetMaxPhi ;// Max phi for jets
05077f28 79 Double_t fJetConstituentMinPt ;// Jet constituent min pt
4358e58a 80 Double_t fJetRadius ;// Jet radius
81 Byte_t fJetType ;// Jet type (0=full, 1=charged, 2=neutral)
82 Byte_t fJetAlgo ;// Jet algorithm (0=kT, 1=anti-kT)
83 Bool_t fJetParticleLevel ;// Trigger, look at particle level jets
787a3c4f 84 Int_t fAODfilterBits[2] ;// AOD track filter bit map
85 Bool_t fIncludeNoITS ;// True = includes tracks with failed ITS refit
5ce8ae64 86 Bool_t fUseNegativeLabels ;// Whether or not should use negative MC labels
87 Double_t fTrackEfficiency ;// Track efficiency
4358e58a 88 Bool_t fIsAODMC ;// Whether the embedding AOD is MC or not
787a3c4f 89 Int_t fTotalFiles ;// Total number of files per pt hard bin
6a20534a 90 Int_t fAttempts ;// Attempts to be tried before giving up in opening the next file
787a3c4f 91 Bool_t fEsdTreeMode ;//! True = embed from ESD (must be a skimmed ESD!)
6a20534a 92 Int_t fCurrentFileID ;//! Current file being processed (via the event handler)
787a3c4f 93 Int_t fCurrentAODFileID ;//! Current file ID
94 TFile *fCurrentAODFile ;//! Current open file
95 Int_t fPicoTrackVersion ;//! Version of the PicoTrack class (if any) in fCurrentAODFile
6a20534a 96 TTree *fCurrentAODTree ;//! Current open tree
787a3c4f 97 AliVHeader *fAODHeader ;//! AOD header
98 TClonesArray *fAODVertex ;//! AOD vertex
99 TClonesArray *fAODTracks ;//! AOD track collection
100 TClonesArray *fAODClusters ;//! AOD cluster collection
101 AliVCaloCells *fAODCaloCells ;//! AOD cell collection
102 TClonesArray *fAODMCParticles ;//! AOD MC particles collection
6a20534a 103 Int_t fCurrentAODEntry ;//! Current entry in the AOD tree
104 TH2 *fHistFileMatching ;//! Current file ID vs. AOD file ID (to be embedded)
105 TH1 *fHistAODFileError ;//! AOD file ID (to be embedded) error
106 TH1 *fHistNotEmbedded ;//! File ID not embedded
2103dc6a 107 TH1 *fHistEmbeddingQA ;//! Embedding QA
b16bb001 108
109 private:
110 AliJetEmbeddingFromAODTask(const AliJetEmbeddingFromAODTask&); // not implemented
111 AliJetEmbeddingFromAODTask &operator=(const AliJetEmbeddingFromAODTask&); // not implemented
112
05077f28 113 ClassDef(AliJetEmbeddingFromAODTask, 8) // Jet embedding from AOD task
b16bb001 114};
115#endif