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