change method name
[u/mrichter/AliRoot.git] / PWGJE / AliAnalysisTaskJetResponseV2.h
CommitLineData
3c6a60f7 1#ifndef ALIANALYSISTASKJETRESPONSEV2_H
2#define ALIANALYSISTASKJETRESPONSEV2_H
3
7a88ef30 4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7//
8// task compares jets in two branches,
9// written for analysis of jet embedding in HI events
10//
11
3c6a60f7 12class TH1F;
8c483a6b 13class TH1I;
3c6a60f7 14class TH2F;
15class TH3F;
16class THnSparse;
17class AliESDEvent;
18class AliAODEvent;
8c483a6b 19class AliAODJet;
53f9653b 20class AliAODExtension;
3c6a60f7 21
22#include "AliAnalysisTaskSE.h"
23#include "AliVEvent.h"
24
25class AliAnalysisTaskJetResponseV2 : public AliAnalysisTaskSE {
31b9d515 26public:
27 AliAnalysisTaskJetResponseV2();
28 AliAnalysisTaskJetResponseV2(const char *name);
29 virtual ~AliAnalysisTaskJetResponseV2();
30
31 virtual void LocalInit() {Init();}
32 virtual void Init();
33 virtual void UserCreateOutputObjects();
34 virtual void UserExec(Option_t *option);
35 virtual void Terminate(const Option_t*);
36
37 virtual Int_t GetNInputTracks();
38 virtual THnSparse* NewTHnSparseF(const char* name, UInt_t entries, UInt_t opt);
39 virtual void GetDimParams(Int_t iEntry, Bool_t hr, TString &label, Int_t &nbins, Double_t &xmin, Double_t &xmax);
40 virtual Int_t GetPtHardBin(Double_t ptHard);
41 virtual Double_t GetPt(AliAODJet* j, Int_t mode);
42
43 virtual AliVEvent::EOfflineTriggerTypes GetOfflineTrgMask() const { return fOfflineTrgMask; }
44 virtual void GetBranchNames(TString &branch1, TString &branch2) const { branch1 = fJetBranchName[0]; branch2 = fJetBranchName[1]; }
45 virtual Bool_t GetIsPbPb() const { return fIsPbPb; }
46 virtual Int_t GetMinContribVtx() const { return fMinContribVtx; };
47 virtual Float_t GetVtxZMin() const { return fVtxZMin; }
48 virtual Float_t GetVtxZMax() const { return fVtxZMax; }
49 virtual Int_t GetEvtClassMin() const { return fEvtClassMin; }
50 virtual Int_t GetEvtClassMax() const { return fEvtClassMax; }
51 virtual Float_t GetCentMin() const { return fCentMin; }
52 virtual Float_t GetCentMax() const { return fCentMax; }
53 virtual Int_t GetNInputTracksMin() const { return fNInputTracksMin; }
54 virtual Int_t GetNInputTracksMax() const { return fNInputTracksMax; }
55 virtual Float_t GetJetEtaMin() const { return fJetEtaMin; }
56 virtual Float_t GetJetEtaMax() const { return fJetEtaMax; }
57 virtual Float_t GetJetPtMin() const { return fJetPtMin; }
58 virtual Float_t GetJetPtFractionMin() const { return fJetPtFractionMin; }
59 virtual Int_t GetNMatchJets() const { return fNMatchJets; }
60
d5ec3aef 61 virtual void SetBranchNames(const TString &branch1= "", const TString &branch2 = "", const TString &branch3 = "");
31b9d515 62 virtual void SetBackgroundBranch(TString &branch) { fBackgroundBranch = branch;}
53f9653b 63 virtual void SetNonStdFile(char* c){fNonStdFile = c;}
31b9d515 64 virtual void SetIsPbPb(Bool_t b=kTRUE) { fIsPbPb = b; }
65 virtual void SetOfflineTrgMask(AliVEvent::EOfflineTriggerTypes mask) { fOfflineTrgMask = mask; }
66 virtual void SetMinContribVtx(Int_t n) { fMinContribVtx = n; }
67 virtual void SetVtxZMin(Float_t z) { fVtxZMin = z; }
68 virtual void SetVtxZMax(Float_t z) { fVtxZMax = z; }
69 virtual void SetEvtClassMin(Int_t evtClass) { fEvtClassMin = evtClass; }
70 virtual void SetEvtClassMax(Int_t evtClass) { fEvtClassMax = evtClass; }
71 virtual void SetCentMin(Float_t cent) { fCentMin = cent; }
72 virtual void SetCentMax(Float_t cent) { fCentMax = cent; }
73 virtual void SetNInputTracksMin(Int_t nTr) { fNInputTracksMin = nTr; }
74 virtual void SetNInputTracksMax(Int_t nTr) { fNInputTracksMax = nTr; }
75 virtual void SetJetEtaMin(Float_t eta) { fJetEtaMin = eta; }
76 virtual void SetJetEtaMax(Float_t eta) { fJetEtaMax = eta; }
77 virtual void SetJetPtMin(Float_t pt) { fJetPtMin = pt; }
78 virtual void SetJetTriggerExclude(UChar_t i) { fJetTriggerExcludeMask = i; }
79 virtual void SetJetPtFractionMin(Float_t frac) { fJetPtFractionMin = frac; }
80 virtual void SetNMatchJets(Int_t n) { fNMatchJets = n; }
81 virtual void SetFillEvent(Bool_t b) { fbEvent = b; }
82 virtual void SetFillJetsMismatch1(Bool_t b) { fbJetsMismatch1 = b; }
83 virtual void SetFillJetsMismatch2(Bool_t b) { fbJetsMismatch2 = b; }
84 virtual void SetFillJetsRp(Bool_t b) { fbJetsRp = b; }
85 virtual void SetFillJetsDeltaPt(Bool_t b) { fbJetsDeltaPt = b; }
86 virtual void SetFillJetsEta(Bool_t b) { fbJetsEta = b; }
87 virtual void SetFillJetsPhi(Bool_t b) { fbJetsPhi = b; }
88 virtual void SetFillJetsArea(Bool_t b) { fbJetsArea = b; }
d5ec3aef 89 virtual void SetFillJets3Branches(Bool_t b) { fbJets3Branches = b; }
31b9d515 90 virtual void SetFillJetsBeforeCut1(Bool_t b) { fbJetsBeforeCut1 = b; }
91 virtual void SetFillJetsBeforeCut2(Bool_t b) { fbJetsBeforeCut2 = b; }
92 virtual void SetKeepJets(Bool_t b = kTRUE) { fKeepJets = b; }
fedb5a47 93 virtual void SetMatchMaxDist(Double_t max) { fMatchMaxDist = max;}
31b9d515 94
95private:
96 // ESD/AOD events
53f9653b 97 AliESDEvent *fESD; //! ESD object
98 AliAODEvent *fAOD; //! AOD event
f34e09e6 99 AliAODEvent *fAODOut; //! AOD event out
53f9653b 100 AliAODExtension *fAODExtension; //! where we take the jets from can be input or output AOD
31b9d515 101
102 // jets to compare
d5ec3aef 103 TString fJetBranchName[3]; // name of jet branches to compare
104 TList *fListJets[3]; //! jet lists
31b9d515 105
53f9653b 106 TString fNonStdFile; // name of delta aod file to catch the extension
7a88ef30 107 TString fBackgroundBranch; // branch of external background
31b9d515 108
d5ec3aef 109 // event selection
31b9d515 110 Bool_t fIsPbPb; // is Pb-Pb (fast embedding) or p-p (detector response)
111 AliVEvent::EOfflineTriggerTypes fOfflineTrgMask; // mask of offline triggers to accept
112 Int_t fMinContribVtx; // minimum number of track contributors for primary vertex
113 Float_t fVtxZMin; // lower bound on vertex z
114 Float_t fVtxZMax; // upper bound on vertex z
115 Int_t fEvtClassMin; // lower bound on event class
116 Int_t fEvtClassMax; // upper bound on event class
117 Float_t fCentMin; // lower bound on centrality
118 Float_t fCentMax; // upper bound on centrality
119 Int_t fNInputTracksMin; // lower bound of nb. of input tracks
120 Int_t fNInputTracksMax; // upper bound of nb. of input tracks
121 Float_t fJetEtaMin; // lower bound on eta for found jets
122 Float_t fJetEtaMax; // upper bound on eta for found jets
123 Float_t fJetPtMin; // minimum jet pT
124 UChar_t fJetTriggerExcludeMask; // mask for jet triggeres to exclude
125 Float_t fJetPtFractionMin; // minimum fraction for positiv match of jets
126 Int_t fNMatchJets; // maximal nb. of jets taken for matching
127 Double_t fMatchMaxDist; // maximal distance of matching jets
128 Bool_t fKeepJets; // keep jets with negative pt after background subtraction
129
130
131 // output objects
d5ec3aef 132 Int_t fkNbranches; //! number of branches to be read
31b9d515 133 const Int_t fkEvtClasses; //! number of event classes
134 TList *fOutputList; //! output data container
135 Bool_t fbEvent; // fill fhnEvent
136 Bool_t fbJetsMismatch1; // fill fhnJetsMismatch1
137 Bool_t fbJetsMismatch2; // fill fhnJetsMismatch2
138 Bool_t fbJetsRp; // fill fhnJetsRp
139 Bool_t fbJetsDeltaPt; // fill fhnJetsDeltaPt
140 Bool_t fbJetsEta; // fill fhnJetsEta
141 Bool_t fbJetsPhi; // fill fhnJetsEta
142 Bool_t fbJetsArea; // fill fhnJetsArea
d5ec3aef 143 Bool_t fbJets3Branches; // fill fhnJets3Branches
31b9d515 144 Bool_t fbJetsBeforeCut1; // fill fhnJetsBeforeCut1
145 Bool_t fbJetsBeforeCut2; // fill fhnJetsBeforeCut2
146 TH1I *fHistEvtSelection; //! event selection statistic
147 TH1I *fHistJetSelection; //! jet selection statistic
148 TH2F *fh2JetSelection; //! jet selection statistic, with probe jet pt
149 THnSparse *fhnEvent; //! variables per event
150 THnSparse *fhnJetsMismatch1; //! variables per jet
151 THnSparse *fhnJetsMismatch2; //! variables per jet
152 THnSparse *fhnJetsRp; //! variables per jet
153 THnSparse *fhnJetsDeltaPt; //! variables per jet
154 THnSparse *fhnJetsEta; //! variables per jet
155 THnSparse *fhnJetsPhi; //! variables per jet
156 THnSparse *fhnJetsArea; //! variables per jet
d5ec3aef 157 THnSparse *fhnJets3Branches; //! variables per jet
158 THnSparse *fhnJetsBeforeCut1; //! variables per jet before acceptance cut
159 THnSparse *fhnJetsBeforeCut2; //! variables per jet before acceptance cut
31b9d515 160
161 AliAnalysisTaskJetResponseV2(const AliAnalysisTaskJetResponseV2&); // not implemented
162 AliAnalysisTaskJetResponseV2& operator=(const AliAnalysisTaskJetResponseV2&); // not implemented
163
f34e09e6 164 ClassDef(AliAnalysisTaskJetResponseV2, 6);
3c6a60f7 165};
166
167#endif
31b9d515 168