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