Add sigma2 jet shape and fill constituent info. for subtracted jets
[u/mrichter/AliRoot.git] / PWGJE / UserTasks / AliAnalysisTaskJetAntenna.h
CommitLineData
e59c88bd 1#ifndef ALIANALYSISTASKJETANTENNA_H
2#define ALIANALYSISTASKJETANTENNA_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// This task computes several jet observables like
9// the fraction of energy in inner and outer coronnas,
10// the distance from track to jet axis and a
11// correlation strength distribution of particles inside jets.
12// Author: lcunquei@cern.ch
13// *******************************************
14
15class TH1F;
16class TH1I;
17class TH2F;
18class TH3F;
19class THnSparse;
20class TRandom3;
21class AliESDEvent;
22class AliAODExtension;
23class AliAODEvent;
24
25#include "AliAnalysisTaskSE.h"
26#include "AliVEvent.h"
27
28class AliAnalysisTaskJetAntenna : public AliAnalysisTaskSE {
29public:
30 AliAnalysisTaskJetAntenna();
31 AliAnalysisTaskJetAntenna(const char *name);
32 virtual ~AliAnalysisTaskJetAntenna();
33 virtual void LocalInit() {Init();}
34 virtual void Init();
35 virtual void UserCreateOutputObjects();
36 virtual void UserExec(Option_t *option);
37 virtual void Terminate(const Option_t*);
38
39 Double_t RelativePhi(Double_t angle1,Double_t angle2);
40 Int_t GetPhiBin(Double_t phi);
86f50c7c 41 Int_t GetPtHardBin(Double_t ptHard);
e59c88bd 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 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 SetFilterMask(UInt_t i){fFilterMask = i;}
70 virtual void SetFilterMaskBestPt(UInt_t i){fFilterMaskBestPt = i;}
71 virtual void SetFilterType(Int_t iType){fFilterType=iType;}
72
73 virtual void SetCentMin(Float_t cent) { fCentMin = cent; }
74 virtual void SetCentMax(Float_t cent) { fCentMax = cent; }
75 virtual void SetNInputTracksMin(Int_t nTr) { fNInputTracksMin = nTr; }
76 virtual void SetNInputTracksMax(Int_t nTr) { fNInputTracksMax = nTr; }
77 virtual void SetRequireITSRefit(Int_t nref) {fRequireITSRefit=nref;}
78 virtual void SetSharedClusterCut(Int_t docut){fApplySharedClusterCut=docut;}
79
80 virtual void SetNRPBins(Int_t bins){fNRPBins=bins;}
81 virtual void SetSemigoodCorrect(Int_t yesno){fSemigoodCorrect=yesno;}
54aaacb8 82 virtual void SetDoMatching(Bool_t b=kFALSE){fDoMatching=b;}
e59c88bd 83 virtual void SetHolePos(Float_t poshole) { fHolePos = poshole; }
84 virtual void SetHoleWidth(Float_t holewidth) { fHoleWidth = holewidth; }
85 virtual void SetTrackTypeRec(Int_t i){fTrackTypeRec = i;}
86 virtual void SetTMCut(Int_t i){fCutTM=i;}
87 virtual void SetJetEtaMin(Float_t eta) { fJetEtaMin = eta; }
88 virtual void SetJetEtaMax(Float_t eta) { fJetEtaMax = eta; }
89 virtual void SetJetPtMin(Float_t pt) { fJetPtMin = pt; }
90 virtual void SetJetTriggerExclude(UChar_t i) { fJetTriggerExcludeMask = i; }
91 virtual void SetJetPtFractionMin(Float_t frac) { fJetPtFractionMin = frac; }
92 virtual void SetNMatchJets(Int_t n) { fNMatchJets = n; }
93 virtual void SetKeepJets(Bool_t b = kTRUE) { fKeepJets = b; }
94 virtual void SetNonStdFile(char* c){fNonStdFile = c;}
95 enum {kTrackUndef = 0, kTrackAOD, kTrackKineAll,kTrackKineCharged, kTrackAODMCAll, kTrackAODMCCharged, kTrackAODMCChargedAcceptance};
96
97private:
98 // ESD/AOD events
99 AliESDEvent *fESD; //! ESD object
100 AliAODEvent *fAODIn; //! AOD event for AOD input tracks
101 AliAODEvent *fAODOut; //! AOD event
102 AliAODExtension *fAODExtension; //! where we take the jets from can be input or output AOD
103 Int_t GetListOfTracks(TList *list);
54aaacb8 104 Int_t GetListOfTracksExtra(TList* list);
e59c88bd 105 Int_t SelectTrigger(TList *list,Double_t minT,Double_t maxT,Int_t &number);
106 Int_t GetHardestTrackBackToJet(AliAODJet *jet);
107 Int_t GetListOfTracksCloseToJet(TList *list,AliAODJet *jet);
86f50c7c 108
e59c88bd 109 // jets to compare
110 TString fJetBranchName[2]; // name of jet branches to compare
111 TList *fListJets[2]; //! jet lists
112
113 TString fBackgroundBranch;
114 TString fNonStdFile; // name of delta aod file to catch the extension
115 // event selection
116 Bool_t fIsPbPb; // is Pb-Pb (fast embedding) or p-p (detector response)
117 AliVEvent::EOfflineTriggerTypes fOfflineTrgMask; // mask of offline triggers to accept
118 Int_t fMinContribVtx; // minimum number of track contributors for primary vertex
119 Float_t fVtxZMin; // lower bound on vertex z
120 Float_t fVtxZMax; // upper bound on vertex z
121 Int_t fEvtClassMin; // lower bound on event class
122 Int_t fEvtClassMax; // upper bound on event class
123 UInt_t fFilterMask; // filter bit for slecected tracks
124 UInt_t fFilterMaskBestPt; // filter bit for selected hig pt tracks (best quality)
125 UInt_t fFilterType; // type of slected tracks parrallel to filtermask
126 Float_t fCentMin; // lower bound on centrality
127 Float_t fCentMax; // upper bound on centrality
128 Int_t fNInputTracksMin; // lower bound of nb. of input tracks
129 Int_t fNInputTracksMax; // upper bound of nb. of input tracks
130 Int_t fRequireITSRefit;
131 Int_t fApplySharedClusterCut; // flag to apply shared cluster cut (needed for some AODs where this cut was not applied in the filtering)
54aaacb8 132 Int_t fTrackTypeRec;
e59c88bd 133 Float_t fRPAngle;
134 Int_t fNRPBins;
135 Int_t fSemigoodCorrect;
54aaacb8 136 Bool_t fDoMatching;
e59c88bd 137 Float_t fHolePos;
138 Float_t fHoleWidth;
139 Float_t fCutTM; //lower pt cut for particles entering the TM axis calculation
140 Float_t fJetEtaMin; // lower bound on eta for found jets
141 Float_t fJetEtaMax; // upper bound on eta for found jets
142 Int_t fNevents; // number of events
143 Int_t fTindex; // index reference
144 Float_t fJetPtMin; // minimum jet pT
145 UChar_t fJetTriggerExcludeMask; // mask for jet triggeres to exclude
146 Float_t fJetPtFractionMin; // minimum fraction for positiv match of jets
147 Int_t fNMatchJets; // maximal nb. of jets taken for matching
148 Double_t fMatchMaxDist; // maximal distance of matching jets
149 Bool_t fKeepJets; // keep jets with negative pt after background subtraction
150
151
152 // output objects
153 const Int_t fkNbranches; //! number of branches to be read
154 const Int_t fkEvtClasses; //! number of event classes
155
156 TList *fOutputList; //! output data container
157
158 TH1I *fHistEvtSelection; //! event selection statistic
03c25974 159 TH2F* fh2JetEntries; //centrality bias of triggers
e59c88bd 160 TH2F* fh2Circularity; //jet density
551abe2f 161 TH2F* fh2JetAxisPhi; //smearing jet axis
e59c88bd 162 THnSparse *fhnJetTM; //Recoil jet spectrum
163
164
165 AliAnalysisTaskJetAntenna(const AliAnalysisTaskJetAntenna&); // not implemented
166 AliAnalysisTaskJetAntenna& operator=(const AliAnalysisTaskJetAntenna&); // not implemented
167
168 ClassDef(AliAnalysisTaskJetAntenna, 6);
169};
170
171#endif
172