AliPhysics  f05a842 (f05a842)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskHJetDphi.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKHJETDPHI_H
2 #define ALIANALYSISTASKHJETDPHI_H
3 
4 #include <vector>
5 
6 class TH2F;
7 class TH1F;
8 class TF1;
9 class THnSparse;
10 class TClonesArray;
11 class TObject;
12 class TString;
13 class AliAODEvent;
14 class AliESDEvent;
15 class AliAODExtension;
16 class AliMCEvent;
17 class AliRhoParameter;
18 class TRandom3;
19 class AliEmcalJet;
20 class AliVTrack;
21 class AliNamedArrayI;
22 class AliAODTrack;
23 class AliESDtrackCuts;
24 class AliAODJetEventBackground;
25 class AliNamedString;
26 
27 #include "AliAnalysisTaskSE.h"
28 
30  public:
32  AliAnalysisTaskHJetDphi(const char *name);
33  virtual ~AliAnalysisTaskHJetDphi();
34 
37  void UserExec(Option_t *option);
38  void Terminate(Option_t *);
39  void PrintConfig();
40 
41  void SetVerbosity(Int_t i) { fVerbosity = i; }
43  void SetAnaType(Int_t i) { fAnaType = i; }
44  void SetRunPeriod(char *p) { fPeriod = p; }
45  void SetCollisionSystem(char *s) { fCollisionSystem = s; }
46  void SetIsMC(Bool_t mc) { fIsMC = mc; }
48  void SetOfflineTrgMask(AliVEvent::EOfflineTriggerTypes mask) { fOfflineTrgMask = mask; }
49  void SetMaxVtxZ(Double_t z) { fMaxVtxZ = z; }
50  void SetFilterMask(UInt_t filter) { fFilterMask = filter; }
53  void SetNonStdFile(char* s) { fNonStdFile = s; }
55  void SetEmbTrkArrName(char *s) { fEmbTrkArrName = s; }
56  void SetTrackArrName(char *s) { fTrackArrName=s; }
60  void SetTrkPtRange(Double_t min, Double_t max) { fMinTrkPt=min; fMaxTrkPt=max; }
61  void SetTrkPhiRange(Double_t min, Double_t max) { fMinTrkPhi=min; fMaxTrkPhi=max; }
62  void SetTrkEtaRange(Double_t min, Double_t max) { fMinTrkEta=min; fMaxTrkEta=max; }
63  void SetRadius(Double_t rad) { fRadius=rad; }
64  void SetJetArrName(char *s) { fJetArrName=s; }
65  void SetPLJetArrName(char *s) { fPLJetArrName = s; }
66  void SetDLJetArrName(char *s) { fDLJetArrName = s; }
67  void SetRhoName(char *s) { fRhoName=s; }
68  void SetRunTrkQA(Bool_t run) { fRunTrkQA=run; }
69  void SetRunJetQA(Bool_t run) { fRunJetQA=run; }
71  void SetTTtype(Bool_t type) { fTTtype=type; }
72  void SetTTRange(Double_t min, Double_t max) { fTTMinPt=min; fTTMaxPt=max; }
73  void SetJetPtMin(Double_t min) { fJetPtMin = min; }
74  void SetRunPLHJet(Bool_t run) { fRunPLHJet = run; }
75  void SetRunDLHJet(Bool_t run) { fRunDLHJet = run; }
77  void SetStudyKtEffects(Bool_t study) { fStudyKtEffects=study; }
78  void SetKtValue(Double_t kt) { fKtValue=kt; }
79  void SetAODfilterBits(Int_t b0 = 0, Int_t b1 = 0) { fAODfilterBits[0] = b0 ; fAODfilterBits[1] = b1 ; }
80  void SetRunBkgFlow(Bool_t run) { fRunBkgFlow=run; }
81 
82 
83 protected:
85  void RunTrackQA();
86  void RunJetQA(const TClonesArray *jetArray, const Double_t rho, THnSparse *hJetPt, THnSparse *hJetArea, THnSparse *hJetQA);
87  Int_t FindSingleIncTrigger(const TClonesArray *trackArray, Double_t &trigPt, Double_t &trigPhi, Double_t &trigEta, const Int_t arrayType);
88  void RunSingleInclHJetCorr(Double_t trigPt, Double_t trigPhi, Double_t trigEta, const TClonesArray *jetArray, Double_t rho, THnSparse *hTT, THnSparse *hn);
89  void RunLeadTrkQA();
90  void StudyKtEffects();
91  Bool_t AcceptTrack(AliVParticle *track);
92  Bool_t IsGoodAODtrack(AliVParticle *track);
93  Bool_t IsGoodJet(Double_t jetEta);
94  Double_t GetLeadingPt(const Int_t jetIndex);
95  Double_t GetZ(const Double_t trkPx, const Double_t trkPy, const Double_t trkPz, const Double_t jetPx, const Double_t jetPy, const Double_t jetPz);
96  Double_t CalculateDPhi(const Double_t phi1, const Double_t phi2);
97  Double_t CalculatePhi(const Double_t py, const Double_t px);
98  Int_t LocateToTPCHole(const Double_t phi);
99  Int_t GetParticleType(Int_t pdg_input);
100  Double_t GetAODTrackPtRes(AliAODTrack *track);
101  Int_t GetPtHardBin(Double_t ptHard);
102 
103  private:
104  Int_t fVerbosity; // Control output
105  Bool_t fIsEmbedding; // Flag of embedding trains
106  Int_t fAnaType; // 0-EMCal jet framework; 1-charged jet framework
107  TString fPeriod; // Run period
108  TString fCollisionSystem; // Collision system
109  Bool_t fIsMC; // Flag if MC data
110  Bool_t fAnalyzeMCTruth; // Analyze MC truth
111  AliMCEvent *fMC;
112  AliVEvent *fEvent;
116  AliAODExtension *fAODExtension;
117  AliVEvent::EOfflineTriggerTypes fOfflineTrgMask; // Mask of offline triggers to accept
120  Double_t fMaxVtxZ; // Maximum z of vertices
121  AliESDtrackCuts *fEsdTrkCut;
122  AliESDtrackCuts *fEsdHybCut;
123  UInt_t fFilterMask; // Filter mask to select AOD tracks
124  Bool_t fRequireITSRefit; // Flag to require ITS refit for AOD tracks
125  Bool_t fRequireSharedClsCut; // Flag to require cut on fraction of shared TPC clusters
127  TString fNonStdFile; // Name of delta aod file to catch the extension
128  TString fMcParticleArrName; // Name of the input mc particles
129  TClonesArray *fMcParticleArray;
131  TString fEmbTrkArrName; // Name of PbPb tracks + PYTHIA tracks
132  TClonesArray *fEmbTrkArray;
133  TString fTrackArrName; // Name of the input track array
134  TClonesArray *fTrackArray;
137  Bool_t fSwitchOnAvoidTpcHole; // Switch on to avoid TPC hole for the recoil jets
138  Int_t fAvoidTpcHole; // Flag if TPC hole is present
139  Bool_t fCutTPCBoundary; // Flag of reqiring trigger tracks stay away from TPC boundary
140  Double_t fDistToTPCBoundary; // Distance to TPC boundary
141  Double_t fMinTrkPt; // Minimum pt for tracks
142  Double_t fMaxTrkPt; // Maximum pt for tracks
143  Double_t fMinTrkEta; // Minimum eta for tracks
144  Double_t fMaxTrkEta; // Maximum eta for tracks
145  Double_t fMinTrkPhi; // Minimum phi for tracks
146  Double_t fMaxTrkPhi; // Maximum phi for tracks
147  Double_t fRadius; // Jet radius
148  TString fJetArrName; // Name of the found jet array
149  TString fPLJetArrName; // Name of the embedded PYTHIA jet array on particle level
150  TString fDLJetArrName; // Name of the embedded PYTHIA jet array on detector level
151  TClonesArray *fJetArray;
152  TClonesArray *fPLJetArray;
153  TClonesArray *fDLJetArray;
154  TString fRhoName; // Name of the rho parameter
157  AliAODJetEventBackground *fEvtBkg;
160  Bool_t fRunTrkQA; // Flag to run track QA
161  Bool_t fRunJetQA; // Flag to run jet QA
162  Bool_t fRunSingleInclHJet; // Flag to run h+jet
163  Int_t fTTtype; // 0-single inclusive; 1-leading (not implemented yet)
164  Double_t fTTMinPt; // Minimum pt for TT
165  Double_t fTTMaxPt; // Maximum pt for TT
166  Double_t fJetPtMin; // Minimum pt for jets
167  Bool_t fRunPLHJet; // Run h+jet for detector-level jets
168  Bool_t fRunDLHJet; // Run h+jet for particle-level jets
169  Bool_t fRunLeadTrkQA; // Run QA for trigger hadron
170  Bool_t fStudyKtEffects; // Study kt effects
171  Double_t fKtValue; // Value of input kt
172  TRandom3 *fRandom;
173  Int_t fAODfilterBits[2]; // AOD track filter bit map
174  Bool_t fRunBkgFlow; // Vary rho for recoil jets
175 
176  // List of histograms
178  TH1F *fhEventStat;
179  TH1F *fhNTrials;
180  TH1F *fhPtHardBins;
181 
182  // Event properties
183  TH1F *fhVtxZ[4];
184  TH1F *fhCentrality[4];
186 
187  // track QA
188  TH2F *fhTrkPt[4];
189  THnSparse *fhTrkQA[4];
190  THnSparse *fhTrkPtRes[4];
191  THnSparse *fhTrkPhiRes[4];
192 
193  // jet QA
194  THnSparse *fhJetPt[4][3];
195  THnSparse *fhJetArea[4][3];
196  THnSparse *fhJetQA[4][3];
197 
198  // h+jet analysis
199  TH1F *fhNumberOfTT[4];
200  THnSparse *fhTTPt[4][3];
201  THnSparse *fHJetPhiCorr[4][3];
202  THnSparse *fHJetPhiCorrUp[4];
203  THnSparse *fHJetPhiCorrDown[4];
204 
205  // additional studies
206  THnSparse *fhLeadTrkQA[4];
207  THnSparse *fhKtEffects[4];
208 
209  AliAnalysisTaskHJetDphi(const AliAnalysisTaskHJetDphi&); // not implemented
210  AliAnalysisTaskHJetDphi &operator=(const AliAnalysisTaskHJetDphi&); // not implemented
211 
213 };
214 
215 #endif
ClassDef(AliAnalysisTaskHJetDphi, 3)
Double_t GetZ(const Double_t trkPx, const Double_t trkPy, const Double_t trkPz, const Double_t jetPx, const Double_t jetPy, const Double_t jetPz)
double Double_t
Definition: External.C:58
Double_t fCentrality
Trigger type of the event.
Int_t fPtHardBin
Pt hard bin param.
AliESDtrackCuts * fEsdHybCut
Track cuts for global tracks in ESD.
Definition: External.C:236
void SetTrkPtRange(Double_t min, Double_t max)
void SetStudyKtEffects(Bool_t study)
void SetTTRange(Double_t min, Double_t max)
AliNamedString * fPtHardBinName
Event background for LEGO train.
TClonesArray * fPLJetArray
Array of the found jets.
void SetTrkPhiRange(Double_t min, Double_t max)
Bool_t IsGoodAODtrack(AliVParticle *track)
void UserExec(Option_t *option)
AliAODJetEventBackground * fEvtBkg
Value of the rho parameter.
Bool_t AcceptTrack(AliVParticle *track)
AliVEvent::EOfflineTriggerTypes fOfflineTrgMask
where we take the jets from can be input or output AOD
Int_t FindSingleIncTrigger(const TClonesArray *trackArray, Double_t &trigPt, Double_t &trigPhi, Double_t &trigEta, const Int_t arrayType)
UInt_t fFilterMask
Track cuts for complementary tracks in ESD.
Bool_t IsGoodJet(Double_t jetEta)
Int_t GetPtHardBin(Double_t ptHard)
Bool_t fSwitchOnAvoidTpcHole
Trigger track pt.
void SetSwitchOnAvoidTpcHole(Bool_t cut)
Double_t GetLeadingPt(const Int_t jetIndex)
TString fNonStdFile
Flag if all the arraies are successfully retrieved.
int Int_t
Definition: External.C:63
Int_t GetParticleType(Int_t pdg_input)
unsigned int UInt_t
Definition: External.C:33
Double_t fTriggerTrkPt
Index of the trigger track in the event.
TString fTrackArrName
Array of PbPb tracks + PYTHIA tracks.
AliAnalysisTaskHJetDphi & operator=(const AliAnalysisTaskHJetDphi &)
void SetOfflineTrgMask(AliVEvent::EOfflineTriggerTypes mask)
void SetDistToTPCBoundary(Double_t dist)
void SetFilterMask(UInt_t filter)
AliAODEvent * fAODIn
ESD event.
Double_t GetAODTrackPtRes(AliAODTrack *track)
void RunJetQA(const TClonesArray *jetArray, const Double_t rho, THnSparse *hJetPt, THnSparse *hJetArea, THnSparse *hJetQA)
void SetTrkEtaRange(Double_t min, Double_t max)
Double_t CalculatePhi(const Double_t py, const Double_t px)
TString fRhoName
Array of the embedded PYTHIA jet array on detector level.
AliAODExtension * fAODExtension
Output AOD event.
TString fEmbTrkArrName
Array of mc map for EMCal train.
Double_t CalculateDPhi(const Double_t phi1, const Double_t phi2)
Int_t fTriggerTrkIndex
Array of input tracks.
AliESDEvent * fESD
Input event.
void SetAODfilterBits(Int_t b0=0, Int_t b1=0)
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:44
TClonesArray * fDLJetArray
Array of the embedded PYTHIA jet array on particle level.
const char Option_t
Definition: External.C:48
AliVEvent * fEvent
MC events.
Int_t fAODfilterBits[2]
Random number generator.
bool Bool_t
Definition: External.C:53
AliAODEvent * fAODOut
Input AOD event.
Double_t fRhoValue
Rho parameter.
void SetRunSingleInclHJet(Bool_t run)
Int_t LocateToTPCHole(const Double_t phi)
Double_t fMaxVtxZ
V0M for current event.
void RunSingleInclHJetCorr(Double_t trigPt, Double_t trigPhi, Double_t trigEta, const TClonesArray *jetArray, Double_t rho, THnSparse *hTT, THnSparse *hn)
AliNamedArrayI * fMcParticlelMap
Array of input mc particles.