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