setter to assume pion mass for clusters
[u/mrichter/AliRoot.git] / PWGJE / EMCALJetTasks / AliJetEmbeddingFromAODTask.h
... / ...
CommitLineData
1#ifndef ALIJETEMBEDDINGFROMAODTASK_H
2#define ALIJETEMBEDDINGFROMAODTASK_H
3
4// $Id$
5
6class TFile;
7class TObjArray;
8class TClonesArray;
9class TString;
10class AliVCaloCells;
11class AliVHeader;
12class TH2;
13class TH1;
14class TLorentzVector;
15class AliNamedString;
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 ; }
34 void SetAODMCParticlesName(const char *n) { fAODMCParticlesName = n ; }
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 ; }
39 void SetCutMaxFractionSharedTPCClusters(Double_t c = 0.4) { fCutMaxFractionSharedTPCClusters = c ; }
40 void SetUseNegativeLabels(Bool_t f) { fUseNegativeLabels = f ; }
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 ; }
43 void SetTotalFiles(Int_t n) { fTotalFiles = n ; }
44 void SetAttempts(Int_t n) { fAttempts = n ; }
45 void SetRandomAccess(Bool_t r=kTRUE) { fRandomAccess = r ; }
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; }
50 void SetJetConstituentMinPt(Double_t pt) { fJetConstituentMinPt= pt ; }
51 void SetJetType(Byte_t t) { fJetType = t ; }
52 void SetJetAlgo(Byte_t t) { fJetAlgo = t ; }
53 void SetZVertexCut(Double_t z) { fZVertexCut = z ; }
54 void SetMaxVertexDist(Double_t d) { fMaxVertexDist = d ; }
55 void SetParticlePtRange(Double_t min, Double_t max, Byte_t t=1) { fParticleMinPt = min; fParticleMaxPt = max; fParticleSelection = t; }
56
57 protected:
58 Bool_t ExecOnce() ;// intialize task
59 void Run() ;// do jet model action
60 virtual TFile *GetNextFile() ;// get next file from fFileList
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
64 TLorentzVector GetLeadingJet(TClonesArray *tracks, TClonesArray *clusters=0); // get the leading jet
65 Bool_t FindParticleInRange(TClonesArray *array);// Find particle in array within range (fParticleMinPt, fParticleMaxPt)
66
67 TObjArray *fFileList ;// List of AOD files
68 Bool_t fRandomAccess ;// Random access to file number and event
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
80 Double_t fMaxVertexDist ;// Maximum distance allowed between the vertices of the current and the embedded events
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
86 Double_t fJetConstituentMinPt ;// Jet constituent min pt
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
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)
94 Int_t fAODfilterBits[2] ;// AOD track filter bit map
95 Bool_t fIncludeNoITS ;// True = includes tracks with failed ITS refit
96 Double_t fCutMaxFractionSharedTPCClusters; // max fraction of shared TPC clusters
97 Bool_t fUseNegativeLabels ;// Whether or not should use negative MC labels
98 TF1 *fTrackEfficiency ;// Track efficiency
99 Bool_t fIsAODMC ;// Whether the embedding AOD is MC or not
100 Int_t fTotalFiles ;// Total number of files per pt hard bin
101 Int_t fAttempts ;// Attempts to be tried before giving up in opening the next file
102 Bool_t fEsdTreeMode ;//! True = embed from ESD (must be a skimmed ESD!)
103 Int_t fCurrentFileID ;//! Current file being processed (via the event handler)
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
107 TTree *fCurrentAODTree ;//! Current open tree
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
114 Int_t fCurrentAODEntry ;//! Current entry in the AOD tree
115 Int_t fFirstAODEntry ;//! First entry in the AOD tree
116 Int_t fLastAODEntry ;//! Last entry in the AOD tree
117 AliNamedString *fAODFilePath ;//! Current AOD file path being embedded
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
121 TH1 *fHistEmbeddingQA ;//! Embedding QA
122 TH1 *fHistRejectedEvents ;//! Rejected events
123 Int_t fEmbeddingCount ;//! Number of embedded events from the current file
124
125 private:
126 AliJetEmbeddingFromAODTask(const AliJetEmbeddingFromAODTask&); // not implemented
127 AliJetEmbeddingFromAODTask &operator=(const AliJetEmbeddingFromAODTask&); // not implemented
128
129 ClassDef(AliJetEmbeddingFromAODTask, 12) // Jet embedding from AOD task
130};
131#endif