AliPhysics  41af4b0 (41af4b0)
AliAnalysisTaskEMCALTriggerQA.cxx
Go to the documentation of this file.
1  /**************************************************************************
2  * Copyright(c) 1998-1999, 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 <TList.h>
17 #include <TH2F.h>
18 #include <TF1.h>
19 #include <TProfile2D.h>
20 #include <TStreamerInfo.h>
21 #include <TFile.h>
22 
23 #include "AliLog.h"
24 #include "AliVCluster.h"
25 #include "AliVCaloCells.h"
26 #include "AliVEvent.h"
27 #include "AliCentrality.h"
28 
29 #include "AliVEvent.h"
30 #include "AliVCaloTrigger.h"
31 #include "AliESDVZERO.h"
32 
33 #include "AliEMCALGeometry.h"
34 #include "AliEMCALRecoUtils.h"
35 #include "AliOADBContainer.h"
36 #include "AliAnalysisManager.h"
37 #include "AliMultSelection.h"
38 #include "AliDataFile.h"
39 
41 
45 
46 //______________________________________________________________________________
49 //______________________________________________________________________________
52 fOutputList(0), fRecoUtils(0x0),
53 fGeoSet(0), fGeometry(0), fGeoName(""),
54 fOADBSet(kFALSE), fAccessOADB(kTRUE), fOADBFilePath(""),
55 fBitEGA(0), fBitEJE(0),
56 fEtaPhiEnMin(2.),
57 fSTUTotal(0), fTRUTotal(0),
58 fV0Trigger(0), fV0A(0), fV0C(0),
59 fFillV0SigHisto(0), fFillCenHisto(0), fFillClusAcceptHisto(0),
60 fMCData(kFALSE),
61 fFirstSM (0), fLastSM (0),
62 fCentEstimator("V0M"), fUseAliCentrality(0),
63 fEventMB (0),
64 fEventL0 (0), fEventL0D (0),
65 fEventL1G (0), fEventL1GD (0),
66 fEventL1G2 (0), fEventL1G2D(0),
67 fEventL1J (0), fEventL1JD (0),
68 fEventL1J2 (0), fEventL1J2D(0),
69 fEventCen (0), fEventSem (0),
70 fMomentum(),
71 //Histograms
72 fhNEvents(0), fhFORAmp(0),
73 fhFORAmpL1G(0), fhFORAmpL1G2(0),
74 fhFORAmpL1J(0), fhFORAmpL1J2(0),
75 fhL0Amp(0), fhL0AmpL1G(0), fhL0AmpL1J(0),
76 fhL1Amp(0), fhL1GAmp(0), fhL1G2Amp(0),
77 fhL1JAmp(0), fhL1J2Amp(0), fhL1FOREnergy(0),
78 fhL0Patch(0), fhL1GPatch(0), fhL1G2Patch(0),
79 fhL1GPatchNotFake(0), fhL1GPatchFake(0), fhL1GPatchNotAllFake(0),
80 fhL1GPatchAllFake(0), fhL1GPatchNotAllFakeMax(0),
81 fhL1GPatchAllFakeMax(0), fhL1GPatchNotAllFakeMaxE(0),
82 fhL1GPatchAllFakeMaxE(0), fhL1GPatchNotAllFakeE(0),
83 fhL1GPatchAllFakeE(0), fhL1GPatchFakeE(0),
84 fhL1GPatchNotFakeE(0), fhNPatchFake(0), fhNPatchNotFake(0),
85 fhL1JPatch(0), fhL1J2Patch(0),
86 fhFEESTU(0), fhTRUSTU(0), fhV0STU(0),
87 fhGPMaxVV0TT(0), fhJPMaxVV0TT(0),
88 fhFORMeanAmp(0), fhL0MeanAmp(0), fhL1MeanAmp(0),
89 fhL1GPatchMax(0), fhL1G2PatchMax(0),
90 fhL1JPatchMax(0), fhL1J2PatchMax(0),
91 //Histogram settings
92 fNBinsSTUSignal (300), fMaxSTUSignal (30000),
93 fNBinsTRUSignal (300), fMaxTRUSignal (30000),
94 fNBinsV0Signal (300), fMaxV0Signal (30000),
95 fNBinsSTUFEERatio(300), fMaxSTUFEERatio(100),
96 fNBinsSTUTRURatio(300), fMaxSTUTRURatio(100),
97 fNBinsClusterE (100), fMaxClusterE (50),
98 fNBinsClusterPhi (250), fMaxClusterPhi (5.71), fMinClusterPhi (1.39),
99 fNBinsClusterEta (96), fMaxClusterEta (0.7),
100 fMapCell (),
101 fMapCellL1G (), fMapCellL1G2 (),
102 fMapCellL1J (), fMapCellL1J2 (),
103 fMapTrigL0 (), fMapTrigL1 (),
104 fMapTrigL0L1G(), fMapTrigL0L1J(),
105 fMapTrigL1G (), fMapTrigL1G2 (),
106 fMapTrigL1J (), fMapTrigL1J2 ()
107 {
109 }
110 
111 //______________________________________________________________________________
113 //______________________________________________________________________________
115 AliAnalysisTaskSE(name),
116 fOutputList(0), fRecoUtils(0x0),
117 fGeoSet(0), fGeometry(0), fGeoName(""),
118 fOADBSet(kFALSE), fAccessOADB(kTRUE), fOADBFilePath(""),
119 fBitEGA(0), fBitEJE(0),
120 fEtaPhiEnMin(2.),
121 fSTUTotal(0), fTRUTotal(0),
122 fV0Trigger(0), fV0A(0), fV0C(0),
124 fMCData(kFALSE),
125 fFirstSM (0), fLastSM (0),
127 fEventMB (0),
128 fEventL0 (0), fEventL0D (0),
129 fEventL1G (0), fEventL1GD (0),
130 fEventL1G2 (0), fEventL1G2D(0),
131 fEventL1J (0), fEventL1JD (0),
132 fEventL1J2 (0), fEventL1J2D(0),
133 fEventCen (0), fEventSem (0),
134 fMomentum(),
135 //Histograms
136 fhNEvents(0), fhFORAmp(0),
139 fhL0Amp(0), fhL0AmpL1G(0), fhL0AmpL1J(0),
140 fhL1Amp(0), fhL1GAmp(0), fhL1G2Amp(0),
141 fhL1JAmp(0), fhL1J2Amp(0), fhL1FOREnergy(0),
142 fhL0Patch(0), fhL1GPatch(0), fhL1G2Patch(0),
149 fhL1JPatch(0), fhL1J2Patch(0),
150 fhFEESTU(0), fhTRUSTU(0), fhV0STU(0),
155 //Histogram settings
156 fNBinsSTUSignal (300), fMaxSTUSignal (30000),
157 fNBinsTRUSignal (300), fMaxTRUSignal (30000),
158 fNBinsV0Signal (300), fMaxV0Signal (30000),
161 fNBinsClusterE (100), fMaxClusterE (50),
162 fNBinsClusterPhi (250), fMaxClusterPhi (5.71), fMinClusterPhi (1.39),
163 fNBinsClusterEta (96), fMaxClusterEta (0.7),
164 fMapCell (),
167 fMapTrigL0 (), fMapTrigL1 (),
171 {
173 
174  DefineOutput(1, TList::Class());
175 }
176 
177 //______________________________________________
179 //______________________________________________
181 {
182  // Set it only once
183  if(fOADBSet) return ;
184 
185  Int_t runnumber = InputEvent()->GetRunNumber() ;
186 
187  AliInfo(Form("Get AODB parameters from EMCAL in %s for run %d",fOADBFilePath.Data(),runnumber));
188 
189  Int_t nSM = fGeometry->GetNumberOfSuperModules();
190 
191  // Bad map
193  {
194  AliOADBContainer *contBC=new AliOADBContainer("");
195  if(fOADBFilePath!="")
196  contBC->InitFromFile(Form("%s/EMCALBadChannels.root",fOADBFilePath.Data()),"AliEMCALBadChannels");
197  else
198  contBC->InitFromFile(AliDataFile::GetFileNameOADB("EMCAL/EMCALBadChannels.root").data(),"AliEMCALBadChannels");
199 
200  TObjArray *arrayBC=(TObjArray*)contBC->GetObject(runnumber);
201 
202  if(arrayBC)
203  {
204  AliInfo("Remove EMCAL bad cells");
205 
206  for (Int_t i=0; i<nSM; ++i)
207  {
208  TH2I *hbm = fRecoUtils->GetEMCALChannelStatusMap(i);
209 
210  if (hbm)
211  delete hbm;
212 
213  hbm=(TH2I*)arrayBC->FindObject(Form("EMCALBadChannelMap_Mod%d",i));
214  if (!hbm)
215  {
216  AliError(Form("Can not get EMCALBadChannelMap_Mod%d",i));
217  continue;
218  }
219 
220  hbm->SetDirectory(0);
222 
223  //printf("Bad map for SM %d: %3.0f entries\n",i,fRecoUtils->GetEMCALChannelStatusMap(i)->Integral());
224 
225  } // loop
226  } else AliInfo("Do NOT remove EMCAL bad channels"); // run array
227 
228  delete contBC;
229  } // Remove bad
230 
231  fOADBSet = kTRUE;
232 }
233 
234 //________________________________________________
236 //________________________________________________
238 {
239  Int_t posX = -1, posY = -1;
240  Int_t nSupMod = -1, ieta = -1, iphi = -1, nModule = -1, nIphi = -1, nIeta = -1;
241  Short_t absId = -1;
242  Int_t nCells = 0;
243 
244  AliVCaloCells& cells= *(InputEvent()->GetEMCALCells());
245 
246  if(cells.IsEMCAL())
247  {
248  for (Int_t icell = 0; icell < cells.GetNumberOfCells(); icell++)
249  {
250  nCells ++;
251 
252  Double_t amp =0., time = 0., efrac = 0;
253  Int_t mclabel = -1;
254 
255  cells.GetCell(icell, absId, amp, time,mclabel,efrac);
256 
257  fGeometry->GetCellIndex(absId, nSupMod, nModule, nIphi, nIeta);
258  fGeometry->GetCellPhiEtaIndexInSModule(nSupMod, nModule, nIphi, nIeta, iphi, ieta);
259 
260  //
261  // Shift collumns in even SM
262  Int_t shiftEta = AliEMCALGeoParams::fgkEMCALCols;
263 
264  // Shift collumn even more due to smaller acceptance of DCal collumns
265  if ( nSupMod > 11 && nSupMod < 18) shiftEta+=AliEMCALGeoParams::fgkEMCALCols/3;
266 
267  posX = (nSupMod % 2) ? ieta + shiftEta : ieta;
268  posY = iphi + AliEMCALGeoParams::fgkEMCALRows * int(nSupMod / 2);
269 
270  // Shift row less due to smaller acceptance of SM 10 and 11 to count DCal rows
271  if ( nSupMod > 11 && nSupMod < 20) posY -= (2*AliEMCALGeoParams::fgkEMCALRows / 3);
272 
273  Int_t indexX = Int_t(posX/2);
274  Int_t indexY = Int_t(posY/2);
275 
276  if(indexX >= fgkFALTROCols || indexY >= fgkFALTRORows )
277  {
278  AliWarning(Form("Wrong Position (x,y) = (%d,%d)",posX,posY));
279 
280  continue;
281  }
282 
283  // here it is the amplitude for each cell
284  fMapCell[indexY][indexX] += amp;
285 
286  if(fEventL1G || fEventL1GD)
287  {
288  fMapCellL1G[indexY][indexX] += amp;
289  //printf("L1G cell[%i,%i] amp=%f\n",indexY,indexX,fMapCellL1G[indexY][indexX]);
290  }
291 
292  if(fEventL1G2 || fEventL1G2D)
293  {
294  fMapCellL1G2[indexY][indexX] += amp;
295  //printf("L1G2 cell[%i,%i] amp=%f\n",indexY,indexX,fMapCellL1G2[indexY][indexX]);
296  }
297 
298  if(fEventL1J || fEventL1JD) fMapCellL1J [indexY][indexX] += amp;
299  if(fEventL1J2 || fEventL1J2D) fMapCellL1J2[indexY][indexX] += amp;
300 
301  //printf("cell[%i,%i] amp=%f\n",indexY,indexX,fMapCell[indexY][indexX]);
302  }
303  }
304 }
305 
306 //______________________________________________________________________________
308 //______________________________________________________________________________
310 {
311  AliVCaloTrigger& trg= * (InputEvent()->GetCaloTrigger("EMCAL"));
312 
313  fV0Trigger = trg.GetL1V0(0)+trg.GetL1V0(1); // used elsewhere
314 
315  Int_t posX = -1, posY = -1;
316 
317  Int_t nL0Patch = 0 ;
318  //Int_t nL1Patch = 0 ;
319  fSTUTotal = 0;
320  fTRUTotal = 0;
321 
322  trg.Reset();
323  // loop on FASTOR
324 
325  while (trg.Next())
326  {
327  trg.GetPosition(posX,posY);
328 
329  if (posX > -1 && posY > -1)
330  {
331  //L0 analysis
332  Int_t nTimes = 0;
333  trg.GetNL0Times(nTimes);
334  Int_t l0Times[10];
335  trg.GetL0Times(l0Times);
336 
337  Float_t ampL0 = 0.;
338  trg.GetAmplitude(ampL0);
339  if (ampL0 > 0) fMapTrigL0[posY][posX] = ampL0;
340 
341  if(triggerclasses.Contains("CEMC7EGA-B-NOPF-CENTNOTRD") || triggerclasses.Contains("CPBI2EGA") ||
342  triggerclasses.Contains("CPBI2EG1") || triggerclasses.Contains("CINT7EG1-B-NOPF-CENTNOPMD") ||
343  triggerclasses.Contains("CINT7DG1-B-NOPF-CENTNOPMD")) fMapTrigL0L1G[posY][posX] += ampL0;
344 
345  if(triggerclasses.Contains("CEMC7EJE-B-NOPF-CENTNOTRD") || triggerclasses.Contains("CPBI2EJE") ||
346  triggerclasses.Contains("CPBI2EJ1") || triggerclasses.Contains("CINT7EJ1-B-NOPF-CENTNOPMD") ||
347  triggerclasses.Contains("CINT7DJ1-B-NOPF-CENTNOPMD")) fMapTrigL0L1J[posY][posX] += ampL0;
348  fTRUTotal += ampL0;
349 
350  Int_t l0fired = 0;
351  for (Int_t itime = 0; itime < nTimes; itime++)
352  {
353  if (l0Times[itime] > 7 && l0Times[itime] < 10) l0fired = 1;
354  }
355 
356  if (l0fired)
357  {
358  nL0Patch += nTimes;
359  fhL0Patch->Fill(posX,posY);
360  }
361 
362  //L1 analysis
363  Int_t bit = 0;
364  trg.GetTriggerBits(bit);
365 
366  Int_t ts = 0;
367  trg.GetL1TimeSum(ts);
368  if (ts > 0) fMapTrigL1[posY][posX] = ts;
369  fSTUTotal += ts;
370  // cout << "ts =" <<ts<<endl;
371 
372  //L1
373  Bool_t isEGA1 = ((bit >> fBitEGA ) & 0x1) && (fEventL1G || fEventL1GD ) ;
374  Bool_t isEGA2 = ((bit >> (fBitEGA+1)) & 0x1) && (fEventL1G2 || fEventL1G2D) ;
375  Bool_t isEJE1 = ((bit >> fBitEJE ) & 0x1) && (fEventL1J || fEventL1JD ) ;
376  Bool_t isEJE2 = ((bit >> (fBitEJE+1)) & 0x1) && (fEventL1J2 || fEventL1J2D) ;
377 
378  //if(isEGA1 || isEGA2 || isEJE1 || isEJE2) nL1Patch++;
379  //if(isEJE1 || isEJE2) printf("Jet STU patch %d, time sum %d, posX %d , posY %d\n",nL1Patch,ts,posX, posY);
380 
381  // L1-Gamma
382 
383  if (isEGA1)
384  {
385  fhL1GPatch ->Fill(posX,posY);
386  if (ts > 0) fMapTrigL1G [posY][posX] = ts;
387  }
388 
389  if (isEGA2)
390  {
391  fhL1G2Patch->Fill(posX,posY);
392  if (ts > 0) fMapTrigL1G2[posY][posX] = ts;
393  }
394 
395  // L1-Jet
396  if (isEJE1)
397  {
398  fhL1JPatch ->Fill(posX,posY);
399  if (ts > 0) fMapTrigL1J [posY][posX] = ts;
400 
401  }
402 
403  if (isEJE2)
404  {
405  fhL1J2Patch->Fill(posX,posY);
406  if (ts > 0) fMapTrigL1J2[posY][posX] = ts;
407  }
408 
409  }
410  }
411 
412 // // NOT SURE WHY THIS LINE, COMMENT IF NOT CLUSTER HISTO NOT FILLED FOR LHC13
413 // if (!nL0Patch)
414 // {
415 // fEventL0 = kFALSE;
416 // if (!triggerclasses.Contains("CPBI2")) fEventL1G = fEventL1G2 = fEventL1J = fEventL1J2 = kFALSE; // pp running
417 // }
418 
419  if(fTRUTotal > fMaxTRUSignal && DebugLevel() > 0)
420  AliInfo(Form("Large fTRUTotal %f",fTRUTotal));
421 
422  if(fSTUTotal > fMaxSTUSignal && DebugLevel() > 0)
423  AliInfo(Form("Large fSTUTotal %d",fSTUTotal));
424 }
425 
426 //___________________________________________________
429 //___________________________________________________
431 {
432  if(fMCData) return ;
433 
434  // Init OADB
435  if(fAccessOADB) AccessOADB(); // only once
436 
437  //Get Vertex
438  Double_t v[3] = {0,0,0};
439  InputEvent()->GetPrimaryVertex()->GetXYZ(v);
440 
441  //clusters distribution
442  TRefArray* caloClus = new TRefArray();
443  InputEvent()->GetEMCALClusters(caloClus);
444 
445  Int_t nCaloClusters = caloClus->GetEntriesFast();
446 
447  Float_t emax = 0;
448  Float_t etamax = 0;
449  Float_t phimax = 0;
450  Float_t ietamax=-1;
451  Float_t iphimax=-1;
452 
453  Float_t e = 0;
454  Float_t eta = 0;
455  Float_t phi = 0;
456 
457  Int_t nSupMod = -1, nSupModMax = -1, ieta = -1, iphi = -1;
458 
459  //Get vertex for momentum calculation
460  Double_t vertex[] = {0.0,0.0,0.0};
461  //InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
462 
463  Float_t centrality = -1;
465  {
466  if(InputEvent()->GetCentrality()) centrality = InputEvent()->GetCentrality()->GetCentralityPercentile(fCentEstimator);
467  }
468  else
469  {
470  AliMultSelection* multSelection = (AliMultSelection * ) fInputEvent->FindListObject("MultSelection") ;
471  if(multSelection) centrality = multSelection->GetMultiplicityPercentile(fCentEstimator, kTRUE) ;
472  }
473 
474  if(fFillCenHisto)
475  {
476  if( fEventL1G ) fhCentrality[kL1GammaTrig] ->Fill(centrality);
477  if( fEventL1G2 ) fhCentrality[kL1GammaTrig2] ->Fill(centrality);
478  if( fEventL1J ) fhCentrality[kL1JetTrig] ->Fill(centrality);
479  if( fEventL1J2 ) fhCentrality[kL1JetTrig2] ->Fill(centrality);
480  if( fEventL1GD ) fhCentrality[kL1GammaTrigD] ->Fill(centrality);
481  if( fEventL1G2D ) fhCentrality[kL1GammaTrig2D] ->Fill(centrality);
482  if( fEventL1JD ) fhCentrality[kL1JetTrigD] ->Fill(centrality);
483  if( fEventL1J2D ) fhCentrality[kL1JetTrig2D] ->Fill(centrality);
484  if( fEventMB ) fhCentrality[kMBTrig] ->Fill(centrality);
485  if( fEventL0 ) fhCentrality[kL0Trig] ->Fill(centrality);
486  if( fEventCen ) fhCentrality[kCentralTrig] ->Fill(centrality);
487  if( fEventSem ) fhCentrality[kSemiCentralTrig]->Fill(centrality);
488  if( fEventL1G && !fEventL1J) fhCentrality[kL1GammaOnlyTrig] ->Fill(centrality);
489  if( fEventL1J && !fEventL1G) fhCentrality[kL1JetOnlyTrig] ->Fill(centrality);
490  if( fEventL1G2 && !fEventL1G) fhCentrality[kL1Gamma2OnlyGammaTrig]->Fill(centrality);
491  if( fEventL1J2 && !fEventL1J) fhCentrality[kL1Jet2OnlyJetTrig] ->Fill(centrality);
492  }
493 
494  //printf("Centrality %f for estimator %s\n",centrality, fCentEstimator.Data());
495 
496  //if(!fEventMB) printf("MB : %d; L0 : %d; L1-Gam1 : %d; L1-Gam2 : %d; L1-Jet1 : %d; L1-Jet2 : %d; Central : %d; SemiCentral : %d \n",
497  // fEventMB,fEventL0,fEventL1G,fEventL1G2,fEventL1J,fEventL1J2,fEventCen,fEventSem);
498 
499  for(Int_t icalo = 0; icalo < nCaloClusters; icalo++)
500  {
501  AliVCluster *clus = (AliVCluster*) (caloClus->At(icalo));
502 
503  if(!clus->IsEMCAL()) continue;
504 
505  if(!fRecoUtils->IsGoodCluster(clus,fGeometry,InputEvent()->GetEMCALCells(),InputEvent()->GetBunchCrossNumber()))
506  continue;
507 
508  if(clus->GetNCells() < 2) continue ; // Avoid 1 cell clusters, noisy, exotic.
509 
510  clus->GetMomentum(fMomentum, vertex);
511 
512  Bool_t shared = kFALSE;
513  Int_t idAbs = -1, iphi0 = -1, ieta0 = -1;
514  fRecoUtils->GetMaxEnergyCell(fGeometry, InputEvent()->GetEMCALCells(),clus,
515  idAbs,nSupMod,ieta0,iphi0,shared);
516 
517  //Change index to be continuous over SM
518  //
519  // Shift collumns in even SM
520  Int_t shiftEta = AliEMCALGeoParams::fgkEMCALCols;
521 
522  // Shift collumn even more due to smaller acceptance of DCal collumns
523  if ( nSupMod > 11 && nSupMod < 18) shiftEta+=AliEMCALGeoParams::fgkEMCALCols/3;
524 
525  ieta = (nSupMod % 2) ? ieta0 + shiftEta : ieta0;
526  iphi = iphi0 + AliEMCALGeoParams::fgkEMCALRows * int(nSupMod / 2);
527 
528  // Shift row less due to smaller acceptance of SM 10 and 11 to count DCal rows
529  if ( nSupMod > 11 && nSupMod < 20) iphi -= (2*AliEMCALGeoParams::fgkEMCALRows / 3);
530 
531  ieta/=2;
532  iphi/=2;
533 
534  if(ieta > fgkFALTROCols || iphi > fgkFALTRORows )
535  AliWarning(Form("Wrong Position (x,y) = (%d,%d)",ieta,iphi));
536 
537  e = clus->E();
538  eta = fMomentum.Eta();
539  phi = fMomentum.Phi();
540  if( phi < 0 ) phi+=TMath::TwoPi();
541 
542  if(e > emax)
543  {
544  emax = e;
545  etamax = eta;
546  phimax = phi;
547  ietamax = ieta;
548  iphimax = iphi;
549  nSupModMax = nSupMod;
550  }
551 
552  // Fill cluster histograms depending on the event trigger selection
553  if( fEventMB ) FillClusterHistograms(kMBTrig ,kFALSE,e,eta,phi,ieta,iphi,nSupMod,centrality,fV0A+fV0C);
554  if( fEventCen ) FillClusterHistograms(kCentralTrig ,kFALSE,e,eta,phi,ieta,iphi,nSupMod,centrality,fV0A+fV0C);
555  if( fEventSem ) FillClusterHistograms(kSemiCentralTrig,kFALSE,e,eta,phi,ieta,iphi,nSupMod,centrality,fV0A+fV0C);
556 
557  if( fEventL0 ) FillClusterHistograms(kL0Trig ,kFALSE,e,eta,phi,ieta,iphi,nSupMod,centrality,fV0A+fV0C);
558  if( fEventL1G ) FillClusterHistograms(kL1GammaTrig ,kFALSE,e,eta,phi,ieta,iphi,nSupMod,centrality,fV0A+fV0C);
559  if( fEventL1G2) FillClusterHistograms(kL1GammaTrig2 ,kFALSE,e,eta,phi,ieta,iphi,nSupMod,centrality,fV0A+fV0C);
560  if( fEventL1J ) FillClusterHistograms(kL1JetTrig ,kFALSE,e,eta,phi,ieta,iphi,nSupMod,centrality,fV0A+fV0C);
561  if( fEventL1J2) FillClusterHistograms(kL1JetTrig2 ,kFALSE,e,eta,phi,ieta,iphi,nSupMod,centrality,fV0A+fV0C);
562 
563  if( fEventL0D ) FillClusterHistograms(kL0TrigD ,kFALSE,e,eta,phi,ieta,iphi,nSupMod,centrality,fV0A+fV0C);
564  if( fEventL1GD ) FillClusterHistograms(kL1GammaTrigD ,kFALSE,e,eta,phi,ieta,iphi,nSupMod,centrality,fV0A+fV0C);
565  if( fEventL1G2D) FillClusterHistograms(kL1GammaTrig2D ,kFALSE,e,eta,phi,ieta,iphi,nSupMod,centrality,fV0A+fV0C);
566  if( fEventL1JD ) FillClusterHistograms(kL1JetTrigD ,kFALSE,e,eta,phi,ieta,iphi,nSupMod,centrality,fV0A+fV0C);
567  if( fEventL1J2D) FillClusterHistograms(kL1JetTrig2D ,kFALSE,e,eta,phi,ieta,iphi,nSupMod,centrality,fV0A+fV0C);
568 
569  if( fEventL0 && !fEventL0D ) FillClusterHistograms(kL0TrigPureEMC , kFALSE,e,eta,phi,ieta,iphi,nSupMod,centrality,fV0A+fV0C);
570  if( !fEventL0 && fEventL0D ) FillClusterHistograms(kL0TrigPureDMC , kFALSE,e,eta,phi,ieta,iphi,nSupMod,centrality,fV0A+fV0C);
571  if( fEventL1G && !fEventL1GD ) FillClusterHistograms(kL1GTrigPureEMC, kFALSE,e,eta,phi,ieta,iphi,nSupMod,centrality,fV0A+fV0C);
572  if( !fEventL1G && fEventL1GD ) FillClusterHistograms(kL1GTrigPureDMC, kFALSE,e,eta,phi,ieta,iphi,nSupMod,centrality,fV0A+fV0C);
573  if( fEventL1J && !fEventL1JD ) FillClusterHistograms(kL1JTrigPureEMC, kFALSE,e,eta,phi,ieta,iphi,nSupMod,centrality,fV0A+fV0C);
574  if( !fEventL1J && fEventL1JD ) FillClusterHistograms(kL1JTrigPureDMC, kFALSE,e,eta,phi,ieta,iphi,nSupMod,centrality,fV0A+fV0C);
575 
576  if( fEventL1G2 && !fEventL1G) FillClusterHistograms(kL1Gamma2OnlyGammaTrig,kFALSE,e,eta,phi,ieta,iphi,nSupMod,centrality,fV0A+fV0C);
577  if( fEventL1J2 && !fEventL1J) FillClusterHistograms(kL1Jet2OnlyJetTrig ,kFALSE,e,eta,phi,ieta,iphi,nSupMod,centrality,fV0A+fV0C);
578 
579  if( fEventL1G2D && !fEventL1GD) FillClusterHistograms(kL1Gamma2OnlyGammaTrigD,kFALSE,e,eta,phi,ieta,iphi,nSupMod,centrality,fV0A+fV0C);
580  if( fEventL1J2D && !fEventL1JD) FillClusterHistograms(kL1Jet2OnlyJetTrigD ,kFALSE,e,eta,phi,ieta,iphi,nSupMod,centrality,fV0A+fV0C);
581 
582 
583  if( fEventL1G && !fEventL1J )
584  FillClusterHistograms (kL1GammaOnlyTrig,kFALSE,e,eta,phi,ieta,iphi,nSupMod,centrality,fV0A+fV0C);
585 
586  if( fEventL1J && !fEventL1G )
587  FillClusterHistograms (kL1JetOnlyTrig ,kFALSE,e,eta,phi,ieta,iphi,nSupMod,centrality,fV0A+fV0C);
588 
589  if( fEventL1GD && !fEventL1JD )
590  FillClusterHistograms (kL1GammaOnlyTrig,kFALSE,e,eta,phi,ieta,iphi,nSupMod,centrality,fV0A+fV0C);
591 
592  if( fEventL1JD && !fEventL1GD )
593  FillClusterHistograms (kL1JetOnlyTrig ,kFALSE,e,eta,phi,ieta,iphi,nSupMod,centrality,fV0A+fV0C);
594 
595  if(!fEventL1G && !fEventL1J && !fEventL0 && !fEventL1GD && !fEventL1JD && !fEventL0D)
596  {
597  if( fEventMB ) fhClusMBPure[0] ->Fill(e);
598  if( fEventCen ) fhClusMBPure[1] ->Fill(e);
599  if( fEventSem ) fhClusMBPure[2] ->Fill(e);
600  }
601 
602  }
603 
604  // Maximum energy cluster per event histograms
605 
606  if( fEventMB ) FillClusterHistograms(kMBTrig ,kTRUE,emax,etamax,phimax,ietamax,iphimax,nSupModMax,centrality,fV0A+fV0C);
607  if( fEventCen ) FillClusterHistograms(kCentralTrig ,kTRUE,emax,etamax,phimax,ietamax,iphimax,nSupModMax,centrality,fV0A+fV0C);
608  if( fEventSem ) FillClusterHistograms(kSemiCentralTrig,kTRUE,emax,etamax,phimax,ietamax,iphimax,nSupModMax,centrality,fV0A+fV0C);
609 
610  if( fEventL0 ) FillClusterHistograms(kL0Trig ,kTRUE,emax,etamax,phimax,ietamax,iphimax,nSupModMax,centrality,fV0A+fV0C);
611  if( fEventL1G ) FillClusterHistograms(kL1GammaTrig ,kTRUE,emax,etamax,phimax,ietamax,iphimax,nSupModMax,centrality,fV0A+fV0C);
612  if( fEventL1G2) FillClusterHistograms(kL1GammaTrig2 ,kTRUE,emax,etamax,phimax,ietamax,iphimax,nSupModMax,centrality,fV0A+fV0C);
613  if( fEventL1J ) FillClusterHistograms(kL1JetTrig ,kTRUE,emax,etamax,phimax,ietamax,iphimax,nSupModMax,centrality,fV0A+fV0C);
614  if( fEventL1J2) FillClusterHistograms(kL1JetTrig2 ,kTRUE,emax,etamax,phimax,ietamax,iphimax,nSupModMax,centrality,fV0A+fV0C);
615 
616  if( fEventL0D ) FillClusterHistograms(kL0TrigD ,kTRUE,emax,etamax,phimax,ietamax,iphimax,nSupModMax,centrality,fV0A+fV0C);
617  if( fEventL1GD ) FillClusterHistograms(kL1GammaTrigD ,kTRUE,emax,etamax,phimax,ietamax,iphimax,nSupModMax,centrality,fV0A+fV0C);
618  if( fEventL1G2D) FillClusterHistograms(kL1GammaTrig2D ,kTRUE,emax,etamax,phimax,ietamax,iphimax,nSupModMax,centrality,fV0A+fV0C);
619  if( fEventL1JD ) FillClusterHistograms(kL1JetTrigD ,kTRUE,emax,etamax,phimax,ietamax,iphimax,nSupModMax,centrality,fV0A+fV0C);
620  if( fEventL1J2D) FillClusterHistograms(kL1JetTrig2D ,kTRUE,emax,etamax,phimax,ietamax,iphimax,nSupModMax,centrality,fV0A+fV0C);
621 
622  if( fEventL0 && !fEventL0D ) FillClusterHistograms(kL0TrigPureEMC , kTRUE,emax,etamax,phimax,ietamax,iphimax,nSupModMax,centrality,fV0A+fV0C);
623  if( !fEventL0 && fEventL0D ) FillClusterHistograms(kL0TrigPureDMC , kTRUE,emax,etamax,phimax,ietamax,iphimax,nSupModMax,centrality,fV0A+fV0C);
624  if( fEventL1G && !fEventL1GD ) FillClusterHistograms(kL1GTrigPureEMC, kTRUE,emax,etamax,phimax,ietamax,iphimax,nSupModMax,centrality,fV0A+fV0C);
625  if( !fEventL1G && fEventL1GD ) FillClusterHistograms(kL1GTrigPureDMC, kTRUE,emax,etamax,phimax,ietamax,iphimax,nSupModMax,centrality,fV0A+fV0C);
626  if( fEventL1J && !fEventL1JD ) FillClusterHistograms(kL1JTrigPureEMC, kTRUE,emax,etamax,phimax,ietamax,iphimax,nSupModMax,centrality,fV0A+fV0C);
627  if( !fEventL1J && fEventL1JD ) FillClusterHistograms(kL1JTrigPureDMC, kTRUE,emax,etamax,phimax,ietamax,iphimax,nSupModMax,centrality,fV0A+fV0C);
628 
629  if( fEventL1G2 && !fEventL1G) FillClusterHistograms(kL1Gamma2OnlyGammaTrig,kTRUE,emax,etamax,phimax,ietamax,iphimax,nSupModMax,centrality,fV0A+fV0C);
630  if( fEventL1J2 && !fEventL1J) FillClusterHistograms(kL1Jet2OnlyJetTrig ,kTRUE,emax,etamax,phimax,ietamax,iphimax,nSupModMax,centrality,fV0A+fV0C);
631 
632  if( fEventL1G2D && !fEventL1GD) FillClusterHistograms(kL1Gamma2OnlyGammaTrigD,kTRUE,emax,etamax,phimax,ietamax,iphimax,nSupModMax,centrality,fV0A+fV0C);
633  if( fEventL1J2D && !fEventL1JD) FillClusterHistograms(kL1Jet2OnlyJetTrigD ,kTRUE,emax,etamax,phimax,ietamax,iphimax,nSupModMax,centrality,fV0A+fV0C);
634 
635  if( fEventL1GD && !fEventL1JD )
636  FillClusterHistograms (kL1GammaOnlyTrigD,kTRUE,emax,etamax,phimax,ietamax,iphimax,nSupModMax,centrality,fV0A+fV0C);
637  if( fEventL1JD && !fEventL1GD )
638  FillClusterHistograms (kL1JetOnlyTrigD ,kTRUE,emax,etamax,phimax,ietamax,iphimax,nSupModMax,centrality,fV0A+fV0C);
639 
640  if(!fEventL1G && !fEventL1J && !fEventL0 && !fEventL1GD && !fEventL1JD && !fEventL0D)
641  {
642  if( fEventMB ) fhClusMaxMBPure[0] ->Fill(emax);
643  if( fEventCen ) fhClusMaxMBPure[1] ->Fill(emax);
644  if( fEventSem ) fhClusMaxMBPure[2] ->Fill(emax);
645  }
646 }
647 
648 //______________________________________________________________________________________________
651 //______________________________________________________________________________________________
653  Float_t e, Float_t eta, Float_t phi,
654  Float_t ieta, Float_t iphi, Int_t nSupMod,
655  Float_t centrality, Float_t fV0AC)
656 {
657  if(!max)
658  {
659  fhClus [triggerNumber]->Fill(e);
660  if(fFillCenHisto) fhClusCen[triggerNumber]->Fill(e,centrality);
661  if(fFillV0SigHisto) fhClusV0 [triggerNumber]->Fill(e,fV0AC);
662 
663  if ( nSupMod >= fFirstSM && nSupMod <= fLastSM )
664  {
665  fhClusSM [triggerNumber][nSupMod]->Fill(e);
666  if(fFillCenHisto) fhClusCenSM[triggerNumber][nSupMod]->Fill(e,centrality);
667  if(fFillV0SigHisto) fhClusV0SM [triggerNumber][nSupMod]->Fill(e,fV0AC);
668  }
669 
671  {
672  // just fill 2
673  if(e > fEtaPhiEnMin) fhClusEtaPhiHigh[triggerNumber]->Fill( eta, phi);
674  else fhClusEtaPhiLow [triggerNumber]->Fill( eta, phi);
675  }
676  else
677  {
678  fhClusEta[triggerNumber]->Fill(e,eta);
679  fhClusPhi[triggerNumber]->Fill(e,phi);
680 
681  if(e > fEtaPhiEnMin)
682  {
683  fhClusEtaPhiHigh [triggerNumber]->Fill( eta, phi);
684  fhClusEtaPhiHighCellMax[triggerNumber]->Fill(ieta,iphi);
685  }
686  else
687  {
688  fhClusEtaPhiLow [triggerNumber]->Fill( eta, phi);
689  fhClusEtaPhiLowCellMax[triggerNumber]->Fill(ieta,iphi);
690  }
691  }
692  }
693  else
694  {
695  fhClusMax [triggerNumber]->Fill(e);
696  if(fFillCenHisto) fhClusCenMax[triggerNumber]->Fill(e,centrality);
697  if(fFillV0SigHisto) fhClusV0Max [triggerNumber]->Fill(e,fV0AC);
698 
700  {
701  fhClusEtaMax[triggerNumber]->Fill(e,eta);
702  fhClusPhiMax[triggerNumber]->Fill(e,phi);
703 
704  if(e > fEtaPhiEnMin)
705  {
706  fhClusEtaPhiHighCluMax [triggerNumber]->Fill( eta, phi);
707  fhClusEtaPhiHighCellMaxCluMax[triggerNumber]->Fill(ieta,iphi);
708  }
709  else
710  {
711  fhClusEtaPhiLowCluMax [triggerNumber]->Fill( eta, phi);
712  fhClusEtaPhiLowCellMaxCluMax[triggerNumber]->Fill(ieta,iphi);
713  }
714  }
715  }
716 }
717 
718 //_____________________________________________________________
720 //_____________________________________________________________
722 {
723  Double_t ampFOR[60] = {0.}, ampL0[60] = {0.}, ampL1[60] = {0.};
724  for (Int_t i = 0; i < fgkFALTRORows; i++)
725  {
726  for (Int_t j = 0; j < fgkFALTROCols; j++)
727  {
728  //method to get TRU number
729  Int_t idFOR = -1;
730  fGeometry->GetAbsFastORIndexFromPositionInEMCAL(j,i,idFOR);
731  Int_t iTRU = -1;
732  Int_t iADC = -1;
733  fGeometry->GetTRUFromAbsFastORIndex(idFOR,iTRU,iADC);
734 
735  //printf("i %d, j %d, iTRU %d, iADC %d, idFOR %d; cell %f, L0 %f, L1 %f\n",
736  // i,j,iTRU,iADC,idFOR, fMapCell [i][j],fMapTrigL0[i][j],fMapTrigL1[i][j]);
737 
738  if (iTRU >= 0)
739  {
740  ampFOR[iTRU] += fMapCell [i][j];
741  ampL0[iTRU] += fMapTrigL0[i][j];
742  ampL1[iTRU] += fMapTrigL1[i][j];
743  }
744  }
745  }
746 
747  // FEE vs STU and TRU vs STU ratios
748  for (Int_t i = 0; i < 60; i++)
749  {
750  if (ampFOR[i] != 0 && ampL1[i] != 0)
751  {
752  fhFEESTU->Fill(ampL1[i]/ampFOR[i],i);
753  if(ampL1[i]/ampFOR[i] > fMaxSTUFEERatio && DebugLevel() > 0 )
754  AliWarning(Form("Large STU/FEE ratio %f",ampL1[i]/ampFOR[i]));
755  }
756 
757  if (ampL0[i] != 0 && ampL1[i] != 0)
758  {
759  fhTRUSTU->Fill(ampL1[i]/ampL0[i] ,i);
760  if(ampL1[i]/ampL0[i] > fMaxSTUTRURatio && DebugLevel() > 0 )
761  AliWarning(Form("Large STU/TRU ratio %f",ampL1[i]/ampL0[i]));
762  }
763  }
764 }
765 
766 //_____________________________________________________________
768 //_____________________________________________________________
770 {
771  fhNEvents->Fill(0.5); // All physics events
772 
773  if( fEventMB )
774  {
775  fhNEvents->Fill(1.5);
776  if( !fEventL1G && !fEventL1J && !fEventL1G2 && !fEventL1J2 && !fEventL0 ) fhNEvents->Fill(12.5);
777  }
778  else
779  {
780  if( fEventL0 ) fhNEvents->Fill(13.5);
781  if( fEventL1G ) fhNEvents->Fill(14.5);
782  if( fEventL1J ) fhNEvents->Fill(15.5);
783  }
784 
785  if( fEventCen) fhNEvents->Fill(2.5);
786  if( fEventSem) fhNEvents->Fill(3.5);
787 
788  if( fEventL0 )
789  {
790  fhNEvents->Fill(4.5);
791  }
792 
793  if( fEventL1G )
794  {
795  fhNEvents->Fill(5.5);
796  if(!fEventL1J) fhNEvents->Fill(9.5);
797  if(fEventCen || fEventSem) fhNEvents->Fill(16.5);
798  }
799 
800  if( fEventL1G2 )
801  {
802  fhNEvents->Fill(6.5);
803  if( !fEventL1G ) fhNEvents->Fill(18.5);
804 
805  }
806 
807  if( fEventL1J )
808  {
809  fhNEvents->Fill(7.5);
810  if(!fEventL1G) fhNEvents->Fill(10.5);
811  if(fEventCen || fEventSem) fhNEvents->Fill(17.5);
812  }
813 
814  if( fEventL1J2 )
815  {
816  fhNEvents->Fill(8.5);
817  if( !fEventL1J ) fhNEvents->Fill(19.5);
818  }
819 
820  if(fEventL1J && fEventL1G) fhNEvents->Fill(11.5);
821 
822  if( fEventL0D ) fhNEvents->Fill(20.5);
823  if( fEventL1GD ) fhNEvents->Fill(21.5);
824  if( fEventL1JD ) fhNEvents->Fill(22.5);
825 
826  if( fEventL0 && !fEventL0D ) fhNEvents->Fill(23.5);
827  if( fEventL1G && !fEventL1GD ) fhNEvents->Fill(24.5);
828  if( fEventL1J && !fEventL1JD ) fhNEvents->Fill(25.5);
829 }
830 
831 //______________________________________________________________
833 //______________________________________________________________
835 {
836  // Study fakes - Make it more understandable!!!
837 
838  Int_t areAllFakes = 2;
839  Int_t numberpatchNotFake = 0;
840  Int_t numberpatchFake = 0;
841 
842  Int_t threshold = 10;// it's not GeV it's ADC !!
843  Bool_t enoughE = kFALSE;
844  Double_t patchMax = 0;
845  Int_t colMax = -1;
846  Int_t rowMax = -1;
847  Int_t shiftCol = -1;
848  Int_t shiftRow = -1;
849 
850  // loop on patches
851  for (Int_t posx = 0; posx < fgkFALTROCols; posx++)
852  {
853  for (Int_t posy = 0; posy < fgkFALTRORows; posy++)
854  {
855  Double_t patchEnergy = 0;
856 
857  if(fMapTrigL1G[posy][posx] > 0)
858  {
859  for(Int_t irow = 0; irow < 2; irow++)
860  {
861  for(Int_t icol = 0; icol < 2; icol++)
862  {
863  // loop on cells
864  shiftCol = posx+icol;
865  shiftRow = posy+irow;
866 
867  // printf("cell[%i,%i]=%f\n",posy+icol,posx+irow, fMapCellL1G[posy+icol][posx+irow]);
868  if(shiftRow < fgkFALTRORows && shiftCol < fgkFALTROCols)
869  {
870  patchEnergy += fMapCellL1G[shiftRow][shiftCol] ;
871 
872  if( fMapCellL1G[shiftRow][shiftCol] > threshold/2 ) enoughE = kTRUE;
873  }
874  }
875  }
876 
877  if (patchEnergy > patchMax)
878  {
879  patchMax = patchEnergy;
880  colMax = posx;
881  rowMax = posy;
882  }
883 
884  if(patchEnergy>threshold || (patchEnergy>threshold-3 && enoughE))
885  {
886  numberpatchNotFake++;
887  fhL1GPatchNotFake ->Fill(posx,posy);
888  fhL1GPatchNotFakeE->Fill(patchEnergy);
889  areAllFakes = 1;
890  }
891  else
892  {
893  numberpatchFake++;
894  areAllFakes = 0;
895  fhL1GPatchFake ->Fill(posx,posy);
896  fhL1GPatchFakeE->Fill(patchEnergy);
897  }
898  }
899  }
900  }
901 
902  fhNPatchNotFake->Fill(areAllFakes,numberpatchNotFake);
903  fhNPatchFake ->Fill(areAllFakes,numberpatchFake);
904 
905  if(areAllFakes == 0)
906  {
907  // loop on patchs
908  for (Int_t col = 0; col < fgkFALTROCols; col++)
909  {
910  for (Int_t row = 0; row < fgkFALTRORows; row++)
911  {
912  if(fMapTrigL1G[row][col] > 0)
913  {
914  // cout <<"checking fMapTrigL1G[row][col]"<<fMapTrigL1G[row][col]<<endl;
915  fhL1GPatchAllFake->Fill(col,row);
916 
917  Double_t patchEnergy=0;
918  for(Int_t irow = 0; irow < 2; irow++)
919  {
920  for(Int_t icol = 0; icol < 2; icol++)
921  {
922  shiftCol = col+icol;
923  shiftRow = row+irow;
924 
925  if(shiftRow < fgkFALTRORows && shiftCol < fgkFALTROCols)
926  patchEnergy += fMapCellL1G[shiftRow][shiftCol] ;
927 
928  }
929  }
930  fhL1GPatchAllFakeE->Fill(patchEnergy);
931  }
932  }
933  }
934  // cout << "row max"<<rowMax<<" colmax"<<colMax<< " fMapTrigL1G[rowMax][colMax]"<< fMapTrigL1G[rowMax][colMax]<<endl;
935 
936  if(fMapTrigL1G[rowMax][colMax] > 0)
937  {
938  // printf("\npatch max [%i,%i] = %f\n",rowMax,colMax,patchMax);
939  fhL1GPatchAllFakeMax ->Fill(colMax,rowMax);
940  fhL1GPatchAllFakeMaxE->Fill(patchMax);
941  }
942  }
943  else
944  {
945  // loop on patches
946  for (Int_t col = 0; col < fgkFALTROCols; col++)
947  {
948  for (Int_t row = 0; row < fgkFALTRORows; row++)
949  {
950  if(fMapTrigL1G[row][col] > 0)
951  {
952  fhL1GPatchNotAllFake->Fill(col,row);
953 
954  Double_t patchEnergy = 0;
955  for(Int_t irow = 0; irow < 2; irow++)
956  {
957  for(Int_t icol = 0; icol < 2; icol++)
958  {
959  shiftCol = col+icol;
960  shiftRow = row+irow;
961 
962  if(shiftRow < fgkFALTRORows && shiftCol < fgkFALTROCols)
963  patchEnergy += fMapCellL1G[shiftRow][shiftCol] ;
964  }
965  }
966 
967  fhL1GPatchNotAllFakeE->Fill(patchEnergy);
968 
969  }
970  }
971  }
972 
973  if(fMapTrigL1G[rowMax][colMax] > 0 )
974  {
975  fhL1GPatchNotAllFakeMax ->Fill(colMax,rowMax);
976  fhL1GPatchNotAllFakeMaxE->Fill(patchMax);
977  }
978  }
979 
980  if( fFillV0SigHisto ) fhGPMaxVV0TT->Fill(fV0Trigger, patchMax);
981  if( fEventL1G ) fhL1GPatchMax ->Fill(colMax,rowMax);
982  if( fEventL1G2 ) fhL1G2PatchMax->Fill(colMax,rowMax);
983 }
984 
985 //____________________________________________________________
987 //____________________________________________________________
989 {
990  Double_t patchMax = 0;
991  Int_t colMax = -1;
992  Int_t rowMax = -1;
993  Int_t col, row = 0;
994 
995  for (Int_t i = 0; i < 9; i++)
996  {
997  for (Int_t j = 0; j < 12; j++)
998  {
999  Int_t patchJ = 0;
1000  col = i;
1001  row = j;
1002 
1003  for (Int_t k = 0; k < 16; k++)
1004  {
1005  for (Int_t l = 0; l < 16; l++)
1006  {
1007  patchJ += Int_t(fMapTrigL1[4*j + l][4*i + k]);
1008  }
1009  }
1010 
1011  if (patchJ > patchMax)
1012  {
1013  patchMax = patchJ;
1014  colMax = 4*col;
1015  rowMax = 4*row;
1016  }
1017  }
1018  }
1019 
1020  if( fFillV0SigHisto ) fhJPMaxVV0TT->Fill(fV0Trigger, patchMax);
1021  if( fEventL1J ) fhL1JPatchMax ->Fill(colMax,rowMax);
1022  if( fEventL1J2 ) fhL1J2PatchMax->Fill(colMax,rowMax);
1023 }
1024 
1025 //______________________________________________________
1027 //______________________________________________________
1029 {
1030  for (Int_t i = 0; i < fgkFALTRORows; i++)
1031  {
1032  for (Int_t j = 0; j < fgkFALTROCols; j++) //check x,y direction for reading FOR ((0,0) = top left);
1033  {
1034  fhFORAmp ->Fill( j, i, fMapCell [i][j]);
1035  fhFORAmpL1G ->Fill( j, i, fMapCellL1G [i][j]);
1036  fhFORAmpL1G2->Fill( j, i, fMapCellL1G2 [i][j]);
1037  fhFORAmpL1J ->Fill( j, i, fMapCellL1J [i][j]);
1038  fhFORAmpL1J2->Fill( j, i, fMapCellL1J2 [i][j]);
1039  fhL0Amp ->Fill( j, i, fMapTrigL0 [i][j]);
1040  fhL0AmpL1G ->Fill( j, i, fMapTrigL0L1G[i][j]);
1041  fhL0AmpL1J ->Fill( j, i, fMapTrigL0L1J[i][j]);
1042  fhL1Amp ->Fill( j, i, fMapTrigL1 [i][j]);
1043 
1044  fhL1FOREnergy->Fill(i+fgkFALTRORows*j, fMapTrigL1 [i][j]);
1045  fhL1GAmp ->Fill( j, i, fMapTrigL1G [i][j]);
1046  fhL1G2Amp ->Fill( j, i, fMapTrigL1G2 [i][j]);
1047  fhL1JAmp ->Fill( j, i, fMapTrigL1J [i][j]);
1048  fhL1J2Amp ->Fill( j, i, fMapTrigL1J2 [i][j]);
1049  fhFORMeanAmp->Fill( j, i, fMapCell [i][j]);
1050  fhL0MeanAmp ->Fill( j, i, fMapTrigL0 [i][j]);
1051  fhL1MeanAmp ->Fill( j, i, fMapTrigL1 [i][j]);
1052  }
1053  }
1054 }
1055 
1056 //____________________________________________________
1058 //____________________________________________________
1060 {
1061  AliESDVZERO* eventV0 = dynamic_cast<AliESDVZERO*> (InputEvent()->GetVZEROData());
1062 
1063  if(eventV0)
1064  {
1065  for (Int_t i = 0; i < 32; i++)
1066  {
1067  fV0C += eventV0->GetAdcV0C(i);
1068  fV0A += eventV0->GetAdcV0A(i);
1069  }
1070 
1071  if (fSTUTotal != 0 && fFillV0SigHisto)
1072  {
1073  fhV0STU->Fill(fV0A+fV0C,fSTUTotal);
1074 
1075  if( fV0A+fV0C > fMaxV0Signal && DebugLevel() > 0)
1076  AliWarning(Form("Large fV0A+fV0C %f",fV0A+fV0C));
1077  }
1078 
1079  //printf("V0A %f, V0C %f\n",fV0A,fV0C);
1080 
1081  // Not interesting in case of data analysis, REVISE in future
1082  if(fMCData || !fFillV0SigHisto) return ;
1083 
1084  if( fEventL1G ) fhV0[kL1GammaTrig] ->Fill(fV0A+fV0C);
1085  if( fEventL1G2 ) fhV0[kL1GammaTrig2] ->Fill(fV0A+fV0C);
1086  if( fEventL1J ) fhV0[kL1JetTrig] ->Fill(fV0A+fV0C);
1087  if( fEventL1J2 ) fhV0[kL1JetTrig2] ->Fill(fV0A+fV0C);
1088  if( fEventL1GD ) fhV0[kL1GammaTrigD] ->Fill(fV0A+fV0C);
1089  if( fEventL1G2D ) fhV0[kL1GammaTrig2D] ->Fill(fV0A+fV0C);
1090  if( fEventL1JD ) fhV0[kL1JetTrigD] ->Fill(fV0A+fV0C);
1091  if( fEventL1J2D ) fhV0[kL1JetTrig2D] ->Fill(fV0A+fV0C);
1092  if( fEventMB ) fhV0[kMBTrig] ->Fill(fV0A+fV0C);
1093  if( fEventL0 ) fhV0[kL0Trig] ->Fill(fV0A+fV0C);
1094  if( fEventCen ) fhV0[kCentralTrig] ->Fill(fV0A+fV0C);
1095  if( fEventSem ) fhV0[kSemiCentralTrig]->Fill(fV0A+fV0C);
1096  if( fEventL1G && !fEventL1J) fhV0[kL1GammaOnlyTrig] ->Fill(fV0A+fV0C);
1097  if( fEventL1J && !fEventL1G) fhV0[kL1JetOnlyTrig] ->Fill(fV0A+fV0C);
1100  //if(nL0Patch!=0 || nL1Patch!=0) printf("total TRU %f, total STU %f, V0C+V0A %f; nL0 %d, nL1 %d \n",
1101  // fTRUTotal,fSTUTotal,fV0A+fV0C,nL0Patch,nL1Patch);
1102  }
1103 }
1104 
1105 //________________________________________
1107 //________________________________________
1109 {
1110  if(!fRecoUtils)
1111  {
1114  }
1115 }
1116 
1117 //_____________________________________________________
1120 //_____________________________________________________
1122 {
1123  for (Int_t i = 0; i < fgkFALTRORows; i++)
1124  {
1125  for (Int_t j = 0; j < fgkFALTROCols; j++)
1126  {
1127  fMapTrigL0 [i][j] = 0.;
1128  fMapTrigL0L1G[i][j] = 0.;
1129  fMapTrigL0L1J[i][j] = 0.;
1130  fMapTrigL1G [i][j] = 0.;
1131  fMapTrigL1G2 [i][j] = 0.;
1132  fMapTrigL1J [i][j] = 0.;
1133  fMapTrigL1J2 [i][j] = 0.;
1134  fMapTrigL1 [i][j] = 0.;
1135  fMapCell [i][j] = 0.;
1136  fMapCellL1G [i][j] = 0.;
1137  fMapCellL1G2 [i][j] = 0.;
1138  fMapCellL1J [i][j] = 0.;
1139  fMapCellL1J2 [i][j] = 0.;
1140  }
1141  }
1142 }
1143 
1144 //________________________________________________
1148 //________________________________________________
1150 {
1151  if(fGeoSet) return;
1152 
1153  // Init the trigger bit once, correct depending on version
1154  fBitEGA = 4;
1155  fBitEJE = 5;
1156 
1157  TFile* file = AliAnalysisManager::GetAnalysisManager()->GetTree()->GetCurrentFile();
1158 
1159  const TList *clist = file->GetStreamerInfoCache();
1160 
1161  if(clist)
1162  {
1163  TStreamerInfo *cinfo = (TStreamerInfo*)clist->FindObject("AliESDCaloTrigger");
1164  Int_t verid = 5; // newer ESD header version
1165  if(!cinfo)
1166  {
1167  cinfo = (TStreamerInfo*)clist->FindObject("AliAODCaloTrigger");
1168  verid = 3; // newer AOD header version
1169  }
1170  if(cinfo)
1171  {
1172  Int_t classversionid = cinfo->GetClassVersion();
1173  //printf("********* Header class version %d *********** \n",classversionid);
1174 
1175  if (classversionid >= verid)
1176  {
1177  fBitEGA = 6;
1178  fBitEJE = 8;
1179  }
1180  } else AliInfo("Streamer info for trigger class not available, bit not changed");
1181  } else AliInfo("Streamer list not available!, bit not changed");
1182 
1183  Int_t runnumber = InputEvent()->GetRunNumber() ;
1184 
1185  if (!fGeometry)
1186  {
1187  if(fGeoName=="")
1188  {
1189  fGeometry = AliEMCALGeometry::GetInstanceFromRunNumber(runnumber);
1190  AliInfo(Form("Get EMCAL geometry name to <%s> for run %d",fGeometry->GetName(),runnumber));
1191  }
1192  else
1193  {
1194  fGeometry = AliEMCALGeometry::GetInstance(fGeoName);
1195  AliInfo(Form("Set EMCAL geometry name to <%s>",fGeoName.Data()));
1196  }
1197  }
1198 
1199  fGeoSet = kTRUE;
1200 }
1201 
1202 //_______________________________________________________
1204 //_______________________________________________________
1206 {
1207  for (Int_t i = 0; i < fgkTriggerCombi; i++)
1208  {
1209  fhV0 [i] = 0; fhCentrality[i] = 0;
1210  fhClus [i] = 0; fhClusMax [i] = 0;
1211  fhClusCen[i] = 0; fhClusCenMax[i] = 0;
1212  fhClusV0 [i] = 0; fhClusV0Max [i] = 0;
1213  fhClusEta[i] = 0; fhClusEtaMax[i] = 0;
1214  fhClusPhi[i] = 0; fhClusPhiMax[i] = 0;
1215 
1216  fhClusEtaPhiHigh [i] = 0; fhClusEtaPhiHighCluMax [i] = 0;
1218  fhClusEtaPhiLow [i] = 0; fhClusEtaPhiLowCluMax [i] = 0;
1220 
1221  if(i<3){ fhClusMBPure[i] = 0; fhClusMaxMBPure[i] = 0; }
1222 
1223  for(Int_t ism = 0; ism < 20; ism++)
1224  {
1225  fhClusSM [i][ism] = 0;
1226  fhClusCenSM[i][ism] = 0;
1227  fhClusV0SM [i][ism] = 0;
1228  }
1229  }
1230 }
1231 
1232 //_____________________________________________________________________________
1234 //_____________________________________________________________________________
1236 {
1237  // Init trigger event bit
1238 
1239  fEventMB = kFALSE;
1240  fEventL0 = kFALSE;
1241  fEventL1G = kFALSE;
1242  fEventL1G2 = kFALSE;
1243  fEventL1J = kFALSE;
1244  fEventL1J2 = kFALSE;
1245  fEventL0D = kFALSE;
1246  fEventL1GD = kFALSE;
1247  fEventL1G2D= kFALSE;
1248  fEventL1JD = kFALSE;
1249  fEventL1J2D= kFALSE;
1250  fEventCen = kFALSE;
1251  fEventSem = kFALSE;
1252 
1253  // Minimum bias event trigger?
1254  if((triggerclasses.Contains("CINT7") || triggerclasses.Contains("CPBI2_B1") ) &&
1255  (triggerclasses.Contains("-B-") || triggerclasses.Contains("-I-")) &&
1256  triggerclasses.Contains("-NOPF") ) fEventMB = kTRUE;
1257  //triggerclasses.Contains("-NOPF-ALLNOTRD") ) fEventMB = kTRUE;
1258 
1259  //if(triggerclasses.Contains("CINT7-B-NOPF-CENT")) fEventMB = kTRUE;
1260 
1261  if(fMCData && triggerclasses.Contains("MB")) fEventMB = kTRUE;
1262 
1263  // EMC triggered event? Which type?
1264  if( triggerclasses.Contains("-B-") || triggerclasses.Contains("-S-") || triggerclasses.Contains("-I-") )
1265  {
1266  if( triggerclasses.Contains("CEMC") &&
1267  !triggerclasses.Contains("EGA" ) &&
1268  !triggerclasses.Contains("EJE" ) &&
1269  !triggerclasses.Contains("EG1" ) &&
1270  !triggerclasses.Contains("EJ1" ) &&
1271  !triggerclasses.Contains("EG2" ) &&
1272  !triggerclasses.Contains("EJ2" ) ) fEventL0 = kTRUE;
1273 
1274  if( triggerclasses.Contains("CDMC") &&
1275  !triggerclasses.Contains("DGA" ) &&
1276  !triggerclasses.Contains("DJE" ) &&
1277  !triggerclasses.Contains("DG1" ) &&
1278  !triggerclasses.Contains("DJ1" ) &&
1279  !triggerclasses.Contains("DG2" ) &&
1280  !triggerclasses.Contains("DJ2" ) ) fEventL0D = kTRUE;
1281 
1282 
1283  if( triggerclasses.Contains("EGA" ) || triggerclasses.Contains("EG1" ) ) fEventL1G = kTRUE;
1284  if( triggerclasses.Contains("EG2" ) ) fEventL1G2 = kTRUE;
1285 
1286  if( triggerclasses.Contains("DGA" ) || triggerclasses.Contains("DG1" ) ) fEventL1GD = kTRUE;
1287  if( triggerclasses.Contains("DG2" ) ) fEventL1G2D = kTRUE;
1288 
1289  if( triggerclasses.Contains("EJE" ) || triggerclasses.Contains("EJ1" ) ) fEventL1J = kTRUE;
1290  if( triggerclasses.Contains("EJ2" ) ) fEventL1J2 = kTRUE;
1291 
1292  if( triggerclasses.Contains("DJE" ) || triggerclasses.Contains("DJ1" ) ) fEventL1JD = kTRUE;
1293  if( triggerclasses.Contains("DJ2" ) ) fEventL1J2D = kTRUE;
1294  }
1295 
1296  // Semi/Central PbPb trigger
1297  if (triggerclasses.Contains("CCENT_R2-B-NOPF-ALLNOTRD")) fEventCen = kTRUE;
1298  else if(triggerclasses.Contains("CSEMI_R1-B-NOPF-ALLNOTRD")) fEventSem = kTRUE;
1299 
1300 // printf("MB : %d; L0-E : %d; L0-D : %d; L1-EGam1 : %d; L1-DGam1 : %d; "
1301 // "L1-EGam2 : %d; L1-DGam2 : %d;\n L1-EJet1 : %d; L1-DJet1 : %d; L1-EJet2 : %d;L1-DJet2 : %d; "
1302 // "Central : %d; SemiCentral : %d; \n Trigger Names : %s \n ",
1303 // fEventMB,fEventL0,fEventL0D,fEventL1G,fEventL1GD,fEventL1G2,fEventL1G2D,
1304 // fEventL1J,fEventL1JD,fEventL1J2,fEventL1J2D,
1305 // fEventCen,fEventSem,triggerclasses.Data());
1306 }
1307 
1308 //___________________________________________________________
1310 //___________________________________________________________
1312 {
1313  fOutputList = new TList;
1314  fOutputList ->SetOwner(kTRUE);
1315 
1316  fhNEvents = new TH1F("hNEvents","Number of selected events",26,0,26);
1317  fhNEvents ->SetYTitle("N events");
1318  fhNEvents ->GetXaxis()->SetBinLabel(1 ,"All");
1319  fhNEvents ->GetXaxis()->SetBinLabel(2 ,"MB");
1320  fhNEvents ->GetXaxis()->SetBinLabel(3 ,"Central Pb");
1321  fhNEvents ->GetXaxis()->SetBinLabel(4 ,"SemiCentral Pb");
1322  fhNEvents ->GetXaxis()->SetBinLabel(5 ,"L0");
1323  fhNEvents ->GetXaxis()->SetBinLabel(6 ,"L1-G1");
1324  fhNEvents ->GetXaxis()->SetBinLabel(7 ,"L1-G2");
1325  fhNEvents ->GetXaxis()->SetBinLabel(8 ,"L1-J1");
1326  fhNEvents ->GetXaxis()->SetBinLabel(9 ,"L1-J2");
1327  fhNEvents ->GetXaxis()->SetBinLabel(10 ,"L1-G1 & !L1-J1");
1328  fhNEvents ->GetXaxis()->SetBinLabel(11 ,"L1-J1 & !L1-G1");
1329  fhNEvents ->GetXaxis()->SetBinLabel(12 ,"L1-J1 & L1-G1");
1330  fhNEvents ->GetXaxis()->SetBinLabel(13 ,"MB & !L1 & !L0");
1331  fhNEvents ->GetXaxis()->SetBinLabel(14,"L0 & !MB");
1332  fhNEvents ->GetXaxis()->SetBinLabel(15,"L1-G1 & !MB");
1333  fhNEvents ->GetXaxis()->SetBinLabel(16,"L1-J1 & !MB");
1334  fhNEvents ->GetXaxis()->SetBinLabel(17,"L1-G1 & (Cen | Semi)");
1335  fhNEvents ->GetXaxis()->SetBinLabel(18,"L1-J1 & (Cen | Semi)");
1336  fhNEvents ->GetXaxis()->SetBinLabel(19,"L1-G2 & !L1-G1");
1337  fhNEvents ->GetXaxis()->SetBinLabel(20,"L1-J2 & !L1-J1");
1338  fhNEvents ->GetXaxis()->SetBinLabel(21,"L0 DCal");
1339  fhNEvents ->GetXaxis()->SetBinLabel(22,"L1-G1 DCal");
1340  fhNEvents ->GetXaxis()->SetBinLabel(23,"L1-J1 DCal");
1341  fhNEvents ->GetXaxis()->SetBinLabel(24,"L0 !DCal");
1342  fhNEvents ->GetXaxis()->SetBinLabel(25,"L1-G1 !DCal");
1343  fhNEvents ->GetXaxis()->SetBinLabel(26,"L1-J1 !DCal");
1344 
1345  fhFORAmp = new TH2F("hFORAmp", "FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column",
1347  fhFORAmp ->SetXTitle("Index #eta (columnns)");
1348  fhFORAmp ->SetYTitle("Index #phi (rows)");
1349  fhFORAmp ->SetZTitle("Amplitude");
1350 
1351  fhFORAmpL1G = new TH2F("hFORAmpL1G1", "FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1G1 trigger condition",
1353  fhFORAmpL1G ->SetXTitle("Index #eta (columnns)");
1354  fhFORAmpL1G ->SetYTitle("Index #phi (rows)");
1355  fhFORAmpL1G ->SetZTitle("Amplitude");
1356 
1357  fhFORAmpL1G2 = new TH2F("hFORAmpL1G2", "FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1G2 trigger condition",
1359  fhFORAmpL1G2 ->SetXTitle("Index #eta (columnns)");
1360  fhFORAmpL1G2 ->SetYTitle("Index #phi (rows)");
1361  fhFORAmpL1G2 ->SetZTitle("Amplitude");
1362 
1363  fhFORAmpL1J = new TH2F("hFORAmpL1J1", "FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1J1 trigger condition",
1365  fhFORAmpL1J ->SetXTitle("Index #eta (columnns)");
1366  fhFORAmpL1J ->SetYTitle("Index #phi (rows)");
1367  fhFORAmpL1J ->SetZTitle("Amplitude");
1368 
1369  fhFORAmpL1J2 = new TH2F("hFORAmpL1J2", "FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1J2 trigger condition",
1371  fhFORAmpL1J2 ->SetXTitle("Index #eta (columnns)");
1372  fhFORAmpL1J2 ->SetYTitle("Index #phi (rows)");
1373  fhFORAmpL1J2 ->SetZTitle("Amplitude");
1374 
1375 
1376  fhL0Amp = new TH2F("hL0Amp","FALTRO signal per Row and Column",
1378  fhL0Amp ->SetXTitle("Index #eta (columnns)");
1379  fhL0Amp ->SetYTitle("Index #phi (rows)");
1380  fhL0Amp ->SetZTitle("Amplitude");
1381 
1382  fhL0AmpL1G = new TH2F("hL0AmpL1G","FALTRO signal per Row and Column, with L1G trigger condition",
1384  fhL0AmpL1G ->SetXTitle("Index #eta (columnns)");
1385  fhL0AmpL1G ->SetYTitle("Index #phi (rows)");
1386  fhL0AmpL1G ->SetZTitle("Amplitude");
1387 
1388 
1389  fhL0AmpL1J = new TH2F("hL0AmpL1J","FALTRO signal per Row and Column, with L1j trigger condition",
1391  fhL0AmpL1J ->SetXTitle("Index #eta (columnns)");
1392  fhL0AmpL1J ->SetYTitle("Index #phi (rows)");
1393  fhL0AmpL1J ->SetZTitle("Amplitude");
1394 
1395 
1396  fhL1Amp = new TH2F("hL1Amp","STU signal per Row and Column",
1398  fhL1Amp ->SetXTitle("Index #eta (columnns)");
1399  fhL1Amp ->SetYTitle("Index #phi (rows)");
1400  fhL1Amp ->SetZTitle("Amplitude");
1401 
1402  fhL1GAmp = new TH2F("hL1G1Amp","STU signal per Row and Column for L1 Gamma1",
1404  fhL1GAmp ->SetXTitle("Index #eta (columnns)");
1405  fhL1GAmp ->SetYTitle("Index #phi (rows)");
1406  fhL1GAmp ->SetZTitle("Amplitude");
1407 
1408  fhL1G2Amp = new TH2F("hL1G2Amp","STU signal per Row and Column for L1 Gamma2",
1410  fhL1G2Amp ->SetXTitle("Index #eta (columnns)");
1411  fhL1G2Amp ->SetYTitle("Index #phi (rows)");
1412  fhL1G2Amp ->SetZTitle("Amplitude");
1413 
1414  fhL1JAmp = new TH2F("hL1J1Amp","STU signal per Row and Column for L1 Jet1",
1416  fhL1JAmp ->SetXTitle("Index #eta (columnns)");
1417  fhL1JAmp ->SetYTitle("Index #phi (rows)");
1418  fhL1JAmp ->SetZTitle("Amplitude");
1419 
1420  fhL1J2Amp = new TH2F("hL1J2Amp","STU signal per Row and Column for L1 Jet2",
1422  fhL1J2Amp ->SetXTitle("Index #eta (columnns)");
1423  fhL1J2Amp ->SetYTitle("Index #phi (rows)");
1424  fhL1J2Amp ->SetZTitle("Amplitude");
1425 
1426  fhL1FOREnergy = new TH2F("hL1FOREnergy","FOR index vs FOR energy",
1427  fgkFALTROCols*fgkFALTRORows,0,fgkFALTROCols*fgkFALTRORows,200,0,200);
1428  fhL1FOREnergy ->SetXTitle("Index FOR");
1429  fhL1FOREnergy ->SetYTitle("Energy (ADC)");
1430 
1431  fhL0Patch = new TH2F("hL0Patch","FOR with associated L0 Patch",
1432  fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1433  fhL0Patch ->SetXTitle("Index #eta (columnns)");
1434  fhL0Patch ->SetYTitle("Index #phi (rows)");
1435  fhL0Patch ->SetZTitle("counts");
1436 
1437  fhL1GPatch = new TH2F("hL1G1Patch","FOR with associated L1 Gamma Patch1",
1438  fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1439  fhL1GPatch ->SetXTitle("Index #eta (columnns)");
1440  fhL1GPatch ->SetYTitle("Index #phi (rows)");
1441  fhL1GPatch ->SetZTitle("counts");
1442 
1443  fhL1G2Patch = new TH2F("hL1G2Patch","FOR with associated L1 Gamma2 Patch",
1444  fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1445  fhL1G2Patch ->SetXTitle("Index #eta (columnns)");
1446  fhL1G2Patch ->SetYTitle("Index #phi (rows)");
1447  fhL1G2Patch ->SetZTitle("counts");
1448 
1449  fhL1GPatchNotFake = new TH2F("hL1G1PatchNotFake","FOR with L1 Gamma1 Patch associated to energetic cells",
1450  fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1451  fhL1GPatchNotFake ->SetXTitle("Index #eta (columnns)");
1452  fhL1GPatchNotFake ->SetYTitle("Index #phi (rows)");
1453  fhL1GPatchNotFake ->SetZTitle("counts");
1454 
1455  fhL1GPatchFake = new TH2F("hL1G1PatchFake","FOR without L1 Gamma1 Patch associated to energetic cells",
1456  fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1457  fhL1GPatchFake ->SetXTitle("Index #eta (columnns)");
1458  fhL1GPatchFake ->SetYTitle("Index #phi (rows)");
1459  fhL1GPatchFake ->SetZTitle("counts");
1460 
1461 
1462  fhL1GPatchNotAllFake = new TH2F("hL1G1PatchNotAllFake","FOR with one L1 Gamma1 Patch associated to an energetic cell",
1463  fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1464  fhL1GPatchNotAllFake ->SetXTitle("Index #eta (columnns)");
1465  fhL1GPatchNotAllFake ->SetYTitle("Index #phi (rows)");
1466  fhL1GPatchNotAllFake ->SetZTitle("counts");
1467 
1468  fhL1GPatchAllFake = new TH2F("hL1G1PatchAllFake","FOR without any L1 Gamma1 Patch associated to an energetic cell",
1469  fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1470  fhL1GPatchAllFake ->SetXTitle("Index #eta (columnns)");
1471  fhL1GPatchAllFake ->SetYTitle("Index #phi (rows)");
1472  fhL1GPatchAllFake ->SetZTitle("counts");
1473 
1474  fhL1GPatchAllFakeMax = new TH2F("hL1G1PatchAllFakeMax","FOR with L1 Gamma1 Patch Max not associated to an energetic cell",
1475  fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1476  fhL1GPatchAllFakeMax ->SetXTitle("Index #eta (columnns)");
1477  fhL1GPatchAllFakeMax ->SetYTitle("Index #phi (rows)");
1478  fhL1GPatchAllFakeMax ->SetZTitle("counts");
1479 
1480  fhL1GPatchNotAllFakeMax = new TH2F("hL1G1PatchNotAllFakeMax","FOR with one L1 Gamma1 Patch Max associated to an energetic cell",
1481  fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1482  fhL1GPatchNotAllFakeMax ->SetXTitle("Index #eta (columnns)");
1483  fhL1GPatchNotAllFakeMax ->SetYTitle("Index #phi (rows)");
1484  fhL1GPatchNotAllFakeMax ->SetZTitle("counts");
1485 
1486  fhL1GPatchNotAllFakeMaxE = new TH1F("hL1G1PatchNotAllFakeMaxE","Energy distribution of FOR in events with L1 Gamma1 Patch Max associated to an energetic cell",
1488  fhL1GPatchNotAllFakeMaxE ->SetXTitle("Energy (GeV)");
1489 
1490 
1491  fhL1GPatchAllFakeMaxE = new TH1F("hL1G1PatchAllFakeMaxE","Energy distribution of FOR in events with L1 Gamma1 Patch Max not associated to an energetic cell",
1493  fhL1GPatchAllFakeMaxE ->SetXTitle("Energy (GeV)");
1494 
1495  fhL1GPatchNotAllFakeE = new TH1F("hL1G1PatchNotAllFakeE","Energy distribution of FOR in events with L1 Gamma1 Patch not associated to an energetic cell",
1497  fhL1GPatchNotAllFakeE ->SetXTitle("Energy (GeV)");
1498 
1499  fhL1GPatchAllFakeE = new TH1F("hL1G1PatchAllFakeE","Energy distribution of FOR in events with L1 Gamma1 Patch associated to an energetic cell",
1501  fhL1GPatchAllFakeE ->SetXTitle("Energy (GeV)");
1502 
1503 
1504  fhL1GPatchFakeE = new TH1F("hL1G1PatchFakeE","Energy distribution of FOR with L1 Gamma1 Patch not associated to an energetic cell",
1506  fhL1GPatchFakeE ->SetXTitle("Energy (GeV)");
1507 
1508  fhL1GPatchNotFakeE = new TH1F("hL1G1PatchNotFakeE","Energy distribution of FOR with L1 Gamma1 Patch associated to an energetic cell",
1510  fhL1GPatchNotFakeE ->SetXTitle("Energy (GeV)");
1511 
1512  fhNPatchFake = new TH2F("hNPatchFake","number of fake patchs vs. all patchs are fake",
1513  3,0,3, 2880,0,2880);
1514  fhNPatchFake ->SetYTitle("number of fake patchs");
1515  fhNPatchFake ->SetXTitle("all fake event");
1516  fhNPatchFake ->SetZTitle("counts");
1517 
1518 
1519  fhNPatchNotFake = new TH2F("hNPatchNotFake","number of Not fake patchs vs. all patchs are fake",
1520  3, 0, 3, 200,0,1000);
1521  fhNPatchNotFake ->SetYTitle("number of Not fake patchs");
1522  fhNPatchNotFake ->SetXTitle("all fake event");
1523  fhNPatchNotFake ->SetZTitle("counts");
1524 
1525 
1526  fhL1JPatch = new TH2F("hL1J1Patch","FOR with associated L1 Jet1 Patch",
1527  fgkFALTROCols/4,0,fgkFALTROCols,fgkFALTRORows/4,0,fgkFALTRORows);
1528  fhL1JPatch ->SetXTitle("Index #eta (columnns)");
1529  fhL1JPatch ->SetYTitle("Index #phi (rows)");
1530  fhL1JPatch ->SetZTitle("counts");
1531 
1532  fhL1J2Patch = new TH2F("hL1J2Patch","FOR with associated L1 Jet2 Patch",
1533  fgkFALTROCols/4,0,fgkFALTROCols,fgkFALTRORows/4,0,fgkFALTRORows);
1534  fhL1J2Patch ->SetXTitle("Index #eta (columnns)");
1535  fhL1J2Patch ->SetYTitle("Index #phi (rows)");
1536  fhL1J2Patch ->SetZTitle("counts");
1537 
1538  // Uncomment when corresponding method is active
1539 // fhFEESTU = new TH2F("hFEESTU","STU / FEE vs channel", fNBinsSTUFEERatio,0,fMaxSTUFEERatio,30,0,30);
1540 // fhFEESTU ->SetXTitle("STU/FEE signal");
1541 // fhFEESTU ->SetYTitle("channel");
1542 // fhFEESTU ->SetZTitle("counts");
1543 //
1544 // fhTRUSTU = new TH2F("hTRUSTU","STU / TRU vs channel", fNBinsSTUTRURatio,0,fMaxSTUTRURatio,30,0,30);
1545 // fhTRUSTU ->SetXTitle("STU/TRU signal");
1546 // fhTRUSTU ->SetYTitle("channel");
1547 // fhTRUSTU ->SetZTitle("counts");
1548 
1549  fhFORMeanAmp = new TProfile2D("hFORMeanAmp", "Mean FastOR(FEE) signal per Row and Column", fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1550  fhFORMeanAmp->SetXTitle("Index #eta");
1551  fhFORMeanAmp->SetYTitle("Index #phi");
1552 
1553  fhL0MeanAmp = new TProfile2D("hL0MeanAmp", "Mean FastOR(TRU) signal per Row and Column", fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1554  fhL0MeanAmp->SetXTitle("Index #eta");
1555  fhL0MeanAmp->SetYTitle("Index #phi");
1556 
1557  fhL1MeanAmp = new TProfile2D("hL1MeanAmp", "Mean FastOR(STU) signal per Row and Column", fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1558  fhL1MeanAmp->SetXTitle("Index #eta");
1559  fhL1MeanAmp->SetYTitle("Index #phi");
1560 
1561  fhL1GPatchMax = new TH2F("hL1G1PatchMax","FOR of max amplitude patch with associated L1 Gamma1 Patch",
1562  fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1563  fhL1GPatchMax ->SetXTitle("Index #eta (columnns)");
1564  fhL1GPatchMax ->SetYTitle("Index #phi (rows)");
1565  fhL1GPatchMax ->SetZTitle("counts");
1566 
1567  fhL1G2PatchMax = new TH2F("hL1G2PatchMax","FOR of max amplitude patch with associated L1 Gamma2 Patch",
1568  fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1569  fhL1G2PatchMax ->SetXTitle("Index #eta (columnns)");
1570  fhL1G2PatchMax ->SetYTitle("Index #phi (rows)");
1571  fhL1G2PatchMax ->SetZTitle("counts");
1572 
1573  fhL1JPatchMax = new TH2F("hL1J1PatchMax","FOR of max amplitude patch with associated L1 Jet1 Patch",
1574  fgkFALTROCols/4,0,fgkFALTROCols,fgkFALTRORows/4,0,fgkFALTRORows);
1575  fhL1JPatchMax ->SetXTitle("Index #eta (columnns)");
1576  fhL1JPatchMax ->SetYTitle("Index #phi (rows)");
1577  fhL1JPatchMax ->SetZTitle("counts");
1578 
1579  fhL1J2PatchMax = new TH2F("hL1J2PatchMax","FOR of max amplitude patch with associated L1 Jet2 Patch",
1580  fgkFALTROCols/4,0,fgkFALTROCols,fgkFALTRORows/4,0,fgkFALTRORows);
1581  fhL1J2PatchMax ->SetXTitle("Index #eta (columnns)");
1582  fhL1J2PatchMax ->SetYTitle("Index #phi (rows)");
1583  fhL1J2PatchMax ->SetZTitle("counts");
1584 
1585  fOutputList->Add(fhNEvents);
1586  fOutputList->Add(fhFORAmp);
1587  fOutputList->Add(fhFORAmpL1G);
1588  fOutputList->Add(fhFORAmpL1G2);
1589  fOutputList->Add(fhFORAmpL1J);
1590  fOutputList->Add(fhFORAmpL1J2);
1591  fOutputList->Add(fhL0Amp);
1592  fOutputList->Add(fhL0AmpL1G);
1593  fOutputList->Add(fhL0AmpL1J);
1594  fOutputList->Add(fhL1Amp);
1595  fOutputList->Add(fhL1GAmp);
1596  fOutputList->Add(fhL1G2Amp);
1597  fOutputList->Add(fhL1JAmp);
1598  fOutputList->Add(fhL1J2Amp);
1599  fOutputList->Add(fhL1FOREnergy);
1600  fOutputList->Add(fhL0Patch);
1601  fOutputList->Add(fhL1GPatch);
1602  fOutputList->Add(fhL1G2Patch);
1615  fOutputList->Add(fhNPatchFake);
1617 
1618  fOutputList->Add(fhL1JPatch);
1619  fOutputList->Add(fhL1J2Patch);
1620 
1621  // Uncomment when corresponding method is active
1622 // fOutputList->Add(fhFEESTU);
1623 // fOutputList->Add(fhTRUSTU);
1624 
1625  fOutputList->Add(fhFORMeanAmp);
1626  fOutputList->Add(fhL0MeanAmp);
1627  fOutputList->Add(fhL1MeanAmp);
1628 
1629  fOutputList->Add(fhL1GPatchMax);
1631  fOutputList->Add(fhL1JPatchMax);
1633 
1634  if(fFillV0SigHisto)
1635  {
1636  fhV0STU = new TH2I("hV0STU","Total signal STU vs V0C+V0S",
1638  fhV0STU ->SetXTitle("Signal V0C+V0A");
1639  fhV0STU ->SetYTitle("Total signal STU");
1640  fhV0STU ->SetZTitle("counts");
1641 
1642  fhGPMaxVV0TT = new TH2F("hGPMaxVV0TT","Maximum patch of L1-Gamma vs V0 signal in STU",fNBinsV0Signal,0,fMaxV0Signal, 500,0,1000);
1643  fhGPMaxVV0TT ->SetXTitle("V0 from STU");
1644  fhGPMaxVV0TT ->SetYTitle("Patch Max");
1645 
1646  fhJPMaxVV0TT = new TH2F("hJPMaxVV0TT","Maximum patch of L1-Jet vs V0 signal in STU",fNBinsV0Signal,0,fMaxV0Signal, 500,0,1000);
1647  fhJPMaxVV0TT ->SetXTitle("V0 from STU");
1648  fhJPMaxVV0TT ->SetYTitle("Patch Max");
1649 
1650  fOutputList->Add(fhV0STU);
1651  fOutputList->Add(fhGPMaxVV0TT);
1652  fOutputList->Add(fhJPMaxVV0TT);
1653  }
1654 
1655  if(fMCData)
1656  {
1657  PostData(1, fOutputList);
1658  return;
1659  }
1660 
1661  // Cluster histograms, E
1662  TString hName [] = { "MB","L0","L0D",
1663  "L1G1","L1G1D","L1G2","L1G2D",
1664  "L1J1","L1J1D","L1J2","L2J2D",
1665  "L1G1NoL1J1","L1G1NoL1J1D","L1J1NoL1G1","L1J1NoL1G1D",
1666  "L1G2NoL1G1","L1G2NoL1G1D","L1J2NoL1J1","L1J2NoL1J1D",
1667  "L0E","L0D","L1EG1","L1DG1","L1EJ1","L1DJ1",
1668  "Central","SemiCentral" } ;
1669  TString hTitle [] = { "MB trigger","EMC-L0 trigger","DMC L0 trigger",
1670  "EMC-L1 Gamma1 trigger","EMC-L1 Gamma1 trigger", "EMC-L1 Gamma2 trigger","EMC-L1 Gamma2 trigger",
1671  "EMC-L1 Jet1 trigger" ,"DMC-L1 Jet1 trigger" , "DMC-L1 Jet2 trigger" ,"DMC-L1 Jet2 trigger",
1672  "EMC-L1 Gamma1 trigger and not L1 Jet1", "DMC-L1 Gamma1 trigger and not L1 Jet1",
1673  "EMC-L1 Jet1 trigger and not L1 Gamma1", "DMC-L1 Jet1 trigger and not L1 Gamma1",
1674  "EMC-L1 Gamma2 trigger and not L1 Gamma1","DMC-L1 Gamma2 trigger and not L1 Gamma1",
1675  "EMC-L1 Jet2 trigger and not L1 Jet1", "DMC-L1 Jet2 trigger and not L1 Jet1",
1676  "L0 EMC Pure", "L0 DMC Pure", "L1-Gamma1 EMC Pure", "L1-Gamma1 DMC Pure",
1677  "L1-Jet EMC Pure", "L1-Jet DMC Pure"
1678  "Central trigger","SemiCentral trigger" } ;
1679 
1680  for(Int_t i=0; i < 3; i++)
1681  {
1682  Int_t j = i+5;
1683  if(i==0)j=0;
1684 
1685  fhClusMBPure[i] = new TH1F(Form("hClus%sPure",hName[j].Data()),
1686  Form("clusters E distribution for %s, no other EMCAL trigger on",hTitle[j].Data()),
1688  fhClusMBPure[i] ->SetXTitle("Energy (GeV)");
1689  fOutputList->Add(fhClusMBPure[i]);
1690 
1691  fhClusMaxMBPure[i] = new TH1F(Form("hClusMax%sPure",hName[j].Data()),
1692  Form("maximum energy cluster per event for %s, no other EMCAL trigger on",hTitle[j].Data()),
1694  fhClusMaxMBPure[i] ->SetXTitle("Energy (GeV)");
1695  fOutputList->Add(fhClusMaxMBPure[i]);
1696  }
1697 
1698  for(Int_t i=0; i < fgkTriggerCombi; i++)
1699  {
1700  if(fFillV0SigHisto)
1701  {
1702  fhV0[i] = new TH1F(Form("hV0%s",hName[i].Data()),
1703  Form("V0 distribution for %s",hTitle[i].Data()),
1705  fhV0[i]->SetXTitle("V0");
1706  fOutputList->Add(fhV0[i]);
1707  }
1708 
1709  fhClus[i] = new TH1F(Form("hClus%s",hName[i].Data()),
1710  Form("clusters E distribution for %s",hTitle[i].Data()),
1712  fhClus[i] ->SetXTitle("Energy (GeV)");
1713  fOutputList->Add(fhClus[i]);
1714 
1715  fhClusMax[i] = new TH1F(Form("hClusMax%s",hName[i].Data()),
1716  Form("maximum energy cluster per event for %s",hTitle[i].Data()),
1718  fhClusMax[i]->SetXTitle("Energy (GeV)");
1719  fOutputList->Add(fhClusMax[i]);
1720 
1721  // Cluster histograms, E vs Cen
1722 
1723  if(fFillCenHisto)
1724  {
1725 
1726  fhCentrality[i] = new TH1F(Form("hCentrality%s",hName[i].Data()),
1727  Form("Centrality distribution for %s",hTitle[i].Data()),
1728  100, 0, 100);
1729  fhCentrality[i]->SetXTitle("Centrality (%)");
1730  fOutputList->Add(fhCentrality[i]);
1731 
1732  fhClusCen[i] = new TH2F(Form("hClusCen%s",hName[i].Data()),
1733  Form("clusters E distribution vs centrality for %s",hTitle[i].Data()),
1734  fNBinsClusterE,0,fMaxClusterE,100, 0, 100);
1735  fhClusCen[i] ->SetXTitle("Energy (GeV)");
1736  fhClusCen[i] ->SetYTitle("Centrality (%)");
1737  fOutputList->Add(fhClusCen[i]);
1738 
1739  fhClusCenMax[i] = new TH2F(Form("hClusCenMax%s",hName[i].Data()),
1740  Form("maximum energy cluster per event vs centrality for %s",hTitle[i].Data()),
1741  fNBinsClusterE,0,fMaxClusterE,100, 0, 100);
1742  fhClusCenMax[i]->SetXTitle("Energy (GeV)");
1743  fhClusCenMax[i]->SetYTitle("Centrality (%)");
1744  fOutputList->Add(fhClusCenMax[i]);
1745  }
1746 
1747  // Cluster histograms, E vs V0
1748 
1749  if(fFillV0SigHisto)
1750  {
1751  fhClusV0[i] = new TH2F(Form("hClusV0%s",hName[i].Data()),
1752  Form("clusters E distribution vs V0 for %s",hTitle[i].Data()),
1754  fhClusV0[i] ->SetXTitle("Energy (GeV)");
1755  fhClusV0[i] ->SetYTitle("V0");
1756  fOutputList->Add(fhClusV0[i]);
1757 
1758  fhClusV0Max[i] = new TH2F(Form("hClusV0Max%s",hName[i].Data()),
1759  Form("maximum energy cluster per event vs V0 for %s",hTitle[i].Data()),
1761  fhClusV0Max[i]->SetXTitle("Energy (GeV)");
1762  fhClusV0Max[i]->SetYTitle("V0");
1763  fOutputList->Add(fhClusV0Max[i]);
1764  }
1765 
1766  // SM dependent histograms
1767  for(Int_t ism = fFirstSM; ism <= fLastSM; ism++)
1768  {
1769  fhClusSM[i][ism] = new TH1F(Form("hClus%s_SM%d",hName[i].Data(),ism),
1770  Form("clusters E distribution for %s and SM%d",hTitle[i].Data(), ism),
1772  fhClusSM[i][ism]->SetXTitle("Energy (GeV)");
1773  fOutputList->Add(fhClusSM[i][ism]);
1774 
1775  if(fFillCenHisto)
1776  {
1777  fhClusCenSM[i][ism] = new TH2F(Form("hClusCen%s_SM%d",hName[i].Data(),ism),
1778  Form("clusters E distribution vs centrality for %s and SM%d",hTitle[i].Data(),ism),
1779  fNBinsClusterE,0,fMaxClusterE,100, 0, 100);
1780  fhClusCenSM[i][ism]->SetXTitle("Energy (GeV)");
1781  fhClusCenSM[i][ism]->SetYTitle("Centrality");
1782  fOutputList->Add(fhClusCenSM[i][ism] );
1783  }
1784 
1785  if(fFillV0SigHisto)
1786  {
1787  fhClusV0SM[i][ism] = new TH2F(Form("hClusV0%s_SM%d",hName[i].Data(),ism),
1788  Form("clusters E distribution vs V0 for %s and SM%d",hTitle[i].Data(),ism),
1790  fhClusV0SM[i][ism]->SetXTitle("Energy (GeV)");
1791  fhClusV0SM[i][ism]->SetYTitle("V0");
1792  fOutputList->Add(fhClusV0SM[i][ism] );
1793  }
1794  }
1795 
1796  // Cluster histograms, Pseudorapidity vs Azimuthal angle
1797 
1798  fhClusEtaPhiHigh[i] = new TH2F(Form("hClusEtaPhiHigh%s",hName[i].Data()),
1799  Form("clusters distribution #eta vs #phi for %s, E > %1.1f GeV",hTitle[i].Data(),fEtaPhiEnMin),
1801  fhClusEtaPhiHigh[i] ->SetXTitle("#eta");
1802  fhClusEtaPhiHigh[i] ->SetYTitle("#phi (rad)");
1803  fOutputList->Add(fhClusEtaPhiHigh[i]);
1804 
1805  fhClusEtaPhiLow[i] = new TH2F(Form("hClusEtaPhiLow%s",hName[i].Data()),
1806  Form("clusters distribution #eta vs #phi for %s, E < %1.1f GeV",hTitle[i].Data(),fEtaPhiEnMin),
1808  fhClusEtaPhiLow[i] ->SetXTitle("#eta");
1809  fhClusEtaPhiLow[i] ->SetYTitle("#phi (rad)");
1810  fOutputList->Add(fhClusEtaPhiLow[i]);
1811 
1813  {
1814  fhClusEtaPhiHighCluMax[i] = new TH2F(Form("hClusEtaPhiHighCluMax%s",hName[i].Data()),
1815  Form("maximum energy cluster per event #eta vs #phi for %s, E > %1.1f GeV",hTitle[i].Data(),fEtaPhiEnMin),
1817  fhClusEtaPhiHighCluMax[i]->SetXTitle("#eta");
1818  fhClusEtaPhiHighCluMax[i]->SetYTitle("#phi (rad)");
1820 
1821  fhClusEtaPhiLowCluMax[i] = new TH2F(Form("hClusEtaPhiLowCluMax%s",hName[i].Data()),
1822  Form("maximum energy cluster per event #eta vs #phi for %s, E < %1.1f GeV",hTitle[i].Data(),fEtaPhiEnMin),
1824  fhClusEtaPhiLowCluMax[i]->SetXTitle("#eta");
1825  fhClusEtaPhiLowCluMax[i]->SetYTitle("#phi (rad)");
1827 
1828  fhClusEtaPhiHighCellMax[i] = new TH2F(Form("hClusEtaPhiHighCellMax%s",hName[i].Data()),
1829  Form("Cluster hit map in calorimeter (max cell), column vs row for %s, E > %1.1f GeV",hTitle[i].Data(),fEtaPhiEnMin),
1830  fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1831  fhClusEtaPhiHighCellMax[i] ->SetXTitle("Index #eta (columnns)");
1832  fhClusEtaPhiHighCellMax[i] ->SetYTitle("Index #phi (rows)");
1834 
1835  fhClusEtaPhiHighCellMaxCluMax[i] = new TH2F(Form("hClusEtaPhiHighCellMaxCluMax%s",hName[i].Data()),
1836  Form("Max E cluster hit map in calorimeter (max cell), column vs row for %s, E > %1.1f GeV",
1837  hTitle[i].Data(),fEtaPhiEnMin),fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1838  fhClusEtaPhiHighCellMaxCluMax[i]->SetXTitle("Index #eta (columnns)");
1839  fhClusEtaPhiHighCellMaxCluMax[i]->SetYTitle("Index #phi (rows)");
1841 
1842  fhClusEtaPhiLowCellMax[i] = new TH2F(Form("hClusEtaPhiLowCellMax%s",hName[i].Data()),
1843  Form("Cluster hit map in calorimeter (max cell), column vs row for %s, E < %1.1f GeV",hTitle[i].Data(),fEtaPhiEnMin),
1844  fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1845  fhClusEtaPhiLowCellMax[i] ->SetXTitle("Index #eta (columnns)");
1846  fhClusEtaPhiLowCellMax[i] ->SetYTitle("#phi (rad)");
1848 
1849  fhClusEtaPhiLowCellMaxCluMax[i] = new TH2F(Form("hClusEtaPhiLowCellMaxCluMax%s",hName[i].Data()),
1850  Form("Max E cluster hit map in calorimeter (max cell), column vs row for %s, E < %1.1f GeV",
1851  hTitle[i].Data(),fEtaPhiEnMin),fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1852  fhClusEtaPhiLowCellMaxCluMax[i]->SetXTitle("Index #eta (columnns)");
1853  fhClusEtaPhiLowCellMaxCluMax[i]->SetYTitle("#phi (rad)");
1855 
1856  // Cluster histograms, E vs Pseudorapidity
1857 
1858  fhClusEta[i] = new TH2F(Form("hClusEta%s",hName[i].Data()),
1859  Form("clusters distribution vs #eta for %s",hTitle[i].Data()),
1861  fhClusEta[i] ->SetXTitle("Energy (GeV)");
1862  fhClusEta[i] ->SetYTitle("#eta");
1863  fOutputList->Add(fhClusEta[i]);
1864 
1865  fhClusEtaMax[i] = new TH2F(Form("hClusEtaMax%s",hName[i].Data()),
1866  Form("maximum energy cluster per event vs #eta for %s",hTitle[i].Data()),
1868  fhClusEtaMax[i]->SetXTitle("Energy (GeV)");
1869  fhClusEtaMax[i]->SetYTitle("#eta");
1870  fOutputList->Add(fhClusEtaMax[i]);
1871 
1872  // Cluster histograms, E vs Azimuthal angle
1873 
1874  fhClusPhi[i] = new TH2F(Form("hClusPhi%s",hName[i].Data()),
1875  Form("clusters distribution vs #phi for %s",hTitle[i].Data()),
1877  fhClusPhi[i] ->SetXTitle("Energy (GeV)");
1878  fhClusPhi[i] ->SetYTitle("#phi (rad)");
1879  fOutputList->Add(fhClusPhi[i]);
1880 
1881  fhClusPhiMax[i] = new TH2F(Form("hClusPhiMax%s",hName[i].Data()),
1882  Form("maximum energy cluster per event vs #phi for %s",hTitle[i].Data()),
1884  fhClusPhiMax[i]->SetXTitle("Energy (GeV)");
1885  fhClusPhiMax[i]->SetYTitle("#phi (rad)");
1886  fOutputList->Add(fhClusPhiMax[i]);
1887  }
1888  }
1889 
1890  PostData(1, fOutputList);
1891 }
1892 
1893 //______________________________________________________
1894 // Main method executed per event, all the action is happens here.
1895 //______________________________________________________
1897 {
1898  AliVEvent* event = InputEvent();
1899 
1900  if (!event)
1901  {
1902  AliError("No Event, exit");
1903  return;
1904  }
1905 
1907  // Execute task on physics events with triggers
1908 
1909  //trigger configuration
1910  TString triggerclasses = event->GetFiredTriggerClasses();
1911 
1912  // event type
1913  Int_t eventType = ((AliVHeader*)event->GetHeader())->GetEventType();
1914 
1915  if(!fMCData)
1916  {
1917  // physics events eventType=7, select only those
1918  if(triggerclasses=="" || eventType != 7) return;
1919  }
1920 
1921  //printf("Event Type %d; Trigger classes: %s\n",eventType,triggerclasses.Data());
1922 
1923  // Check what trigger we had
1924  SetTriggerEventBit(triggerclasses);
1925 
1926  if(!fEventMB && !fEventL0 && !fEventL1G && !fEventL1G2 && !fEventL1J && ! fEventL1J2 && !fEventCen && !fEventSem) return;
1927 
1929  // Init geometry, OADB, maps
1930 
1931  InitGeometry(); // only once, must be done before OADB, geo OADB accessed here
1932 
1933  InitCellPatchMaps(); //init to 0 map for cells and patches
1934 
1936  // Do the analysis
1937 
1939 
1940  FillCellMaps();
1941 
1942  FillTriggerPatchMaps(triggerclasses);
1943 
1944  //if(!fEventMB)printf("MB : %d; L0 : %d; L1-Gam1 : %d; L1-Gam2 : %d; L1-Jet1 : %d; L1-Jet2 : %d; Central : %d; SemiCentral : %d; Trigger Names : %s \n",
1945  // fEventMB,fEventL0,fEventL1G,fEventL1G2,fEventL1J,fEventL1J2,fEventCen,fEventSem,triggerclasses.Data());
1946 
1948 
1949  FillV0Histograms();
1950 
1952 
1954 
1955  // FEE vs STU vs TRU
1956  //FillCorrelationHistograms();
1957 
1958  ClusterAnalysis();
1959 
1960  PostData(1, fOutputList);
1961 
1962 }
Bool_t fEventSem
Bit for Semi Central events.
Bool_t fEventL1JD
Bit for L1 Jet 1 events, DCal.
TH2F * fhL0Amp
! FALTRO signal per Row and Column for FOR involves L0 patch
TH2F * fhL1Amp
! STU signal per Row and Column for FOR involves L0 patch
void FillTriggerPatchMaps(TString triggerclasses)
Fill L0, L1 patch arrays.
TH2F * fhClusCenSM[fgkTriggerCombi][20]
! Clusters Centrality vs E distribution for a trigger, per SM
TH2F * fhClusPhi[fgkTriggerCombi]
! Clusters Phi vs E distribution for a trigger
void UserCreateOutputObjects()
Init histograms and geometry.
TH2F * fhNPatchFake
! number of fake patchs per event vs. if all were fakes or not
TH2F * fhL1GPatchMax
! FOR of max. amplitude patch with L1 Gamma patch associated
static const int fgkFALTROCols
Total number of fake altro collumns in EMCAL, (ALTRO channels in one SM times 2 SM divided by 2 per F...
double Double_t
Definition: External.C:58
TH1F * fhClusMax[fgkTriggerCombi]
! Maximum E Cluster per event distribution for MB trigger
TH2F * fhClusV0[fgkTriggerCombi]
! Clusters V0 vs E distribution for a trigger
TH2F * fhNPatchNotFake
! number of non fake patchs per events vs. if all were fakes or not
Definition: External.C:236
TH2F * fhClusPhiMax[fgkTriggerCombi]
! Maximum E Cluster vs Phi per event distribution for a trigger
TH2F * fhClusCenMax[fgkTriggerCombi]
! Maximum E Cluster vs Centrality per event distribution for a trigger
TH2F * fhL1JPatch
! FOR with L1 Jet patch associated
void FillV0Histograms()
Fill V0 histograms, only for ESDs.
TH2F * fhL1J2Patch
! FOR with L1 Jet patch associated
TProfile2D * fhFORMeanAmp
! Mean FastOR(FEE) signal per Row and Column
void AccessOADB()
Set the AODB bad channels at least once.
void FillL1JetPatchHistograms()
L1 jet trigger patches histograms.
void FillCorrelationHistograms()
FEE-TRU-STU correlation checks.
static const int fgkFALTRORows
Total number of fake altro rows in EMCAL, temporary, not considers DCal yet (ALTRO channels in one SM...
centrality
TH2F * fhClusEtaPhiHighCellMaxCluMax[fgkTriggerCombi]
! Maximum E Cluster, maximum energy cell index Phi vs Eta per event distribution for MB trigger...
TH2F * fhClusEtaPhiHighCellMax[fgkTriggerCombi]
! Clusters maximum energy cell index eta vs phi distribution for a trigger, energy above fEtaPhiEnMin...
TH2F * fhClusEtaPhiLowCellMax[fgkTriggerCombi]
! Clusters maximum energy cell index eta vs phi distribution for a trigger, energy below fEtaPhiEnMin...
TProfile2D * fhL0MeanAmp
! Mean FastOR(TRU) signal per Row and Column
TH2F * fhClusEta[fgkTriggerCombi]
! Clusters eta vs E distribution for a trigger
void FillEventCounterHistogram()
Fill a TH1 histogram, each bin corresponds to a even trigger type.
Bool_t fEventL1GD
Bit for L1 Gamma 1 events, DCal.
TH2F * fhClusEtaPhiHighCluMax[fgkTriggerCombi]
! Maximum E Cluster, Phi vs Eta per event distribution for a trigger, energy above fEtaPhiEnMin GeV ...
TH2F * fhL0AmpL1G
! FALTRO signal per Row and Column for FOR involves L0 patch, with L1G trigger event ...
TH2F * fhClusEtaPhiLowCellMaxCluMax[fgkTriggerCombi]
! Maximum E Cluster, maximum energy cell index Phi vs Eta per event distribution for MB trigger...
AliEMCALGeometry * fGeometry
Access to EMCAL geometry utils.
TH2F * fhL1JPatchMax
! FOR of max. amplitude patch with L1 Jet patch associated
TH1F * fhNEvents
! Number of selected events
Bool_t IsBadChannelsRemovalSwitchedOn() const
AliEMCALRecoUtils * fRecoUtils
RecoUtils.
Double_t fMapTrigL1J2[fgkFALTRORows][fgkFALTROCols]
TH1F * fhL1GPatchAllFakeE
! Energy distrib of FOR forfake events, all patch energy
TH1F * fhL1GPatchNotFakeE
! Energy distrib of FOR for non fake events, all patch energy
TH2F * fhL1GAmp
! STU signal per Row and Column for FOR position of L1 Gamma patch (top-left)
TH2F * fhL0Patch
! FOR with L0 patch associated
TH1F * fhClusSM[fgkTriggerCombi][20]
! Clusters E distribution for a trigger, per SM
Double_t fMapTrigL0L1G[fgkFALTRORows][fgkFALTROCols]
TString fGeoName
Name of geometry used.
Some utilities for cluster and cell treatment.
TH2F * fhL1JAmp
! STU signal per Row and Column for FOR position of L1 Jet patch (top-left)
TH2F * fhFORAmpL1G
! FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1 Gamma trigger event...
Double_t fMapTrigL0[fgkFALTRORows][fgkFALTROCols]
TH1F * fhV0[fgkTriggerCombi]
! V0 distribution for a triggered event
Bool_t fAccessOADB
Get calibration from OADB for EMCAL.
TH2F * fhL1GPatchAllFakeMax
! FOR without any L1 Gamma patch associated with energy in the related cell, maximal energy patch : f...
TH1F * fhClusMBPure[3]
! Clusters E distribution for pure MB trigger
TH2I * GetEMCALChannelStatusMap(Int_t iSM) const
TH2F * fhL1G2Patch
! FOR with L1 Gamma patch associated
Float_t fTRUTotal
Sum of TRU amplitudes.
Double_t fMapTrigL1[fgkFALTRORows][fgkFALTROCols]
Double_t fMapTrigL1G[fgkFALTRORows][fgkFALTROCols]
TH2F * fhL0AmpL1J
! FALTRO signal per Row and Column for FOR involves L0 patch, with L1J trigger event ...
int Int_t
Definition: External.C:63
void Init()
Init analysis parameters not set before.
TH1F * fhClus[fgkTriggerCombi]
! Clusters E distribution for a trigger
TH2F * fhJPMaxVV0TT
! V0 signal vs maximum jet L1 patch
float Float_t
Definition: External.C:68
TH2F * fhTRUSTU
! Correlation TRU vs STU
TH1F * fhL1GPatchAllFakeMaxE
! Energy distrib FOR for fake events, patch of maximal energy
TString fCentEstimator
Centrality estimator string: V0M, TKL, FMD, ZEMvsZDC, ...
Bool_t fEventL1J2D
Bit for L1 JEt 2 events, DCal.
TH2F * fhClusEtaPhiLowCluMax[fgkTriggerCombi]
! Maximum E Cluster, Phi vs Eta per event distribution for MB trigger, energy below fEtaPhiEnMin GeV ...
TH2F * fhL1GPatchNotAllFakeMax
! FOR with at least one L1 Gamma patch associated with energy in the related cell, maximal energy patch : not fake events
TH2F * fhFORAmpL1J2
! FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1 Jet2 trigger event ...
TH2F * fhL1GPatchAllFake
! FOR without any L1 Gamma patch associated with energy in the related cells: fake patch ...
TH1F * fhClusMaxMBPure[3]
! Maximum E Cluster per event distribution for pure MB trigger
Bool_t fUseAliCentrality
Use the centrality estimator from AliCentrality or AliMultSelection.
TH2F * fhClusEtaMax[fgkTriggerCombi]
! Maximum E Cluster vs Eta per event distribution for a trigger
Bool_t fEventL1J
Bit for L1 Jet 1 events.
TH2F * fhL1J2Amp
! STU signal per Row and Column for FOR position of L1 Jet2 patch (top-left)
TH2F * fhFEESTU
! Correlation FEE vs STU
Int_t fFirstSM
Fill SM histograms for SM >= fFirstSM.
TH2F * fhL1J2PatchMax
! FOR of max. amplitude patch with L1 Jet patch associated
void FillL1GammaPatchHistograms()
L1 Gamma trigger patches histograms.
TH2F * fhClusEtaPhiHigh[fgkTriggerCombi]
! Clusters eta vs phi distribution for a trigger, energy above fEtaPhiEnMin GeV
void FillClusterHistograms(Int_t triggerNumber, Bool_t maxCluster, Float_t e, Float_t eta, Float_t phi, Float_t ietamax, Float_t iphimax, Int_t sm, Float_t centrality, Float_t v0AC)
Bool_t fEventL1J2
Bit for L1 JEt 2 events.
TH2F * fhClusV0SM[fgkTriggerCombi][20]
! Clusters V0 vs E distribution for a trigger, per SM
Double_t fMapCellL1G[fgkFALTRORows][fgkFALTROCols]
static const int fgkTriggerCombi
Total number of trigger combinations defined above.
TH2F * fhClusCen[fgkTriggerCombi]
! Clusters Centrality vs E distribution for a trigger
Double_t fMapTrigL1G2[fgkFALTRORows][fgkFALTROCols]
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)
short Short_t
Definition: External.C:23
void FillMapHistograms()
Matrix with signal per channel.
TH2F * fhL1G2PatchMax
! FOR of max. amplitude patch with L1 Gamma patch associated
TH1F * fhCentrality[fgkTriggerCombi]
! Centrality distribution for a triggered event
Bool_t fFillV0SigHisto
V0 signal creation and fill.
Bool_t IsGoodCluster(AliVCluster *cluster, const AliEMCALGeometry *geom, AliVCaloCells *cells, Int_t bc=-1)
TH1F * fhL1GPatchNotAllFakeE
! Energy distrib of FOR for non fake events, all patch energy
TH2F * fhFORAmp
! FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column
void InitHistogramArrays()
Histograms array initialization called in constructor.
void GetMaxEnergyCell(const AliEMCALGeometry *geom, AliVCaloCells *cells, const AliVCluster *clu, Int_t &absId, Int_t &iSupMod, Int_t &ieta, Int_t &iphi, Bool_t &shared)
Bool_t fEventL1G2D
Bit for L1 Gamma 2 events, DCal.
TProfile2D * fhL1MeanAmp
! Mean FastOR(STU) signal per Row and Column
Bool_t fFillClusAcceptHisto
Fill eta/phi distributions.
TH2I * fhV0STU
! Total signal STU vs V0C+V0S
Bool_t fEventL0D
Bit for L0 events, DCal.
TString fOADBFilePath
Default path $ALICE_PHYSICS/OADB/EMCAL, if needed change.
Bool_t fFillCenHisto
Centrality histograms creation and fill.
TLorentzVector fMomentum
Cluster kinematics, temporal, avoid recreation per event.
TH2F * fhL1GPatchNotFake
! FOR with L1 Gamma patch associated but no energy in the related cells
TFile * file
TList with histograms for a given trigger.
const Double_t etamax
Int_t fLastSM
Fill SM histograms for SM <= fLastSM.
Bool_t fEventL1G2
Bit for L1 Gamma 2 events.
TH2F * fhL1GPatchFake
! FOR with L1 Gamma patch associated
Double_t fMapCellL1J2[fgkFALTRORows][fgkFALTROCols]
Double_t fMapCellL1G2[fgkFALTRORows][fgkFALTROCols]
const char Option_t
Definition: External.C:48
void FillCellMaps()
Cells analysis. Fill FEE energy per channel array.
TH2F * fhClusEtaPhiLow[fgkTriggerCombi]
! Clusters eta vs phi distribution for a trigger, energy below fEtaPhiEnMin GeV
Float_t fV0Trigger
V0 signal from trigger.
TH2F * fhL1GPatchNotAllFake
! FOR with at least 1 L1 Gamma patch associated that has energy in the related celles : not a fake ev...
TH1F * fhL1GPatchNotAllFakeMaxE
! Energy distrib of FOR for non fake events, patch of maximal energy
TH2F * fhGPMaxVV0TT
! V0 signal vs maximum gamma L1 patch
bool Bool_t
Definition: External.C:53
Float_t fEtaPhiEnMin
Min energy for Eta/Phi histograms.
Fill histograms with basic QA information for EMCAL offline trigger.
Bool_t fEventCen
Bit for Central events.
TH2F * fhClusV0Max[fgkTriggerCombi]
! Maximum E Cluster vs Centrality per event distribution for a trigger
TH2F * fhFORAmpL1J
! FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1 Jet trigger event ...
Double_t fMapCell[fgkFALTRORows][fgkFALTROCols]
TH2F * fhFORAmpL1G2
! FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1 Gamma2 trigger even...
TH2F * fhL1FOREnergy
! STU signal per Row and Column for FOR position vs FOR energy
Double_t fMapTrigL0L1J[fgkFALTRORows][fgkFALTROCols]
void SetEMCALChannelStatusMap(const TObjArray *map)
Bool_t fOADBSet
AODB parameters already set.
TH2F * fhL1G2Amp
! STU signal per Row and Column for FOR position of L1 Gamma2 patch (top-left)
void SetTriggerEventBit(TString list)
Check what trigger is the event, set the corresponding bit.
Double_t fMapCellL1J[fgkFALTRORows][fgkFALTROCols]
TH1F * fhL1GPatchFakeE
! Energy distrib of FOR for fake events, all patch energy
Double_t fMapTrigL1J[fgkFALTRORows][fgkFALTROCols]
Bool_t fEventL1G
Bit for L1 Gamma 1 events.
TH2F * fhL1GPatch
! FOR with L1 Gamma patch associated