AliPhysics  720d1f3 (720d1f3)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskEmcalJetSpectra8TeVTriggerQA.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-2016, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: The ALICE Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
7  * Permission to use, copy, modify and distribute this software and its *
8  * documentation strictly for non-commercial purposes is hereby granted *
9  * without fee, provided that the above copyright notice appears in all *
10  * copies and that both the copyright notice and this permission notice *
11  * appear in the supporting documentation. The authors make no claims *
12  * about the suitability of this software for any purpose. It is *
13  * provided "as is" without express or implied warranty. *
14  **************************************************************************/
15 
16 #include <TClonesArray.h>
17 #include <TH1F.h>
18 #include <TH2F.h>
19 #include <TList.h>
20 #include <array>
21 #include <iostream>
22 #include <map>
23 #include <vector>
24 #include <TClonesArray.h>
25 #include <TGrid.h>
26 #include <THistManager.h>
27 #include <THashList.h>
28 #include <TLinearBinning.h>
29 #include <TObjArray.h>
30 #include <TParameter.h>
31 
32 #include <AliVCluster.h>
33 #include <AliVParticle.h>
34 #include <AliLog.h>
35 
36 #include "AliTLorentzVector.h"
37 #include "AliEmcalJet.h"
38 #include "AliRhoParameter.h"
39 #include "AliJetContainer.h"
40 #include "AliParticleContainer.h"
41 #include "AliClusterContainer.h"
42 
43 
44 #include "AliAnalysisUtils.h"
45 #include "AliESDEvent.h"
46 #include "AliEMCALTriggerPatchInfo.h"
48 #include "AliInputEventHandler.h"
49 #include "AliLog.h"
50 #include "AliMultSelection.h"
51 #include "AliMultEstimator.h"
52 #include "AliOADBContainer.h"
53 
55 
59 
60 using std::cout;
61 using std::endl;
62 
68 fUseRecalcPatches(false),
69 fHistManager(),
70 fHistNumbJets(),
71 fHistJetPt()
72 {
73 }
74 
81 AliAnalysisTaskEmcalJet(name, kTRUE),
82 fUseRecalcPatches(false),
83 fHistManager(name),
84 fHistNumbJets(0),
85 fHistJetPt(0)
86 {
88  SetCaloTriggerPatchInfoName("EmcalTriggers");
89 }
90 
95 {
96 }
97 
103 {
105 
110 
111  TIter next(fHistManager.GetListOfHistograms());
112  TObject* obj = 0;
113  while ((obj = next())) {
114  fOutput->Add(obj);
115  }
116  fOutput->Add(fHistNumbJets);
117  fOutput->Add(fHistJetPt);
118 
119  PostData(1, fOutput); // Post data for ALL output slots > 0 here.
120 }
121 
122 /*
123  * This function allocates the histograms for basic EMCal cluster QA.
124  * A set of histograms (energy, eta, phi, number of cluster) is allocated
125  * per each cluster container and per each centrality bin.
126  */
128 {
129  TString histname;
130  TString histtitle;
131  TString groupname;
132  AliClusterContainer* clusCont = 0;
133  TIter next(&fClusterCollArray);
134  while ((clusCont = static_cast<AliClusterContainer*>(next()))) {
135  groupname = clusCont->GetName();
136  fHistManager.CreateHistoGroup(groupname);
137  for (Int_t cent = 0; cent < fNcentBins; cent++) {
138  histname = TString::Format("%s/histClusterEnergy_%d", groupname.Data(), cent);
139  histtitle = TString::Format("%s;#it{E}_{cluster} (GeV);counts", histname.Data());
140  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt / 2);
141 
142  histname = TString::Format("%s/histClusterEnergyExotic_%d", groupname.Data(), cent);
143  histtitle = TString::Format("%s;#it{E}_{cluster}^{exotic} (GeV);counts", histname.Data());
144  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt / 2);
145 
146  histname = TString::Format("%s/histClusterNonLinCorrEnergy_%d", groupname.Data(), cent);
147  histtitle = TString::Format("%s;#it{E}_{cluster}^{non-lin.corr.} (GeV);counts", histname.Data());
148  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt / 2);
149 
150  histname = TString::Format("%s/histClusterHadCorrEnergy_%d", groupname.Data(), cent);
151  histtitle = TString::Format("%s;#it{E}_{cluster}^{had.corr.} (GeV);counts", histname.Data());
152  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt / 2);
153 
154  histname = TString::Format("%s/histClusterPhi_%d", groupname.Data(), cent);
155  histtitle = TString::Format("%s;#it{#phi}_{custer};counts", histname.Data());
156  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, 0, TMath::TwoPi());
157 
158  histname = TString::Format("%s/histClusterEta_%d", groupname.Data(), cent);
159  histtitle = TString::Format("%s;#it{#eta}_{custer};counts", histname.Data());
160  fHistManager.CreateTH1(histname, histtitle, fNbins / 6, -1, 1);
161 
162  histname = TString::Format("%s/histNClusters_%d", groupname.Data(), cent);
163  histtitle = TString::Format("%s;number of clusters;events", histname.Data());
164  if (fForceBeamType != kpp) {
165  fHistManager.CreateTH1(histname, histtitle, 500, 0, 3000);
166  }
167  else {
168  fHistManager.CreateTH1(histname, histtitle, 200, 0, 200);
169  }
170  }
171  }
172 }
173 
174 /*
175  * This function allocates the histograms for basic EMCal QA.
176  * One 2D histogram with the cell energy spectra and the number of cells
177  * per event is allocated per each centrality bin.
178  */
180 {
181  TString histname;
182  TString histtitle;
183  TString groupname(fCaloCellsName);
184 
185  fHistManager.CreateHistoGroup(groupname);
186  for (Int_t cent = 0; cent < fNcentBins; cent++) {
187  histname = TString::Format("%s/histCellEnergy_%d", groupname.Data(), cent);
188  histtitle = TString::Format("%s;#it{E}_{cell} (GeV);counts", histname.Data());
189  fHistManager.CreateTH1(histname, histtitle, 300, 0, 150);
190 
191  histname = TString::Format("%s/histNCells_%d", groupname.Data(), cent);
192  histtitle = TString::Format("%s;number of cells;events", histname.Data());
193  if (fForceBeamType != kpp) {
194  fHistManager.CreateTH1(histname, histtitle, 500, 0, 6000);
195  }
196  else {
197  fHistManager.CreateTH1(histname, histtitle, 200, 0, 200);
198  }
199  }
200 }
201 
202 /*
203  * This function allocates the histograms for basic tracking QA.
204  * A set of histograms (pT, eta, phi, difference between kinematic properties
205  * at the vertex and at the EMCal surface, number of tracks) is allocated
206  * per each particle container and per each centrality bin.
207  */
209 {
210  TString histname;
211  TString histtitle;
212  TString groupname;
213  AliParticleContainer* partCont = 0;
214  TIter next(&fParticleCollArray);
215  while ((partCont = static_cast<AliParticleContainer*>(next()))) {
216  groupname = partCont->GetName();
217  fHistManager.CreateHistoGroup(groupname);
218  for (Int_t cent = 0; cent < fNcentBins; cent++) {
219  histname = TString::Format("%s/histTrackPt_%d", groupname.Data(), cent);
220  histtitle = TString::Format("%s;#it{p}_{T,track} (GeV/#it{c});counts", histname.Data());
221  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt / 2);
222 
223  histname = TString::Format("%s/histTrackPhi_%d", groupname.Data(), cent);
224  histtitle = TString::Format("%s;#it{#phi}_{track};counts", histname.Data());
225  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, 0, TMath::TwoPi());
226 
227  histname = TString::Format("%s/histTrackEta_%d", groupname.Data(), cent);
228  histtitle = TString::Format("%s;#it{#eta}_{track};counts", histname.Data());
229  fHistManager.CreateTH1(histname, histtitle, fNbins / 6, -1, 1);
230 
231  if (TClass(partCont->GetClassName()).InheritsFrom("AliVTrack")) {
232  histname = TString::Format("%s/fHistDeltaEtaPt_%d", groupname.Data(), cent);
233  histtitle = TString::Format("%s;#it{p}_{T,track}^{vertex} (GeV/#it{c});#it{#eta}_{track}^{vertex} - #it{#eta}_{track}^{EMCal};counts", histname.Data());
234  fHistManager.CreateTH2(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt, 50, -0.5, 0.5);
235 
236  histname = TString::Format("%s/fHistDeltaPhiPt_%d", groupname.Data(), cent);
237  histtitle = TString::Format("%s;#it{p}_{T,track}^{vertex} (GeV/#it{c});#it{#phi}_{track}^{vertex} - #it{#phi}_{track}^{EMCal};counts", histname.Data());
238  fHistManager.CreateTH2(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt, 200, -2, 2);
239 
240  histname = TString::Format("%s/fHistDeltaPtvsPt_%d", groupname.Data(), cent);
241  histtitle = TString::Format("%s;#it{p}_{T,track}^{vertex} (GeV/#it{c});#it{p}_{T,track}^{vertex} - #it{p}_{T,track}^{EMCal} (GeV/#it{c});counts", histname.Data());
242  fHistManager.CreateTH2(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt, fNbins / 2, -fMaxBinPt/2, fMaxBinPt/2);
243 
244  histname = TString::Format("%s/fHistEoverPvsP_%d", groupname.Data(), cent);
245  histtitle = TString::Format("%s;#it{P}_{track} (GeV/#it{c});#it{E}_{cluster} / #it{P}_{track} #it{c};counts", histname.Data());
246  fHistManager.CreateTH2(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt, fNbins / 2, 0, 4);
247  }
248 
249  histname = TString::Format("%s/histNTracks_%d", groupname.Data(), cent);
250  histtitle = TString::Format("%s;number of tracks;events", histname.Data());
251  if (fForceBeamType != kpp) {
252  fHistManager.CreateTH1(histname, histtitle, 500, 0, 5000);
253  }
254  else {
255  fHistManager.CreateTH1(histname, histtitle, 200, 0, 200);
256  }
257  }
258  }
259 }
260 
261 /*
262  * This function allocates the histograms for basic jet QA.
263  * A set of histograms (pT, eta, phi, area, number of jets, corrected pT) is allocated
264  * per each jet container and per each centrality bin.
265  */
267 {
268  TString histname;
269  TString histtitle;
270  TString groupname;
271  AliJetContainer* jetCont = 0;
272  TIter next(&fJetCollArray);
273  while ((jetCont = static_cast<AliJetContainer*>(next()))) {
274  groupname = jetCont->GetName();
275  fHistManager.CreateHistoGroup(groupname);
276  for (Int_t cent = 0; cent < fNcentBins; cent++) {
277  histname = TString::Format("%s/histJetPt_%d", groupname.Data(), cent);
278  histtitle = TString::Format("%s;#it{p}_{T,jet} (GeV/#it{c});counts", histname.Data());
279  fHistManager.CreateTH1(histname, histtitle, fNbins, fMinBinPt, fMaxBinPt);
280 
281  histname = TString::Format("%s/histJetArea_%d", groupname.Data(), cent);
282  histtitle = TString::Format("%s;#it{A}_{jet};counts", histname.Data());
283  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, 0, 3);
284 
285  histname = TString::Format("%s/histJetPhi_%d", groupname.Data(), cent);
286  histtitle = TString::Format("%s;#it{#phi}_{jet};counts", histname.Data());
287  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, 0, TMath::TwoPi());
288 
289  histname = TString::Format("%s/histJetEta_%d", groupname.Data(), cent);
290  histtitle = TString::Format("%s;#it{#eta}_{jet};counts", histname.Data());
291  fHistManager.CreateTH1(histname, histtitle, fNbins / 6, -1, 1);
292 
293  histname = TString::Format("%s/histNJets_%d", groupname.Data(), cent);
294  histtitle = TString::Format("%s;number of jets;events", histname.Data());
295  if (fForceBeamType != kpp) {
296  fHistManager.CreateTH1(histname, histtitle, 500, 0, 500);
297  }
298  else {
299  fHistManager.CreateTH1(histname, histtitle, 100, 0, 100);
300  }
301 
302  if (!jetCont->GetRhoName().IsNull()) {
303  histname = TString::Format("%s/histJetCorrPt_%d", groupname.Data(), cent);
304  histtitle = TString::Format("%s;#it{p}_{T,jet}^{corr} (GeV/#it{c});counts", histname.Data());
305  fHistManager.CreateTH1(histname, histtitle, fNbins, -fMaxBinPt / 2, fMaxBinPt / 2);
306  }
307  }
308  }
309 }
310 
318 {
319  DoJetLoop();
320  DoTrackLoop();
321  DoClusterLoop();
322  DoCellLoop();
323 
324  return kTRUE;
325 }
326 
332 {
333 
334  /*
335  TString firedtriggers(InputEvent()->GetFiredTriggerClasses());
336  if(!firedtriggers.Contains("EG1")){
337  // cout<<"Not EG1 Event"<<endl;
338  //return kFALSE;
339  }
340  */
341  TClonesArray *triggerpatches = dynamic_cast<TClonesArray *>(InputEvent()->FindListObject("EmcalTriggers"));
342  if(!triggerpatches)
343  AliErrorStream() << "Trigger patch container EmcalTriggers not found in task " << GetName() << std::endl;
344 
345  AliEMCALTriggerPatchInfo *currentpatch(nullptr);
346  for(TIter patchiter = TIter(triggerpatches).Begin(); patchiter != TIter::End(); ++patchiter){
347  currentpatch = static_cast<AliEMCALTriggerPatchInfo *>(*patchiter);
348  if(currentpatch->GetPatchSize() != 2) continue; // Reject L0 patches
349  //cout<<"PatchSize: " <<currentpatch->GetPatchSize()<<endl;
350  Double_t patchE = currentpatch->GetPatchE();
351  //cout<<"Patch E: "<< patchE <<endl;
352  }
353 
354  TString histname;
355  TString groupname;
356  AliJetContainer* jetCont = 0;
357  TIter next(&fJetCollArray);
358  while ((jetCont = static_cast<AliJetContainer*>(next()))) {
359  groupname = jetCont->GetName();
360  UInt_t count = 0;
361  for(auto jet : jetCont->accepted()) {
362  if (!jet) continue;
363  count++;
364 
365 
366  Double_t dEtaJetTrigger = 0.0, dPhiJetTrigger = 0.0, deltaRpatch = 0.0; // dEta dPhi between Jet Axis and Trigger Patch
367 
368  dEtaJetTrigger = jet->Eta() - currentpatch->GetEtaGeo();
369  dPhiJetTrigger = jet->Phi() - currentpatch->GetPhiGeo();
370  Double_t dphi2 = 0.0, deta2 = 0.0;
371  dphi2 = TMath::Abs(dPhiJetTrigger * dPhiJetTrigger );
372  deta2 = TMath::Abs(dEtaJetTrigger * dEtaJetTrigger );
373  deltaRpatch = TMath::Sqrt(dphi2 + deta2);
374 
375  // cout <<"dEat: " << dEtaJetTrigger << " dPhi: " <<dPhiJetTrigger<<" delatR: "<< deltaRpatch <<endl;
376 
377  histname = TString::Format("%s/histJetPt_%d", groupname.Data(), fCentBin);
378  fHistManager.FillTH1(histname, jet->Pt());
379 
380  histname = TString::Format("%s/histJetArea_%d", groupname.Data(), fCentBin);
381  fHistManager.FillTH1(histname, jet->Area());
382 
383  histname = TString::Format("%s/histJetPhi_%d", groupname.Data(), fCentBin);
384  fHistManager.FillTH1(histname, jet->Phi());
385 
386  histname = TString::Format("%s/histJetEta_%d", groupname.Data(), fCentBin);
387  fHistManager.FillTH1(histname, jet->Eta());
388 
389  if (jetCont->GetRhoParameter()) {
390  histname = TString::Format("%s/histJetCorrPt_%d", groupname.Data(), fCentBin);
391  fHistManager.FillTH1(histname, jet->Pt() - jetCont->GetRhoVal() * jet->Area());
392  }
393  }
394  histname = TString::Format("%s/histNJets_%d", groupname.Data(), fCentBin);
395  fHistManager.FillTH1(histname, count);
396  }
397 }
398 
404 {
406 
407  TString histname;
408  TString groupname;
409  AliParticleContainer* partCont = 0;
410  TIter next(&fParticleCollArray);
411  while ((partCont = static_cast<AliParticleContainer*>(next()))) {
412  groupname = partCont->GetName();
413  UInt_t count = 0;
414  for(auto part : partCont->accepted()) {
415  if (!part) continue;
416  count++;
417 
418  histname = TString::Format("%s/histTrackPt_%d", groupname.Data(), fCentBin);
419  fHistManager.FillTH1(histname, part->Pt());
420 
421  histname = TString::Format("%s/histTrackPhi_%d", groupname.Data(), fCentBin);
422  fHistManager.FillTH1(histname, part->Phi());
423 
424  histname = TString::Format("%s/histTrackEta_%d", groupname.Data(), fCentBin);
425  fHistManager.FillTH1(histname, part->Eta());
426 
427  if (partCont->GetLoadedClass()->InheritsFrom("AliVTrack")) {
428  const AliVTrack* track = static_cast<const AliVTrack*>(part);
429 
430  histname = TString::Format("%s/fHistDeltaEtaPt_%d", groupname.Data(), fCentBin);
431  fHistManager.FillTH1(histname, track->Pt(), track->Eta() - track->GetTrackEtaOnEMCal());
432 
433  histname = TString::Format("%s/fHistDeltaPhiPt_%d", groupname.Data(), fCentBin);
434  fHistManager.FillTH1(histname, track->Pt(), track->Phi() - track->GetTrackPhiOnEMCal());
435 
436  histname = TString::Format("%s/fHistDeltaPtvsPt_%d", groupname.Data(), fCentBin);
437  fHistManager.FillTH1(histname, track->Pt(), track->Pt() - track->GetTrackPtOnEMCal());
438 
439  if (clusCont) {
440  Int_t iCluster = track->GetEMCALcluster();
441  if (iCluster >= 0) {
442  AliVCluster* cluster = clusCont->GetAcceptCluster(iCluster);
443  if (cluster) {
444  histname = TString::Format("%s/fHistEoverPvsP_%d", groupname.Data(), fCentBin);
445  fHistManager.FillTH2(histname, track->P(), cluster->GetNonLinCorrEnergy() / track->P());
446  }
447  }
448  }
449  }
450  }
451 
452  histname = TString::Format("%s/histNTracks_%d", groupname.Data(), fCentBin);
453  fHistManager.FillTH1(histname, count);
454  }
455 }
456 
462 {
463  TString histname;
464  TString groupname;
465  AliClusterContainer* clusCont = 0;
466  TIter next(&fClusterCollArray);
467  while ((clusCont = static_cast<AliClusterContainer*>(next()))) {
468  groupname = clusCont->GetName();
469 
470  for(auto cluster : clusCont->all()) {
471  if (!cluster) continue;
472 
473  if (cluster->GetIsExotic()) {
474  histname = TString::Format("%s/histClusterEnergyExotic_%d", groupname.Data(), fCentBin);
475  fHistManager.FillTH1(histname, cluster->E());
476  }
477  }
478 
479  UInt_t count = 0;
480  for(auto cluster : clusCont->accepted()) {
481  if (!cluster) continue;
482  count++;
483 
484  AliTLorentzVector nPart;
485  cluster->GetMomentum(nPart, fVertex);
486 
487  histname = TString::Format("%s/histClusterEnergy_%d", groupname.Data(), fCentBin);
488  fHistManager.FillTH1(histname, cluster->E());
489 
490  histname = TString::Format("%s/histClusterNonLinCorrEnergy_%d", groupname.Data(), fCentBin);
491  fHistManager.FillTH1(histname, cluster->GetNonLinCorrEnergy());
492 
493  histname = TString::Format("%s/histClusterHadCorrEnergy_%d", groupname.Data(), fCentBin);
494  fHistManager.FillTH1(histname, cluster->GetHadCorrEnergy());
495 
496  histname = TString::Format("%s/histClusterPhi_%d", groupname.Data(), fCentBin);
497  fHistManager.FillTH1(histname, nPart.Phi_0_2pi());
498 
499  histname = TString::Format("%s/histClusterEta_%d", groupname.Data(), fCentBin);
500  fHistManager.FillTH1(histname, nPart.Eta());
501  }
502 
503  histname = TString::Format("%s/histNClusters_%d", groupname.Data(), fCentBin);
504  fHistManager.FillTH1(histname, count);
505  }
506 }
507 
513 {
514  if (!fCaloCells) return;
515 
516  TString histname;
517 
518  const Short_t ncells = fCaloCells->GetNumberOfCells();
519 
520  histname = TString::Format("%s/histNCells_%d", fCaloCellsName.Data(), fCentBin);
521  fHistManager.FillTH1(histname, ncells);
522 
523  histname = TString::Format("%s/histCellEnergy_%d", fCaloCellsName.Data(), fCentBin);
524  for (Short_t pos = 0; pos < ncells; pos++) {
525  Double_t amp = fCaloCells->GetAmplitude(pos);
526 
527  fHistManager.FillTH1(histname, amp);
528  }
529 }
530 
536 {
537 
539 }
540 
549 {
550 
551  /*
552  TString firedtriggers(InputEvent()->GetFiredTriggerClasses());
553  if(!firedtriggers.Contains("EG1")){
554  cout<<"Not EG1 Event"<<endl;
555  //return kFALSE;
556  }
557 
558  TClonesArray *triggerpatches = dynamic_cast<TClonesArray *>(InputEvent()->FindListObject("EmcalTriggers"));
559  if(!triggerpatches)
560  AliErrorStream() << "Trigger patch container EmcalTriggers not found in task " << GetName() << std::endl;
561 
562  AliEMCALTriggerPatchInfo *currentpatch(nullptr);
563  for(TIter patchiter = TIter(triggerpatches).Begin(); patchiter != TIter::End(); ++patchiter){
564  currentpatch = static_cast<AliEMCALTriggerPatchInfo *>(*patchiter);
565  if(currentpatch->GetPatchSize() != 2) continue; // Reject L0 patches
566  //cout<<"PatchSize: " <<currentpatch->GetPatchSize()<<endl;
567  Double_t patchE = currentpatch->GetPatchE();
568  //cout<<"Patch E: "<< patchE <<endl;
569  }
570  */
571  //AliEMCALTriggerPatchInfo *patch;
572  /*
573  AliDebugStream(1) << GetName() << ": Number of trigger patches " << fTriggerPatchInfo->GetEntries() << std::endl;
574  for(auto patchIter : *fTriggerPatchInfo){
575  AliEMCALTriggerPatchInfo *patch = static_cast<AliEMCALTriggerPatchInfo *>(patchIter);
576  }
577 
578  bool isDCAL = patch->IsDCalPHOS(),
579  isSingleShower = SelectSingleShowerPatch(patch),
580  isJetPatch = SelectJetPatch(patch);
581  */
582  //cout<<"PATCH RENERGY" <<patch->GetPatchE()<<endl;
583 
584  return kTRUE;
585 }
586 
588  if(fUseRecalcPatches){
589  if(!patch->IsRecalc()) return false;
590  return patch->IsGammaLowRecalc();
591  } else {
592  if(!patch->IsOfflineSimple()) return false;
593  return patch->IsGammaLowSimple();
594  }
595 }
596 
597 Bool_t AliAnalysisTaskEmcalJetSpectra8TeVTriggerQA::SelectJetPatch(const AliEMCALTriggerPatchInfo *patch) const{
598  if(fUseRecalcPatches){
599  if(!patch->IsRecalc()) return false;
600  return patch->IsJetLowRecalc();
601  } else {
602  if(!patch->IsOfflineSimple()) return false;
603  return patch->IsJetLowSimple();
604  }
605 }
607 
608  //Find main trigger
609  if(!fTriggerPatchInfo)
610  return;
611 
612  //number of patches in event
613  Int_t nPatch = fTriggerPatchInfo->GetEntriesFast();
614  //extract main trigger patch
615  Double_t emax = -1.;
616  for (Int_t iPatch = 0; iPatch < nPatch; iPatch++) {
617  AliEMCALTriggerPatchInfo *patch = (AliEMCALTriggerPatchInfo*)fTriggerPatchInfo->At( iPatch );
618  if (!patch) continue;
619  }
620 }
621 
626 {
627  cout<<"****************************"<<endl;
628  cout<<"**** User Task Finished ****"<<endl;
629  cout<<"****************************"<<endl;
630 }
THashList * CreateHistoGroup(const char *groupname)
TObjArray fClusterCollArray
cluster collection array
Double_t GetRhoVal() const
const TString & GetRhoName() const
double Double_t
Definition: External.C:58
void FillTH2(const char *hname, double x, double y, double weight=1., Option_t *opt="")
Declaration of class AliTLorentzVector.
Double_t fMinBinPt
min pt in histograms
Int_t fCentBin
!event centrality bin
Declaration of class AliAnalysisTaskEmcalJetSpectra8TeVTriggerQA.
Container for particles within the EMCAL framework.
void SetCaloTriggerPatchInfoName(const char *n)
TObjArray fParticleCollArray
particle/track collection array
const AliClusterIterableContainer all() const
TH2 * CreateTH2(const char *name, const char *title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax, Option_t *opt="")
int Int_t
Definition: External.C:63
Bool_t fUseRecalcPatches
Switch between offline (FEE) and recalc (L1) patches.
unsigned int UInt_t
Definition: External.C:33
THashList * GetListOfHistograms() const
Definition: THistManager.h:504
Bool_t SelectSingleShowerPatch(const AliEMCALTriggerPatchInfo *patch) const
Double_t Phi_0_2pi() const
Implementation of a EMCal spectra task and QA for EMCal triggers.
TH1 * CreateTH1(const char *name, const char *title, int nbins, double xmin, double xmax, Option_t *opt="")
BeamType fForceBeamType
forced beam type
Int_t fNcentBins
how many centrality bins
AliClusterContainer * GetClusterContainer(Int_t i=0) const
AliVCluster * GetAcceptCluster(Int_t i) const
const AliClusterIterableContainer accepted() const
Bool_t SelectJetPatch(const AliEMCALTriggerPatchInfo *patch) const
TString fCaloCellsName
name of calo cell collection
void FillTH1(const char *hname, double x, double weight=1., Option_t *opt="")
TObjArray fJetCollArray
jet collection array
short Short_t
Definition: External.C:23
AliVCaloCells * fCaloCells
!cells
AliRhoParameter * GetRhoParameter()
AliEmcalList * fOutput
!output list
Double_t fMaxBinPt
max pt in histograms
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
Double_t fVertex[3]
!event vertex
void SetMakeGeneralHistograms(Bool_t g)
TClonesArray * fTriggerPatchInfo
!trigger patch info array
Base task in the EMCAL jet framework.
const AliParticleIterableContainer accepted() const
const char Option_t
Definition: External.C:48
const AliJetIterableContainer accepted() const
bool Bool_t
Definition: External.C:53
Container structure for EMCAL clusters.
Container for jet within the EMCAL jet framework.
Int_t fNbins
no. of pt bins