]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGJE/AliAnalysisTaskJetResponseV2.h
cosmetics
[u/mrichter/AliRoot.git] / PWGJE / AliAnalysisTaskJetResponseV2.h
1 #ifndef ALIANALYSISTASKJETRESPONSEV2_H
2 #define ALIANALYSISTASKJETRESPONSEV2_H
3
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
12 class TH1F;
13 class TH1I;
14 class TH2F;
15 class TH3F;
16 class THnSparse;
17 class AliESDEvent;
18 class AliAODEvent;
19 class AliAODJet;
20
21 #include "AliAnalysisTaskSE.h"
22 #include "AliVEvent.h"
23
24 class AliAnalysisTaskJetResponseV2 : public AliAnalysisTaskSE {
25 public:
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 = "", const TString &branch3 = "");
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     SetFillJets3Branches(Bool_t b) { fbJets3Branches = b; }
88    virtual void     SetFillJetsBeforeCut1(Bool_t b) { fbJetsBeforeCut1 = b; }
89    virtual void     SetFillJetsBeforeCut2(Bool_t b) { fbJetsBeforeCut2 = b; }
90    virtual void     SetKeepJets(Bool_t b = kTRUE) { fKeepJets = b; }
91
92 private:
93    // ESD/AOD events
94    AliESDEvent *fESD;    //! ESD object
95    AliAODEvent *fAOD;    //! AOD event
96
97    // jets to compare
98    TString fJetBranchName[3]; //  name of jet branches to compare
99    TList *fListJets[3];       //! jet lists
100
101    TString fBackgroundBranch;  // branch of external background
102
103     // event selection
104    Bool_t fIsPbPb;         // is Pb-Pb (fast embedding) or p-p (detector response)
105    AliVEvent::EOfflineTriggerTypes fOfflineTrgMask; // mask of offline triggers to accept
106    Int_t   fMinContribVtx; // minimum number of track contributors for primary vertex
107    Float_t fVtxZMin;      // lower bound on vertex z
108    Float_t fVtxZMax;      // upper bound on vertex z
109    Int_t   fEvtClassMin;          // lower bound on event class
110    Int_t   fEvtClassMax;          // upper bound on event class
111    Float_t fCentMin;      // lower bound on centrality
112    Float_t fCentMax;      // upper bound on centrality
113    Int_t   fNInputTracksMin;  // lower bound of nb. of input tracks
114    Int_t   fNInputTracksMax;  // upper bound of nb. of input tracks
115    Float_t fJetEtaMin;     // lower bound on eta for found jets
116    Float_t fJetEtaMax;     // upper bound on eta for found jets
117    Float_t fJetPtMin;      // minimum jet pT
118    UChar_t fJetTriggerExcludeMask; // mask for jet triggeres to exclude
119    Float_t fJetPtFractionMin; // minimum fraction for positiv match of jets
120    Int_t   fNMatchJets;       // maximal nb. of jets taken for matching
121    Double_t fMatchMaxDist;     // maximal distance of matching jets
122    Bool_t  fKeepJets;          // keep jets with negative pt after background subtraction
123
124
125    // output objects
126    Int_t fkNbranches;                   //! number of branches to be read
127    const Int_t fkEvtClasses;                  //! number of event classes
128    TList *fOutputList;                        //! output data container
129    Bool_t fbEvent;                            // fill fhnEvent
130    Bool_t fbJetsMismatch1;                    // fill fhnJetsMismatch1
131    Bool_t fbJetsMismatch2;                    // fill fhnJetsMismatch2
132    Bool_t fbJetsRp;                           // fill fhnJetsRp
133    Bool_t fbJetsDeltaPt;                      // fill fhnJetsDeltaPt
134    Bool_t fbJetsEta;                          // fill fhnJetsEta
135    Bool_t fbJetsPhi;                          // fill fhnJetsEta
136    Bool_t fbJetsArea;                         // fill fhnJetsArea
137    Bool_t fbJets3Branches;                         // fill fhnJets3Branches
138    Bool_t fbJetsBeforeCut1;                   // fill fhnJetsBeforeCut1
139    Bool_t fbJetsBeforeCut2;                   // fill fhnJetsBeforeCut2
140    TH1I  *fHistEvtSelection;                  //! event selection statistic
141    TH1I  *fHistJetSelection;                  //! jet selection statistic
142    TH2F  *fh2JetSelection;                    //! jet selection statistic, with probe jet pt
143    THnSparse *fhnEvent;                       //! variables per event
144    THnSparse *fhnJetsMismatch1;               //! variables per jet
145    THnSparse *fhnJetsMismatch2;               //! variables per jet
146    THnSparse *fhnJetsRp;                      //! variables per jet
147    THnSparse *fhnJetsDeltaPt;                 //! variables per jet
148    THnSparse *fhnJetsEta;                     //! variables per jet
149    THnSparse *fhnJetsPhi;                     //! variables per jet
150    THnSparse *fhnJetsArea;                    //! variables per jet
151    THnSparse *fhnJets3Branches;               //! variables per jet
152    THnSparse *fhnJetsBeforeCut1;              //! variables per jet before acceptance cut
153    THnSparse *fhnJetsBeforeCut2;              //! variables per jet before acceptance cut
154
155    AliAnalysisTaskJetResponseV2(const AliAnalysisTaskJetResponseV2&); // not implemented
156    AliAnalysisTaskJetResponseV2& operator=(const AliAnalysisTaskJetResponseV2&); // not implemented
157
158    ClassDef(AliAnalysisTaskJetResponseV2, 4);
159 };
160
161 #endif
162