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