AliPhysics  068200c (068200c)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskHJetEmbed.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKHJETEMBED_H
2 #define ALIANALYSISTASKHJETEMBED_H
3 
4 #include <vector>
5 
6 class TH2F;
7 class TH1F;
8 class TF1;
9 class TH3F;
10 class THnSparse;
11 class TClonesArray;
12 class TObject;
13 class TString;
14 class AliNamedString;
15 class AliAODEvent;
16 class AliESDEvent;
17 class AliMCEvent;
18 class AliRhoParameter;
19 class TRandom3;
20 class AliEmcalJet;
21 class AliVTrack;
22 
23 template<class T> class TParameter;
24 
25 #include "AliAnalysisTaskSE.h"
26 
28  public:
30  AliAnalysisTaskHJetEmbed(const char *name);
31  virtual ~AliAnalysisTaskHJetEmbed();
32 
34  void UserExec(Option_t *option);
35  void Terminate(Option_t *);
36  void PrintConfig();
37 
38  void SetMaxVtxZ(Double_t z) { fMaxVtxZ=z; }
39  void SetCollisionSystem(char *s) { fCollisionSystem=s; }
40  void SetRunPeriod(char *p) { fPeriod=p; }
42  void SetTrackArrName(char *s) { fTrackArrName=s; }
43  void SetTrkPtRange(Double_t min, Double_t max) { fMinTrkPt=min; fMaxTrkPt=max; }
44  void SetTrkPhiRange(Double_t min, Double_t max) { fMinTrkPhi=min; fMaxTrkPhi=max; }
45  void SetTrkEtaRange(Double_t min, Double_t max) { fMinTrkEta=min; fMaxTrkEta=max; }
46  void SetTTtype(Int_t type) { fTTtype=type; }
47  void SetRadius(Double_t rad) { fRadius=rad; }
48  void SetPLJetArrName(char *s) { fPLJetArrName=s; }
49  void SetDLJetArrName(char *s) { fDLJetArrName=s; }
50  void SetJetArrName(char *s) { fJetArrName=s; }
51  void SetRhoName(char *s) { fRhoName=s; }
52  void SetRunQA(Bool_t run) { fRunQA=run; }
53  void SetRunPL(Bool_t run) { fRunPL=run; }
54  void SetRunDL(Bool_t run) { fRunDL=run; }
55  void SetRunHJet(Bool_t run) { fRunHJet=run; }
56  void SetRunMatch(Bool_t run) { fRunMatch=run; }
57  void SetTTRanges(Double_t *min, Double_t *max)
58  {
59  for(Int_t i=0; i<kNTT; i++)
60  {
61  fMinTTPt[i] = min[i];
62  fMaxTTPt[i] = max[i];
63  }
64  }
65 
66 
67 
68 protected:
69  void RunQA();
70  void RunHJet(const Double_t minPt, const Double_t maxPt);
71  void RunMatch(const TClonesArray *tracks, const Int_t leadingIndex);
72  void FillHJetCor(const TClonesArray *tracks, const Int_t leadingIndex, const TClonesArray *jetArray, THnSparse *hTT, THnSparse *hn, Bool_t isBkg = kFALSE);
73  Int_t FindGeoMatchedJet(const AliEmcalJet* jet, const TClonesArray *jetArray, Double_t &dR);
74  Int_t FindEnergyMatchedJet(const AliEmcalJet* jet, const TClonesArray *jetArray, Double_t &dR, Double_t &fraction);
75  Bool_t AcceptTrack(const AliVParticle *track);
76  Bool_t IsGoodJet(const AliEmcalJet* jet);
77  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);
78  Double_t GetDPhi(const Double_t phi1, const Double_t phi2);
79  Double_t CalculateDPhi(const Double_t phi1, const Double_t phi2);
80  Double_t GetJetDistance(const AliEmcalJet *jet1, const AliEmcalJet* jet2);
81 
82  enum { kNTrig = 3 };
83  enum { kNTT = 4 };
84 
85  private:
87  Int_t fAnaType; // 0-local; 1-grid
88  TString fPeriod; // Run period
89  TString fCollisionSystem; // Collision system
90  AliVEvent *fEvent;
93  Double_t fMaxVtxZ; // Maximum z of vertices
95  TClonesArray *fMCParticleArray;
96  TString fTrackArrName; // Name of the input track array
97  TClonesArray *fTrackArray;
108  Double_t fRadius; // Jet radius
109  TString fJetArrName; // Name of the found jet array
110  TString fPLJetArrName; // Name of the embedded PYTHIA jet array on particle level
111  TString fDLJetArrName; // Name of the embedded PYTHIA jet array on detector level
112  TClonesArray *fJetArray;
113  TClonesArray *fPLJetArray;
114  TClonesArray *fDLJetArray;
115  TString fRhoName; // Name of the rho parameter
120  TRandom3 *fRandom;
121 
122  Bool_t fRunQA; // Flag to run QA
123  Bool_t fRunHJet; // Flag to run h+jet
124  Bool_t fRunMatch; // Flag to run matching
127 
129  TH1F *fhEventStat;
130  TH1F *fhPtHardBins;
131 
132  TH1F *fhVtxZ[kNTrig];
135 
136  // QA histograms
137  THnSparse *fhPLJetPtVsCent[kNTrig];
138  THnSparse *fhDLJetPtVsCent[kNTrig];
139 
140  // HJet
141  THnSparse *fhPLTT[kNTrig];
142  THnSparse *fhDLTT[kNTrig];
143  THnSparse *fhPLHJet[kNTrig];
144  THnSparse *fhDLHJet[kNTrig];
145  THnSparse *fhTTPtQA[kNTrig];
146  THnSparse *fhTTPt[kNTrig];
147  THnSparse *fhHJet[kNTrig];
148 
149 
150  // Matching
151  THnSparse *fhJetPtGeoMatch[kNTrig];
152  THnSparse *fhJetPtEnMatch[kNTrig];
153 
154  THnSparse *fhJetPhiGeoMatch[kNTrig];
155  THnSparse *fhJetPhiEnMatch[kNTrig];
156 
157  AliAnalysisTaskHJetEmbed(const AliAnalysisTaskHJetEmbed&); // not implemented
158  AliAnalysisTaskHJetEmbed &operator=(const AliAnalysisTaskHJetEmbed&); // not implemented
159 
160  ClassDef(AliAnalysisTaskHJetEmbed, 3);
161 };
162 
163 #endif
164 
165 
Bool_t AcceptTrack(const AliVParticle *track)
Double_t CalculateDPhi(const Double_t phi1, const Double_t phi2)
Double_t fMinTrkPt
Index of the trigger track in the event.
double Double_t
Definition: External.C:58
Definition: External.C:260
TClonesArray * fDLJetArray
Array of the embedded PYTHIA jet array on particle level.
Definition: External.C:236
void SetTrkPhiRange(Double_t min, Double_t max)
Double_t GetDPhi(const Double_t phi1, const Double_t phi2)
Double_t GetJetDistance(const AliEmcalJet *jet1, const AliEmcalJet *jet2)
Int_t fTriggerTrkIndex
Array of input tracks.
TClonesArray * fPLJetArray
Array of the found jets.
TString fRhoName
Array of the embedded PYTHIA jet array on detector level.
void SetTrkPtRange(Double_t min, Double_t max)
Int_t fAnaType
Control output.
AliNamedString * fPtHardBinName
Value of the rho parameter.
int Int_t
Definition: External.C:63
Double_t fMaxVtxZ
V0M for current event.
void SetTrkEtaRange(Double_t min, Double_t max)
void RunHJet(const Double_t minPt, const Double_t maxPt)
Int_t fPtHardBin
Pt hard bin param.
Int_t FindGeoMatchedJet(const AliEmcalJet *jet, const TClonesArray *jetArray, Double_t &dR)
Int_t FindEnergyMatchedJet(const AliEmcalJet *jet, const TClonesArray *jetArray, Double_t &dR, Double_t &fraction)
Double_t fRhoValue
Rho parameter.
THnSparse * fhJetPhiGeoMatch[kNTrig]
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_t fCentrality
Trigger type of the event.
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:44
AliAnalysisTaskHJetEmbed & operator=(const AliAnalysisTaskHJetEmbed &)
const char Option_t
Definition: External.C:48
bool Bool_t
Definition: External.C:53
void FillHJetCor(const TClonesArray *tracks, const Int_t leadingIndex, const TClonesArray *jetArray, THnSparse *hTT, THnSparse *hn, Bool_t isBkg=kFALSE)
void RunMatch(const TClonesArray *tracks, const Int_t leadingIndex)
Bool_t IsGoodJet(const AliEmcalJet *jet)
void SetTTRanges(Double_t *min, Double_t *max)