AliPhysics  a0db429 (a0db429)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
AliAnalysisTaskEmcalPatchesRef.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-2015, 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 #include <map>
16 #include <vector>
17 
18 #include <TArrayD.h>
19 #include <TClonesArray.h>
20 #include <THashList.h>
21 #include <TString.h>
22 
23 #include "AliAnalysisUtils.h"
24 #include "AliESDEvent.h"
25 #include "AliEMCalHistoContainer.h"
26 #include "AliEmcalTriggerPatchInfoAP.h"
27 #include "AliEmcalTriggerPatchInfoAPV1.h"
28 #include "AliInputEventHandler.h"
29 #include "AliLog.h"
30 
32 
34 
35 namespace EMCalTriggerPtAnalysis {
36 
40 AliAnalysisTaskEmcalPatchesRef::AliAnalysisTaskEmcalPatchesRef() :
41  AliAnalysisTaskSE(),
42  fAnalysisUtil(NULL),
43  fHistos(NULL),
44  fRequestAnalysisUtil(kTRUE),
45  fTriggerStringFromPatches(kFALSE)
46 {
47  for(int itrg = 0; itrg < kEPRntrig; itrg++){
48  fOfflineEnergyThreshold[itrg] = -1;
49  }
50 }
51 
56 AliAnalysisTaskEmcalPatchesRef::AliAnalysisTaskEmcalPatchesRef(const char *name):
57  AliAnalysisTaskSE(name),
58  fAnalysisUtil(NULL),
59  fHistos(NULL),
60  fRequestAnalysisUtil(kTRUE),
61  fTriggerStringFromPatches(kFALSE)
62 {
63  for(int itrg = 0; itrg < kEPRntrig; itrg++){
64  fOfflineEnergyThreshold[itrg] = -1;
65  }
66  DefineOutput(1, TList::Class());
67 }
68 
72 AliAnalysisTaskEmcalPatchesRef::~AliAnalysisTaskEmcalPatchesRef() {
73 }
74 
80 void AliAnalysisTaskEmcalPatchesRef::UserCreateOutputObjects(){
81  fAnalysisUtil = new AliAnalysisUtils;
82 
83  TArrayD energybinning, etabinning;
84  CreateEnergyBinning(energybinning);
85  CreateLinearBinning(etabinning, 100, -0.7, 0.7);
86  fHistos = new AliEMCalHistoContainer("Ref");
87  TString triggers[18] = {"MB", "EMC7", "DMC7",
88  "EJ1", "EJ2", "EG1", "EG2", "DJ1", "DJ2", "DG1", "DG2",
89  "MBexcl", "EMC7excl", "DMC7excl", "EG2excl", "EJ2excl", "DG2excl", "DJ2excl"
90  };
91  TString patchtype[10] = {"EG1", "EG2", "EJ1", "EJ2", "EMC7", "DG1", "DG2", "DJ1", "DJ2", "DMC7"};
92  Double_t encuts[5] = {1., 2., 5., 10., 20.};
93  for(TString *trg = triggers; trg < triggers+18; trg++){
94  fHistos->CreateTH1(Form("hEventCount%s", trg->Data()), Form("Event count for trigger class %s", trg->Data()), 1, 0.5, 1.5);
95  for(int ipatch = 0; ipatch < 10; ipatch++){
96  fHistos->CreateTH1(Form("h%sPatchEnergy%s", patchtype[ipatch].Data(), trg->Data()), Form("%s-patch energy for trigger class %s", patchtype[ipatch].Data(), trg->Data()), energybinning);
97  fHistos->CreateTH1(Form("h%sPatchET%s", patchtype[ipatch].Data(), trg->Data()), Form("%s-patch transverse energy for trigger class %s", patchtype[ipatch].Data(), trg->Data()), energybinning);
98  fHistos->CreateTH2(Form("h%sPatchEnergyEta%s", patchtype[ipatch].Data(), trg->Data()), Form("%s-patch energy for trigger class %s", patchtype[ipatch].Data(), trg->Data()), energybinning, etabinning);
99  fHistos->CreateTH2(Form("h%sPatchETEta%s", patchtype[ipatch].Data(), trg->Data()), Form("%s-patch transverse energy for trigger class %s", patchtype[ipatch].Data(), trg->Data()), energybinning, etabinning);
100  for(int ien = 0; ien < 5; ien++){
101  fHistos->CreateTH2(Form("h%sEtaPhi%dG%s", patchtype[ipatch].Data(), static_cast<int>(encuts[ien]), trg->Data()), Form("%s-patch #eta-#phi map for clusters with energy larger than %f GeV/c for trigger class %s", patchtype[ipatch].Data(), encuts[ien], trg->Data()), 100, -0.7, 0.7, 100, 1.4, 3.2);
102  }
103  }
104  }
105  PostData(1, fHistos->GetListOfHistograms());
106 
107 }
108 
113 void AliAnalysisTaskEmcalPatchesRef::UserExec(Option_t *){
114  TClonesArray *patches = dynamic_cast<TClonesArray *>(fInputEvent->FindListObject("EmcalTriggers"));
115  TString triggerstring = "";
116  if(fTriggerStringFromPatches){
117  triggerstring = GetFiredTriggerClassesFromPatches(patches);
118  } else {
119  triggerstring = fInputEvent->GetFiredTriggerClasses();
120  }
121  UInt_t selectionstatus = fInputHandler->IsEventSelected();
122  Bool_t isMinBias = selectionstatus & AliVEvent::kINT7,
123  isEMC7 = (selectionstatus & AliVEvent::kEMC7) && triggerstring.Contains("EMC7") && IsOfflineSelected(kEPREL0, patches),
124  isEJ1 = (selectionstatus & AliVEvent::kEMCEJE) && triggerstring.Contains("EJ1") && IsOfflineSelected(kEPREJ1, patches),
125  isEJ2 = (selectionstatus & AliVEvent::kEMCEJE) && triggerstring.Contains("EJ2") && IsOfflineSelected(kEPREJ2, patches),
126  isEG1 = (selectionstatus & AliVEvent::kEMCEGA) && triggerstring.Contains("EG1") && IsOfflineSelected(kEPREG1, patches),
127  isEG2 = (selectionstatus & AliVEvent::kEMCEGA) && triggerstring.Contains("EG2") && IsOfflineSelected(kEPREG2, patches),
128  isDMC7 = (selectionstatus & AliVEvent::kEMC7) && triggerstring.Contains("DMC7") && IsOfflineSelected(kEPRDL0, patches),
129  isDJ1 = (selectionstatus & AliVEvent::kEMCEJE) && triggerstring.Contains("DJ1") && IsOfflineSelected(kEPRDJ1, patches),
130  isDJ2 = (selectionstatus & AliVEvent::kEMCEJE) && triggerstring.Contains("DJ2") && IsOfflineSelected(kEPRDJ2, patches),
131  isDG1 = (selectionstatus & AliVEvent::kEMCEGA) && triggerstring.Contains("DG1") && IsOfflineSelected(kEPRDG1, patches),
132  isDG2 = (selectionstatus & AliVEvent::kEMCEGA) && triggerstring.Contains("DG2") && IsOfflineSelected(kEPRDG2, patches);
133  if(!(isMinBias || isEMC7 || isEG1 || isEG2 || isEJ1 || isEJ2 || isDMC7 || isDG1 || isDG2 || isDJ1 || isDJ2)) return;
134  const AliVVertex *vtx = fInputEvent->GetPrimaryVertex();
135  //if(!fInputEvent->IsPileupFromSPD(3, 0.8, 3., 2., 5.)) return; // reject pileup event
136  if(vtx->GetNContributors() < 1) return;
137  // Fill reference distribution for the primary vertex before any z-cut
138  if(fRequestAnalysisUtil){
139  if(fInputEvent->IsA() == AliESDEvent::Class() && fAnalysisUtil->IsFirstEventInChunk(fInputEvent)) return;
140  if(!fAnalysisUtil->IsVertexSelected2013pA(fInputEvent)) return; // Apply new vertex cut
141  if(fAnalysisUtil->IsPileUpEvent(fInputEvent)) return; // Apply new vertex cut
142  }
143  // Apply vertex z cut
144  if(vtx->GetZ() < -10. || vtx->GetZ() > 10.) return;
145 
146  // Fill Event counter and reference vertex distributions for the different trigger classes
147  if(isMinBias){
148  fHistos->FillTH1("hEventCountMB", 1);
149  // Check for exclusive classes
150  if(!(isEMC7 || isDMC7 || isEJ1 || isEJ2 || isEG1 || isEG2 || isDJ1 || isDJ2 || isDG1 || isDG2)){
151  fHistos->FillTH1("hEventCountMBexcl", 1);
152  }
153  }
154 
155  // L0 triggers
156  if(isEMC7){
157  fHistos->FillTH1("hEventCountEMC7", 1);
158  if(!(isEJ1 || isEJ2 || isEG1 || isEG2)){
159  fHistos->FillTH1("hEventCountEMC7excl", 1);
160  }
161  }
162  if(isDMC7){
163  fHistos->FillTH1("hEventCountDMC7", 1);
164  if(!(isDJ1 || isDJ2 || isDG1 || isDG2)){
165  fHistos->FillTH1("hEventCountDMC7excl", 1);
166  }
167  }
168 
169  // L1 jet triggers
170  if(isEJ1){
171  fHistos->FillTH1("hEventCountEJ1", 1);
172  }
173  if(isDJ1){
174  fHistos->FillTH1("hEventCountEJ1", 1);
175  }
176 
177  if(isEJ2){
178  fHistos->FillTH1("hEventCountEJ2", 1);
179  // Check for exclusive classes
180  if(!isEJ1){
181  fHistos->FillTH1("hEventCountEJ2excl", 1);
182  }
183  }
184  if(isDJ2){
185  fHistos->FillTH1("hEventCountDJ2", 1);
186  // Check for exclusive classes
187  if(!isDJ1){
188  fHistos->FillTH1("hEventCountDJ2excl", 1);
189  }
190  }
191 
192  // L1 gamma triggers
193  if(isEG1){
194  fHistos->FillTH1("hEventCountEG1", 1);
195  }
196  if(isDG1){
197  fHistos->FillTH1("hEventCountDG1", 1);
198  }
199  if(isEG2){
200  fHistos->FillTH1("hEventCountEG2", 1);
201  // Check for exclusive classes
202  if(!isEG1){
203  fHistos->FillTH1("hEventCountEG2excl", 1);
204  }
205  }
206  if(isDG2){
207  fHistos->FillTH1("hEventCountDG2", 1);
208  // Check for exclusive classes
209  if(!isEG1){
210  fHistos->FillTH1("hEventCountDG2excl", 1);
211  }
212  }
213 
214  if(!patches){
215  AliError("Trigger patch container not available");
216  return;
217  }
218 
219  Double_t vertexpos[3];
220  fInputEvent->GetPrimaryVertex()->GetXYZ(vertexpos);
221 
222  Double_t energy, eta, phi, et;
223  for(TIter patchIter = TIter(patches).Begin(); patchIter != TIter::End(); ++patchIter){
224  if(!IsOfflineSimplePatch(*patchIter)) continue;
225  AliEmcalTriggerPatchInfo *patch = static_cast<AliEmcalTriggerPatchInfo *>(*patchIter);
226 
227  bool isDCAL = SelectDCALPatch(*patchIter), isSingleShower = SelectSingleShowerPatch(*patchIter), isJetPatch = SelectJetPatch(*patchIter);
228 
229  std::vector<TString> patchnames;
230  if(isJetPatch){
231  if(isDCAL){
232  patchnames.push_back("DJ1");
233  patchnames.push_back("DJ2");
234  } else {
235  patchnames.push_back("EJ1");
236  patchnames.push_back("EJ2");
237  }
238  }
239  if(isSingleShower){
240  if(isDCAL){
241  patchnames.push_back("DMC7");
242  patchnames.push_back("DG1");
243  patchnames.push_back("DG2");
244  } else {
245  patchnames.push_back("EMC7");
246  patchnames.push_back("EG1");
247  patchnames.push_back("EG2");
248  }
249  }
250  if(!patchnames.size()){
251  // Undefined patch type - ignore
252  continue;
253  }
254 
255  TLorentzVector posvec;
256  energy = patch->GetPatchE();
257  eta = patch->GetEtaGeo();
258  phi = patch->GetPhiGeo();
259  et = patch->GetLorentzVectorCenterGeo().Et();
260 
261  // fill histograms allEta
262  for(std::vector<TString>::iterator nameit = patchnames.begin(); nameit != patchnames.end(); ++nameit){
263  if(isMinBias){
264  FillPatchHistograms("MB", *nameit, energy, et, eta, phi);
265  // check for exclusive classes
266  if(!(isEMC7 || isDMC7 || isEJ1 || isEJ2 || isEG1 || isEG2 || isDJ1 || isDJ2 || isDG1 || isDG2)){
267  FillPatchHistograms("MBexcl", *nameit, energy, et, eta, phi);
268  }
269  }
270 
271  if(isEMC7){
272  FillPatchHistograms("EMC7", *nameit, energy, et, eta, phi);
273  if(!(isEJ1 || isEJ2 || isEG1 || isEG2)){
274  FillPatchHistograms("EMC7excl", *nameit, energy, et, eta, phi);
275  }
276  }
277  if(isDMC7){
278  FillPatchHistograms("DMC7", *nameit, energy, et, eta, phi);
279  if(!(isDJ1 || isDJ2 || isDG1 || isDG2)){
280  FillPatchHistograms("DMC7excl", *nameit, energy, et, eta, phi);
281  }
282  }
283 
284  if(isEJ1){
285  FillPatchHistograms("EJ1", *nameit, energy, et, eta, phi);
286  }
287  if(isDJ1){
288  FillPatchHistograms("DJ1", *nameit, energy, et, eta, phi);
289  }
290 
291 
292  if(isEJ2){
293  FillPatchHistograms("EJ2", *nameit, energy, et, eta, phi);
294  // check for exclusive classes
295  if(!isEJ1){
296  FillPatchHistograms("EJ2excl", *nameit, energy, et, eta, phi);
297  }
298  }
299  if(isDJ2){
300  FillPatchHistograms("DJ2", *nameit, energy, et, eta, phi);
301  // check for exclusive classes
302  if(!isDJ1){
303  FillPatchHistograms("DJ2excl", *nameit, energy, et, eta, phi);
304  }
305  }
306 
307  if(isEG1){
308  FillPatchHistograms("EG1", *nameit, energy, et, eta, phi);
309  }
310  if(isDG1){
311  FillPatchHistograms("DG1", *nameit, energy, et, eta, phi);
312  }
313 
314  if(isEG2){
315  FillPatchHistograms("EG2", *nameit, energy, et, eta, phi);
316  // check for exclusive classes
317  if(!isEG1){
318  FillPatchHistograms("EG2excl", *nameit, energy, et, eta, phi);
319  }
320  }
321  if(isDG2){
322  FillPatchHistograms("DG2", *nameit, energy, et, eta, phi);
323  // check for exclusive classes
324  if(!isDG1){
325  FillPatchHistograms("DG2excl", *nameit, energy, et, eta, phi);
326  }
327  }
328  }
329  }
330  PostData(1, fHistos->GetListOfHistograms());
331 }
332 
341 void AliAnalysisTaskEmcalPatchesRef::FillPatchHistograms(TString triggerclass, TString patchname, double energy, double transverseenergy, double eta, double phi){
342  fHistos->FillTH1(Form("h%sPatchEnergy%s", patchname.Data(), triggerclass.Data()), energy);
343  fHistos->FillTH1(Form("h%sPatchET%s", patchname.Data(), triggerclass.Data()), transverseenergy);
344  fHistos->FillTH2(Form("h%sPatchEnergyEta%s", patchname.Data(), triggerclass.Data()), eta, energy);
345  fHistos->FillTH2(Form("h%sPatchETEta%s", patchname.Data(), triggerclass.Data()), eta, transverseenergy);
346  Double_t encuts[5] = {1., 2., 5., 10., 20.};
347  for(int ien = 0; ien < 5; ien++){
348  if(energy > encuts[ien]){
349  fHistos->FillTH2(Form("h%sEtaPhi%dG%s", patchname.Data(), static_cast<int>(encuts[ien]), triggerclass.Data()), eta, phi);
350  }
351  }
352 }
353 
358 void AliAnalysisTaskEmcalPatchesRef::CreateEnergyBinning(TArrayD& binning) const {
359  std::vector<double> mybinning;
360  std::map<double,double> definitions;
361  definitions.insert(std::pair<double, double>(1, 0.05));
362  definitions.insert(std::pair<double, double>(2, 0.1));
363  definitions.insert(std::pair<double, double>(4, 0.2));
364  definitions.insert(std::pair<double, double>(7, 0.5));
365  definitions.insert(std::pair<double, double>(16, 1));
366  definitions.insert(std::pair<double, double>(32, 2));
367  definitions.insert(std::pair<double, double>(40, 4));
368  definitions.insert(std::pair<double, double>(50, 5));
369  definitions.insert(std::pair<double, double>(100, 10));
370  definitions.insert(std::pair<double, double>(200, 20));
371  double currentval = 0.;
372  mybinning.push_back(currentval);
373  for(std::map<double,double>::iterator id = definitions.begin(); id != definitions.end(); ++id){
374  double limit = id->first, binwidth = id->second;
375  while(currentval < limit){
376  currentval += binwidth;
377  mybinning.push_back(currentval);
378  }
379  }
380  binning.Set(mybinning.size());
381  int ib = 0;
382  for(std::vector<double>::iterator it = mybinning.begin(); it != mybinning.end(); ++it)
383  binning[ib++] = *it;
384 }
385 
393 void AliAnalysisTaskEmcalPatchesRef::CreateLinearBinning(TArrayD& binning, int nbins, double min, double max) const {
394  double binwidth = (max-min)/static_cast<double>(nbins);
395  binning.Set(nbins+1);
396  binning[0] = min;
397  double currentlimit = min + binwidth;
398  for(int ibin = 0; ibin < nbins; ibin++){
399  binning[ibin+1] = currentlimit;
400  currentlimit += binwidth;
401  }
402 }
403 
412 Bool_t AliAnalysisTaskEmcalPatchesRef::IsOfflineSelected(EmcalTriggerClass trgcls, const TClonesArray * const triggerpatches) const {
413  if(fOfflineEnergyThreshold[trgcls] < 0) return true;
414  bool isSingleShower = ((trgcls == kEPREL0) || (trgcls == kEPREG1) || (trgcls == kEPREG2) ||
415  (trgcls == kEPRDL0) || (trgcls == kEPRDG1) || (trgcls == kEPRDG2)),
416  isDCAL = ((trgcls == kEPRDL0) || (trgcls == kEPRDG1) || (trgcls == kEPRDG2) || (trgcls == kEPRDJ1) || (trgcls == kEPRDJ2));
417  int nfound = 0;
418  for(TIter patchIter = TIter(triggerpatches).Begin(); patchIter != TIter::End(); ++patchIter){
419  bool isDCALpatch = SelectDCALPatch(*patchIter);
420  if(isDCAL){
421  if(!isDCALpatch) continue;
422  } else {
423  if(isDCALpatch) continue;
424  }
425  if(!IsOfflineSimplePatch(*patchIter)) continue;
426  if(isSingleShower){
427  if(!SelectSingleShowerPatch(*patchIter)) continue;
428  } else{
429  if(!SelectJetPatch(*patchIter)) continue;
430  }
431  if(GetPatchEnergy(*patchIter) > fOfflineEnergyThreshold[trgcls]) nfound++;
432  }
433  return nfound > 0;
434 }
435 
436 
442 TString AliAnalysisTaskEmcalPatchesRef::GetFiredTriggerClassesFromPatches(const TClonesArray* triggerpatches) const {
443  TString triggerstring = "";
444  if(!triggerpatches) return triggerstring;
445  Int_t nEJ1 = 0, nEJ2 = 0, nEG1 = 0, nEG2 = 0;
446  double minADC_EJ1 = 260.,
447  minADC_EJ2 = 127.,
448  minADC_EG1 = 140.,
449  minADC_EG2 = 89.;
450  for(TIter patchIter = TIter(triggerpatches).Begin(); patchIter != TIter::End(); ++patchIter){
451  AliEmcalTriggerPatchInfo *patch = dynamic_cast<AliEmcalTriggerPatchInfo *>(*patchIter);
452  if(!patch->IsOfflineSimple()) continue;
453  if(patch->IsJetHighSimple() && patch->GetADCOfflineAmp() > minADC_EJ1) nEJ1++;
454  if(patch->IsJetLowSimple() && patch->GetADCOfflineAmp() > minADC_EJ2) nEJ2++;
455  if(patch->IsGammaHighSimple() && patch->GetADCOfflineAmp() > minADC_EG1) nEG1++;
456  if(patch->IsGammaLowSimple() && patch->GetADCOfflineAmp() > minADC_EG2) nEG2++;
457  }
458  if(nEJ1) triggerstring += "EJ1";
459  if(nEJ2){
460  if(triggerstring.Length()) triggerstring += ",";
461  triggerstring += "EJ2";
462  }
463  if(nEG1){
464  if(triggerstring.Length()) triggerstring += ",";
465  triggerstring += "EG1";
466  }
467  if(nEG2){
468  if(triggerstring.Length()) triggerstring += ",";
469  triggerstring += "EG2";
470  }
471  return triggerstring;
472 }
473 
474 void AliAnalysisTaskEmcalPatchesRef::GetPatchBoundaries(TObject *o, Double_t *boundaries) const {
475  AliEmcalTriggerPatchInfo *patch(NULL);
476  if((patch = dynamic_cast<AliEmcalTriggerPatchInfo *>(o))){
477  boundaries[0] = patch->GetEtaMin();
478  boundaries[1] = patch->GetEtaMax();
479  boundaries[2] = patch->GetPhiMin();
480  boundaries[3] = patch->GetPhiMax();
481  } else {
482  AliEmcalTriggerPatchInfoAPV1 *newpatch = dynamic_cast<AliEmcalTriggerPatchInfoAPV1 *>(o);
483  if(newpatch){
484  boundaries[0] = newpatch->GetEtaMin();
485  boundaries[1] = newpatch->GetEtaMax();
486  boundaries[2] = newpatch->GetPhiMin();
487  boundaries[3] = newpatch->GetPhiMax();
488  }
489  }
490 
491 }
492 
493 bool AliAnalysisTaskEmcalPatchesRef::IsOfflineSimplePatch(TObject *o) const {
494  AliEmcalTriggerPatchInfo *patch(NULL);
495  if((patch = dynamic_cast<AliEmcalTriggerPatchInfo *>(o))){
496  return patch->IsOfflineSimple();
497  } else {
498  AliEmcalTriggerPatchInfoAPV1 *newpatch = dynamic_cast<AliEmcalTriggerPatchInfoAPV1 *>(o);
499  if(newpatch) return newpatch->IsOfflineSimple();
500  }
501  return false;
502 }
503 
504 bool AliAnalysisTaskEmcalPatchesRef::SelectDCALPatch(TObject *o) const {
505  AliEmcalTriggerPatchInfo *patch(NULL);
506  if((patch = dynamic_cast<AliEmcalTriggerPatchInfo *>(o))){
507  return patch->GetRowStart() >= 64;
508  } else {
509  AliEmcalTriggerPatchInfoAPV1 *newpatch = dynamic_cast<AliEmcalTriggerPatchInfoAPV1 *>(o);
510  if(newpatch) return newpatch->GetRowStart() >= 64;
511  }
512  return false;
513 }
514 
515 bool AliAnalysisTaskEmcalPatchesRef::SelectSingleShowerPatch(TObject *o) const{
516  AliEmcalTriggerPatchInfo *patch(NULL);
517  if((patch = dynamic_cast<AliEmcalTriggerPatchInfo *>(o))){
518  if(!patch->IsOfflineSimple()) return false;
519  return patch->IsGammaLowSimple();
520  } else {
521  AliEmcalTriggerPatchInfoAPV1 *newpatch = dynamic_cast<AliEmcalTriggerPatchInfoAPV1 *>(o);
522  if(newpatch) return newpatch->IsGammaLowSimple();
523  }
524  return false;
525 }
526 
527 bool AliAnalysisTaskEmcalPatchesRef::SelectJetPatch(TObject *o) const{
528  AliEmcalTriggerPatchInfo *patch(NULL);
529  if((patch = dynamic_cast<AliEmcalTriggerPatchInfo *>(o))){
530  if(!patch->IsOfflineSimple()) return false;
531  return patch->IsJetLowSimple();
532  } else {
533  AliEmcalTriggerPatchInfoAPV1 *newpatch = dynamic_cast<AliEmcalTriggerPatchInfoAPV1 *>(o);
534  if(newpatch) return newpatch->IsJetLowSimple();
535  }
536  return false;
537 }
538 
539 
540 double AliAnalysisTaskEmcalPatchesRef::GetPatchEnergy(TObject *o) const {
541  double energy = 0.;
542  AliEmcalTriggerPatchInfo *patch(NULL);
543  if((patch = dynamic_cast<AliEmcalTriggerPatchInfo *>(o))){
544  if(!patch->IsOfflineSimple()) return false;
545  energy = patch->GetPatchE();
546  } else {
547  AliEmcalTriggerPatchInfoAPV1 *newpatch = dynamic_cast<AliEmcalTriggerPatchInfoAPV1 *>(o);
548  if(newpatch) energy = newpatch->GetPatchE();
549  }
550  return energy;
551 }
552 
553 
554 } /* namespace EMCalTriggerPtAnalysis */
ClassImp(EMCalTriggerPtAnalysis::AliAnalysisTaskEmcalPatchesRef) namespace EMCalTriggerPtAnalysis
Declarartion of class AliEMCalHistoContainer.
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
energy
const Int_t nbins