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