]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGJE/AliAnalysisTaskJetResponseV2.h
Introduction of PartonInfo object to trace the original hard partons +
[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 class AliAODExtension;
21
22 #include "AliAnalysisTaskSE.h"
23 #include "AliVEvent.h"
24
25 class AliAnalysisTaskJetResponseV2 : public AliAnalysisTaskSE {
26 public:
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
61    virtual void     SetBranchNames(const TString &branch1= "", const TString &branch2 = "", const TString &branch3 = "");
62    virtual void     SetBackgroundBranch(TString &branch) { fBackgroundBranch = branch;}
63    virtual void     SetNonStdFile(char* c){fNonStdFile = c;} 
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; }
89    virtual void     SetFillJets3Branches(Bool_t b) { fbJets3Branches = b; }
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; }
93    virtual void     SetMatchMaxDist(Double_t max) { fMatchMaxDist = max;}
94
95 private:
96    // ESD/AOD events
97    AliESDEvent      *fESD;    //! ESD object
98    AliAODEvent      *fAOD;    //! AOD event
99    AliAODEvent      *fAODOut; //! AOD event out
100    AliAODExtension  *fAODExtension; //! where we take the jets from can be input or output AOD
101
102    // jets to compare
103    TString fJetBranchName[3]; //  name of jet branches to compare
104    TList *fListJets[3];       //! jet lists
105
106    TString       fNonStdFile; // name of delta aod file to catch the extension
107    TString fBackgroundBranch;  // branch of external background
108
109     // event selection
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
132    Int_t fkNbranches;                   //! number of branches to be read
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
143    Bool_t fbJets3Branches;                         // fill fhnJets3Branches
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
157    THnSparse *fhnJets3Branches;               //! variables per jet
158    THnSparse *fhnJetsBeforeCut1;              //! variables per jet before acceptance cut
159    THnSparse *fhnJetsBeforeCut2;              //! variables per jet before acceptance cut
160
161    AliAnalysisTaskJetResponseV2(const AliAnalysisTaskJetResponseV2&); // not implemented
162    AliAnalysisTaskJetResponseV2& operator=(const AliAnalysisTaskJetResponseV2&); // not implemented
163
164    ClassDef(AliAnalysisTaskJetResponseV2, 6);
165 };
166
167 #endif
168