AliPhysics  a9863a5 (a9863a5)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskEmcalJetTriggerQA.cxx
Go to the documentation of this file.
1 // Jet trigger QA analysis task.
2 //
3 // Author: M.Verweij
4 
5 #include <TClonesArray.h>
6 #include <TH1F.h>
7 #include <TH2F.h>
8 #include <TH3F.h>
9 #include <TProfile.h>
10 #include <THnSparse.h>
11 #include <TList.h>
12 #include <TLorentzVector.h>
13 
14 #include "AliVCluster.h"
15 #include "AliVTrack.h"
16 #include "AliVVZERO.h"
17 #include "AliEmcalJet.h"
18 #include "AliRhoParameter.h"
19 #include "AliLog.h"
20 #include "AliEmcalParticle.h"
21 #include "AliAODCaloTrigger.h"
22 #include "AliEMCALGeometry.h"
23 #include "AliVCaloCells.h"
24 #include "AliJetContainer.h"
25 #include "AliClusterContainer.h"
26 #include "AliParticleContainer.h"
27 #include "AliEMCALTriggerPatchInfo.h"
28 #include "AliAODHeader.h"
29 #include "AliPicoTrack.h"
30 
32 
34 
35 //________________________________________________________________________
38  fDebug(kFALSE),
39  fTriggerClass(""),
40  fContainerFull(0),
41  fContainerCharged(1),
42  fMaxPatchEnergy(0),
43  fMaxPatchADCEnergy(0),
44  fTriggerType(-1),
45  fNFastOR(16),
46  fMainTrigCat(kTriggerLevel1Jet),
47  fMainTrigSimple(kFALSE),
48  fhNEvents(0),
49  fhTriggerbit(0),
50  fHistRhovsCentFull(0),
51  fHistRhovsCentCharged(0),
52  fh3PtEtaPhiTracks(0),
53  fh3PtEtaPhiTracksOnEmcal(0),
54  fh3PtEtaPhiTracksToProp(0),
55  fh3PtEtaPhiTracksProp(0),
56  fh3PtEtaPhiTracksNoProp(0),
57  fh2CentPtJetFull(0),
58  fh2CentPtJetCharged(0),
59  fh3PtEtaPhiJetFull(0),
60  fh3PtEtaPhiJetCharged(0),
61  fh2NJetsPtFull(0),
62  fh2NJetsPtCharged(0),
63  fh3PtEtaAreaJetFull(0),
64  fh3PtEtaAreaJetCharged(0),
65  fh2PtNConstituentsCharged(0),
66  fh2PtNConstituents(0),
67  fh2PtMeanPtConstituentsCharged(0),
68  fh2PtMeanPtConstituentsNeutral(0),
69  fh2PtNEF(0),
70  fh3NEFEtaPhi(0),
71  fh2NEFNConstituentsCharged(0),
72  fh2NEFNConstituentsNeutral(0),
73  fh2Ptz(0),
74  fh2PtzCharged(0),
75  fh2PtLeadJet1VsLeadJet2(0),
76  fh3EEtaPhiCluster(0),
77  fh3PtLeadJet1VsPatchEnergy(0),
78  fh3PtLeadJet2VsPatchEnergy(0),
79  fh3PtLeadJet1PatchEnergyVZEROAmp(0),
80  fh3PtLeadJet1RawPatchEnergyVZEROAmp(0),
81  fh3PatchEnergyEtaPhiCenterJ1(0),
82  fh3PatchEnergyEtaPhiCenterJ2(0),
83  fh3PatchEnergyEtaPhiCenterJ1J2(0),
84  fh3PatchADCEnergyEtaPhiCenterJ1(0),
85  fh3PatchADCEnergyEtaPhiCenterJ2(0),
86  fh3PatchADCEnergyEtaPhiCenterJ1J2(0),
87  fh3PatchADCEnergyEtaPhiCenterAll(0),
88  fh3EEtaPhiCell(0),
89  fh2ECellVsCent(0),
90  fh2CellEnergyVsTime(0),
91  fh3EClusELeadingCellVsTime(0),
92  fh3JetReacCent(0)
93 {
94  // Default constructor.
95 
96  SetMakeGeneralHistograms(kTRUE);
97 }
98 
99 //________________________________________________________________________
101  AliAnalysisTaskEmcalJet(name, kTRUE),
102  fDebug(kFALSE),
103  fTriggerClass(""),
104  fContainerFull(0),
105  fContainerCharged(1),
106  fMaxPatchEnergy(0),
107  fMaxPatchADCEnergy(0),
108  fTriggerType(-1),
109  fNFastOR(16),
110  fMainTrigCat(kTriggerLevel1Jet),
111  fMainTrigSimple(kFALSE),
112  fhNEvents(0),
113  fhTriggerbit(0),
114  fHistRhovsCentFull(0),
115  fHistRhovsCentCharged(0),
116  fh3PtEtaPhiTracks(0),
117  fh3PtEtaPhiTracksOnEmcal(0),
118  fh3PtEtaPhiTracksToProp(0),
119  fh3PtEtaPhiTracksProp(0),
120  fh3PtEtaPhiTracksNoProp(0),
121  fh2CentPtJetFull(0),
122  fh2CentPtJetCharged(0),
123  fh3PtEtaPhiJetFull(0),
124  fh3PtEtaPhiJetCharged(0),
125  fh2NJetsPtFull(0),
126  fh2NJetsPtCharged(0),
127  fh3PtEtaAreaJetFull(0),
128  fh3PtEtaAreaJetCharged(0),
129  fh2PtNConstituentsCharged(0),
130  fh2PtNConstituents(0),
131  fh2PtMeanPtConstituentsCharged(0),
132  fh2PtMeanPtConstituentsNeutral(0),
133  fh2PtNEF(0),
134  fh3NEFEtaPhi(0),
135  fh2NEFNConstituentsCharged(0),
136  fh2NEFNConstituentsNeutral(0),
137  fh2Ptz(0),
138  fh2PtzCharged(0),
139  fh2PtLeadJet1VsLeadJet2(0),
140  fh3EEtaPhiCluster(0),
141  fh3PtLeadJet1VsPatchEnergy(0),
142  fh3PtLeadJet2VsPatchEnergy(0),
143  fh3PtLeadJet1PatchEnergyVZEROAmp(0),
144  fh3PtLeadJet1RawPatchEnergyVZEROAmp(0),
145  fh3PatchEnergyEtaPhiCenterJ1(0),
146  fh3PatchEnergyEtaPhiCenterJ2(0),
147  fh3PatchEnergyEtaPhiCenterJ1J2(0),
148  fh3PatchADCEnergyEtaPhiCenterJ1(0),
149  fh3PatchADCEnergyEtaPhiCenterJ2(0),
150  fh3PatchADCEnergyEtaPhiCenterJ1J2(0),
151  fh3PatchADCEnergyEtaPhiCenterAll(0),
152  fh3EEtaPhiCell(0),
153  fh2ECellVsCent(0),
154  fh2CellEnergyVsTime(0),
155  fh3EClusELeadingCellVsTime(0),
156  fh3JetReacCent(0)
157 {
158  // Standard constructor.
159 
161 }
162 
163 //________________________________________________________________________
165 {
166  // Destructor.
167 
168 }
169 
170 //________________________________________________________________________
172  //
173  // Decide if event should be selected for analysis
174  //
175 
176  fhNEvents->Fill(3.5);
177 
178  if(!fTriggerClass.IsNull()) {
179  //Check if requested trigger was fired
180  TString trigType1 = "J1";
181  TString trigType2 = "J2";
182  if(fTriggerClass.Contains("G")) {
183  trigType1 = "G1";
184  trigType2 = "G2";
185  }
186 
187  TString firedTrigClass = InputEvent()->GetFiredTriggerClasses();
188  if(fTriggerClass.Contains(trigType1.Data()) && fTriggerClass.Contains(trigType2.Data())) { //if events with J1&&J2 are requested
189  if(!firedTrigClass.Contains(trigType1.Data()) || !firedTrigClass.Contains(trigType2.Data()) ) //check if both are fired
190  return kFALSE;
191  }
192  else {
193  if(!firedTrigClass.Contains(fTriggerClass))
194  return kFALSE;
195  else if(fTriggerClass.Contains(trigType1.Data()) && firedTrigClass.Contains(trigType2.Data())) //if J2 is requested also add triggers which have J1&&J2. Reject if J1 is requested and J2 is fired
196  return kFALSE;
197  }
198  }
199  fhNEvents->Fill(1.5);
200 
201  return kTRUE;
202 }
203 
204 //________________________________________________________________________
206 
207  //Fill trigger patch histos for main trigger
208 
209  AliEMCALTriggerPatchInfo *patch = GetMainTriggerPatch(fMainTrigCat,fMainTrigSimple);
210  fMaxPatchEnergy = 0;
211  fMaxPatchADCEnergy = 0;
212  if(patch) {
213  fMaxPatchEnergy = patch->GetPatchE();
214  fMaxPatchADCEnergy = patch->GetADCAmpGeVRough();
215  fh3PatchADCEnergyEtaPhiCenterAll->Fill(fMaxPatchADCEnergy,patch->GetEtaGeo(),patch->GetPhiGeo());
216  if(patch->IsJetLow() && !patch->IsJetHigh()) { //main patch only fired low threshold trigger
217  fh3PatchEnergyEtaPhiCenterJ2->Fill(patch->GetPatchE(),patch->GetEtaGeo(),patch->GetPhiGeo());
218  fh3PatchADCEnergyEtaPhiCenterJ2->Fill(fMaxPatchADCEnergy,patch->GetEtaGeo(),patch->GetPhiGeo());
219  }
220  else if(patch->IsJetHigh() && !patch->IsJetLow()) { //main patch only fired high threshold trigger - should never happen
221  fh3PatchEnergyEtaPhiCenterJ1->Fill(patch->GetPatchE(),patch->GetEtaGeo(),patch->GetPhiGeo());
222  fh3PatchADCEnergyEtaPhiCenterJ1->Fill(fMaxPatchADCEnergy,patch->GetEtaGeo(),patch->GetPhiGeo());
223  }
224  else if(patch->IsJetHigh() && patch->IsJetLow()) { //main patch fired both triggers
225  fh3PatchEnergyEtaPhiCenterJ1J2->Fill(patch->GetPatchE(),patch->GetEtaGeo(),patch->GetPhiGeo());
226  fh3PatchADCEnergyEtaPhiCenterJ1J2->Fill(fMaxPatchADCEnergy,patch->GetEtaGeo(),patch->GetPhiGeo());
227  }
228  }
229 }
230 
231 //________________________________________________________________________
233 {
234  // Create user output.
235 
237 
238  Bool_t oldStatus = TH1::AddDirectoryStatus();
239  TH1::AddDirectory(kFALSE);
240 
241  fhNEvents = new TH1F("fhNEvents","fhNEvents;selection;N_{evt}",5,0,5);
242  fOutput->Add(fhNEvents);
243 
244  fhTriggerbit = new TProfile("fhTriggerbit","fhTriggerbit;;TriggerBit",1,0,1);
245  fOutput->Add(fhTriggerbit);
246 
247  fHistRhovsCentFull = new TH2F("fHistRhovsCentFull", "fHistRhovsCentFull", 101, -1, 100, 300, 0., 300.);
248  fHistRhovsCentFull->GetXaxis()->SetTitle("Centrality (%)");
249  fHistRhovsCentFull->GetYaxis()->SetTitle("s#rho_{ch} (GeV/c * rad^{-1})");
251 
252  fHistRhovsCentCharged = new TH2F("fHistRhovsCentCharged", "fHistRhovsCentCharged", 101, -1, 100, 300, 0., 300.);
253  fHistRhovsCentCharged->GetXaxis()->SetTitle("Centrality (%)");
254  fHistRhovsCentCharged->GetYaxis()->SetTitle("#rho_{ch} (GeV/c * rad^{-1})");
256 
257  Int_t fgkNCentBins = 21;
258  Float_t kMinCent = 0.;
259  Float_t kMaxCent = 105.;
260  Double_t *binsCent = new Double_t[fgkNCentBins+1];
261  for(Int_t i=0; i<=fgkNCentBins; i++) binsCent[i]=(Double_t)kMinCent + (kMaxCent-kMinCent)/fgkNCentBins*(Double_t)i ;
262  binsCent[fgkNCentBins-1] = 100.5;
263  binsCent[fgkNCentBins] = 101.5;
264 
265  Int_t fgkNdEPBins = 18*8;
266  Float_t kMindEP = 0.;
267  Float_t kMaxdEP = 1.*TMath::Pi()/2.;
268  Double_t *binsdEP = new Double_t[fgkNdEPBins+1];
269  for(Int_t i=0; i<=fgkNdEPBins; i++) binsdEP[i]=(Double_t)kMindEP + (kMaxdEP-kMindEP)/fgkNdEPBins*(Double_t)i ;
270 
271  Int_t fgkNPtBins = 200;
272  Float_t kMinPt = -50.;
273  Float_t kMaxPt = 150.;
274  Double_t *binsPt = new Double_t[fgkNPtBins+1];
275  for(Int_t i=0; i<=fgkNPtBins; i++) binsPt[i]=(Double_t)kMinPt + (kMaxPt-kMinPt)/fgkNPtBins*(Double_t)i ;
276 
277  Int_t fgkNPhiBins = 18*8;
278  Float_t kMinPhi = 0.;
279  Float_t kMaxPhi = 2.*TMath::Pi();
280  Double_t *binsPhi = new Double_t[fgkNPhiBins+1];
281  for(Int_t i=0; i<=fgkNPhiBins; i++) binsPhi[i]=(Double_t)kMinPhi + (kMaxPhi-kMinPhi)/fgkNPhiBins*(Double_t)i ;
282 
283  Int_t fgkNEtaBins = 100;
284  Float_t fgkEtaMin = -1.;
285  Float_t fgkEtaMax = 1.;
286  Double_t *binsEta=new Double_t[fgkNEtaBins+1];
287  for(Int_t i=0; i<=fgkNEtaBins; i++) binsEta[i]=(Double_t)fgkEtaMin + (fgkEtaMax-fgkEtaMin)/fgkNEtaBins*(Double_t)i ;
288 
289  Int_t fgkNAreaBins = 100;
290  Float_t kMinArea = 0.;
291  Float_t kMaxArea = 1.;
292  Double_t *binsArea = new Double_t[fgkNAreaBins+1];
293  for(Int_t i=0; i<=fgkNAreaBins; i++) binsArea[i]=(Double_t)kMinArea + (kMaxArea-kMinArea)/fgkNAreaBins*(Double_t)i ;
294 
295  Int_t fgkNConstBins = 100;
296  Float_t kMinConst = 0.;
297  Float_t kMaxConst = 100.;
298  Double_t *binsConst = new Double_t[fgkNConstBins+1];
299  for(Int_t i=0; i<=fgkNConstBins; i++) binsConst[i]=(Double_t)kMinConst + (kMaxConst-kMinConst)/fgkNConstBins*(Double_t)i ;
300 
301  Int_t fgkNMeanPtBins = 100;
302  Float_t kMinMeanPt = 0.;
303  Float_t kMaxMeanPt = 20.;
304  Double_t *binsMeanPt = new Double_t[fgkNMeanPtBins+1];
305  for(Int_t i=0; i<=fgkNMeanPtBins; i++) binsMeanPt[i]=(Double_t)kMinMeanPt + (kMaxMeanPt-kMinMeanPt)/fgkNMeanPtBins*(Double_t)i ;
306 
307  Int_t fgkNNEFBins = 101;
308  Float_t kMinNEF = 0.;
309  Float_t kMaxNEF = 1.01;
310  Double_t *binsNEF = new Double_t[fgkNNEFBins+1];
311  for(Int_t i=0; i<=fgkNNEFBins; i++) binsNEF[i]=(Double_t)kMinNEF + (kMaxNEF-kMinNEF)/fgkNNEFBins*(Double_t)i ;
312 
313  Int_t fgkNzBins = 101;
314  Float_t kMinz = 0.;
315  Float_t kMaxz = 1.01;
316  Double_t *binsz = new Double_t[fgkNzBins+1];
317  for(Int_t i=0; i<=fgkNzBins; i++) binsz[i]=(Double_t)kMinz + (kMaxz-kMinz)/fgkNzBins*(Double_t)i ;
318 
319  Int_t fgkNJetTypeBins = 2;
320  Float_t kMinJetType = -0.5;
321  Float_t kMaxJetType = 1.5;
322  Double_t *binsJetType = new Double_t[fgkNJetTypeBins+1];
323  for(Int_t i=0; i<=fgkNJetTypeBins; i++) binsJetType[i]=(Double_t)kMinJetType + (kMaxJetType-kMinJetType)/fgkNJetTypeBins*(Double_t)i ;
324 
325  Int_t fgkNTimeBins = 100;
326  Float_t kMinTime = -200.;
327  Float_t kMaxTime = 200;
328  Double_t *binsTime = new Double_t[fgkNTimeBins+1];
329  for(Int_t i=0; i<=fgkNTimeBins; i++) binsTime[i]=(Double_t)kMinTime + (kMaxTime-kMinTime)/fgkNTimeBins*(Double_t)i ;
330 
331  Int_t fgkNVZEROBins = 100;
332  Float_t kMinVZERO = 0.;
333  Float_t kMaxVZERO = 25000;
334  Double_t *binsVZERO = new Double_t[fgkNVZEROBins+1];
335  for(Int_t i=0; i<=fgkNVZEROBins; i++) binsVZERO[i]=(Double_t)kMinVZERO + (kMaxVZERO-kMinVZERO)/fgkNVZEROBins*(Double_t)i ;
336 
337  Double_t enBinEdges[3][2];
338  enBinEdges[0][0] = 1.; //10 bins
339  enBinEdges[0][1] = 0.1;
340  enBinEdges[1][0] = 5.; //8 bins
341  enBinEdges[1][1] = 0.5;
342  enBinEdges[2][0] = 100.;//95 bins
343  enBinEdges[2][1] = 1.;
344 
345  const Float_t enmin1 = 0;
346  const Float_t enmax1 = enBinEdges[0][0];
347  const Float_t enmin2 = enmax1 ;
348  const Float_t enmax2 = enBinEdges[1][0];
349  const Float_t enmin3 = enmax2 ;
350  const Float_t enmax3 = enBinEdges[2][0];//fgkEnMax;
351  const Int_t nbin11 = (int)((enmax1-enmin1)/enBinEdges[0][1]);
352  const Int_t nbin12 = (int)((enmax2-enmin2)/enBinEdges[1][1])+nbin11;
353  const Int_t nbin13 = (int)((enmax3-enmin3)/enBinEdges[2][1])+nbin12;
354 
355  Int_t fgkNEnBins=nbin13;
356  Double_t *binsEn=new Double_t[fgkNEnBins+1];
357  for(Int_t i=0; i<=fgkNEnBins; i++) {
358  if(i<=nbin11) binsEn[i]=(Double_t)enmin1 + (enmax1-enmin1)/nbin11*(Double_t)i ;
359  if(i<=nbin12 && i>nbin11) binsEn[i]=(Double_t)enmin2 + (enmax2-enmin2)/(nbin12-nbin11)*((Double_t)i-(Double_t)nbin11) ;
360  if(i<=nbin13 && i>nbin12) binsEn[i]=(Double_t)enmin3 + (enmax3-enmin3)/(nbin13-nbin12)*((Double_t)i-(Double_t)nbin12) ;
361  }
362 
363  fh3PtEtaPhiTracks = new TH3F("fh3PtEtaPhiTracks","fh3PtEtaPhiTracks;#it{p}_{T}^{track}_{vtx};#eta_{vtx};#varphi_{vtx}",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
365 
366  fh3PtEtaPhiTracksOnEmcal = new TH3F("fh3PtEtaPhiTracksOnEmcal","fh3PtEtaPhiTracksOnEmcal;#it{p}_{T}^{track}_{emc};#eta_{emc};#varphi_{emc}",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
368 
369  fh3PtEtaPhiTracksToProp = new TH3F("fh3PtEtaPhiTracksToProp","fh3PtEtaPhiTracksToProp;#it{p}_{T}^{track}_{vtx};#eta_{vtx};#varphi_{vtx}",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
371 
372  fh3PtEtaPhiTracksProp = new TH3F("fh3PtEtaPhiTracksProp","fh3PtEtaPhiTracksProp;#it{p}_{T}^{track}_{vtx};#eta_{vtx};#varphi_{vtx}",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
374 
375  fh3PtEtaPhiTracksNoProp = new TH3F("fh3PtEtaPhiTracksNoProp","fh3PtEtaPhiTracksNoProp;#it{p}_{T}^{track}_{vtx};#eta_{vtx};#varphi_{vtx}",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
377 
378  fh2CentPtJetFull = new TH2F("fh2CentPtJetFull","fh2CentPtJetFull;cent;#it{p}_{T}^{jet}",fgkNCentBins,binsCent,fgkNPtBins,binsPt);
380 
381  fh2CentPtJetCharged = new TH2F("fh2CentPtJetCharged","fh2CentPtJetCharged;cent;#it{p}_{T}^{jet}",fgkNCentBins,binsCent,fgkNPtBins,binsPt);
383 
384  fh3PtEtaPhiJetFull = new TH3F("fh3PtEtaPhiJetFull","fh3PtEtaPhiJetFull;#it{p}_{T}^{jet};#eta;#varphi",fgkNPtBins,binsPt,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
386 
387  fh3PtEtaPhiJetCharged = new TH3F("fh3PtEtaPhiJetCharged","fh3PtEtaPhiJetCharged;#it{p}_{T}^{jet};#eta;#varphi",fgkNPtBins,binsPt,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
389 
390  fh2NJetsPtFull = new TH2F("fh2NJetsPtFull","fh2NJetsPtFull;N_{jets};#it{p}_{T}^{jet}",20,-0.5,19.5,fgkNPtBins,binsPt);
391  fOutput->Add(fh2NJetsPtFull);
392 
393  fh2NJetsPtCharged = new TH2F("fh2NJetsPtCharged","fh2NJetsPtCharged;N_{jets};#it{p}_{T}^{jet}",20,-0.5,19.5,fgkNPtBins,binsPt);
395 
396  fh3PtEtaAreaJetFull = new TH3F("fh3PtEtaAreaJetFull","fh3PtEtaAreaJetFull;#it{p}_{T}^{jet};#eta;A",fgkNPtBins,binsPt,fgkNEtaBins,binsEta,fgkNAreaBins,binsArea);
398 
399  fh3PtEtaAreaJetCharged = new TH3F("fh3PtEtaAreaJetCharged","fh3PtEtaAreaJetCharged;#it{p}_{T}^{jet};#eta;A",fgkNPtBins,binsPt,fgkNEtaBins,binsEta,fgkNAreaBins,binsArea);
401 
402  fh2PtNConstituentsCharged = new TH2F("fh2PtNConstituentsCharged","fh2PtNConstituentsCharged;#it{p}_{T}^{jet};N_{charged constituents}",fgkNPtBins,binsPt,fgkNConstBins,binsConst);
404 
405  fh2PtNConstituents = new TH2F("fh2PtNConstituents","fh2PtNConstituents;#it{p}_{T}^{jet};N_{constituents}",fgkNPtBins,binsPt,fgkNConstBins,binsConst);
407 
408  fh2PtMeanPtConstituentsCharged = new TH2F("fh2PtMeanPtConstituentsCharged","fh2PtMeanPtConstituentsCharged;#it{p}_{T}^{jet};charged #langle #it{p}_{T} #rangle",fgkNPtBins,binsPt,fgkNMeanPtBins,binsMeanPt);
410 
411  fh2PtMeanPtConstituentsNeutral = new TH2F("fh2PtMeanPtConstituentsNeutral","fh2PtMeanPtConstituentsNeutral;#it{p}_{T}^{jet};neutral langle #it{p}_{T} #rangle",fgkNPtBins,binsPt,fgkNMeanPtBins,binsMeanPt);
413 
414  fh2PtNEF = new TH2F("fh2PtNEF","fh2PtNEF;#it{p}_{T}^{jet};NEF",fgkNPtBins,binsPt,fgkNNEFBins,binsNEF);
415  fOutput->Add(fh2PtNEF);
416 
417  fh3NEFEtaPhi = new TH3F("fh3NEFEtaPhi","fh3NEFEtaPhi;NEF;#eta;#varphi",fgkNNEFBins,binsNEF,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
418  fOutput->Add(fh3NEFEtaPhi);
419 
420  fh2NEFNConstituentsCharged = new TH2F("fh2NEFNConstituentsCharged","fh2NEFNConstituentsCharged;NEF;N_{charged constituents}",fgkNNEFBins,binsNEF,fgkNConstBins,binsConst);
422 
423  fh2NEFNConstituentsNeutral = new TH2F("fh2NEFNConstituentsNeutral","fh2NEFNConstituentsNeutral;NEF;N_{clusters}",fgkNNEFBins,binsNEF,fgkNConstBins,binsConst);
425 
426  fh2Ptz = new TH2F("fh2Ptz","fh2Ptz;#it{p}_{T}^{jet};z=p_{t,trk}^{proj}/p_{jet}",fgkNPtBins,binsPt,fgkNzBins,binsz);
427  fOutput->Add(fh2Ptz);
428 
429  fh2PtzCharged = new TH2F("fh2PtzCharged","fh2Ptz;#it{p}_{T}^{ch jet};z=p_{t,trk}^{proj}/p_{ch jet}",fgkNPtBins,binsPt,fgkNzBins,binsz);
430  fOutput->Add(fh2PtzCharged);
431 
432  fh2PtLeadJet1VsLeadJet2 = new TH2F("fh2PtLeadJet1VsLeadJet2","fh2PtLeadJet1VsLeadJet2;#it{p}_{T}^{jet 1};#it{p}_{T}^{jet 2}",fgkNPtBins,binsPt,fgkNPtBins,binsPt);
434 
435  fh3EEtaPhiCluster = new TH3F("fh3EEtaPhiCluster","fh3EEtaPhiCluster;E_{clus};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
437 
438  fh3PtLeadJet1VsPatchEnergy = new TH3F("fh3PtLeadJet1VsPatchEnergy","fh3PtLeadJet1VsPatchEnergy;#it{p}_{T}^{jet 1};Amplitude_{patch};trig type",fgkNPtBins,binsPt,fgkNPtBins,binsPt,fgkNJetTypeBins,binsJetType);
440  fh3PtLeadJet2VsPatchEnergy = new TH3F("fh3PtLeadJet2VsPatchEnergy","fh3PtLeadJet2VsPatchEnergy;#it{p}_{T}^{jet 1};Amplitude_{patch};trig type",fgkNPtBins,binsPt,fgkNPtBins,binsPt,fgkNJetTypeBins,binsJetType);
442 
443  fh3PtLeadJet1PatchEnergyVZEROAmp = new TH3F("fh3PtLeadJet1PatchEnergyVZEROAmp","fh3PtLeadJet1VsPatchEnergyVZEROAmp;#it{p}_{T}^{jet 1};Amplitude_{patch};VZERO amp",fgkNPtBins,binsPt,fgkNPtBins,binsPt,fgkNVZEROBins,binsVZERO);
445  fh3PtLeadJet1RawPatchEnergyVZEROAmp = new TH3F("fh3PtLeadJet1RawPatchEnergyVZEROAmp","fh3PtLeadJet1RawPatchEnergyVZEROAmp;#it{p}_{T}^{jet 1};ADC Amplitude_{patch} (GeV);VZERO amp",fgkNPtBins,binsPt,fgkNPtBins,binsPt,fgkNVZEROBins,binsVZERO);
447 
448  fh3PatchEnergyEtaPhiCenterJ1 = new TH3F("fh3PatchEnergyEtaPhiCenterJ1","fh3PatchEnergyEtaPhiCenterJ1;E_{patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
450 
451  fh3PatchEnergyEtaPhiCenterJ2 = new TH3F("fh3PatchEnergyEtaPhiCenterJ2","fh3PatchEnergyEtaPhiCenterJ2;E_{patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
453 
454  fh3PatchEnergyEtaPhiCenterJ1J2 = new TH3F("fh3PatchEnergyEtaPhiCenterJ1J2","fh3PatchEnergyEtaPhiCenterJ1J2;E_{patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
456 
457  fh3PatchADCEnergyEtaPhiCenterJ1 = new TH3F("fh3PatchADCEnergyEtaPhiCenterJ1","fh3PatchADCEnergyEtaPhiCenterJ1;E_{ADC,patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
459 
460  fh3PatchADCEnergyEtaPhiCenterJ2 = new TH3F("fh3PatchADCEnergyEtaPhiCenterJ2","fh3PatchADCEnergyEtaPhiCenterJ2;E_{ADC,patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
462 
463  fh3PatchADCEnergyEtaPhiCenterJ1J2 = new TH3F("fh3PatchADCEnergyEtaPhiCenterJ1J2","fh3PatchADCEnergyEtaPhiCenterJ1J2;E_{ADC,patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
465 
466  fh3PatchADCEnergyEtaPhiCenterAll = new TH3F("fh3PatchADCEnergyEtaPhiCenterAll","fh3PatchADCEnergyEtaPhiCenterAll;E_{ADC,patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
468 
469  fh3EEtaPhiCell = new TH3F("fh3EEtaPhiCell","fh3EEtaPhiCell;E_{cell};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
470  fOutput->Add(fh3EEtaPhiCell);
471 
472  fh2ECellVsCent = new TH2F("fh2ECellVsCent","fh2ECellVsCent;centrality;E_{cell}",101,-1,100,500,0.,5.);
473  fOutput->Add(fh2ECellVsCent);
474 
475  fh2CellEnergyVsTime = new TH2F("fh2CellEnergyVsTime","fh2CellEnergyVsTime;E_{cell};time",fgkNEnBins,binsEn,fgkNTimeBins,binsTime);
477 
478  fh3EClusELeadingCellVsTime = new TH3F("fh3EClusELeadingCellVsTime","fh3EClusELeadingCellVsTime;E_{cluster};E_{leading cell};time_{leading cell}",fgkNEnBins,binsEn,fgkNEnBins,binsEn,fgkNTimeBins,binsTime);
480 
481  fh3JetReacCent = new TH3F("fh3JetReacCent","fh3JetReacCent;E_{Jet};Centrality;dEP",fgkNEnBins,binsEn,fgkNCentBins,binsCent,fgkNdEPBins,binsdEP);
482  fOutput->Add(fh3JetReacCent);
483 
484  // =========== Switch on Sumw2 for all histos ===========
485  for (Int_t i=0; i<fOutput->GetEntries(); ++i) {
486  TH1 *h1 = dynamic_cast<TH1*>(fOutput->At(i));
487  if (h1){
488  h1->Sumw2();
489  continue;
490  }
491  TH2 *h2 = dynamic_cast<TH2*>(fOutput->At(i));
492  if (h2){
493  h2->Sumw2();
494  continue;
495  }
496  TH3 *h3 = dynamic_cast<TH3*>(fOutput->At(i));
497  if (h3){
498  h3->Sumw2();
499  continue;
500  }
501  THnSparse *hn = dynamic_cast<THnSparse*>(fOutput->At(i));
502  if(hn)hn->Sumw2();
503  }
504 
505  TH1::AddDirectory(oldStatus);
506 
507  PostData(1, fOutput); // Post data for ALL output slots > 0 here.
508 
509  delete [] binsCent;
510  if(binsdEP) delete [] binsdEP;
511  if(binsEn) delete [] binsEn;
512  if(binsPt) delete [] binsPt;
513  if(binsPhi) delete [] binsPhi;
514  if(binsEta) delete [] binsEta;
515  if(binsArea) delete [] binsArea;
516  if(binsConst) delete [] binsConst;
517  if(binsMeanPt) delete [] binsMeanPt;
518  if(binsNEF) delete [] binsNEF;
519  if(binsz) delete [] binsz;
520  if(binsJetType) delete [] binsJetType;
521  if(binsTime) delete [] binsTime;
522  if(binsVZERO) delete [] binsVZERO;
523 
524 }
525 
526 //________________________________________________________________________
528 {
529  // Fill histograms.
530 
531  //Tracks
533  if (partCont) {
534  partCont->ResetCurrentID();
535  AliPicoTrack *track = dynamic_cast<AliPicoTrack*>(partCont->GetNextAcceptParticle());
536  while(track) {
537  Double_t trkphi = track->Phi()*TMath::RadToDeg();
538  fh3PtEtaPhiTracks->Fill(track->Pt(),track->Eta(),track->Phi());
539  //Select tracks which should be propagated
540  if(track->Pt()>=0.350) {
541  if (TMath::Abs(track->Eta())<=0.9 && trkphi > 10 && trkphi < 250) {
543  fh3PtEtaPhiTracksToProp->Fill(track->Pt(),track->Eta(),track->Phi());
544  if(track->GetTrackPtOnEMCal()>=0)
545  fh3PtEtaPhiTracksProp->Fill(track->Pt(),track->Eta(),track->Phi());
546  else
547  fh3PtEtaPhiTracksNoProp->Fill(track->Pt(),track->Eta(),track->Phi());
548  }
549  }
550  track = dynamic_cast<AliPicoTrack*>(partCont->GetNextAcceptParticle());
551  }
552  }
553 
554  //Clusters
556  if (clusCont) {
557  Int_t nclusters = clusCont->GetNClusters();
558  for (Int_t ic = 0; ic < nclusters; ic++) {
559  AliVCluster *cluster = static_cast<AliVCluster*>(clusCont->GetCluster(ic));
560  if (!cluster) {
561  AliDebug(2,Form("Could not receive cluster %d", ic));
562  continue;
563  }
564  if (!cluster->IsEMCAL()) {
565  AliDebug(2,Form("%s: Cluster is not emcal",GetName()));
566  continue;
567  }
568 
569  TLorentzVector lp;
570  cluster->GetMomentum(lp, const_cast<Double_t*>(fVertex));
571  fh3EEtaPhiCluster->Fill(lp.E(),lp.Eta(),lp.Phi());
572  if(fCaloCells) {
573  Double_t leadCellE = GetEnergyLeadingCell(cluster);
574  Double_t leadCellT = cluster->GetTOF();
575  fh3EClusELeadingCellVsTime->Fill(lp.E(),leadCellE,leadCellT*1e9);
576  }
577  }
578  }
579 
580  //Cells
581  if(fCaloCells) {
582  const Short_t nCells = fCaloCells->GetNumberOfCells();
583 
584  for(Int_t iCell=0; iCell<nCells; ++iCell) {
585  Short_t cellId = fCaloCells->GetCellNumber(iCell);
586  Double_t cellE = fCaloCells->GetCellAmplitude(cellId);
587  Double_t cellT = fCaloCells->GetCellTime(cellId);
588  TVector3 pos;
589  fGeom->GetGlobal(cellId, pos);
590  TLorentzVector lv(pos,cellE);
591  Double_t cellEta = lv.Eta();
592  Double_t cellPhi = lv.Phi();
593  if(cellPhi<0.) cellPhi+=TMath::TwoPi();
594  if(cellPhi>TMath::TwoPi()) cellPhi-=TMath::TwoPi();
595 
596  AliDebug(2,Form("cell energy = %f time = %f",cellE,cellT*1e9));
597  fh2CellEnergyVsTime->Fill(cellE,cellT*1e9);
598  fh3EEtaPhiCell->Fill(cellE,cellEta,cellPhi);
599  fh2ECellVsCent->Fill(fCent,cellE);
600  }
601  }
602 
603  //Jets
604  Double_t ptLeadJet1 = 0.;
605  Double_t ptLeadJet2 = 0.;
606 
609 
610  TArrayI *nJetsArr = new TArrayI(fh2NJetsPtFull->GetNbinsY()+1);
611  nJetsArr->Reset(0);
612  nJetsArr->Set(fh2NJetsPtFull->GetNbinsY()+1);
613 
615  const Int_t njets = GetNJets(fContainerFull);
616  for (Int_t ij = 0; ij < njets; ij++) {
617 
619  if (!jet)
620  continue; //jet not selected
621 
622  Double_t jetPt = jet->Pt() - GetRhoVal(fContainerFull)*jet->Area();
623  if(jetPt>ptLeadJet1) ptLeadJet1=jetPt;
624 
625  Double_t dEPJetFull = RelativeEP(jet->Phi() , fEPV0);
626  fh3JetReacCent->Fill(jet->E(),fCent,dEPJetFull);
627 
628  fh2CentPtJetFull->Fill(fCent,jetPt);
629  fh3PtEtaPhiJetFull->Fill(jetPt,jet->Eta(),jet->Phi());
630  fh3PtEtaAreaJetFull->Fill(jetPt,jet->Eta(),jet->Area());
631 
632  //count jets above certain pT threshold
633  Int_t ptbin = fh2NJetsPtFull->GetYaxis()->FindBin(jetPt);
634  for(Int_t iptbin = ptbin; iptbin<=fh2NJetsPtFull->GetNbinsY(); iptbin++)
635  nJetsArr->AddAt(nJetsArr->At(iptbin)+1,iptbin);
636 
637  fh2PtNConstituentsCharged->Fill(jetPt,jet->GetNumberOfTracks());
638  fh2PtNConstituents->Fill(jetPt,jet->GetNumberOfConstituents());
639  fh2PtNEF->Fill(jetPt,jet->NEF());
640  fh3NEFEtaPhi->Fill(jet->NEF(),jet->Eta(),jet->Phi());
641  fh2NEFNConstituentsCharged->Fill(jet->NEF(),jet->GetNumberOfTracks());
643 
644  AliVParticle *vp;
645  Double_t sumPtCh = 0.;
646  for(Int_t icc=0; icc<jet->GetNumberOfTracks(); icc++) {
647  vp = static_cast<AliVParticle*>(jet->TrackAt(icc, fTracks));
648  if(!vp) continue;
649  fh2Ptz->Fill(jetPt,GetZ(vp,jet));
650  sumPtCh+=vp->Pt();
651  }
652 
653  if(jet->GetNumberOfTracks()>0)
654  fh2PtMeanPtConstituentsCharged->Fill(jetPt,sumPtCh/(double)(jet->GetNumberOfTracks()) );
655 
656  AliVCluster *vc = 0x0;
657  Double_t sumPtNe = 0.;
658  if (clusCont) {
659  for(Int_t icc=0; icc<jet->GetNumberOfClusters(); icc++) {
660  vc = static_cast<AliVCluster*>(clusCont->GetCluster(icc));
661  if(!vc) continue;
662  TLorentzVector lp;
663  vc->GetMomentum(lp, const_cast<Double_t*>(fVertex));
664  sumPtNe+=lp.Pt();
665  }
666 
667  if(jet->GetNumberOfClusters()>0)
668  fh2PtMeanPtConstituentsNeutral->Fill(jetPt,sumPtNe/(double)(jet->GetNumberOfClusters()) );
669  }
670  } //full jet loop
671 
672  for(Int_t i=1; i<=fh2NJetsPtFull->GetNbinsY(); i++) {
673  Int_t nJetsInEvent = nJetsArr->At(i);
674  fh2NJetsPtFull->Fill(nJetsInEvent,fh2NJetsPtFull->GetYaxis()->GetBinCenter(i));
675  }
676  }
677 
678  //Reset array to zero to also count charged jets
679  nJetsArr->Reset(0);
680 
681  //Loop over charged jets
683  const Int_t njets = GetNJets(fContainerCharged);
684  for (Int_t ij = 0; ij < njets; ij++) {
685 
687  if (!jet)
688  continue; //jet not selected
689 
690  Double_t jetPt = jet->Pt() - GetRhoVal(fContainerCharged)*jet->Area();
691  if(jetPt>ptLeadJet2) ptLeadJet2=jetPt;
692  fh2CentPtJetCharged->Fill(fCent,jetPt);
693  fh3PtEtaPhiJetCharged->Fill(jetPt,jet->Eta(),jet->Phi());
694  fh3PtEtaAreaJetCharged->Fill(jetPt,jet->Eta(),jet->Area());
695 
696  AliVParticle *vp;
697  for(Int_t icc=0; icc<jet->GetNumberOfTracks(); icc++) {
698  vp = static_cast<AliVParticle*>(jet->TrackAt(icc, fTracks));
699  if(!vp) continue;
700  fh2PtzCharged->Fill(jetPt,GetZ(vp,jet));
701  }
702 
703  //count jets above certain pT threshold
704  Int_t ptbin = fh2NJetsPtCharged->GetYaxis()->FindBin(jetPt);
705  for(Int_t iptbin = ptbin; iptbin<=fh2NJetsPtCharged->GetNbinsY(); iptbin++)
706  nJetsArr->AddAt(nJetsArr->At(iptbin)+1,iptbin);
707 
708  }//ch jet loop
709  for(Int_t i=1; i<=fh2NJetsPtCharged->GetNbinsY(); i++) {
710  Int_t nJetsInEvent = nJetsArr->At(i);
711  fh2NJetsPtCharged->Fill(nJetsInEvent,fh2NJetsPtCharged->GetYaxis()->GetBinCenter(i));
712  }
713  }
714 
716  fh2PtLeadJet1VsLeadJet2->Fill(ptLeadJet1,ptLeadJet2);
717 
720 
721  // Get VZERO amplitude
722  Float_t VZEROAmp = InputEvent()->GetVZEROData()->GetTriggerChargeA() + InputEvent()->GetVZEROData()->GetTriggerChargeC();
723 
724  fh3PtLeadJet1PatchEnergyVZEROAmp->Fill(ptLeadJet1,fMaxPatchEnergy,VZEROAmp);
725  fh3PtLeadJet1RawPatchEnergyVZEROAmp->Fill(ptLeadJet1,fMaxPatchADCEnergy,VZEROAmp);
726 
727  delete nJetsArr;
728 
729  return kTRUE;
730 }
731 
732 //________________________________________________________________________
734 {
735  // Run analysis code here, if needed. It will be executed before FillHistograms().
736 
737  fhTriggerbit->Fill(0.5,GetCollisionCandidates());
738 
739  //Check if event is selected (vertex & pile-up)
740  if(!SelectEvent())
741  return kFALSE;
742 
743  if(fTriggerPatchInfo)
745 
746  return kTRUE; // If return kFALSE FillHistogram() will NOT be executed.
747 }
748 
749 //_______________________________________________________________________
751 {
752  // Called once at the end of the analysis.
753 }
754 //________________________________________________________________________
755 Double_t AliAnalysisTaskEmcalJetTriggerQA::GetZ(const AliVParticle *trk, const AliEmcalJet *jet) const
756 {
757  // Get Z of constituent trk
758  return GetZ(trk->Px(),trk->Py(),trk->Pz(),jet->Px(),jet->Py(),jet->Pz());
759 }
760 
761 //________________________________________________________________________
762 Double_t AliAnalysisTaskEmcalJetTriggerQA::GetZ(Double_t trkPx, Double_t trkPy, Double_t trkPz, Double_t jetPx, Double_t jetPy, Double_t jetPz) const
763 {
764  //
765  // Get the z of a constituent inside of a jet
766  //
767  Double_t pJetSq = jetPx*jetPx+jetPy*jetPy+jetPz*jetPz;
768  if(pJetSq>0.)
769  return (trkPx*jetPx+trkPy*jetPy+trkPz*jetPz)/pJetSq;
770  else {
771  AliWarning(Form("%s: strange, pjet*pjet seems to be zero pJetSq: %f",GetName(), pJetSq));
772  return 0;
773  }
774 }
775 
776 //________________________________________________________________________
777 Int_t AliAnalysisTaskEmcalJetTriggerQA::GetLeadingCellId(const AliVCluster *clus) const
778 {
779  //Get energy of leading cell in cluster
780 
781  if(!fCaloCells)
782  return -1;
783 
784  Double_t emax = -1.;
785  Int_t iCellAbsIdMax = -1;
786  Int_t nCells = clus->GetNCells();
787  for(Int_t i = 0; i<nCells; i++) {
788  Int_t absId = clus->GetCellAbsId(i);
789  Double_t cellE = fCaloCells->GetCellAmplitude(absId);
790  if(cellE>emax) {
791  emax = cellE;
792  iCellAbsIdMax = absId;
793  }
794  }
795  return iCellAbsIdMax;
796 }
797 
798 //________________________________________________________________________
799 Double_t AliAnalysisTaskEmcalJetTriggerQA::GetEnergyLeadingCell(const AliVCluster *clus) const
800 {
801  //Get energy of leading cell in cluster
802  if(!fCaloCells)
803  return -1.;
804 
805  Int_t absID = GetLeadingCellId(clus);
806  if(absID>-1)
807  return fCaloCells->GetCellAmplitude(absID);
808  else
809  return -1.;
810 }
811 
812 //________________________________________________________________________
813 Double_t AliAnalysisTaskEmcalJetTriggerQA::GetECross(Int_t absID) const {
814 
815  //Get Ecross = sum of energy of neighbouring cells (using uncalibrated energy)
816 
817  if(!fCaloCells)
818  return -1.;
819 
820  Double_t ecross = -1.;
821 
822  Int_t absID1 = -1;
823  Int_t absID2 = -1;
824  Int_t absID3 = -1;
825  Int_t absID4 = -1;
826 
827  Int_t imod = -1, iphi =-1, ieta=-1,iTower = -1, iIphi = -1, iIeta = -1;
828  fGeom->GetCellIndex(absID,imod,iTower,iIphi,iIeta);
829  fGeom->GetCellPhiEtaIndexInSModule(imod,iTower,iIphi, iIeta,iphi,ieta);
830 
831  if( iphi < AliEMCALGeoParams::fgkEMCALRows-1)
832  absID1 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi+1, ieta);
833  if( iphi > 0 )
834  absID2 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi-1, ieta);
835 
836  if( ieta == AliEMCALGeoParams::fgkEMCALCols-1 && !(imod%2) ) {
837  absID3 = fGeom->GetAbsCellIdFromCellIndexes(imod+1, iphi, 0);
838  absID4 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta-1);
839  }
840  else if( ieta == 0 && imod%2 ) {
841  absID3 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta+1);
842  absID4 = fGeom->GetAbsCellIdFromCellIndexes(imod-1, iphi, AliEMCALGeoParams::fgkEMCALCols-1);
843  }
844  else {
845  if( ieta < AliEMCALGeoParams::fgkEMCALCols-1 )
846  absID3 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta+1);
847  if( ieta > 0 )
848  absID4 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta-1);
849  }
850 
851  Double_t ecell1 = fCaloCells->GetCellAmplitude(absID1);
852  Double_t ecell2 = fCaloCells->GetCellAmplitude(absID2);
853  Double_t ecell3 = fCaloCells->GetCellAmplitude(absID3);
854  Double_t ecell4 = fCaloCells->GetCellAmplitude(absID4);
855 
856  ecross = ecell1+ecell2+ecell3+ecell4;
857 
858  return ecross;
859 }
860 
861 //_________________________________________________________________________
862 Float_t AliAnalysisTaskEmcalJetTriggerQA::RelativeEP(Double_t objAng, Double_t EPAng) const
863 {
864  // function to calculate angle between object and EP in the 1st quadrant (0,Pi/2)
865  Double_t dphi = EPAng - objAng;
866 
867  // ran into trouble with a few dEP<-Pi so trying this...
868  if( dphi<-1*TMath::Pi() )
869  dphi = dphi + 1*TMath::Pi();
870  if( dphi>1*TMath::Pi())
871  dphi = dphi - 1*TMath::Pi();
872 
873  if( (dphi>0) && (dphi<1*TMath::Pi()/2) ){
874  // Do nothing! we are in quadrant 1
875  }else if( (dphi>1*TMath::Pi()/2) && (dphi<1*TMath::Pi()) ){
876  dphi = 1*TMath::Pi() - dphi;
877  }else if( (dphi<0) && (dphi>-1*TMath::Pi()/2) ){
878  dphi = fabs(dphi);
879  }else if( (dphi<-1*TMath::Pi()/2) && (dphi>-1*TMath::Pi()) ){
880  dphi = dphi + 1*TMath::Pi();
881  }
882 
883  return dphi; // dphi in [0, Pi/2]
884 }
Double_t GetTrackPhiOnEMCal() const
Definition: AliPicoTrack.h:61
TH2F * fh2NJetsPtCharged
NJets per event vs pT,jet.
TH2F * fh2PtMeanPtConstituentsNeutral
pt, <pt> charged constituents
TH3F * fh3JetReacCent
cluster energy vs energy of leading cell in cluster vs time of the leading cell
TH3F * fh3EEtaPhiCluster
correlation between leading jet of the two branches
Double_t Area() const
Definition: AliEmcalJet.h:97
virtual AliVParticle * GetNextAcceptParticle()
AliJetContainer * GetJetContainer(Int_t i=0) const
TH3F * fh3PtEtaPhiJetCharged
pt,eta,phi of full jets
Double_t Eta() const
Definition: AliEmcalJet.h:88
TH2F * fh2PtNConstituents
pt, # charged jet constituents
Int_t GetNJets(Int_t i=0) const
Double_t Py() const
Definition: AliEmcalJet.h:74
Double_t Phi() const
Definition: AliEmcalJet.h:84
TH3F * fh3PatchADCEnergyEtaPhiCenterJ2
patch ADC energy vs eta, phi at center of patch, high threshold
TH3F * fh3PatchADCEnergyEtaPhiCenterJ1
patch energy vs eta, phi at center of patch, low + high threshold
Double_t fEPV0
!event plane V0
TH3F * fh3PatchEnergyEtaPhiCenterJ1J2
patch energy vs eta, phi at center of patch, low threshold
TH3F * fh3PtEtaPhiTracksNoProp
pt,eta,phi of tracks at vertex
TH2F * fh2PtNEF
pt, <pt> neutral constituents
Double_t GetTrackPtOnEMCal() const
Definition: AliPicoTrack.h:63
Double_t E() const
Definition: AliEmcalJet.h:86
TH2F * fh2Ptz
NEF, # neutral jet constituents.
TList * fOutput
!output list
TH2F * fHistRhovsCentFull
histogram containing the triggerbit (fOfflineTriggerMask)
TH3F * fh3PtEtaAreaJetCharged
pt,eta,area of full jet
UShort_t GetNumberOfConstituents() const
Definition: AliEmcalJet.h:107
Container for particles within the EMCAL framework.
Double_t GetEnergyLeadingCell(const AliVCluster *clus) const
UShort_t GetNumberOfTracks() const
Definition: AliEmcalJet.h:106
TH3F * fh3PtEtaPhiTracksToProp
pt,eta,phi of tracks at Emcal surface
Double_t Px() const
Definition: AliEmcalJet.h:73
AliParticleContainer * GetParticleContainer(Int_t i=0) const
Double_t Eta() const
Definition: AliPicoTrack.h:37
Double_t GetZ(const AliVParticle *trk, const AliEmcalJet *jet) const
TH3F * fh3PtLeadJet1RawPatchEnergyVZEROAmp
leading jet energy vs leading patch energy vs VZERO amplitude
UShort_t GetNumberOfClusters() const
Definition: AliEmcalJet.h:105
TH3F * fh3PtLeadJet2VsPatchEnergy
leading jet energy vs leading patch energy vs jet trigger (J1/J2)
TH2F * fh2CentPtJetCharged
cent, pt of full jets
AliEMCALGeometry * fGeom
!emcal geometry
TH2F * fh2PtzCharged
pt, z=pT,h,proj/p,jet full jet
AliClusterContainer * GetClusterContainer(Int_t i=0) const
Int_t GetNClusters() const
TH2F * fh2PtNConstituentsCharged
pt,eta,area of charged jets
TH3F * fh3NEFEtaPhi
pt, NEF (neutral energy fraction)
Double_t Phi() const
Definition: AliPicoTrack.h:33
Double_t fCent
!event centrality
TH3F * fh3PatchEnergyEtaPhiCenterJ2
patch energy vs eta, phi at center of patch, high threshold
TH3F * fh3EEtaPhiCell
patch ADC energy vs eta, phi at center of patch, all trigger patches
AliEmcalJet * GetAcceptJetFromArray(Int_t j, Int_t c=0) const
TH3F * fh3PatchADCEnergyEtaPhiCenterAll
patch ADC energy vs eta, phi at center of patch, low + high threshold
Double_t Pt() const
Definition: AliPicoTrack.h:23
AliVCluster * GetCluster(Int_t i) const
TH3F * fh3PatchADCEnergyEtaPhiCenterJ1J2
patch ADC energy vs eta, phi at center of patch, low threshold
TH3F * fh3PtEtaPhiTracksProp
pt,eta,phi of tracks at vertex
TH3F * fh3PtEtaAreaJetFull
NJets per event vs pT,jet.
AliVCaloCells * fCaloCells
!cells
TH2F * fh2PtMeanPtConstituentsCharged
pt, # jet constituents
TH3F * fh3PtLeadJet1VsPatchEnergy
cluster E, eta, phi
Double_t Pt() const
Definition: AliEmcalJet.h:76
TH3F * fh3PtEtaPhiJetFull
cent, pt of charged jets
TH3F * fh3PtLeadJet1PatchEnergyVZEROAmp
leading jet energy vs leading patch energy vs jet trigger (J1/J2)
Double_t GetRhoVal(Int_t i=0) const
TClonesArray * fTracks
!tracks
Short_t TrackAt(Int_t idx) const
Definition: AliEmcalJet.h:127
Double_t fVertex[3]
!event vertex
void SetMakeGeneralHistograms(Bool_t g)
Float_t RelativeEP(Double_t objAng, Double_t EPAng) const
TH3F * fh3EClusELeadingCellVsTime
emcal cell energy vs time
TClonesArray * fTriggerPatchInfo
!trigger patch info array
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:44
Double_t Pz() const
Definition: AliEmcalJet.h:75
TProfile * fhTriggerbit
Histo number of events.
TH3F * fh3PtEtaPhiTracksOnEmcal
pt,eta,phi of tracks at vertex
TH2F * fh2CentPtJetFull
pt,eta,phi of tracks at vertex
Double_t GetTrackEtaOnEMCal() const
Definition: AliPicoTrack.h:62
TH3F * fh3PatchEnergyEtaPhiCenterJ1
leading jet energy vs online leading patch energy vs VZERO amplitude
Int_t GetLeadingCellId(const AliVCluster *clus) const
Double_t NEF() const
Definition: AliEmcalJet.h:115
TH2F * fh2NEFNConstituentsNeutral
NEF, # charged jet constituents.
Container structure for EMCAL clusters.
TH2F * fh2PtLeadJet1VsLeadJet2
pt, z=pT,h,proj/p,jet charged jet
void ResetCurrentID(Int_t i=-1)
ClassImp(AliAnalysisTaskEmcalJetTriggerQA) AliAnalysisTaskEmcalJetTriggerQA
TH2F * fh2NJetsPtFull
pt,eta,phi of charged jets
AliEMCALTriggerPatchInfo * GetMainTriggerPatch(TriggerCategory triggersel=kTriggerLevel1Jet, Bool_t doOfflinSimple=kFALSE)