1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 //------------------------------------------------------------------------//
17 // Fill histograms with basic QA information for EMCAL offline trigger //
18 // Author: Nicolas Arbor (LPSC-Grenoble), Rachid Guernane (LPSC-Grenoble)//
19 // Gustavo Conesa Balbastre (LPSC-Grenoble) //
22 //------------------------------------------------------------------------//
27 #include <TProfile2D.h>
28 #include <TStreamerInfo.h>
32 #include "AliVCluster.h"
33 #include "AliVCaloCells.h"
34 #include "AliVEvent.h"
35 #include "AliCentrality.h"
37 #include "AliVEvent.h"
38 #include "AliVCaloTrigger.h"
39 #include "AliESDVZERO.h"
41 #include "AliEMCALGeometry.h"
42 #include "AliEMCALRecoUtils.h"
43 #include "AliOADBContainer.h"
44 #include "AliAnalysisManager.h"
46 #include "AliAnalysisTaskEMCALTriggerQA.h"
48 ClassImp(AliAnalysisTaskEMCALTriggerQA)
50 //______________________________________________________________
51 AliAnalysisTaskEMCALTriggerQA::AliAnalysisTaskEMCALTriggerQA() :
53 fOutputList(0), fRecoUtils(0x0),
54 fGeoSet(0), fGeometry(0), fGeoName(""),
55 fOADBSet(kFALSE), fAccessOADB(kTRUE), fOADBFilePath(""),
56 fBitEGA(0), fBitEJE(0),
58 fSTUTotal(0), fTRUTotal(0),
59 fV0Trigger(0), fV0A(0), fV0C(0),
60 fFillV0SigHisto(1), fFillClusAcceptHisto(0),
62 fEventMB (0), fEventL0 (0),
63 fEventL1G (0), fEventL1G2 (0),
64 fEventL1J (0), fEventL1J2 (0),
65 fEventCen (0), fEventSem (0),
67 fhNEvents(0), fhFORAmp(0),
68 fhFORAmpL1G(0), fhFORAmpL1G2(0),
69 fhFORAmpL1J(0), fhFORAmpL1J2(0),
70 fhL0Amp(0), fhL0AmpL1G(0), fhL0AmpL1J(0),
71 fhL1Amp(0), fhL1GAmp(0), fhL1G2Amp(0),
72 fhL1JAmp(0), fhL1J2Amp(0), fhL1FOREnergy(0),
73 fhL0Patch(0), fhL1GPatch(0), fhL1G2Patch(0),
74 fhL1GPatchNotFake(0), fhL1GPatchFake(0), fhL1GPatchNotAllFake(0),
75 fhL1GPatchAllFake(0), fhL1GPatchNotAllFakeMax(0),
76 fhL1GPatchAllFakeMax(0), fhL1GPatchNotAllFakeMaxE(0),
77 fhL1GPatchAllFakeMaxE(0), fhL1GPatchNotAllFakeE(0),
78 fhL1GPatchAllFakeE(0), fhL1GPatchFakeE(0),
79 fhL1GPatchNotFakeE(0), fhNPatchFake(0), fhNPatchNotFake(0),
80 fhL1JPatch(0), fhL1J2Patch(0),
81 fhFEESTU(0), fhTRUSTU(0), fhV0STU(0),
82 fhGPMaxVV0TT(0), fhJPMaxVV0TT(0),
83 fhFORMeanAmp(0), fhL0MeanAmp(0), fhL1MeanAmp(0),
84 fhL1GPatchMax(0), fhL1G2PatchMax(0),
85 fhL1JPatchMax(0), fhL1J2PatchMax(0),
87 fNBinsSTUSignal (2000), fMaxSTUSignal (200000),
88 fNBinsTRUSignal (2000), fMaxTRUSignal (200000),
89 fNBinsV0Signal (5000), fMaxV0Signal (100000),
90 fNBinsSTUFEERatio(1000), fMaxSTUFEERatio(100),
91 fNBinsSTUTRURatio(1000), fMaxSTUTRURatio(100),
92 fNBinsClusterE (500), fMaxClusterE (200),
94 fMapCellL1G (), fMapCellL1G2 (),
95 fMapCellL1J (), fMapCellL1J2 (),
96 fMapTrigL0 (), fMapTrigL1 (),
97 fMapTrigL0L1G(), fMapTrigL0L1J(),
98 fMapTrigL1G (), fMapTrigL1G2 (),
99 fMapTrigL1J (), fMapTrigL1J2 ()
103 InitHistogramArrays();
105 DefineOutput(1, TList::Class());
109 //______________________________________________________________________________
110 AliAnalysisTaskEMCALTriggerQA::AliAnalysisTaskEMCALTriggerQA(const char *name) :
111 AliAnalysisTaskSE(name),
112 fOutputList(0), fRecoUtils(0x0),
113 fGeoSet(0), fGeometry(0), fGeoName(""),
114 fOADBSet(kFALSE), fAccessOADB(kTRUE), fOADBFilePath(""),
115 fBitEGA(0), fBitEJE(0),
117 fSTUTotal(0), fTRUTotal(0),
118 fV0Trigger(0), fV0A(0), fV0C(0),
119 fFillV0SigHisto(1), fFillClusAcceptHisto(0),
121 fEventMB (0), fEventL0 (0),
122 fEventL1G (0), fEventL1G2 (0),
123 fEventL1J (0), fEventL1J2 (0),
124 fEventCen (0), fEventSem (0),
126 fhNEvents(0), fhFORAmp(0),
127 fhFORAmpL1G(0), fhFORAmpL1G2(0),
128 fhFORAmpL1J(0), fhFORAmpL1J2(0),
129 fhL0Amp(0), fhL0AmpL1G(0), fhL0AmpL1J(0),
130 fhL1Amp(0), fhL1GAmp(0), fhL1G2Amp(0),
131 fhL1JAmp(0), fhL1J2Amp(0), fhL1FOREnergy(0),
132 fhL0Patch(0), fhL1GPatch(0), fhL1G2Patch(0),
133 fhL1GPatchNotFake(0), fhL1GPatchFake(0), fhL1GPatchNotAllFake(0),
134 fhL1GPatchAllFake(0), fhL1GPatchNotAllFakeMax(0),
135 fhL1GPatchAllFakeMax(0), fhL1GPatchNotAllFakeMaxE(0),
136 fhL1GPatchAllFakeMaxE(0), fhL1GPatchNotAllFakeE(0),
137 fhL1GPatchAllFakeE(0), fhL1GPatchFakeE(0),
138 fhL1GPatchNotFakeE(0), fhNPatchFake(0), fhNPatchNotFake(0),
139 fhL1JPatch(0), fhL1J2Patch(0),
140 fhFEESTU(0), fhTRUSTU(0), fhV0STU(0),
141 fhGPMaxVV0TT(0), fhJPMaxVV0TT(0),
142 fhFORMeanAmp(0), fhL0MeanAmp(0), fhL1MeanAmp(0),
143 fhL1GPatchMax(0), fhL1G2PatchMax(0),
144 fhL1JPatchMax(0), fhL1J2PatchMax(0),
146 fNBinsSTUSignal (2000), fMaxSTUSignal (200000),
147 fNBinsTRUSignal (2000), fMaxTRUSignal (200000),
148 fNBinsV0Signal (5000), fMaxV0Signal (100000),
149 fNBinsSTUFEERatio(1000), fMaxSTUFEERatio(100),
150 fNBinsSTUTRURatio(1000), fMaxSTUTRURatio(100),
151 fNBinsClusterE (500), fMaxClusterE (200),
153 fMapCellL1G (), fMapCellL1G2 (),
154 fMapCellL1J (), fMapCellL1J2 (),
155 fMapTrigL0 (), fMapTrigL1 (),
156 fMapTrigL0L1G(), fMapTrigL0L1J(),
157 fMapTrigL1G (), fMapTrigL1G2 (),
158 fMapTrigL1J (), fMapTrigL1J2 ()
162 InitHistogramArrays();
164 DefineOutput(1, TList::Class());
168 //______________________________________________
169 void AliAnalysisTaskEMCALTriggerQA::AccessOADB()
171 // Set the AODB bad channels at least once
174 if(fOADBSet) return ;
176 if(fOADBFilePath == "") fOADBFilePath = "$ALICE_ROOT/OADB/EMCAL" ;
178 Int_t runnumber = InputEvent()->GetRunNumber() ;
181 printf("AliAnalysisTaskEMCALClusterize::SetOADBParameters() - Get AODB parameters from EMCAL in %s for run %d\n",fOADBFilePath.Data(),runnumber);
183 Int_t nSM = fGeometry->GetNumberOfSuperModules();
186 if(fRecoUtils->IsBadChannelsRemovalSwitchedOn())
188 AliOADBContainer *contBC=new AliOADBContainer("");
189 contBC->InitFromFile(Form("%s/EMCALBadChannels.root",fOADBFilePath.Data()),"AliEMCALBadChannels");
191 TObjArray *arrayBC=(TObjArray*)contBC->GetObject(runnumber);
196 printf("AliAnalysisTaskEMCALClusterize::SetOADBParameters() - Remove EMCAL bad cells \n");
198 for (Int_t i=0; i<nSM; ++i)
200 TH2I *hbm = fRecoUtils->GetEMCALChannelStatusMap(i);
205 hbm=(TH2I*)arrayBC->FindObject(Form("EMCALBadChannelMap_Mod%d",i));
209 AliError(Form("Can not get EMCALBadChannelMap_Mod%d",i));
213 hbm->SetDirectory(0);
214 fRecoUtils->SetEMCALChannelStatusMap(i,hbm);
217 } else if(DebugLevel() > 0)
218 printf("AliAnalysisTaskEMCALClusterize::SetOADBParameters() - Do NOT remove EMCAL bad channels\n"); // run array
225 //________________________________________________
226 void AliAnalysisTaskEMCALTriggerQA::FillCellMaps()
229 // Fill FEE energy per channel array
230 Int_t posX = -1, posY = -1;
231 Int_t nSupMod = -1, ieta = -1, iphi = -1, nModule = -1, nIphi = -1, nIeta = -1;
235 AliVCaloCells& cells= *(InputEvent()->GetEMCALCells());
239 for (Int_t icell = 0; icell < cells.GetNumberOfCells(); icell++)
243 Double_t amp =0., time = 0., efrac = 0;
246 cells.GetCell(icell, absId, amp, time,mclabel,efrac);
248 fGeometry->GetCellIndex(absId, nSupMod, nModule, nIphi, nIeta);
249 fGeometry->GetCellPhiEtaIndexInSModule(nSupMod, nModule, nIphi, nIeta, iphi, ieta);
251 posX = (nSupMod % 2) ? ieta + AliEMCALGeoParams::fgkEMCALCols : ieta;
252 posY = iphi + AliEMCALGeoParams::fgkEMCALRows * int(nSupMod / 2);
254 Int_t indexX = Int_t(posX/2);
255 Int_t indexY = Int_t(posY/2);
257 if(indexX >= fgkFALTROCols || indexY >= fgkFALTRORows )
259 if(DebugLevel() > 0) printf("AliAnalysisTaskEMCALTriggerQA::UserExec() - Wrong Position (x,y) = (%d,%d)\n",
264 // here it is the amplitude for each cell
265 fMapCell[indexY][indexX] += amp;
269 fMapCellL1G[indexY][indexX] += amp;
270 //printf("L1G cell[%i,%i] amp=%f\n",indexY,indexX,fMapCellL1G[indexY][indexX]);
275 fMapCellL1G2[indexY][indexX] += amp;
276 //printf("L1G2 cell[%i,%i] amp=%f\n",indexY,indexX,fMapCellL1G2[indexY][indexX]);
279 if(fEventL1J) fMapCellL1J [indexY][indexX] += amp;
280 if(fEventL1J2) fMapCellL1J2[indexY][indexX] += amp;
282 //printf("cell[%i,%i] amp=%f\n",indexY,indexX,fMapCell[indexY][indexX]);
289 //______________________________________________________________________________
290 void AliAnalysisTaskEMCALTriggerQA::FillTriggerPatchMaps(TString triggerclasses)
292 // Trigger analysis, fill L0, L1 arrays
294 AliVCaloTrigger& trg= * (InputEvent()->GetCaloTrigger("EMCAL"));
296 fV0Trigger = trg.GetL1V0(0)+trg.GetL1V0(1); // used elsewhere
298 Int_t posX = -1, posY = -1;
301 //Int_t nL1Patch = 0 ;
310 trg.GetPosition(posX,posY);
312 if (posX > -1 && posY > -1)
316 trg.GetNL0Times(nTimes);
318 trg.GetL0Times(l0Times);
321 trg.GetAmplitude(ampL0);
322 if (ampL0 > 0) fMapTrigL0[posY][posX] = ampL0;
324 if(triggerclasses.Contains("CEMC7EGA-B-NOPF-CENTNOTRD") || triggerclasses.Contains("CPBI2EGA") || triggerclasses.Contains("CPBI2EG1")) fMapTrigL0L1G[posY][posX] += ampL0;
325 if(triggerclasses.Contains("CEMC7EJE-B-NOPF-CENTNOTRD") || triggerclasses.Contains("CPBI2EJE") || triggerclasses.Contains("CPBI2EJ1")) fMapTrigL0L1J[posY][posX] += ampL0;
329 for (Int_t itime = 0; itime < nTimes; itime++)
331 if (l0Times[itime] > 7 && l0Times[itime] < 10) l0fired = 1;
337 fhL0Patch->Fill(posX,posY);
342 trg.GetTriggerBits(bit);
345 trg.GetL1TimeSum(ts);
346 if (ts > 0) fMapTrigL1[posY][posX] = ts;
348 // cout << "ts =" <<ts<<endl;
351 Bool_t isEGA1 = ((bit >> fBitEGA ) & 0x1) && fEventL1G ;
352 Bool_t isEGA2 = ((bit >> (fBitEGA+1)) & 0x1) && fEventL1G2 ;
353 Bool_t isEJE1 = ((bit >> fBitEJE ) & 0x1) && fEventL1J ;
354 Bool_t isEJE2 = ((bit >> (fBitEJE+1)) & 0x1) && fEventL1J2 ;
356 //if(isEGA1 || isEGA2 || isEJE1 || isEJE2) nL1Patch++;
357 //if(isEJE1 || isEJE2) printf("Jet STU patch %d, time sum %d, posX %d , posY %d\n",nL1Patch,ts,posX, posY);
363 fhL1GPatch ->Fill(posX,posY);
364 if (ts > 0) fMapTrigL1G [posY][posX] = ts;
369 fhL1G2Patch->Fill(posX,posY);
370 if (ts > 0) fMapTrigL1G2[posY][posX] = ts;
376 fhL1JPatch ->Fill(posX,posY);
377 if (ts > 0) fMapTrigL1J [posY][posX] = ts;
383 fhL1J2Patch->Fill(posX,posY);
384 if (ts > 0) fMapTrigL1J2[posY][posX] = ts;
390 // // NOT SURE WHY THIS LINE, COMMENT IF NOT CLUSTER HISTO NOT FILLED FOR LHC13
393 // fEventL0 = kFALSE;
394 // if (!triggerclasses.Contains("CPBI2")) fEventL1G = fEventL1G2 = fEventL1J = fEventL1J2 = kFALSE; // pp running
397 if(fTRUTotal > fMaxTRUSignal && DebugLevel() > 0) printf("AliAnalysisTaskEMCALTriggerQA::FillTriggerPatchMaps() - Large fTRUTotal %f\n",fTRUTotal);
398 if(fSTUTotal > fMaxSTUSignal && DebugLevel() > 0) printf("AliAnalysisTaskEMCALTriggerQA::FillTriggerPatchMaps() - Large fSTUTotal %d\n",fSTUTotal);
402 //___________________________________________________
403 void AliAnalysisTaskEMCALTriggerQA::ClusterAnalysis()
405 // Loop on clusters and fill corresponding histograms
407 // Not interesting in case of data analysis, REVISE in future
411 if(fAccessOADB) AccessOADB(); // only once
414 Double_t v[3] = {0,0,0};
415 InputEvent()->GetPrimaryVertex()->GetXYZ(v);
417 //clusters distribution
418 TRefArray* caloClus = new TRefArray();
419 InputEvent()->GetEMCALClusters(caloClus);
421 Int_t nCaloClusters = caloClus->GetEntriesFast();
433 Int_t nSupMod = -1, ieta = -1, iphi = -1;
437 //Get vertex for momentum calculation
438 Double_t vertex[] = {0.0,0.0,0.0};
439 //InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
441 Float_t centrality = -1;
442 if(InputEvent()->GetCentrality()) centrality = InputEvent()->GetCentrality()->GetCentralityPercentile("V0M");
444 //if(!fEventMB) printf("MB : %d; L0 : %d; L1-Gam1 : %d; L1-Gam2 : %d; L1-Jet1 : %d; L1-Jet2 : %d; Central : %d; SemiCentral : %d \n",
445 // fEventMB,fEventL0,fEventL1G,fEventL1G2,fEventL1J,fEventL1J2,fEventCen,fEventSem);
447 for(Int_t icalo = 0; icalo < nCaloClusters; icalo++)
449 AliVCluster *clus = (AliVCluster*) (caloClus->At(icalo));
451 if(!clus->IsEMCAL()) continue;
453 if(!fRecoUtils->IsGoodCluster(clus,fGeometry,InputEvent()->GetEMCALCells(),InputEvent()->GetBunchCrossNumber()))
456 if(clus->GetNCells() < 2) continue ; // Avoid 1 cell clusters, noisy, exotic.
458 clus->GetMomentum(mom, vertex);
460 Bool_t shared = kFALSE;
461 Int_t idAbs = -1, iphi0 = -1, ieta0 = -1;
462 fRecoUtils->GetMaxEnergyCell(fGeometry, InputEvent()->GetEMCALCells(),clus,
463 idAbs,nSupMod,ieta0,iphi0,shared);
464 //Change index to be continuous over SM
465 ieta = (nSupMod % 2) ? ieta0 + AliEMCALGeoParams::fgkEMCALCols : ieta0;
466 iphi = iphi0 + AliEMCALGeoParams::fgkEMCALRows * int(nSupMod / 2);
470 if(ieta > fgkFALTROCols || iphi > fgkFALTRORows )
471 printf("AliAnalysisTaskEMCALTriggerQA::UserExec() - Wrong Position (x,y) = (%d,%d)\n",ieta,iphi);
486 // Fill cluster histograms depending on the event trigger selection
487 if( fEventMB ) FillClusterHistograms(kMBTrig ,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
488 if( fEventCen ) FillClusterHistograms(kCentralTrig ,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
489 if( fEventSem ) FillClusterHistograms(kSemiCentralTrig,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
491 if( fEventL0 ) FillClusterHistograms(kL0Trig ,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
492 if( fEventL1G ) FillClusterHistograms(kL1GammaTrig ,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
493 if( fEventL1G2) FillClusterHistograms(kL1GammaTrig2 ,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
494 if( fEventL1J ) FillClusterHistograms(kL1JetTrig ,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
495 if( fEventL1J2) FillClusterHistograms(kL1JetTrig2 ,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
497 if( fEventL1G2 && !fEventL1G) FillClusterHistograms(kL1Gamma2OnlyGammaTrig,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
498 if( fEventL1J2 && !fEventL1J) FillClusterHistograms(kL1Jet2OnlyJetTrig ,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
500 if( fEventL1G && !fEventL1J )
501 FillClusterHistograms (kL1GammaOnlyTrig,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
502 if( fEventL1J && !fEventL1G )
503 FillClusterHistograms (kL1JetOnlyTrig ,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
505 if( fEventMB && !fEventL1G && !fEventL1J && !fEventL0 ) fhClusMBPure[0] ->Fill(e);
506 if( fEventCen && !fEventL1G && !fEventL1J && !fEventL0 ) fhClusMBPure[1] ->Fill(e);
507 if( fEventSem && !fEventL1G && !fEventL1J && !fEventL0 ) fhClusMBPure[2] ->Fill(e);
511 // Maximum energy cluster per event histograms
513 if( fEventMB ) FillClusterHistograms(kMBTrig ,kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
514 if( fEventCen ) FillClusterHistograms(kCentralTrig ,kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
515 if( fEventSem ) FillClusterHistograms(kSemiCentralTrig,kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
517 if( fEventL0 ) FillClusterHistograms(kL0Trig ,kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
518 if( fEventL1G ) FillClusterHistograms(kL1GammaTrig ,kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
519 if( fEventL1G2) FillClusterHistograms(kL1GammaTrig2 ,kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
520 if( fEventL1J ) FillClusterHistograms(kL1JetTrig ,kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
521 if( fEventL1J2) FillClusterHistograms(kL1JetTrig2 ,kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
523 if( fEventL1G2 && !fEventL1G) FillClusterHistograms(kL1Gamma2OnlyGammaTrig,kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
524 if( fEventL1J2 && !fEventL1J) FillClusterHistograms(kL1Jet2OnlyJetTrig ,kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
526 if( fEventL1G && !fEventL1J )
527 FillClusterHistograms (kL1GammaOnlyTrig,kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
528 if( fEventL1J && !fEventL1G )
529 FillClusterHistograms (kL1JetOnlyTrig ,kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
531 if( fEventMB && !fEventL1G && !fEventL1J && !fEventL0 ) fhClusMaxMBPure[0] ->Fill(emax);
532 if( fEventCen && !fEventL1G && !fEventL1J && !fEventL0 ) fhClusMaxMBPure[1] ->Fill(emax);
533 if( fEventSem && !fEventL1G && !fEventL1J && !fEventL0 ) fhClusMaxMBPure[2] ->Fill(emax);
537 //______________________________________________________________________________________________
538 void AliAnalysisTaskEMCALTriggerQA::FillClusterHistograms(Int_t triggerNumber, Bool_t max,
539 Float_t e, Float_t eta, Float_t phi,
540 Float_t ieta, Float_t iphi,
541 Float_t centrality, Float_t fV0AC)
543 //Fill normal cluster related histograms depending on the trigger type selection
544 // (10 options, MB, L0, L1 Gamma ... defined in enum triggerType)
548 fhClus [triggerNumber]->Fill(e);
549 fhClusCen[triggerNumber]->Fill(e,centrality);
550 if(fFillV0SigHisto) fhClusV0 [triggerNumber]->Fill(e,fV0AC);
552 if(!fFillClusAcceptHisto)
555 if(e > fEtaPhiEnMin) fhClusEtaPhiHigh[triggerNumber]->Fill( eta, phi);
556 else fhClusEtaPhiLow [triggerNumber]->Fill( eta, phi);
560 fhClusEta[triggerNumber]->Fill(e,eta);
561 fhClusPhi[triggerNumber]->Fill(e,phi);
565 fhClusEtaPhiHigh [triggerNumber]->Fill( eta, phi);
566 fhClusEtaPhiHighCellMax[triggerNumber]->Fill(ieta,iphi);
570 fhClusEtaPhiLow [triggerNumber]->Fill( eta, phi);
571 fhClusEtaPhiLowCellMax[triggerNumber]->Fill(ieta,iphi);
577 fhClusMax [triggerNumber]->Fill(e);
578 fhClusCenMax[triggerNumber]->Fill(e,centrality);
579 if(fFillV0SigHisto) fhClusV0Max [triggerNumber]->Fill(e,fV0AC);
581 if(fFillClusAcceptHisto)
583 fhClusEtaMax[triggerNumber]->Fill(e,eta);
584 fhClusPhiMax[triggerNumber]->Fill(e,phi);
588 fhClusEtaPhiHighCluMax [triggerNumber]->Fill( eta, phi);
589 fhClusEtaPhiHighCellMaxCluMax[triggerNumber]->Fill(ieta,iphi);
593 fhClusEtaPhiLowCluMax [triggerNumber]->Fill( eta, phi);
594 fhClusEtaPhiLowCellMaxCluMax[triggerNumber]->Fill(ieta,iphi);
600 //_____________________________________________________________
601 void AliAnalysisTaskEMCALTriggerQA::FillCorrelationHistograms()
603 //FEE-TRU-STU correlation checks
605 Double_t ampFOR[30] = {0.}, ampL0[30] = {0.}, ampL1[30] = {0.};
606 for (Int_t i = 0; i < fgkFALTRORows; i++)
608 for (Int_t j = 0; j < fgkFALTROCols; j++)
610 //method to get TRU number
612 fGeometry->GetAbsFastORIndexFromPositionInEMCAL(j,i,idFOR);
615 fGeometry->GetTRUFromAbsFastORIndex(idFOR,iTRU,iADC);
617 //printf("i %d, j %d, iTRU %d, iADC %d, idFOR %d; cell %f, L0 %f, L1 %f\n",
618 // i,j,iTRU,iADC,idFOR, fMapCell [i][j],fMapTrigL0[i][j],fMapTrigL1[i][j]);
622 ampFOR[iTRU] += fMapCell [i][j];
623 ampL0[iTRU] += fMapTrigL0[i][j];
624 ampL1[iTRU] += fMapTrigL1[i][j];
629 // FEE vs STU and TRU vs STU ratios
630 for (Int_t i = 0; i < 30; i++)
632 if (ampFOR[i] != 0 && ampL1[i] != 0)
634 fhFEESTU->Fill(ampL1[i]/ampFOR[i],i);
635 if(ampL1[i]/ampFOR[i] > fMaxSTUFEERatio && DebugLevel() > 0 ) printf("AliAnalysisTaskEMCALTriggerQA::FillCorrelationHistograms() - Large STU/FEE ratio %f\n",ampL1[i]/ampFOR[i]);
638 if (ampL0[i] != 0 && ampL1[i] != 0)
640 fhTRUSTU->Fill(ampL1[i]/ampL0[i] ,i);
641 if(ampL1[i]/ampL0[i] > fMaxSTUTRURatio && DebugLevel() > 0 ) printf("AliAnalysisTaskEMCALTriggerQA::FillCorrelationHistograms() - Large STU/TRU ratio %f\n",ampL1[i]/ampL0[i]);
646 //_____________________________________________________________
647 void AliAnalysisTaskEMCALTriggerQA::FillEventCounterHistogram()
649 // Fill a TH1 histogram, each bin corresponds to a even trigger type
651 fhNEvents->Fill(0.5); // All physics events
655 fhNEvents->Fill(1.5);
656 if( !fEventL1G && !fEventL1J && !fEventL1G2 && !fEventL1J2 && !fEventL0 ) fhNEvents->Fill(12.5);
660 if( fEventL0 ) fhNEvents->Fill(13.5);
661 if( fEventL1G ) fhNEvents->Fill(14.5);
662 if( fEventL1J ) fhNEvents->Fill(15.5);
665 if( fEventCen) fhNEvents->Fill(2.5);
666 if( fEventSem) fhNEvents->Fill(3.5);
670 fhNEvents->Fill(4.5);
675 fhNEvents->Fill(5.5);
676 if(!fEventL1J) fhNEvents->Fill(9.5);
677 if(fEventCen || fEventSem) fhNEvents->Fill(16.5);
682 fhNEvents->Fill(6.5);
683 if( !fEventL1G ) fhNEvents->Fill(18.5);
689 fhNEvents->Fill(7.5);
690 if(!fEventL1G) fhNEvents->Fill(10.5);
691 if(fEventCen || fEventSem) fhNEvents->Fill(17.5);
696 fhNEvents->Fill(8.5);
697 if( !fEventL1J ) fhNEvents->Fill(19.5);
700 if(fEventL1J && fEventL1G) fhNEvents->Fill(11.5);
704 //______________________________________________________________
705 void AliAnalysisTaskEMCALTriggerQA::FillL1GammaPatchHistograms()
709 // Study fakes - Make it more understandable!!!
711 Int_t areAllFakes = 2;
712 Int_t numberpatchNotFake = 0;
713 Int_t numberpatchFake = 0;
715 Int_t threshold = 10;// it's not GeV it's ADC !!
716 Bool_t enoughE = kFALSE;
717 Double_t patchMax = 0;
724 for (Int_t posx = 0; posx < fgkFALTROCols; posx++)
726 for (Int_t posy = 0; posy < fgkFALTRORows; posy++)
728 Double_t patchEnergy = 0;
730 if(fMapTrigL1G[posy][posx] > 0)
732 for(Int_t irow = 0; irow < 2; irow++)
734 for(Int_t icol = 0; icol < 2; icol++)
737 shiftCol = posx+icol;
738 shiftRow = posy+irow;
740 // printf("cell[%i,%i]=%f\n",posy+icol,posx+irow, fMapCellL1G[posy+icol][posx+irow]);
741 if(shiftRow < fgkFALTRORows && shiftCol < fgkFALTROCols)
743 patchEnergy += fMapCellL1G[shiftRow][shiftCol] ;
745 if( fMapCellL1G[shiftRow][shiftCol] > threshold/2 ) enoughE = kTRUE;
750 if (patchEnergy > patchMax)
752 patchMax = patchEnergy;
757 if(patchEnergy>threshold || (patchEnergy>threshold-3 && enoughE))
759 numberpatchNotFake++;
760 fhL1GPatchNotFake ->Fill(posx,posy);
761 fhL1GPatchNotFakeE->Fill(patchEnergy);
768 fhL1GPatchFake ->Fill(posx,posy);
769 fhL1GPatchFakeE->Fill(patchEnergy);
775 fhNPatchNotFake->Fill(areAllFakes,numberpatchNotFake);
776 fhNPatchFake ->Fill(areAllFakes,numberpatchFake);
781 for (Int_t col = 0; col < fgkFALTROCols; col++)
783 for (Int_t row = 0; row < fgkFALTRORows; row++)
785 if(fMapTrigL1G[row][col] > 0)
787 // cout <<"checking fMapTrigL1G[row][col]"<<fMapTrigL1G[row][col]<<endl;
788 fhL1GPatchAllFake->Fill(col,row);
790 Double_t patchEnergy=0;
791 for(Int_t irow = 0; irow < 2; irow++)
793 for(Int_t icol = 0; icol < 2; icol++)
798 if(shiftRow < fgkFALTRORows && shiftCol < fgkFALTROCols)
799 patchEnergy += fMapCellL1G[shiftRow][shiftCol] ;
803 fhL1GPatchAllFakeE->Fill(patchEnergy);
807 // cout << "row max"<<rowMax<<" colmax"<<colMax<< " fMapTrigL1G[rowMax][colMax]"<< fMapTrigL1G[rowMax][colMax]<<endl;
809 if(fMapTrigL1G[rowMax][colMax] > 0)
811 // printf("\npatch max [%i,%i] = %f\n",rowMax,colMax,patchMax);
812 fhL1GPatchAllFakeMax ->Fill(colMax,rowMax);
813 fhL1GPatchAllFakeMaxE->Fill(patchMax);
819 for (Int_t col = 0; col < fgkFALTROCols; col++)
821 for (Int_t row = 0; row < fgkFALTRORows; row++)
823 if(fMapTrigL1G[row][col] > 0)
825 fhL1GPatchNotAllFake->Fill(col,row);
827 Double_t patchEnergy = 0;
828 for(Int_t irow = 0; irow < 2; irow++)
830 for(Int_t icol = 0; icol < 2; icol++)
835 if(shiftRow < fgkFALTRORows && shiftCol < fgkFALTROCols)
836 patchEnergy += fMapCellL1G[shiftRow][shiftCol] ;
840 fhL1GPatchNotAllFakeE->Fill(patchEnergy);
846 if(fMapTrigL1G[rowMax][colMax] > 0 )
848 fhL1GPatchNotAllFakeMax ->Fill(colMax,rowMax);
849 fhL1GPatchNotAllFakeMaxE->Fill(patchMax);
853 fhGPMaxVV0TT->Fill(fV0Trigger, patchMax);
854 if( fEventL1G ) fhL1GPatchMax ->Fill(colMax,rowMax);
855 if( fEventL1G2 ) fhL1G2PatchMax->Fill(colMax,rowMax);
859 //____________________________________________________________
860 void AliAnalysisTaskEMCALTriggerQA::FillL1JetPatchHistograms()
864 Double_t patchMax = 0;
869 for (Int_t i = 0; i < 9; i++)
871 for (Int_t j = 0; j < 12; j++)
877 for (Int_t k = 0; k < 16; k++)
879 for (Int_t l = 0; l < 16; l++)
881 patchJ += Int_t(fMapTrigL1[4*j + l][4*i + k]);
885 if (patchJ > patchMax)
894 fhJPMaxVV0TT->Fill(fV0Trigger, patchMax);
895 if( fEventL1J ) fhL1JPatchMax ->Fill(colMax,rowMax);
896 if( fEventL1J2 ) fhL1J2PatchMax->Fill(colMax,rowMax);
900 //______________________________________________________
901 void AliAnalysisTaskEMCALTriggerQA::FillMapHistograms()
903 //Matrix with signal per channel
905 for (Int_t i = 0; i < fgkFALTRORows; i++)
907 for (Int_t j = 0; j < fgkFALTROCols; j++) //check x,y direction for reading FOR ((0,0) = top left);
909 fhFORAmp ->Fill( j, i, fMapCell [i][j]);
910 fhFORAmpL1G ->Fill( j, i, fMapCellL1G [i][j]);
911 fhFORAmpL1G2->Fill( j, i, fMapCellL1G2 [i][j]);
912 fhFORAmpL1J ->Fill( j, i, fMapCellL1J [i][j]);
913 fhFORAmpL1J2->Fill( j, i, fMapCellL1J2 [i][j]);
914 fhL0Amp ->Fill( j, i, fMapTrigL0 [i][j]);
915 fhL0AmpL1G ->Fill( j, i, fMapTrigL0L1G[i][j]);
916 fhL0AmpL1J ->Fill( j, i, fMapTrigL0L1J[i][j]);
917 fhL1Amp ->Fill( j, i, fMapTrigL1 [i][j]);
919 fhL1FOREnergy->Fill(i+fgkFALTRORows*j, fMapTrigL1 [i][j]);
920 fhL1GAmp ->Fill( j, i, fMapTrigL1G [i][j]);
921 fhL1G2Amp ->Fill( j, i, fMapTrigL1G2 [i][j]);
922 fhL1JAmp ->Fill( j, i, fMapTrigL1J [i][j]);
923 fhL1J2Amp ->Fill( j, i, fMapTrigL1J2 [i][j]);
924 fhFORMeanAmp->Fill( j, i, fMapCell [i][j]);
925 fhL0MeanAmp ->Fill( j, i, fMapTrigL0 [i][j]);
926 fhL1MeanAmp ->Fill( j, i, fMapTrigL1 [i][j]);
931 //____________________________________________________
932 void AliAnalysisTaskEMCALTriggerQA::FillV0Histograms()
934 //V0 analysis, only for ESDs
937 AliESDVZERO* eventV0 = dynamic_cast<AliESDVZERO*> (InputEvent()->GetVZEROData());
941 for (Int_t i = 0; i < 32; i++)
943 fV0C += eventV0->GetAdcV0C(i);
944 fV0A += eventV0->GetAdcV0A(i);
947 if (fSTUTotal != 0 && fFillV0SigHisto)
949 fhV0STU->Fill(fV0A+fV0C,fSTUTotal);
950 if( fV0A+fV0C > fMaxV0Signal && DebugLevel() > 0) printf("AliAnalysisTaskEMCALTriggerQA::UserExec() - Large fV0A+fV0C %f\n",fV0A+fV0C);
953 // Not interesting in case of data analysis, REVISE in future
954 if(fMCData || !fFillV0SigHisto) return ;
956 if( fEventL1G ) fhV0[kL1GammaTrig] ->Fill(fV0A+fV0C);
957 if( fEventL1G2 ) fhV0[kL1GammaTrig2] ->Fill(fV0A+fV0C);
958 if( fEventL1J ) fhV0[kL1JetTrig] ->Fill(fV0A+fV0C);
959 if( fEventL1J2 ) fhV0[kL1JetTrig2] ->Fill(fV0A+fV0C);
960 if( fEventMB ) fhV0[kMBTrig] ->Fill(fV0A+fV0C);
961 if( fEventL0 ) fhV0[kL0Trig] ->Fill(fV0A+fV0C);
962 if( fEventCen ) fhV0[kCentralTrig] ->Fill(fV0A+fV0C);
963 if( fEventSem ) fhV0[kSemiCentralTrig]->Fill(fV0A+fV0C);
964 if( fEventL1G && !fEventL1J) fhV0[kL1GammaOnlyTrig] ->Fill(fV0A+fV0C);
965 if( fEventL1J && !fEventL1G) fhV0[kL1JetOnlyTrig] ->Fill(fV0A+fV0C);
966 if( fEventL1G2 && !fEventL1G) fhV0[kL1Gamma2OnlyGammaTrig]->Fill(fV0A+fV0C);
967 if( fEventL1J2 && !fEventL1J) fhV0[kL1Jet2OnlyJetTrig] ->Fill(fV0A+fV0C);
968 //if(nL0Patch!=0 || nL1Patch!=0) printf("total TRU %f, total STU %f, V0C+V0A %f; nL0 %d, nL1 %d \n",
969 // fTRUTotal,fSTUTotal,fV0A+fV0C,nL0Patch,nL1Patch);
973 //________________________________________
974 void AliAnalysisTaskEMCALTriggerQA::Init()
976 //Init analysis parameters not set before
980 fRecoUtils = new AliEMCALRecoUtils ;
981 fRecoUtils->SwitchOnBadChannelsRemoval();
986 //_____________________________________________________
987 void AliAnalysisTaskEMCALTriggerQA::InitCellPatchMaps()
989 //Init to 0 and per event different cell/patch maps, depending on trigger type
991 for (Int_t i = 0; i < fgkFALTRORows; i++)
993 for (Int_t j = 0; j < fgkFALTROCols; j++)
995 fMapTrigL0 [i][j] = 0.;
996 fMapTrigL0L1G[i][j] = 0.;
997 fMapTrigL0L1J[i][j] = 0.;
998 fMapTrigL1G [i][j] = 0.;
999 fMapTrigL1G2 [i][j] = 0.;
1000 fMapTrigL1J [i][j] = 0.;
1001 fMapTrigL1J2 [i][j] = 0.;
1002 fMapTrigL1 [i][j] = 0.;
1003 fMapCell [i][j] = 0.;
1004 fMapCellL1G [i][j] = 0.;
1005 fMapCellL1G2 [i][j] = 0.;
1006 fMapCellL1J [i][j] = 0.;
1007 fMapCellL1J2 [i][j] = 0.;
1012 //________________________________________________
1013 void AliAnalysisTaskEMCALTriggerQA::InitGeometry()
1015 // Init geometry and set the geometry matrix, for the first event, skip the rest
1016 // Also set once the run dependent calibrations
1020 // Init the trigger bit once, correct depending on version
1024 TFile* file = AliAnalysisManager::GetAnalysisManager()->GetTree()->GetCurrentFile();
1026 const TList *clist = file->GetStreamerInfoCache();
1030 TStreamerInfo *cinfo = (TStreamerInfo*)clist->FindObject("AliESDCaloTrigger");
1031 Int_t verid = 5; // newer ESD header version
1034 cinfo = (TStreamerInfo*)clist->FindObject("AliAODCaloTrigger");
1035 verid = 3; // newer AOD header version
1039 Int_t classversionid = cinfo->GetClassVersion();
1040 //printf("********* Header class version %d *********** \n",classversionid);
1042 if (classversionid >= verid)
1047 } else printf("AliAnalysisTaskEMCALTriggerQA - Streamer info for trigger class not available, bit not changed\n");
1048 } else printf("AliAnalysisTaskEMCALTriggerQA - Streamer list not available!, bit not changed\n");
1050 Int_t runnumber = InputEvent()->GetRunNumber() ;
1056 if (runnumber < 140000) fGeoName = "EMCAL_FIRSTYEARV1";
1057 else if(runnumber < 171000) fGeoName = "EMCAL_COMPLETEV1";
1058 else fGeoName = "EMCAL_COMPLETE12SMV1";
1059 if(DebugLevel() > 0)
1060 printf("AliAnalysisTaskEMCALTriggerQA::InitGeometry() - Set EMCAL geometry name to <%s> for run %d\n",fGeoName.Data(),runnumber);
1063 fGeometry = AliEMCALGeometry::GetInstance(fGeoName);
1070 //_______________________________________________________
1071 void AliAnalysisTaskEMCALTriggerQA::InitHistogramArrays()
1073 //Histograms array initialization
1075 for (Int_t i = 0; i < fgkTriggerCombi; i++)
1078 fhClus [i] = 0; fhClusMax [i] = 0;
1079 fhClusCen[i] = 0; fhClusCenMax[i] = 0;
1080 fhClusV0 [i] = 0; fhClusV0Max [i] = 0;
1081 fhClusEta[i] = 0; fhClusEtaMax[i] = 0;
1082 fhClusPhi[i] = 0; fhClusPhiMax[i] = 0;
1084 fhClusEtaPhiHigh [i] = 0; fhClusEtaPhiHighCluMax [i] = 0;
1085 fhClusEtaPhiHighCellMax[i] = 0; fhClusEtaPhiHighCellMaxCluMax[i] = 0;
1086 fhClusEtaPhiLow [i] = 0; fhClusEtaPhiLowCluMax [i] = 0;
1087 fhClusEtaPhiLowCellMax [i] = 0; fhClusEtaPhiLowCellMaxCluMax [i] = 0;
1089 if(i<3){ fhClusMBPure[i] = 0; fhClusMaxMBPure[i] = 0; }
1093 //_____________________________________________________________________________
1094 void AliAnalysisTaskEMCALTriggerQA::SetTriggerEventBit( TString triggerclasses)
1096 // Check what trigger is the event, set the corresponding bit
1098 // Init trigger event bit
1102 fEventL1G2 = kFALSE;
1104 fEventL1J2 = kFALSE;
1108 //Min bias event trigger?
1109 if((triggerclasses.Contains("CINT") || triggerclasses.Contains("CPBI2_B1") ) &&
1110 (triggerclasses.Contains("-B-") || triggerclasses.Contains("-I-")) &&
1111 triggerclasses.Contains("-NOPF-ALLNOTRD") ) fEventMB = kTRUE;
1113 if(fMCData && triggerclasses.Contains("MB")) fEventMB = kTRUE;
1115 // EMC triggered event? Which type?
1116 if( triggerclasses.Contains("-B-") || triggerclasses.Contains("-S-") || triggerclasses.Contains("-I-") )
1118 if( triggerclasses.Contains("CEMC") &&
1119 !triggerclasses.Contains("EGA" ) &&
1120 !triggerclasses.Contains("EJE" ) &&
1121 !triggerclasses.Contains("EG1" ) &&
1122 !triggerclasses.Contains("EJ1" ) &&
1123 !triggerclasses.Contains("EG2" ) &&
1124 !triggerclasses.Contains("EJ2" ) ) fEventL0 = kTRUE;
1126 if( triggerclasses.Contains("EGA" ) || triggerclasses.Contains("EG1" ) ) fEventL1G = kTRUE;
1127 if( triggerclasses.Contains("EG2" ) ) fEventL1G2 = kTRUE;
1129 if( triggerclasses.Contains("EJE" ) || triggerclasses.Contains("EJ1" ) ) fEventL1J = kTRUE;
1130 if( triggerclasses.Contains("EJ2" ) ) fEventL1J2 = kTRUE;
1133 // Semi/Central PbPb trigger
1134 if (triggerclasses.Contains("CCENT_R2-B-NOPF-ALLNOTRD")) fEventCen = kTRUE;
1135 else if(triggerclasses.Contains("CSEMI_R1-B-NOPF-ALLNOTRD")) fEventSem = kTRUE;
1137 //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 ",
1138 // fEventMB,fEventL0,fEventL1G,fEventL1G2,fEventL1J,fEventL1J2,fEventCen,fEventSem,triggerclasses.Data());
1142 //___________________________________________________________
1143 void AliAnalysisTaskEMCALTriggerQA::UserCreateOutputObjects()
1145 // Init histograms and geometry
1147 fOutputList = new TList;
1148 fOutputList ->SetOwner(kTRUE);
1150 fhNEvents = new TH1F("hNEvents","Number of selected events",20,0,20);
1151 fhNEvents ->SetYTitle("N events");
1152 fhNEvents ->GetXaxis()->SetBinLabel(1 ,"All");
1153 fhNEvents ->GetXaxis()->SetBinLabel(2 ,"MB");
1154 fhNEvents ->GetXaxis()->SetBinLabel(3 ,"Central Pb");
1155 fhNEvents ->GetXaxis()->SetBinLabel(4 ,"SemiCentral Pb");
1156 fhNEvents ->GetXaxis()->SetBinLabel(5 ,"L0");
1157 fhNEvents ->GetXaxis()->SetBinLabel(6 ,"L1-G1");
1158 fhNEvents ->GetXaxis()->SetBinLabel(7 ,"L1-G2");
1159 fhNEvents ->GetXaxis()->SetBinLabel(8 ,"L1-J1");
1160 fhNEvents ->GetXaxis()->SetBinLabel(9 ,"L1-J2");
1161 fhNEvents ->GetXaxis()->SetBinLabel(10 ,"L1-G1 & !L1-J1");
1162 fhNEvents ->GetXaxis()->SetBinLabel(11 ,"L1-J1 & !L1-G1");
1163 fhNEvents ->GetXaxis()->SetBinLabel(12 ,"L1-J1 & L1-G1");
1164 fhNEvents ->GetXaxis()->SetBinLabel(13 ,"MB & !L1 & !L0");
1165 fhNEvents ->GetXaxis()->SetBinLabel(14,"L0 & !MB");
1166 fhNEvents ->GetXaxis()->SetBinLabel(15,"L1-G1 & !MB");
1167 fhNEvents ->GetXaxis()->SetBinLabel(16,"L1-J1 & !MB");
1168 fhNEvents ->GetXaxis()->SetBinLabel(17,"L1-G1 & (Cen | Semi)");
1169 fhNEvents ->GetXaxis()->SetBinLabel(18,"L1-J1 & (Cen | Semi)");
1170 fhNEvents ->GetXaxis()->SetBinLabel(19,"L1-G2 & !L1-G1");
1171 fhNEvents ->GetXaxis()->SetBinLabel(20,"L1-J2 & !L1-J1");
1173 fhFORAmp = new TH2F("hFORAmp", "FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column",
1174 fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1175 fhFORAmp ->SetXTitle("Index #eta (columnns)");
1176 fhFORAmp ->SetYTitle("Index #phi (rows)");
1177 fhFORAmp ->SetZTitle("Amplitude");
1179 fhFORAmpL1G = new TH2F("hFORAmpL1G1", "FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1G1 trigger condition",
1180 fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1181 fhFORAmpL1G ->SetXTitle("Index #eta (columnns)");
1182 fhFORAmpL1G ->SetYTitle("Index #phi (rows)");
1183 fhFORAmpL1G ->SetZTitle("Amplitude");
1185 fhFORAmpL1G2 = new TH2F("hFORAmpL1G2", "FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1G2 trigger condition",
1186 fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1187 fhFORAmpL1G2 ->SetXTitle("Index #eta (columnns)");
1188 fhFORAmpL1G2 ->SetYTitle("Index #phi (rows)");
1189 fhFORAmpL1G2 ->SetZTitle("Amplitude");
1191 fhFORAmpL1J = new TH2F("hFORAmpL1J1", "FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1J1 trigger condition",
1192 fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1193 fhFORAmpL1J ->SetXTitle("Index #eta (columnns)");
1194 fhFORAmpL1J ->SetYTitle("Index #phi (rows)");
1195 fhFORAmpL1J ->SetZTitle("Amplitude");
1197 fhFORAmpL1J2 = new TH2F("hFORAmpL1J2", "FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1J2 trigger condition",
1198 fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1199 fhFORAmpL1J2 ->SetXTitle("Index #eta (columnns)");
1200 fhFORAmpL1J2 ->SetYTitle("Index #phi (rows)");
1201 fhFORAmpL1J2 ->SetZTitle("Amplitude");
1204 fhL0Amp = new TH2F("hL0Amp","FALTRO signal per Row and Column",
1205 fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1206 fhL0Amp ->SetXTitle("Index #eta (columnns)");
1207 fhL0Amp ->SetYTitle("Index #phi (rows)");
1208 fhL0Amp ->SetZTitle("Amplitude");
1210 fhL0AmpL1G = new TH2F("hL0AmpL1G","FALTRO signal per Row and Column, with L1G trigger condition",
1211 fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1212 fhL0AmpL1G ->SetXTitle("Index #eta (columnns)");
1213 fhL0AmpL1G ->SetYTitle("Index #phi (rows)");
1214 fhL0AmpL1G ->SetZTitle("Amplitude");
1217 fhL0AmpL1J = new TH2F("hL0AmpL1J","FALTRO signal per Row and Column, with L1j trigger condition",
1218 fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1219 fhL0AmpL1J ->SetXTitle("Index #eta (columnns)");
1220 fhL0AmpL1J ->SetYTitle("Index #phi (rows)");
1221 fhL0AmpL1J ->SetZTitle("Amplitude");
1224 fhL1Amp = new TH2F("hL1Amp","STU signal per Row and Column",
1225 fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1226 fhL1Amp ->SetXTitle("Index #eta (columnns)");
1227 fhL1Amp ->SetYTitle("Index #phi (rows)");
1228 fhL1Amp ->SetZTitle("Amplitude");
1230 fhL1GAmp = new TH2F("hL1G1Amp","STU signal per Row and Column for L1 Gamma1",
1231 fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1232 fhL1GAmp ->SetXTitle("Index #eta (columnns)");
1233 fhL1GAmp ->SetYTitle("Index #phi (rows)");
1234 fhL1GAmp ->SetZTitle("Amplitude");
1236 fhL1G2Amp = new TH2F("hL1G2Amp","STU signal per Row and Column for L1 Gamma2",
1237 fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1238 fhL1G2Amp ->SetXTitle("Index #eta (columnns)");
1239 fhL1G2Amp ->SetYTitle("Index #phi (rows)");
1240 fhL1G2Amp ->SetZTitle("Amplitude");
1242 fhL1JAmp = new TH2F("hL1J1Amp","STU signal per Row and Column for L1 Jet1",
1243 fgkFALTROCols/4,0,fgkFALTROCols,fgkFALTRORows/4,0,fgkFALTRORows);
1244 fhL1JAmp ->SetXTitle("Index #eta (columnns)");
1245 fhL1JAmp ->SetYTitle("Index #phi (rows)");
1246 fhL1JAmp ->SetZTitle("Amplitude");
1248 fhL1J2Amp = new TH2F("hL1J2Amp","STU signal per Row and Column for L1 Jet2",
1249 fgkFALTROCols/4,0,fgkFALTROCols,fgkFALTRORows/4,0,fgkFALTRORows);
1250 fhL1J2Amp ->SetXTitle("Index #eta (columnns)");
1251 fhL1J2Amp ->SetYTitle("Index #phi (rows)");
1252 fhL1J2Amp ->SetZTitle("Amplitude");
1254 fhL1FOREnergy = new TH2F("hL1FOREnergy","FOR index vs FOR energy",
1255 fgkFALTROCols*fgkFALTRORows,0,fgkFALTROCols*fgkFALTRORows,200,0,200);
1256 fhL1FOREnergy ->SetXTitle("Index FOR");
1257 fhL1FOREnergy ->SetYTitle("Energy (ADC)");
1259 fhL0Patch = new TH2F("hL0Patch","FOR with associated L0 Patch",
1260 fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1261 fhL0Patch ->SetXTitle("Index #eta (columnns)");
1262 fhL0Patch ->SetYTitle("Index #phi (rows)");
1263 fhL0Patch ->SetZTitle("counts");
1265 fhL1GPatch = new TH2F("hL1G1Patch","FOR with associated L1 Gamma Patch1",
1266 fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1267 fhL1GPatch ->SetXTitle("Index #eta (columnns)");
1268 fhL1GPatch ->SetYTitle("Index #phi (rows)");
1269 fhL1GPatch ->SetZTitle("counts");
1271 fhL1G2Patch = new TH2F("hL1G2Patch","FOR with associated L1 Gamma2 Patch",
1272 fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1273 fhL1G2Patch ->SetXTitle("Index #eta (columnns)");
1274 fhL1G2Patch ->SetYTitle("Index #phi (rows)");
1275 fhL1G2Patch ->SetZTitle("counts");
1277 fhL1GPatchNotFake = new TH2F("hL1G1PatchNotFake","FOR with L1 Gamma1 Patch associated to energetic cells",
1278 fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1279 fhL1GPatchNotFake ->SetXTitle("Index #eta (columnns)");
1280 fhL1GPatchNotFake ->SetYTitle("Index #phi (rows)");
1281 fhL1GPatchNotFake ->SetZTitle("counts");
1283 fhL1GPatchFake = new TH2F("hL1G1PatchFake","FOR without L1 Gamma1 Patch associated to energetic cells",
1284 fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1285 fhL1GPatchFake ->SetXTitle("Index #eta (columnns)");
1286 fhL1GPatchFake ->SetYTitle("Index #phi (rows)");
1287 fhL1GPatchFake ->SetZTitle("counts");
1290 fhL1GPatchNotAllFake = new TH2F("hL1G1PatchNotAllFake","FOR with one L1 Gamma1 Patch associated to an energetic cell",
1291 fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1292 fhL1GPatchNotAllFake ->SetXTitle("Index #eta (columnns)");
1293 fhL1GPatchNotAllFake ->SetYTitle("Index #phi (rows)");
1294 fhL1GPatchNotAllFake ->SetZTitle("counts");
1296 fhL1GPatchAllFake = new TH2F("hL1G1PatchAllFake","FOR without any L1 Gamma1 Patch associated to an energetic cell",
1297 fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1298 fhL1GPatchAllFake ->SetXTitle("Index #eta (columnns)");
1299 fhL1GPatchAllFake ->SetYTitle("Index #phi (rows)");
1300 fhL1GPatchAllFake ->SetZTitle("counts");
1302 fhL1GPatchAllFakeMax = new TH2F("hL1G1PatchAllFakeMax","FOR with L1 Gamma1 Patch Max not associated to an energetic cell",
1303 fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1304 fhL1GPatchAllFakeMax ->SetXTitle("Index #eta (columnns)");
1305 fhL1GPatchAllFakeMax ->SetYTitle("Index #phi (rows)");
1306 fhL1GPatchAllFakeMax ->SetZTitle("counts");
1308 fhL1GPatchNotAllFakeMax = new TH2F("hL1G1PatchNotAllFakeMax","FOR with one L1 Gamma1 Patch Max associated to an energetic cell",
1309 fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1310 fhL1GPatchNotAllFakeMax ->SetXTitle("Index #eta (columnns)");
1311 fhL1GPatchNotAllFakeMax ->SetYTitle("Index #phi (rows)");
1312 fhL1GPatchNotAllFakeMax ->SetZTitle("counts");
1314 fhL1GPatchNotAllFakeMaxE = new TH1F("hL1G1PatchNotAllFakeMaxE","Energy distribution of FOR in events with L1 Gamma1 Patch Max associated to an energetic cell",
1315 fNBinsClusterE,0,fMaxClusterE);
1316 fhL1GPatchNotAllFakeMaxE ->SetXTitle("Energy (GeV)");
1319 fhL1GPatchAllFakeMaxE = new TH1F("hL1G1PatchAllFakeMaxE","Energy distribution of FOR in events with L1 Gamma1 Patch Max not associated to an energetic cell",
1320 fNBinsClusterE,0,fMaxClusterE);
1321 fhL1GPatchAllFakeMaxE ->SetXTitle("Energy (GeV)");
1323 fhL1GPatchNotAllFakeE = new TH1F("hL1G1PatchNotAllFakeE","Energy distribution of FOR in events with L1 Gamma1 Patch not associated to an energetic cell",
1324 fNBinsClusterE,0,fMaxClusterE);
1325 fhL1GPatchNotAllFakeE ->SetXTitle("Energy (GeV)");
1327 fhL1GPatchAllFakeE = new TH1F("hL1G1PatchAllFakeE","Energy distribution of FOR in events with L1 Gamma1 Patch associated to an energetic cell",
1328 fNBinsClusterE,0,fMaxClusterE);
1329 fhL1GPatchAllFakeE ->SetXTitle("Energy (GeV)");
1332 fhL1GPatchFakeE = new TH1F("hL1G1PatchFakeE","Energy distribution of FOR with L1 Gamma1 Patch not associated to an energetic cell",
1333 fNBinsClusterE,0,fMaxClusterE);
1334 fhL1GPatchFakeE ->SetXTitle("Energy (GeV)");
1336 fhL1GPatchNotFakeE = new TH1F("hL1G1PatchNotFakeE","Energy distribution of FOR with L1 Gamma1 Patch associated to an energetic cell",
1337 fNBinsClusterE,0,fMaxClusterE);
1338 fhL1GPatchNotFakeE ->SetXTitle("Energy (GeV)");
1340 fhNPatchFake = new TH2F("hNPatchFake","number of fake patchs vs. all patchs are fake",
1341 3,0,3, 2880,0,2880);
1342 fhNPatchFake ->SetYTitle("number of fake patchs");
1343 fhNPatchFake ->SetXTitle("all fake event");
1344 fhNPatchFake ->SetZTitle("counts");
1347 fhNPatchNotFake = new TH2F("hNPatchNotFake","number of Not fake patchs vs. all patchs are fake",
1348 3, 0, 3, 2000,0,2000);
1349 fhNPatchNotFake ->SetYTitle("number of Not fake patchs");
1350 fhNPatchNotFake ->SetXTitle("all fake event");
1351 fhNPatchNotFake ->SetZTitle("counts");
1354 fhL1JPatch = new TH2F("hL1J1Patch","FOR with associated L1 Jet1 Patch",
1355 fgkFALTROCols/4,0,fgkFALTROCols,fgkFALTRORows/4,0,fgkFALTRORows);
1356 fhL1JPatch ->SetXTitle("Index #eta (columnns)");
1357 fhL1JPatch ->SetYTitle("Index #phi (rows)");
1358 fhL1JPatch ->SetZTitle("counts");
1360 fhL1J2Patch = new TH2F("hL1J2Patch","FOR with associated L1 Jet2 Patch",
1361 fgkFALTROCols/4,0,fgkFALTROCols,fgkFALTRORows/4,0,fgkFALTRORows);
1362 fhL1J2Patch ->SetXTitle("Index #eta (columnns)");
1363 fhL1J2Patch ->SetYTitle("Index #phi (rows)");
1364 fhL1J2Patch ->SetZTitle("counts");
1368 fhV0STU = new TH2I("hV0STU","Total signal STU vs V0C+V0S",
1369 fNBinsV0Signal,0,fMaxV0Signal,fNBinsSTUSignal,0,fMaxSTUSignal);
1370 fhV0STU ->SetXTitle("Signal V0C+V0A");
1371 fhV0STU ->SetYTitle("Total signal STU");
1372 fhV0STU ->SetZTitle("counts");
1375 fhFEESTU = new TH2F("hFEESTU","STU / FEE vs channel", fNBinsSTUFEERatio,0,fMaxSTUFEERatio,30,0,30);
1376 fhFEESTU ->SetXTitle("STU/FEE signal");
1377 fhFEESTU ->SetYTitle("channel");
1378 fhFEESTU ->SetZTitle("counts");
1380 fhTRUSTU = new TH2F("hTRUSTU","STU / TRU vs channel", fNBinsSTUTRURatio,0,fMaxSTUTRURatio,30,0,30);
1381 fhTRUSTU ->SetXTitle("STU/TRU signal");
1382 fhTRUSTU ->SetYTitle("channel");
1383 fhTRUSTU ->SetZTitle("counts");
1385 fhGPMaxVV0TT = new TH2F("hGPMaxVV0TT","Maximum patch of L1-Gamma vs V0 signal in STU",fNBinsV0Signal,0,fMaxV0Signal,1000,0,1000);
1386 fhGPMaxVV0TT ->SetXTitle("V0 from STU");
1387 fhGPMaxVV0TT ->SetYTitle("Patch Max");
1389 fhJPMaxVV0TT = new TH2F("hJPMaxVV0TT","Maximum patch of L1-Jet vs V0 signal in STU",fNBinsV0Signal,0,fMaxV0Signal,1000,0,1000);
1390 fhJPMaxVV0TT ->SetXTitle("V0 from STU");
1391 fhJPMaxVV0TT ->SetYTitle("Patch Max");
1393 fhFORMeanAmp = new TProfile2D("hFORMeanAmp", "Mean FastOR(FEE) signal per Row and Column", fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1394 fhFORMeanAmp->SetXTitle("Index #eta");
1395 fhFORMeanAmp->SetYTitle("Index #phi");
1397 fhL0MeanAmp = new TProfile2D("hL0MeanAmp", "Mean FastOR(TRU) signal per Row and Column", fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1398 fhL0MeanAmp->SetXTitle("Index #eta");
1399 fhL0MeanAmp->SetYTitle("Index #phi");
1401 fhL1MeanAmp = new TProfile2D("hL1MeanAmp", "Mean FastOR(STU) signal per Row and Column", fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1402 fhL1MeanAmp->SetXTitle("Index #eta");
1403 fhL1MeanAmp->SetYTitle("Index #phi");
1405 fhL1GPatchMax = new TH2F("hL1G1PatchMax","FOR of max amplitude patch with associated L1 Gamma1 Patch",
1406 fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1407 fhL1GPatchMax ->SetXTitle("Index #eta (columnns)");
1408 fhL1GPatchMax ->SetYTitle("Index #phi (rows)");
1409 fhL1GPatchMax ->SetZTitle("counts");
1411 fhL1G2PatchMax = new TH2F("hL1G2PatchMax","FOR of max amplitude patch with associated L1 Gamma2 Patch",
1412 fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1413 fhL1G2PatchMax ->SetXTitle("Index #eta (columnns)");
1414 fhL1G2PatchMax ->SetYTitle("Index #phi (rows)");
1415 fhL1G2PatchMax ->SetZTitle("counts");
1417 fhL1JPatchMax = new TH2F("hL1J1PatchMax","FOR of max amplitude patch with associated L1 Jet1 Patch",
1418 fgkFALTROCols/4,0,fgkFALTROCols,fgkFALTRORows/4,0,fgkFALTRORows);
1419 fhL1JPatchMax ->SetXTitle("Index #eta (columnns)");
1420 fhL1JPatchMax ->SetYTitle("Index #phi (rows)");
1421 fhL1JPatchMax ->SetZTitle("counts");
1423 fhL1J2PatchMax = new TH2F("hL1J2PatchMax","FOR of max amplitude patch with associated L1 Jet2 Patch",
1424 fgkFALTROCols/4,0,fgkFALTROCols,fgkFALTRORows/4,0,fgkFALTRORows);
1425 fhL1J2PatchMax ->SetXTitle("Index #eta (columnns)");
1426 fhL1J2PatchMax ->SetYTitle("Index #phi (rows)");
1427 fhL1J2PatchMax ->SetZTitle("counts");
1429 fOutputList->Add(fhNEvents);
1430 fOutputList->Add(fhV0STU);
1431 fOutputList->Add(fhFORAmp);
1432 fOutputList->Add(fhFORAmpL1G);
1433 fOutputList->Add(fhFORAmpL1G2);
1434 fOutputList->Add(fhFORAmpL1J);
1435 fOutputList->Add(fhFORAmpL1J2);
1436 fOutputList->Add(fhL0Amp);
1437 fOutputList->Add(fhL0AmpL1G);
1438 fOutputList->Add(fhL0AmpL1J);
1439 fOutputList->Add(fhL1Amp);
1440 fOutputList->Add(fhL1GAmp);
1441 fOutputList->Add(fhL1G2Amp);
1442 fOutputList->Add(fhL1JAmp);
1443 fOutputList->Add(fhL1J2Amp);
1444 fOutputList->Add(fhL1FOREnergy);
1445 fOutputList->Add(fhL0Patch);
1446 fOutputList->Add(fhL1GPatch);
1447 fOutputList->Add(fhL1G2Patch);
1448 fOutputList->Add(fhL1GPatchNotFake);
1449 fOutputList->Add(fhL1GPatchFake);
1450 fOutputList->Add(fhL1GPatchAllFake);
1451 fOutputList->Add(fhL1GPatchNotAllFake);
1452 fOutputList->Add(fhL1GPatchNotAllFakeMax);
1453 fOutputList->Add(fhL1GPatchAllFakeMax);
1454 fOutputList->Add(fhL1GPatchNotAllFakeMaxE);
1455 fOutputList->Add(fhL1GPatchAllFakeMaxE);
1456 fOutputList->Add(fhL1GPatchNotAllFakeE);
1457 fOutputList->Add(fhL1GPatchAllFakeE);
1458 fOutputList->Add(fhL1GPatchFakeE);
1459 fOutputList->Add(fhL1GPatchNotFakeE);
1460 fOutputList->Add(fhNPatchFake);
1461 fOutputList->Add(fhNPatchNotFake);
1463 fOutputList->Add(fhL1JPatch);
1464 fOutputList->Add(fhL1J2Patch);
1465 fOutputList->Add(fhFEESTU);
1466 fOutputList->Add(fhTRUSTU);
1468 fOutputList->Add(fhGPMaxVV0TT);
1469 fOutputList->Add(fhJPMaxVV0TT);
1471 fOutputList->Add(fhFORMeanAmp);
1472 fOutputList->Add(fhL0MeanAmp);
1473 fOutputList->Add(fhL1MeanAmp);
1475 fOutputList->Add(fhL1GPatchMax);
1476 fOutputList->Add(fhL1G2PatchMax);
1477 fOutputList->Add(fhL1JPatchMax);
1478 fOutputList->Add(fhL1J2PatchMax);
1482 PostData(1, fOutputList);
1486 // Cluster histograms, E
1487 TString hName [] = {"MB","L0","L1G1","L1G2","L1J1","L1J2","L1G1NoL1J1","L1J1NoLG1","L1G2NoL1G1","L1J2NoL1J1","Central","SemiCentral"};
1488 TString hTitle [] = {"MB trigger","L0 trigger","L1 Gamma1 trigger","L1 Gamma2 trigger","L1 Jet1 trigger","L1 Jet2 trigger",
1489 "L1 Gamma1 trigger and not L1 Jet1" ,"L1 Jet1 trigger and not L1 Gamma1",
1490 "L1 Gamma2 trigger and not L1 Gamma1","L1 Jet2 trigger and not L1 Jet1",
1491 "Central trigger","SemiCentral trigger"};
1493 for(Int_t i=0; i < 3; i++)
1498 fhClusMBPure[i] = new TH1F(Form("hClus%sPure",hName[j].Data()),
1499 Form("clusters E distribution for %s, no other EMCAL trigger on",hTitle[j].Data()),
1500 fNBinsClusterE,0,fMaxClusterE);
1501 fhClusMBPure[i] ->SetXTitle("Energy (GeV)");
1502 fOutputList->Add(fhClusMBPure[i]);
1504 fhClusMaxMBPure[i] = new TH1F(Form("hClusMax%sPure",hName[j].Data()),
1505 Form("maximum energy cluster per event for %s, no other EMCAL trigger on",hTitle[j].Data()),
1506 fNBinsClusterE,0,fMaxClusterE);
1507 fhClusMaxMBPure[i] ->SetXTitle("Energy (GeV)");
1508 fOutputList->Add(fhClusMaxMBPure[i]);
1511 for(Int_t i=0; i < fgkTriggerCombi; i++)
1515 fhV0[i] = new TH1F(Form("hV0%s",hName[i].Data()),
1516 Form("V0 distribution for %s",hTitle[i].Data()),
1517 fNBinsV0Signal,0,fMaxV0Signal);
1518 fhV0[i]->SetXTitle("V0");
1519 fOutputList->Add(fhV0[i] );
1522 fhClus[i] = new TH1F(Form("hClus%s",hName[i].Data()),
1523 Form("clusters E distribution for %s",hTitle[i].Data()),
1524 fNBinsClusterE,0,fMaxClusterE);
1525 fhClus[i] ->SetXTitle("Energy (GeV)");
1526 fOutputList->Add(fhClus[i]);
1528 fhClusMax[i] = new TH1F(Form("hClusMax%s",hName[i].Data()),
1529 Form("maximum energy cluster per event for %s",hTitle[i].Data()),
1530 fNBinsClusterE,0,fMaxClusterE);
1531 fhClusMax[i]->SetXTitle("Energy (GeV)");
1532 fOutputList->Add(fhClusMax[i]);
1534 // Cluster histograms, E vs Cen
1536 fhClusCen[i] = new TH2F(Form("hClusCen%s",hName[i].Data()),
1537 Form("clusters E distribution vs centrality for %s",hTitle[i].Data()),
1538 fNBinsClusterE,0,fMaxClusterE,100, 0, 100);
1539 fhClusCen[i] ->SetXTitle("Energy (GeV)");
1540 fhClusCen[i] ->SetYTitle("Centrality");
1541 fOutputList->Add(fhClusCen[i]);
1543 fhClusCenMax[i] = new TH2F(Form("hClusCenMax%s",hName[i].Data()),
1544 Form("maximum energy cluster per event vs centrality for %s",hTitle[i].Data()),
1545 fNBinsClusterE,0,fMaxClusterE,100, 0, 100);
1546 fhClusCenMax[i]->SetXTitle("Energy (GeV)");
1547 fhClusCenMax[i]->SetYTitle("Centrality");
1548 fOutputList->Add(fhClusCenMax[i]);
1550 // Cluster histograms, E vs V0
1554 fhClusV0[i] = new TH2F(Form("hClusV0%s",hName[i].Data()),
1555 Form("clusters E distribution vs V0 for %s",hTitle[i].Data()),
1556 fNBinsClusterE,0,fMaxClusterE,fNBinsV0Signal,0,fMaxV0Signal);
1557 fhClusV0[i] ->SetXTitle("Energy (GeV)");
1558 fhClusV0[i] ->SetYTitle("V0");
1559 fOutputList->Add(fhClusV0[i]);
1561 fhClusV0Max[i] = new TH2F(Form("hClusV0Max%s",hName[i].Data()),
1562 Form("maximum energy cluster per event vs V0 for %s",hTitle[i].Data()),
1563 fNBinsClusterE,0,fMaxClusterE,fNBinsV0Signal,0,fMaxV0Signal);
1564 fhClusV0Max[i]->SetXTitle("Energy (GeV)");
1565 fhClusV0Max[i]->SetYTitle("V0");
1566 fOutputList->Add(fhClusV0Max[i]);
1569 // Cluster acceptance histograms
1570 Float_t etamin =-0.7;
1571 Float_t etamax = 0.7;
1574 Float_t phimin = 80. *TMath::DegToRad();
1575 Float_t phimax = 190.*TMath::DegToRad();
1578 // Cluster histograms, Pseudorapidity vs Azimuthal angle
1580 fhClusEtaPhiHigh[i] = new TH2F(Form("hClusEtaPhiHigh%s",hName[i].Data()),
1581 Form("clusters distribution #eta vs #phi for %s, E > %1.1f GeV",hTitle[i].Data(),fEtaPhiEnMin),
1582 neta, etamin, etamax,nphi, phimin, phimax);
1583 fhClusEtaPhiHigh[i] ->SetXTitle("#eta");
1584 fhClusEtaPhiHigh[i] ->SetYTitle("#phi (rad)");
1585 fOutputList->Add(fhClusEtaPhiHigh[i]);
1587 fhClusEtaPhiLow[i] = new TH2F(Form("hClusEtaPhiLow%s",hName[i].Data()),
1588 Form("clusters distribution #eta vs #phi for %s, E < %1.1f GeV",hTitle[i].Data(),fEtaPhiEnMin),
1589 neta, etamin, etamax,nphi, phimin, phimax);
1590 fhClusEtaPhiLow[i] ->SetXTitle("#eta");
1591 fhClusEtaPhiLow[i] ->SetYTitle("#phi (rad)");
1592 fOutputList->Add(fhClusEtaPhiLow[i]);
1594 if(fFillClusAcceptHisto)
1596 fhClusEtaPhiHighCluMax[i] = new TH2F(Form("hClusEtaPhiHighCluMax%s",hName[i].Data()),
1597 Form("maximum energy cluster per event #eta vs #phi for %s, E > %1.1f GeV",hTitle[i].Data(),fEtaPhiEnMin),
1598 neta, etamin, etamax,nphi, phimin, phimax);
1599 fhClusEtaPhiHighCluMax[i]->SetXTitle("#eta");
1600 fhClusEtaPhiHighCluMax[i]->SetYTitle("#phi (rad)");
1601 fOutputList->Add(fhClusEtaPhiHighCluMax[i]);
1603 fhClusEtaPhiLowCluMax[i] = new TH2F(Form("hClusEtaPhiLowCluMax%s",hName[i].Data()),
1604 Form("maximum energy cluster per event #eta vs #phi for %s, E < %1.1f GeV",hTitle[i].Data(),fEtaPhiEnMin),
1605 neta, etamin, etamax,nphi, phimin, phimax);
1606 fhClusEtaPhiLowCluMax[i]->SetXTitle("#eta");
1607 fhClusEtaPhiLowCluMax[i]->SetYTitle("#phi (rad)");
1608 fOutputList->Add(fhClusEtaPhiLowCluMax[i]);
1610 fhClusEtaPhiHighCellMax[i] = new TH2F(Form("hClusEtaPhiHighCellMax%s",hName[i].Data()),
1611 Form("Cluster hit map in calorimeter (max cell), column vs row for %s, E > %1.1f GeV",hTitle[i].Data(),fEtaPhiEnMin),
1612 fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1613 fhClusEtaPhiHighCellMax[i] ->SetXTitle("Index #eta (columnns)");
1614 fhClusEtaPhiHighCellMax[i] ->SetYTitle("Index #phi (rows)");
1615 fOutputList->Add(fhClusEtaPhiHighCellMax[i]);
1617 fhClusEtaPhiHighCellMaxCluMax[i] = new TH2F(Form("hClusEtaPhiHighCellMaxCluMax%s",hName[i].Data()),
1618 Form("Max E cluster hit map in calorimeter (max cell), column vs row for %s, E > %1.1f GeV",
1619 hTitle[i].Data(),fEtaPhiEnMin),fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1620 fhClusEtaPhiHighCellMaxCluMax[i]->SetXTitle("Index #eta (columnns)");
1621 fhClusEtaPhiHighCellMaxCluMax[i]->SetYTitle("Index #phi (rows)");
1622 fOutputList->Add(fhClusEtaPhiHighCellMaxCluMax[i]);
1624 fhClusEtaPhiLowCellMax[i] = new TH2F(Form("hClusEtaPhiLowCellMax%s",hName[i].Data()),
1625 Form("Cluster hit map in calorimeter (max cell), column vs row for %s, E < %1.1f GeV",hTitle[i].Data(),fEtaPhiEnMin),
1626 fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1627 fhClusEtaPhiLowCellMax[i] ->SetXTitle("Index #eta (columnns)");
1628 fhClusEtaPhiLowCellMax[i] ->SetYTitle("#phi (rad)");
1629 fOutputList->Add(fhClusEtaPhiLowCellMax[i]);
1631 fhClusEtaPhiLowCellMaxCluMax[i] = new TH2F(Form("hClusEtaPhiLowCellMaxCluMax%s",hName[i].Data()),
1632 Form("Max E cluster hit map in calorimeter (max cell), column vs row for %s, E < %1.1f GeV",
1633 hTitle[i].Data(),fEtaPhiEnMin),fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1634 fhClusEtaPhiLowCellMaxCluMax[i]->SetXTitle("Index #eta (columnns)");
1635 fhClusEtaPhiLowCellMaxCluMax[i]->SetYTitle("#phi (rad)");
1636 fOutputList->Add(fhClusEtaPhiLowCellMaxCluMax[i]);
1638 // Cluster histograms, E vs Pseudorapidity
1640 fhClusEta[i] = new TH2F(Form("hClusEta%s",hName[i].Data()),
1641 Form("clusters distribution vs #eta for %s",hTitle[i].Data()),
1642 fNBinsClusterE,0,fMaxClusterE,neta, etamin, etamax);
1643 fhClusEta[i] ->SetXTitle("Energy (GeV)");
1644 fhClusEta[i] ->SetYTitle("#eta");
1645 fOutputList->Add(fhClusEta[i]);
1647 fhClusEtaMax[i] = new TH2F(Form("hClusEtaMax%s",hName[i].Data()),
1648 Form("maximum energy cluster per event vs #eta for %s",hTitle[i].Data()),
1649 fNBinsClusterE,0,fMaxClusterE,neta, etamin, etamax);
1650 fhClusEtaMax[i]->SetXTitle("Energy (GeV)");
1651 fhClusEtaMax[i]->SetYTitle("#eta");
1652 fOutputList->Add(fhClusEtaMax[i]);
1654 // Cluster histograms, E vs Azimuthal angle
1656 fhClusPhi[i] = new TH2F(Form("hClusPhi%s",hName[i].Data()),
1657 Form("clusters distribution vs #phi for %s",hTitle[i].Data()),
1658 fNBinsClusterE,0,fMaxClusterE,nphi, phimin, phimax);
1659 fhClusPhi[i] ->SetXTitle("Energy (GeV)");
1660 fhClusPhi[i] ->SetYTitle("#phi (rad)");
1661 fOutputList->Add(fhClusPhi[i]);
1663 fhClusPhiMax[i] = new TH2F(Form("hClusPhiMax%s",hName[i].Data()),
1664 Form("maximum energy cluster per event vs #phi for %s",hTitle[i].Data()),
1665 fNBinsClusterE,0,fMaxClusterE,nphi, phimin, phimax);
1666 fhClusPhiMax[i]->SetXTitle("Energy (GeV)");
1667 fhClusPhiMax[i]->SetYTitle("#phi (rad)");
1668 fOutputList->Add(fhClusPhiMax[i]);
1672 PostData(1, fOutputList);
1675 //______________________________________________________
1676 void AliAnalysisTaskEMCALTriggerQA::UserExec(Option_t *)
1680 AliVEvent* event = InputEvent();
1684 AliError("No Event, exit");
1688 ////////////////////////////////////////////////
1689 // Execute task on physics events with triggers
1691 //trigger configuration
1692 TString triggerclasses = event->GetFiredTriggerClasses();
1695 Int_t eventType = ((AliVHeader*)event->GetHeader())->GetEventType();
1699 // physics events eventType=7, select only those
1700 if(triggerclasses=="" || eventType != 7) return;
1703 //printf("Event Type %d; Trigger classes: %s\n",eventType,triggerclasses.Data());
1705 // Check what trigger we had
1706 SetTriggerEventBit(triggerclasses);
1708 if(!fEventMB && !fEventL0 && !fEventL1G && !fEventL1G2 && !fEventL1J && ! fEventL1J2 && !fEventCen && !fEventSem) return;
1710 ////////////////////////////
1711 // Init geometry, OADB, maps
1713 InitGeometry(); // only once, must be done before OADB, geo OADB accessed here
1715 InitCellPatchMaps(); //init to 0 map for cells and patches
1720 FillEventCounterHistogram();
1724 FillTriggerPatchMaps(triggerclasses);
1726 //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",
1727 // fEventMB,fEventL0,fEventL1G,fEventL1G2,fEventL1J,fEventL1J2,fEventCen,fEventSem,triggerclasses.Data());
1729 FillMapHistograms();
1733 FillL1GammaPatchHistograms();
1735 FillL1JetPatchHistograms();
1737 // FEE vs STU vs TRU
1738 FillCorrelationHistograms();
1742 PostData(1, fOutputList);