AliPhysics  64f4410 (64f4410)
AliAnalysisTaskEmcalTriggerPatchJetMatch.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 //-------------------------------------------------------------------------
17 // 1) Analysis task to identify the jet whose cluster fired the trigger patch
18 // 2) perform some QA on the patch / cluster / jet
19 // 3) and pass the saved out collection of jet(s) to other tasks
20 //
21 // currently set up for GA trigger
22 //
23 // Author: Joel Mazer (joel.mazer@cern.ch)
24 //-------------------------------------------------------------------------
25 
26 // task head include
27 //#include "AliAnalysisTaskEmcalTriggerPatchJetMatch.h"
28 #include <iostream>
29 
30 // ROOT includes
31 #include <TClonesArray.h>
32 #include <TH1F.h>
33 #include <TH2F.h>
34 #include <TH3F.h>
35 #include <TProfile.h>
36 #include <THnSparse.h>
37 #include <TList.h>
38 #include <TLorentzVector.h>
39 
40 // event handler (and pico's) includes
41 #include "AliAnalysisManager.h"
42 #include <AliInputEventHandler.h>
43 #include <AliVEventHandler.h>
44 #include "AliESDInputHandler.h"
45 #include "AliVCluster.h"
46 #include "AliVTrack.h"
47 #include "AliVVZERO.h"
48 #include "AliEmcalJet.h"
49 #include "AliRhoParameter.h"
50 #include "AliLog.h"
51 #include "AliEmcalParticle.h"
52 #include "AliAODCaloTrigger.h"
53 #include "AliEMCALGeometry.h"
54 #include "AliVCaloCells.h"
55 #include "AliJetContainer.h"
56 #include "AliClusterContainer.h"
57 #include "AliParticleContainer.h"
58 #include "AliEMCALTriggerPatchInfo.h"
59 #include "AliAODHeader.h"
60 #include "AliPicoTrack.h"
61 
63 
64 using std::cout;
65 using std::endl;
66 
68 
69 //________________________________________________________________________
72  fDebug(kFALSE), fAttachToEvent(kTRUE),
73  fTriggerClass(""),
74  fJetContainer(0),
75  fMaxPatchEnergy(0), fMaxPatchADCEnergy(0),
76  fTriggerType(1), //-1),
77  fNFastOR(16),
78  fMainTrigCat(kTriggerLevel1Jet), // options: kTriggerLevel0, kTriggerLevel1Jet, kTriggerLevel1Gamma, kTriggerRecalcJet, kTriggerRecalGamma
79  //fMainTrigCat(kTriggerRecalcJet), // Recalculated max trigger patch; does not need to be above trigger threshold
80  //fMainTrigCat(kTriggerRecalcGamma),// Recalculated max trigger patch; does not need to be above trigger threshold
81  fTriggerCategory(kTriggerRecalcGamma),
82  fMainTrigSimple(kFALSE), // (kTRUE)
83  fJetPtCut(10.0), // jet pt cut at 10 by default
84  fPatchECut(10.0), // patch E cut at 10 by default
85  fTrkBias(0), fClusBias(0),
86  doComments(0), fUseALLrecalcPatches(0), // defaults to max patch only
87  fJetTriggeredEventname("JETthatTriggeredEvent"), fCaloClustersName(""),
88  fMaxPatch(0), // max patch object
89  fMainPatchType(kManual), // (kEmcalJet)
90  fhNEvents(0),
91  fhTriggerbit(0),
92  fHistRhovsCent(0),
93  fh3PtEtaPhiTracks(0), fh3PtEtaPhiTracksOnEmcal(0), fh3PtEtaPhiTracksToProp(0), fh3PtEtaPhiTracksProp(0), fh3PtEtaPhiTracksNoProp(0),
94  fh2CentPtJet(0),
95  fh3PtEtaPhiJet(0),
96  fh2NJetsPt(0),
97  fh3PtEtaAreaJet(0),
98  fh2PtNConstituentsCharged(0), fh2PtNConstituents(0),
99  fh2PtMeanPtConstituentsCharged(0), fh2PtMeanPtConstituentsNeutral(0),
100  fh2PtNEF(0),
101  fh3NEFEtaPhi(0),
102  fh2NEFNConstituentsCharged(0), fh2NEFNConstituentsNeutral(0),
103  fh2Ptz(0),
104  fh2PtLeadJet1VsLeadJet2(0),
105  fh3EEtaPhiCluster(0),
106  fh3PtLeadJet1VsPatchEnergy(0), fh3PtLeadJet2VsPatchEnergy(0),
107  fh3PtLeadJet1PatchEnergyVZEROAmp(0), fh3PtLeadJet1RawPatchEnergyVZEROAmp(0),
108  fh3PatchEnergyEtaPhiCenterJ1(0), fh3PatchEnergyEtaPhiCenterJ2(0), fh3PatchEnergyEtaPhiCenterJ1J2(0),
109  fh3PatchADCEnergyEtaPhiCenterJ1(0), fh3PatchADCEnergyEtaPhiCenterJ2(0), fh3PatchADCEnergyEtaPhiCenterJ1J2(0),
110  fh3PatchEnergyEtaPhiCenterG1(0), fh3PatchEnergyEtaPhiCenterG2(0), fh3PatchEnergyEtaPhiCenterG1G2(0),
111  fh3PatchADCEnergyEtaPhiCenterG1(0), fh3PatchADCEnergyEtaPhiCenterG2(0), fh3PatchADCEnergyEtaPhiCenterG1G2(0),
112  fh3PatchADCEnergyEtaPhiCenterAll(0),
113  fh3EEtaPhiCell(0), fh2ECellVsCent(0), fh2CellEnergyVsTime(0), fh3EClusELeadingCellVsTime(0),
114  fh3JetReacCent(0),
115  fHistClusEnergy(0), fHistClusofJetEnergy(0),
116  fHistEventSelectionQA(0), fhQAinfoAllPatchesCounter(0), fhQAinfoCounter(0), fhQAmaxinfoCounter(0),
117  fhRecalcGammaPatchEnergy(0), fhGammaLowPatchEnergy(0), fhGammaLowSimplePatchEnergy(0),
118  fhRecalcJetPatchEnergy(0), fhJetLowPatchEnergy(0), fhJetLowSimplePatchEnergy(0),
119  fhMainTriggerPatchEnergy(0),
120  fJetTriggeredEvent(0), fRecalcTriggerPatches(0),
121  fhnPatchMaxClus(0x0), fhnPatchMatch(0x0), fhnPatchMatch2(0x0), fhnPatchMatchJetLeadClus(0x0)
122 {
123  // Default constructor.
124  for(Int_t j=0; j<16; j++) {
125  fHistdPhidEtaPatchJetCluster[j] = 0;
126  }
127 
128  SetMakeGeneralHistograms(kTRUE);
129 }
130 
131 //________________________________________________________________________
133  AliAnalysisTaskEmcalJet(name, kTRUE),
134  fDebug(kFALSE), fAttachToEvent(kTRUE),
135  fTriggerClass(""),
136  fJetContainer(0),
137  fMaxPatchEnergy(0), fMaxPatchADCEnergy(0),
138  fTriggerType(1), //-1),
139  fNFastOR(16),
140  fMainTrigCat(kTriggerLevel1Jet), // options: kTriggerLevel0, kTriggerLevel1Jet, kTriggerLevel1Gamma, kTriggerRecalcJet, kTriggerRecalGamma
141  //fMainTrigCat(kTriggerRecalcJet), // Recalculated max trigger patch; does not need to be above trigger threshold
142  //fMainTrigCat(kTriggerRecalcGamma),// Recalculated max trigger patch; does not need to be above trigger threshold
143  fTriggerCategory(kTriggerRecalcGamma),
144  fMainTrigSimple(kFALSE), // (kTRUE)
145  fJetPtCut(10.0), // jet pt cut at 10 by default
146  fPatchECut(10.0), // patch E cut at 10 by default
147  fTrkBias(0), fClusBias(0),
148  doComments(0), fUseALLrecalcPatches(0), // defaults to max patch only
149  fJetTriggeredEventname("JETthatTriggeredEvent"), fCaloClustersName(""),
150  fMaxPatch(0),
151  fMainPatchType(kManual), //kEmcalJet
152  fhNEvents(0),
153  fhTriggerbit(0),
154  fHistRhovsCent(0),
155  fh3PtEtaPhiTracks(0), fh3PtEtaPhiTracksOnEmcal(0), fh3PtEtaPhiTracksToProp(0), fh3PtEtaPhiTracksProp(0), fh3PtEtaPhiTracksNoProp(0),
156  fh2CentPtJet(0),
157  fh3PtEtaPhiJet(0),
158  fh2NJetsPt(0),
159  fh3PtEtaAreaJet(0),
160  fh2PtNConstituentsCharged(0), fh2PtNConstituents(0),
161  fh2PtMeanPtConstituentsCharged(0), fh2PtMeanPtConstituentsNeutral(0),
162  fh2PtNEF(0),
163  fh3NEFEtaPhi(0),
164  fh2NEFNConstituentsCharged(0), fh2NEFNConstituentsNeutral(0),
165  fh2Ptz(0),
166  fh2PtLeadJet1VsLeadJet2(0),
167  fh3EEtaPhiCluster(0),
168  fh3PtLeadJet1VsPatchEnergy(0), fh3PtLeadJet2VsPatchEnergy(0),
169  fh3PtLeadJet1PatchEnergyVZEROAmp(0), fh3PtLeadJet1RawPatchEnergyVZEROAmp(0),
170  fh3PatchEnergyEtaPhiCenterJ1(0), fh3PatchEnergyEtaPhiCenterJ2(0), fh3PatchEnergyEtaPhiCenterJ1J2(0),
171  fh3PatchADCEnergyEtaPhiCenterJ1(0), fh3PatchADCEnergyEtaPhiCenterJ2(0), fh3PatchADCEnergyEtaPhiCenterJ1J2(0),
172  fh3PatchEnergyEtaPhiCenterG1(0), fh3PatchEnergyEtaPhiCenterG2(0), fh3PatchEnergyEtaPhiCenterG1G2(0),
173  fh3PatchADCEnergyEtaPhiCenterG1(0), fh3PatchADCEnergyEtaPhiCenterG2(0), fh3PatchADCEnergyEtaPhiCenterG1G2(0),
174  fh3PatchADCEnergyEtaPhiCenterAll(0),
175  fh3EEtaPhiCell(0), fh2ECellVsCent(0), fh2CellEnergyVsTime(0), fh3EClusELeadingCellVsTime(0),
176  fh3JetReacCent(0),
177  fHistClusEnergy(0), fHistClusofJetEnergy(0),
178  fHistEventSelectionQA(0), fhQAinfoAllPatchesCounter(0), fhQAinfoCounter(0), fhQAmaxinfoCounter(0),
179  fhRecalcGammaPatchEnergy(0), fhGammaLowPatchEnergy(0), fhGammaLowSimplePatchEnergy(0),
180  fhRecalcJetPatchEnergy(0), fhJetLowPatchEnergy(0), fhJetLowSimplePatchEnergy(0),
181  fhMainTriggerPatchEnergy(0),
182  fJetTriggeredEvent(0), fRecalcTriggerPatches(0),
183  fhnPatchMaxClus(0x0), fhnPatchMatch(0x0), fhnPatchMatch2(0x0), fhnPatchMatchJetLeadClus(0x0)
184 {
185  // Standard constructor.
186  for(Int_t j=0; j<16; j++) {
188  }
189 
191 }
192 
193 //________________________________________________________________________
195 {
196  // Destructor.
197 }
198 
199 //_____________________________________________________________________________
202 
203  // Init the analysis
204  if(fJetTriggeredEventname=="") fJetTriggeredEventname = Form("fJetTriggeredEventname_%s", GetName());
205  fJetTriggeredEvent = new TClonesArray("AliEmcalJet");
207  fJetTriggeredEvent->SetOwner(kTRUE);
208 
209  fRecalcTriggerPatches = new TClonesArray("AliEMCALTriggerPatchInfo");
210  fRecalcTriggerPatches->SetName("RecalcTriggerPatches");
211  fRecalcTriggerPatches->SetOwner(kTRUE);
212 
213  // add jet object (of jets triggering event) to event if not yet there
214  if(fAttachToEvent) {
215  if (InputEvent()->FindListObject(fJetTriggeredEventname)) {
216  AliFatal(Form("%s: Container with same name %s already present. Aborting", GetName(), fJetTriggeredEventname.Data()));
217  } else {
218  InputEvent()->AddObject(fJetTriggeredEvent);
219  }
220  }
221 }
222 
223 //________________________________________________________________________
225  // Decide if event should be selected for analysis
226  fhNEvents->Fill(3.5);
227 
228  // this section isn't needed for LHC11h
229  if(!fTriggerClass.IsNull()) {
230  //Check if requested trigger was fired
231  TString trigType1 = "J1";
232  TString trigType2 = "J2";
233  if(fTriggerClass.Contains("G")) {
234  trigType1 = "G1";
235  trigType2 = "G2";
236  }
237 
238  // get fired trigger classes
239  TString firedTrigClass = InputEvent()->GetFiredTriggerClasses();
240 
241  if(fTriggerClass.Contains(trigType1.Data()) && fTriggerClass.Contains(trigType2.Data())) { //if events with J1&&J2 are requested
242  if(!firedTrigClass.Contains(trigType1.Data()) || !firedTrigClass.Contains(trigType2.Data()) ) //check if both are fired
243  return kFALSE;
244  } else {
245  if(!firedTrigClass.Contains(fTriggerClass)) return kFALSE;
246  else if(fTriggerClass.Contains(trigType1.Data()) && firedTrigClass.Contains(trigType2.Data())) //if J2 is requested also add triggers which have J1&&J2. Reject if J1 is requested and J2 is fired
247  return kFALSE;
248  }
249  }
250 
251  fhNEvents->Fill(1.5);
252 
253  return kTRUE;
254 }
255 
256 //________________________________________________________________________
258  // Fill trigger patch histos for main trigger
259  if(!fTriggerPatchInfo) {
260  AliFatal(Form("%s: TriggerPatchInfo object %s does not exist. Aborting", GetName(), fJetTriggeredEventname.Data()));
261  return;
262  }
263 
264  // see if event was selected
265  UInt_t trig = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();
266 
268  //if(fMainPatchType == kManual) ExtractMainPatch();
269  // not set up yet for jet patch
270  //else if(fMainPatchType == kEmcalJet) cout<<"kEmcalJet"<<endl; //fMaxPatch = GetMainTriggerPatch(fMainTrigCat,fMainTrigSimple);
271  //AliEMCALTriggerPatchInfo *patch = GetMainTriggerPatch(fMainTrigCat,fMainTrigSimple);
272 
273  fMaxPatchEnergy = 0;
274  fMaxPatchADCEnergy = 0;
275 
276  if(fMaxPatch) {
277  fMaxPatchEnergy = fMaxPatch->GetPatchE();
278  fMaxPatchADCEnergy = fMaxPatch->GetADCAmpGeVRough();
280 
281  // the following don't exist for LHC11h data
282  //Check if requested trigger was fired, relevant for data sets with 2 EMCal trigger thresholds
283  // JET trigger
284  if(fMaxPatch->IsJetLow() && !fMaxPatch->IsJetHigh()) { //main patch only fired low threshold trigger
285  fh3PatchEnergyEtaPhiCenterJ2->Fill(fMaxPatch->GetPatchE(),fMaxPatch->GetEtaGeo(),fMaxPatch->GetPhiGeo());
287  }
288  else if(fMaxPatch->IsJetHigh() && !fMaxPatch->IsJetLow()) { //main patch only fired high threshold trigger - should never happen
289  fh3PatchEnergyEtaPhiCenterJ1->Fill(fMaxPatch->GetPatchE(),fMaxPatch->GetEtaGeo(),fMaxPatch->GetPhiGeo());
291  }
292  else if(fMaxPatch->IsJetHigh() && fMaxPatch->IsJetLow()) { //main patch fired both triggers
293  fh3PatchEnergyEtaPhiCenterJ1J2->Fill(fMaxPatch->GetPatchE(),fMaxPatch->GetEtaGeo(),fMaxPatch->GetPhiGeo());
295  } // JE
296 
297  // GAMMA trigger
298  if(fMaxPatch->IsGammaLow() && !fMaxPatch->IsGammaHigh()) { //main patch only fired low threshold trigger
299  fh3PatchEnergyEtaPhiCenterG2->Fill(fMaxPatch->GetPatchE(),fMaxPatch->GetEtaGeo(),fMaxPatch->GetPhiGeo());
301  }
302  else if(fMaxPatch->IsGammaHigh() && !fMaxPatch->IsGammaLow()) { //main patch only fired high threshold trigger - should never happen
303  fh3PatchEnergyEtaPhiCenterG1->Fill(fMaxPatch->GetPatchE(),fMaxPatch->GetEtaGeo(),fMaxPatch->GetPhiGeo());
305  }
306  else if(fMaxPatch->IsGammaHigh() && fMaxPatch->IsGammaLow()) { //main patch fired both triggers
307  fh3PatchEnergyEtaPhiCenterG1G2->Fill(fMaxPatch->GetPatchE(),fMaxPatch->GetEtaGeo(),fMaxPatch->GetPhiGeo());
309  } // GA
310 
311  // fill max patch counters
313 
314  } // have patch
315 
316 }
317 
318 //_________________________________________________________________________________________
320  //Find main trigger
321  if(!fTriggerPatchInfo) return;
322 
323  // reset array of patches to save
324  fRecalcTriggerPatches->Clear();
325 
326  //number of patches in event
327  Int_t nPatch = fTriggerPatchInfo->GetEntriesFast();
328 
329  //loop over patches to define trigger type of event
330  Int_t nG1 = 0, nG2 = 0, nJ1 = 0, nJ2 = 0, nL0 = 0;
331 
332  // see if event was selected
333  UInt_t trig = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();
334 
335  // check the Fired Trigger Classes
336  TString firedTrigClass = InputEvent()->GetFiredTriggerClasses();
337 
338  //extract main trigger patch
339  AliEMCALTriggerPatchInfo *patch;
340  Double_t emax = -1.;
341  for (Int_t iPatch = 0, patchacc = 0; iPatch < nPatch; iPatch++) {
342  patch = (AliEMCALTriggerPatchInfo*)fTriggerPatchInfo->At( iPatch );
343  if (!patch) continue;
344 
345  // count trigger types
346  if (patch->IsGammaHigh()) nG1++;
347  if (patch->IsGammaLow()) nG2++;
348  if (patch->IsJetHigh()) nJ1++;
349  if (patch->IsJetLow()) nJ2++;
350  if (patch->IsLevel0()) nL0++;
351 
352  // fill Energy spectra of recalculated Jet and GA patches
353  if(patch->IsRecalcGamma()) { fhRecalcGammaPatchEnergy->Fill(patch->GetPatchE()); }
354  if(patch->IsGammaLow()) { fhGammaLowPatchEnergy->Fill(patch->GetPatchE()); }
355  if(patch->IsGammaLowSimple()) { fhGammaLowSimplePatchEnergy->Fill(patch->GetPatchE()); }
356  if(patch->IsRecalcJet()) { fhRecalcJetPatchEnergy->Fill(patch->GetPatchE()); }
357  if(patch->IsJetLow()) { fhJetLowPatchEnergy->Fill(patch->GetPatchE()); }
358  if(patch->IsJetLowSimple()) { fhJetLowSimplePatchEnergy->Fill(patch->GetPatchE()); }
359  if(patch->IsMainTrigger()) { fhMainTriggerPatchEnergy->Fill(patch->GetPatchE()); }
360 
361  // fill QA counter histo for all 'trig class' patches
363 
364  // make sure trigger "fTriggerClass" actually was fired in event
365  if(!firedTrigClass.Contains(fTriggerClass)) continue;
366 
367  // check that we have a recalculated (OFFLINE) trigger patch of type fTriggerCategory
369  if(!patch->IsRecalcGamma()) continue;
370  } else if (fTriggerCategory == kTriggerRecalcJet) {
371  if(!patch->IsRecalcGamma()) continue;
372  }
373 
374  // method for filling collection output array of 'saved' recalculated patches
375  (*fRecalcTriggerPatches)[patchacc] = patch;
376  ++patchacc;
377 
378  // fill QA counter histo for Recalculated 'trig class' patches
379  FillTriggerPatchQA(fhQAinfoCounter, trig, patch);
380 
381  // find max patch energy
382  if(patch->GetPatchE()>emax) {
383  fMaxPatch = patch;
384  emax = patch->GetPatchE();
385  } // max patch
386  } // loop over patches
387 
388  // check on patch Energy
389  if(firedTrigClass.Contains(fTriggerClass) && fMaxPatch && fMaxPatch->GetPatchE() > fPatchECut) {
390  // get cluster container and find leading cluster
392  if(!clusContp) {
393  AliError(Form("ERROR: Cluster container doesn't exist\n"));
394  return;
395  }
396  AliVCluster* leadclus = clusContp->GetLeadingCluster();
397  if(!leadclus) return;
398 
399  // initialize variables and get leading cluster parameters
400  double leadclusEta = 0, leadclusPhi = 0, leadclusE = 0;
401  TLorentzVector clusvect;
402  leadclus->GetMomentum(clusvect, const_cast<Double_t*>(fVertex));
403  leadclusEta = clusvect.Eta();
404  leadclusPhi = clusvect.Phi();
405  leadclusE = leadclus->E();
406 
407  // get patch variables
408  double fMaxPatchPhiCM = fMaxPatch->GetPhiCM();
409  double fMaxPatchPhiGeo = fMaxPatch->GetPhiGeo();
410  double fMaxPatchEtaCM = fMaxPatch->GetEtaCM();
411  double fMaxPatchEtaGeo = fMaxPatch->GetEtaGeo();
412  double fMaxPatchPhiMin = fMaxPatch->GetPhiMin();
413  double fMaxPatchPhiMax = fMaxPatch->GetPhiMax();
414  double fMaxPatchEtaMin = fMaxPatch->GetEtaMin();
415  double fMaxPatchEtaMax = fMaxPatch->GetEtaMax();
416  Int_t nTrigBit = fMaxPatch->GetTriggerBits();
417 
418  // positional variables
419  double dEtaGeo = 1.0*TMath::Abs(leadclusEta - fMaxPatchEtaGeo);
420  double dEtaCM = 1.0*TMath::Abs(leadclusEta - fMaxPatchEtaCM);
421  double dPhiGeo = 1.0*TMath::Abs(leadclusPhi - fMaxPatchPhiGeo);
422  double dPhiCM = 1.0*TMath::Abs(leadclusPhi - fMaxPatchPhiCM);
423  double maxPatchE = fMaxPatch->GetPatchE();
424  double maxPatchADC = fMaxPatch->GetADCAmpGeVRough();
425 
426  // patch summary (meeting energy cut requirement)
427  if(doComments) {
428  cout<<endl<<"Patch summary: "<<endl;
429  cout<<Form("Number of patches = %d, Max Patch Energy = %f GeV, MAXClusterE = %f, Phi = %f, Eta = %f", nPatch, fMaxPatch->GetPatchE(), leadclus->E(), leadclusPhi, leadclusEta)<<endl;
430  cout<<Form("CM in Phi = %f, in Eta = %f, Geo Center in Phi = %f, in Eta = %f, TriggerBits = %d", fMaxPatchPhiCM, fMaxPatchEtaCM, fMaxPatchPhiGeo, fMaxPatchEtaGeo, nTrigBit)<<endl;
431  cout<<Form("phi min = %f, phi max = %f, eta min = %f, eta max = %f", fMaxPatchPhiMin, fMaxPatchPhiMax, fMaxPatchEtaMin, fMaxPatchEtaMax)<<endl;
432  }
433 
434  Double_t fill[7] = {dEtaGeo, dEtaCM, dPhiGeo, dPhiCM, maxPatchADC, maxPatchE, leadclusE};
435  fhnPatchMaxClus->Fill(fill);
436 
437  } // patch energy cut
438 
439 // cout<<Form("Jet: low: %d, high: %d," ,nJ2, nJ1)<<" ";//<<endl;
440 // cout<<Form("Gamma: low: %d, high: %d," ,nG2, nG1)<<" ";//<<endl;
441 // cout<<Form("L0: %d", nL0)<<endl;
442 // cout<<Form("Max Patch Energy: %f GeV", fMaxPatch->GetPatchE())<<endl;
443 }
444 
445 //________________________________________________________________________
447 {
448  // Create user output.
450 
451  Bool_t oldStatus = TH1::AddDirectoryStatus();
452  TH1::AddDirectory(kFALSE);
453 
454  fhNEvents = new TH1F("fhNEvents","fhNEvents;selection;N_{evt}",5,0,5);
455  fOutput->Add(fhNEvents);
456 
457  fhTriggerbit = new TProfile("fhTriggerbit","fhTriggerbit;;TriggerBit",1,0,1);
458  fOutput->Add(fhTriggerbit);
459 
460  fHistRhovsCent = new TH2F("fHistRhovsCent", "fHistRhovsCent", 101, -1, 100, 300, 0., 300.);
461  fHistRhovsCent->GetXaxis()->SetTitle("Centrality (%)");
462  fHistRhovsCent->GetYaxis()->SetTitle("s#rho_{ch} (GeV/c * rad^{-1})");
463  fOutput->Add(fHistRhovsCent);
464 
465  Int_t fgkNCentBins = 21;
466  Float_t kMinCent = 0.;
467  Float_t kMaxCent = 105.;
468  Double_t *binsCent = new Double_t[fgkNCentBins+1];
469  for(Int_t i=0; i<=fgkNCentBins; i++) binsCent[i]=(Double_t)kMinCent + (kMaxCent-kMinCent)/fgkNCentBins*(Double_t)i ;
470  binsCent[fgkNCentBins-1] = 100.5;
471  binsCent[fgkNCentBins] = 101.5;
472 
473  Int_t fgkNdEPBins = 18*8;
474  Float_t kMindEP = 0.;
475  Float_t kMaxdEP = 1.*TMath::Pi()/2.;
476  Double_t *binsdEP = new Double_t[fgkNdEPBins+1];
477  for(Int_t i=0; i<=fgkNdEPBins; i++) binsdEP[i]=(Double_t)kMindEP + (kMaxdEP-kMindEP)/fgkNdEPBins*(Double_t)i ;
478 
479  Int_t fgkNPtBins = 200;
480  Float_t kMinPt = -50.;
481  Float_t kMaxPt = 150.;
482  Double_t *binsPt = new Double_t[fgkNPtBins+1];
483  for(Int_t i=0; i<=fgkNPtBins; i++) binsPt[i]=(Double_t)kMinPt + (kMaxPt-kMinPt)/fgkNPtBins*(Double_t)i ;
484 
485  Int_t fgkNPhiBins = 18*8;
486  Float_t kMinPhi = 0.;
487  Float_t kMaxPhi = 2.*TMath::Pi();
488  Double_t *binsPhi = new Double_t[fgkNPhiBins+1];
489  for(Int_t i=0; i<=fgkNPhiBins; i++) binsPhi[i]=(Double_t)kMinPhi + (kMaxPhi-kMinPhi)/fgkNPhiBins*(Double_t)i ;
490 
491  Int_t fgkNEtaBins = 100;
492  Float_t fgkEtaMin = -1.;
493  Float_t fgkEtaMax = 1.;
494  Double_t *binsEta=new Double_t[fgkNEtaBins+1];
495  for(Int_t i=0; i<=fgkNEtaBins; i++) binsEta[i]=(Double_t)fgkEtaMin + (fgkEtaMax-fgkEtaMin)/fgkNEtaBins*(Double_t)i ;
496 
497  Int_t fgkNAreaBins = 100;
498  Float_t kMinArea = 0.;
499  Float_t kMaxArea = 1.;
500  Double_t *binsArea = new Double_t[fgkNAreaBins+1];
501  for(Int_t i=0; i<=fgkNAreaBins; i++) binsArea[i]=(Double_t)kMinArea + (kMaxArea-kMinArea)/fgkNAreaBins*(Double_t)i ;
502 
503  Int_t fgkNConstBins = 100;
504  Float_t kMinConst = 0.;
505  Float_t kMaxConst = 100.;
506  Double_t *binsConst = new Double_t[fgkNConstBins+1];
507  for(Int_t i=0; i<=fgkNConstBins; i++) binsConst[i]=(Double_t)kMinConst + (kMaxConst-kMinConst)/fgkNConstBins*(Double_t)i ;
508 
509  Int_t fgkNMeanPtBins = 100;
510  Float_t kMinMeanPt = 0.;
511  Float_t kMaxMeanPt = 20.;
512  Double_t *binsMeanPt = new Double_t[fgkNMeanPtBins+1];
513  for(Int_t i=0; i<=fgkNMeanPtBins; i++) binsMeanPt[i]=(Double_t)kMinMeanPt + (kMaxMeanPt-kMinMeanPt)/fgkNMeanPtBins*(Double_t)i ;
514 
515  Int_t fgkNNEFBins = 101;
516  Float_t kMinNEF = 0.;
517  Float_t kMaxNEF = 1.01;
518  Double_t *binsNEF = new Double_t[fgkNNEFBins+1];
519  for(Int_t i=0; i<=fgkNNEFBins; i++) binsNEF[i]=(Double_t)kMinNEF + (kMaxNEF-kMinNEF)/fgkNNEFBins*(Double_t)i ;
520 
521  Int_t fgkNzBins = 101;
522  Float_t kMinz = 0.;
523  Float_t kMaxz = 1.01;
524  Double_t *binsz = new Double_t[fgkNzBins+1];
525  for(Int_t i=0; i<=fgkNzBins; i++) binsz[i]=(Double_t)kMinz + (kMaxz-kMinz)/fgkNzBins*(Double_t)i ;
526 
527  Int_t fgkNJetTypeBins = 2;
528  Float_t kMinJetType = -0.5;
529  Float_t kMaxJetType = 1.5;
530  Double_t *binsJetType = new Double_t[fgkNJetTypeBins+1];
531  for(Int_t i=0; i<=fgkNJetTypeBins; i++) binsJetType[i]=(Double_t)kMinJetType + (kMaxJetType-kMinJetType)/fgkNJetTypeBins*(Double_t)i ;
532 
533  Int_t fgkNTimeBins = 100;
534  Float_t kMinTime = -200.;
535  Float_t kMaxTime = 200;
536  Double_t *binsTime = new Double_t[fgkNTimeBins+1];
537  for(Int_t i=0; i<=fgkNTimeBins; i++) binsTime[i]=(Double_t)kMinTime + (kMaxTime-kMinTime)/fgkNTimeBins*(Double_t)i ;
538 
539  Int_t fgkNVZEROBins = 100;
540  Float_t kMinVZERO = 0.;
541  Float_t kMaxVZERO = 25000;
542  Double_t *binsVZERO = new Double_t[fgkNVZEROBins+1];
543  for(Int_t i=0; i<=fgkNVZEROBins; i++) binsVZERO[i]=(Double_t)kMinVZERO + (kMaxVZERO-kMinVZERO)/fgkNVZEROBins*(Double_t)i ;
544 
545  Double_t enBinEdges[3][2];
546  enBinEdges[0][0] = 1.; //10 bins
547  enBinEdges[0][1] = 0.1;
548  enBinEdges[1][0] = 5.; //8 bins
549  enBinEdges[1][1] = 0.5;
550  enBinEdges[2][0] = 100.;//95 bins
551  enBinEdges[2][1] = 1.;
552 
553  const Float_t enmin1 = 0;
554  const Float_t enmax1 = enBinEdges[0][0];
555  const Float_t enmin2 = enmax1 ;
556  const Float_t enmax2 = enBinEdges[1][0];
557  const Float_t enmin3 = enmax2 ;
558  const Float_t enmax3 = enBinEdges[2][0];//fgkEnMax;
559  const Int_t nbin11 = (int)((enmax1-enmin1)/enBinEdges[0][1]);
560  const Int_t nbin12 = (int)((enmax2-enmin2)/enBinEdges[1][1])+nbin11;
561  const Int_t nbin13 = (int)((enmax3-enmin3)/enBinEdges[2][1])+nbin12;
562 
563  Int_t fgkNEnBins=nbin13;
564  Double_t *binsEn=new Double_t[fgkNEnBins+1];
565  for(Int_t i=0; i<=fgkNEnBins; i++) {
566  if(i<=nbin11) binsEn[i]=(Double_t)enmin1 + (enmax1-enmin1)/nbin11*(Double_t)i ;
567  if(i<=nbin12 && i>nbin11) binsEn[i]=(Double_t)enmin2 + (enmax2-enmin2)/(nbin12-nbin11)*((Double_t)i-(Double_t)nbin11) ;
568  if(i<=nbin13 && i>nbin12) binsEn[i]=(Double_t)enmin3 + (enmax3-enmin3)/(nbin13-nbin12)*((Double_t)i-(Double_t)nbin12) ;
569  }
570 
571  fh3PtEtaPhiTracks = new TH3F("fh3PtEtaPhiTracks","fh3PtEtaPhiTracks;#it{p}_{T}^{track}_{vtx};#eta_{vtx};#varphi_{vtx}",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
573 
574  fh3PtEtaPhiTracksOnEmcal = new TH3F("fh3PtEtaPhiTracksOnEmcal","fh3PtEtaPhiTracksOnEmcal;#it{p}_{T}^{track}_{emc};#eta_{emc};#varphi_{emc}",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
576 
577  fh3PtEtaPhiTracksToProp = new TH3F("fh3PtEtaPhiTracksToProp","fh3PtEtaPhiTracksToProp;#it{p}_{T}^{track}_{vtx};#eta_{vtx};#varphi_{vtx}",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
579 
580  fh3PtEtaPhiTracksProp = new TH3F("fh3PtEtaPhiTracksProp","fh3PtEtaPhiTracksProp;#it{p}_{T}^{track}_{vtx};#eta_{vtx};#varphi_{vtx}",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
582 
583  fh3PtEtaPhiTracksNoProp = new TH3F("fh3PtEtaPhiTracksNoProp","fh3PtEtaPhiTracksNoProp;#it{p}_{T}^{track}_{vtx};#eta_{vtx};#varphi_{vtx}",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
585 
586  fh2CentPtJet = new TH2F("fh2CentPtJet","fh2CentPtJet;cent;#it{p}_{T}^{jet}",fgkNCentBins,binsCent,fgkNPtBins,binsPt);
587  fOutput->Add(fh2CentPtJet);
588 
589  fh3PtEtaPhiJet = new TH3F("fh3PtEtaPhiJet","fh3PtEtaPhiJet;#it{p}_{T}^{jet};#eta;#varphi",fgkNPtBins,binsPt,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
590  fOutput->Add(fh3PtEtaPhiJet);
591 
592  fh2NJetsPt = new TH2F("fh2NJetsPt","fh2NJetsPt;N_{jets};#it{p}_{T}^{jet}",20,-0.5,19.5,fgkNPtBins,binsPt);
593  fOutput->Add(fh2NJetsPt);
594 
595  fh3PtEtaAreaJet = new TH3F("fh3PtEtaAreaJet","fh3PtEtaAreaJet;#it{p}_{T}^{jet};#eta;A",fgkNPtBins,binsPt,fgkNEtaBins,binsEta,fgkNAreaBins,binsArea);
596  fOutput->Add(fh3PtEtaAreaJet);
597 
598  fh2PtNConstituentsCharged = new TH2F("fh2PtNConstituentsCharged","fh2PtNConstituentsCharged;#it{p}_{T}^{jet};N_{charged constituents}",fgkNPtBins,binsPt,fgkNConstBins,binsConst);
600 
601  fh2PtNConstituents = new TH2F("fh2PtNConstituents","fh2PtNConstituents;#it{p}_{T}^{jet};N_{constituents}",fgkNPtBins,binsPt,fgkNConstBins,binsConst);
603 
604  fh2PtMeanPtConstituentsCharged = new TH2F("fh2PtMeanPtConstituentsCharged","fh2PtMeanPtConstituentsCharged;#it{p}_{T}^{jet};charged #langle #it{p}_{T} #rangle",fgkNPtBins,binsPt,fgkNMeanPtBins,binsMeanPt);
606 
607  fh2PtMeanPtConstituentsNeutral = new TH2F("fh2PtMeanPtConstituentsNeutral","fh2PtMeanPtConstituentsNeutral;#it{p}_{T}^{jet};neutral langle #it{p}_{T} #rangle",fgkNPtBins,binsPt,fgkNMeanPtBins,binsMeanPt);
609 
610  fh2PtNEF = new TH2F("fh2PtNEF","fh2PtNEF;#it{p}_{T}^{jet};NEF",fgkNPtBins,binsPt,fgkNNEFBins,binsNEF);
611  fOutput->Add(fh2PtNEF);
612 
613  fh3NEFEtaPhi = new TH3F("fh3NEFEtaPhi","fh3NEFEtaPhi;NEF;#eta;#varphi",fgkNNEFBins,binsNEF,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
614  fOutput->Add(fh3NEFEtaPhi);
615 
616  fh2NEFNConstituentsCharged = new TH2F("fh2NEFNConstituentsCharged","fh2NEFNConstituentsCharged;NEF;N_{charged constituents}",fgkNNEFBins,binsNEF,fgkNConstBins,binsConst);
618 
619  fh2NEFNConstituentsNeutral = new TH2F("fh2NEFNConstituentsNeutral","fh2NEFNConstituentsNeutral;NEF;N_{clusters}",fgkNNEFBins,binsNEF,fgkNConstBins,binsConst);
621 
622  fh2Ptz = new TH2F("fh2Ptz","fh2Ptz;#it{p}_{T}^{jet};z=p_{t,trk}^{proj}/p_{jet}",fgkNPtBins,binsPt,fgkNzBins,binsz);
623  fOutput->Add(fh2Ptz);
624 
625  fh2PtLeadJet1VsLeadJet2 = new TH2F("fh2PtLeadJet1VsLeadJet2","fh2PtLeadJet1VsLeadJet2;#it{p}_{T}^{jet 1};#it{p}_{T}^{jet 2}",fgkNPtBins,binsPt,fgkNPtBins,binsPt);
627 
628  fh3EEtaPhiCluster = new TH3F("fh3EEtaPhiCluster","fh3EEtaPhiCluster;E_{clus};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
630 
631  fh3PtLeadJet1VsPatchEnergy = new TH3F("fh3PtLeadJet1VsPatchEnergy","fh3PtLeadJet1VsPatchEnergy;#it{p}_{T}^{jet 1};Amplitude_{patch};trig type",fgkNPtBins,binsPt,fgkNPtBins,binsPt,fgkNJetTypeBins,binsJetType);
633  fh3PtLeadJet2VsPatchEnergy = new TH3F("fh3PtLeadJet2VsPatchEnergy","fh3PtLeadJet2VsPatchEnergy;#it{p}_{T}^{jet 1};Amplitude_{patch};trig type",fgkNPtBins,binsPt,fgkNPtBins,binsPt,fgkNJetTypeBins,binsJetType);
635 
636  fh3PtLeadJet1PatchEnergyVZEROAmp = new TH3F("fh3PtLeadJet1PatchEnergyVZEROAmp","fh3PtLeadJet1VsPatchEnergyVZEROAmp;#it{p}_{T}^{jet 1};Amplitude_{patch};VZERO amp",fgkNPtBins,binsPt,fgkNPtBins,binsPt,fgkNVZEROBins,binsVZERO);
638  fh3PtLeadJet1RawPatchEnergyVZEROAmp = new TH3F("fh3PtLeadJet1RawPatchEnergyVZEROAmp","fh3PtLeadJet1RawPatchEnergyVZEROAmp;#it{p}_{T}^{jet 1};ADC Amplitude_{patch} (GeV);VZERO amp",fgkNPtBins,binsPt,fgkNPtBins,binsPt,fgkNVZEROBins,binsVZERO);
640 
641  fh3PatchEnergyEtaPhiCenterJ1 = new TH3F("fh3PatchEnergyEtaPhiCenterJ1","fh3PatchEnergyEtaPhiCenterJ1;E_{patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
643 
644  fh3PatchEnergyEtaPhiCenterJ2 = new TH3F("fh3PatchEnergyEtaPhiCenterJ2","fh3PatchEnergyEtaPhiCenterJ2;E_{patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
646 
647  fh3PatchEnergyEtaPhiCenterJ1J2 = new TH3F("fh3PatchEnergyEtaPhiCenterJ1J2","fh3PatchEnergyEtaPhiCenterJ1J2;E_{patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
649 
650  fh3PatchADCEnergyEtaPhiCenterJ1 = new TH3F("fh3PatchADCEnergyEtaPhiCenterJ1","fh3PatchADCEnergyEtaPhiCenterJ1;E_{ADC,patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
652 
653  fh3PatchADCEnergyEtaPhiCenterJ2 = new TH3F("fh3PatchADCEnergyEtaPhiCenterJ2","fh3PatchADCEnergyEtaPhiCenterJ2;E_{ADC,patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
655 
656  fh3PatchADCEnergyEtaPhiCenterJ1J2 = new TH3F("fh3PatchADCEnergyEtaPhiCenterJ1J2","fh3PatchADCEnergyEtaPhiCenterJ1J2;E_{ADC,patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
658 
659  fh3PatchEnergyEtaPhiCenterG1 = new TH3F("fh3PatchEnergyEtaPhiCenterG1","fh3PatchEnergyEtaPhiCenterG1;E_{patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
661 
662  fh3PatchEnergyEtaPhiCenterG2 = new TH3F("fh3PatchEnergyEtaPhiCenterG2","fh3PatchEnergyEtaPhiCenterG2;E_{patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
664 
665  fh3PatchEnergyEtaPhiCenterG1G2 = new TH3F("fh3PatchEnergyEtaPhiCenterG1G2","fh3PatchEnergyEtaPhiCenterG1G2;E_{patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
667 
668  fh3PatchADCEnergyEtaPhiCenterG1 = new TH3F("fh3PatchADCEnergyEtaPhiCenterG1","fh3PatchADCEnergyEtaPhiCenterG1;E_{ADC,patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
670 
671  fh3PatchADCEnergyEtaPhiCenterG2 = new TH3F("fh3PatchADCEnergyEtaPhiCenterG2","fh3PatchADCEnergyEtaPhiCenterG2;E_{ADC,patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
673 
674  fh3PatchADCEnergyEtaPhiCenterG1G2 = new TH3F("fh3PatchADCEnergyEtaPhiCenterG1G2","fh3PatchADCEnergyEtaPhiCenterG1G2;E_{ADC,patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
676 
677  fh3PatchADCEnergyEtaPhiCenterAll = new TH3F("fh3PatchADCEnergyEtaPhiCenterAll","fh3PatchADCEnergyEtaPhiCenterAll;E_{ADC,patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
679 
680  fh3EEtaPhiCell = new TH3F("fh3EEtaPhiCell","fh3EEtaPhiCell;E_{cell};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
681  fOutput->Add(fh3EEtaPhiCell);
682 
683  fh2ECellVsCent = new TH2F("fh2ECellVsCent","fh2ECellVsCent;centrality;E_{cell}",101,-1,100,500,0.,5.);
684  fOutput->Add(fh2ECellVsCent);
685 
686  fh2CellEnergyVsTime = new TH2F("fh2CellEnergyVsTime","fh2CellEnergyVsTime;E_{cell};time",fgkNEnBins,binsEn,fgkNTimeBins,binsTime);
688 
689  fh3EClusELeadingCellVsTime = new TH3F("fh3EClusELeadingCellVsTime","fh3EClusELeadingCellVsTime;E_{cluster};E_{leading cell};time_{leading cell}",fgkNEnBins,binsEn,fgkNEnBins,binsEn,fgkNTimeBins,binsTime);
691 
692  fh3JetReacCent = new TH3F("fh3JetReacCent","fh3JetReacCent;E_{Jet};Centrality;dEP",fgkNEnBins,binsEn,fgkNCentBins,binsCent,fgkNdEPBins,binsdEP);
693  fOutput->Add(fh3JetReacCent);
694 
695  fhQAinfoAllPatchesCounter = new TH1F("fhQAinfoAllPatchesCounter", "QA trigger info counters for all patches", 20, 0.5, 20.5);
697 
698  fhQAinfoCounter = new TH1F("fhQAinfoCounter", "QA trigger info counters", 20, 0.5, 20.5);
699  fOutput->Add(fhQAinfoCounter);
700 
701  fhQAmaxinfoCounter = new TH1F("fhQAmaxinfoCounter", "QA Max patch trigger info counters", 20, 0.5, 20.5);
703 
704  fhRecalcGammaPatchEnergy = new TH1F("fhRecalcGammaPatchEnergy", "Recalculated Gamma Patch Energy", 200, 0, 50); //100
706 
707  fhGammaLowPatchEnergy = new TH1F("fhGammaLowPatchEnergy", "Gamma Low Patch Energy", 200, 0, 50); //100
709 
710  fhGammaLowSimplePatchEnergy = new TH1F("fhGammaLowSimplePatchEnergy", "Gamma Low Simple Patch Energy", 200, 0, 50); //100
712 
713  fhRecalcJetPatchEnergy = new TH1F("fhRecalcJetPatchEnergy", "Recalculated Jet Patch Energy", 200, 0, 100);
715 
716  fhJetLowPatchEnergy = new TH1F("fhJetLowPatchEnergy", "Jet Low Patch Energy", 200, 0, 100);
718 
719  fhJetLowSimplePatchEnergy = new TH1F("fhJetLowSimplePatchEnergy", "Jet Low Simple Patch Energy", 200, 0, 100);
721 
722  fhMainTriggerPatchEnergy = new TH1F("fhMainTriggerPatchEnergy", "Main Trigger Patch Energy", 200, 0, 100);
724 
725  fHistClusEnergy = new TH1F("fHistClusEnergy", "Cluster Energy distribution", 200, 0, 50);
726  fOutput->Add(fHistClusEnergy);
727 
728 
729  fHistClusofJetEnergy = new TH1F("fHistClusofJetEnergy", "Cluster of Jet Energy distribution", 200, 0, 20);
731 
732  for(Int_t j=0; j<16; j++) {
733  fHistdPhidEtaPatchJetCluster[j] = new TH2F(Form("fHistdPhidEtaPatchJetCluster_%d",j), "dPhi-dEta distribution between max recalculated Gamma patch and most energetic jet cluster", 144, 0, 2.016, 144, 0, 2.016);
735  }
736 
737  Int_t nDim=7;
738  Int_t *nbins = new Int_t[nDim];
739  Double_t *xmin = new Double_t[nDim];
740  Double_t *xmax = new Double_t[nDim];
741  for (Int_t i=0; i<nDim; i++){
742  nbins[i]=144;
743  xmin[i]=0;
744  xmax[i]=2.016;
745  }
746 
747  nbins[4]=100; xmax[4]=100;
748  nbins[5]=100; xmax[5]=100.;
749  nbins[6]=100; xmax[6]=100.;
750 
751  fhnPatchMaxClus = new THnSparseF("fhnPatchMaxClus","fhn Patch Max Cluster Distributions", nDim,nbins,xmin,xmax);
752  fhnPatchMaxClus->GetAxis(0)->SetTitle("#Delta#etaGeo"); // 0
753  fhnPatchMaxClus->GetAxis(1)->SetTitle("#Delta#etaCM"); // 1
754  fhnPatchMaxClus->GetAxis(2)->SetTitle("#Delta#phiGeo"); // 2
755  fhnPatchMaxClus->GetAxis(3)->SetTitle("#Delta#phiCM"); // 3
756  fhnPatchMaxClus->GetAxis(4)->SetTitle("Max Patch ADC"); // 4
757  fhnPatchMaxClus->GetAxis(5)->SetTitle("Max Patch Energy"); // 5
758  fhnPatchMaxClus->GetAxis(6)->SetTitle("Leading Cluster Energy"); // 6
759  fOutput->Add(fhnPatchMaxClus);
760 
761  // QA before matching
762  Int_t nDim1=8;
763  Int_t *nbins1 = new Int_t[nDim1];
764  Double_t *xmin1 = new Double_t[nDim1];
765  Double_t *xmax1 = new Double_t[nDim1];
766  nbins1[0]=10; xmin1[0]=0.; xmax1[0]=100.;
767  nbins1[1]=250; xmin1[1]=0.; xmax1[1]=250.;
768  nbins1[2]=50; xmin1[2]=0.; xmax1[2]=50;
769  nbins1[3]=144; xmin1[3]=0.; xmax1[3]=2.016;
770  nbins1[4]=144; xmin1[4]=0.; xmax1[4]=2.016;
771  nbins1[5]=300; xmin1[5]=0.; xmax1[5]=300;
772  nbins1[6]=500; xmin1[6]=0.; xmax1[6]=500;
773  nbins1[7]=3; xmin1[7]=0.0; xmax1[7]=1.0*TMath::Pi()/2.0;
774 
775  // before cuts to perform match
776  fhnPatchMatch = new THnSparseF("fhnPatchMatch","fhn Patch Match before cuts", nDim1,nbins1,xmin1,xmax1);
777  fhnPatchMatch->GetAxis(0)->SetTitle("Centrality %"); // 0
778  fhnPatchMatch->GetAxis(1)->SetTitle("Jet p_{T}"); // 1
779  fhnPatchMatch->GetAxis(2)->SetTitle("Max Cluster Energy"); // 2
780  fhnPatchMatch->GetAxis(3)->SetTitle("#Delta#phi Geo"); // 3
781  fhnPatchMatch->GetAxis(4)->SetTitle("#Delta#eta Geo"); // 4
782  fhnPatchMatch->GetAxis(5)->SetTitle("Max Patch Energy"); // 5
783  fhnPatchMatch->GetAxis(6)->SetTitle("Max Patch ADC"); // 6
784  fhnPatchMatch->GetAxis(7)->SetTitle("Event Plane - Jet Angle"); // 7
785  fOutput->Add(fhnPatchMatch);
786 
787  // after cuts to perform match
788  fhnPatchMatch2 = new THnSparseF("fhnPatchMatch2","fhn Patch Match after cuts", nDim1,nbins1,xmin1,xmax1);
789  fhnPatchMatch2->GetAxis(0)->SetTitle("Centrality %"); // 0
790  fhnPatchMatch2->GetAxis(1)->SetTitle("Jet p_{T}"); // 1
791  fhnPatchMatch2->GetAxis(2)->SetTitle("Max Cluster Energy"); // 2
792  fhnPatchMatch2->GetAxis(3)->SetTitle("#Delta#phi Geo"); // 3
793  fhnPatchMatch2->GetAxis(4)->SetTitle("#Delta#eta Geo"); // 4
794  fhnPatchMatch2->GetAxis(5)->SetTitle("Max Patch Energy"); // 5
795  fhnPatchMatch2->GetAxis(6)->SetTitle("Max Patch ADC"); // 6
796  fhnPatchMatch2->GetAxis(7)->SetTitle("Event Plane - Jet Angle"); // 7
797  fOutput->Add(fhnPatchMatch2);
798 
799  // for jet cluster matched to patch
800  Int_t nDim2=18;
801  Int_t *nbins2 = new Int_t[nDim2];
802  Double_t *xmin2 = new Double_t[nDim2];
803  Double_t *xmax2 = new Double_t[nDim2];
804  for (Int_t i=0; i<nDim2; i++){
805  nbins2[i]=144;
806  xmin2[i]=0;
807  }
808 
809  nbins2[0]=10; xmax2[0]=100;
810  nbins2[1]=3; xmax2[1]=1.0*TMath::Pi()/2.;
811  nbins2[2]=250; xmax2[2]=250;
812  nbins2[3]=72; xmin2[3]=1.2; xmax2[3]=3.4; //*TMath::Pi();
813  nbins2[4]=56; xmin2[4]=-0.7; xmax2[4]=0.7;
814  nbins2[5]=40; xmax2[5]=2.;
815  nbins2[6]=50; xmax2[6]=50;
816  nbins2[7]=100; xmax2[7]=100.;
817  nbins2[8]=50; xmax2[8]=50;
818  nbins2[9]=100; xmax2[9]=100.;
819  nbins2[10]=72; xmin2[10]=1.2; xmax2[10]=3.4; //2.0*TMath::Pi();
820  nbins2[11]=56; xmin2[11]=-0.7; xmax2[11]=0.7;
821  nbins2[12]=500; xmax2[12]=500.;
822  nbins2[13]=500; xmax2[13]=500.;
823  nbins2[14]=300; xmax2[14]=300.;
824  nbins2[15]=300; xmax2[15]=300.;
825  nbins2[16]=72; xmin2[16]=1.4; xmax2[16]=3.2;
826  nbins2[17]=56; xmin2[17]=-0.7; xmax2[17]=0.7;
827 
828  //Double_t fill[18] = {fCent, dEPJet, jet->Pt(), jet->Phi(), jet->Eta(), jet->Area(), jet->GetNumberOfTracks(), jet->MaxTrackPt(), jet->GetNumberOfClusters(), maxClusterE, maxClusterPhi, maxClusterEta, kAmplitudeOnline, kAmplitudeOnline, kEnergyOnline, kEnergyOffline, fMaxPatchPhiGeo, fMaxPatchEtaGeo};
829 
830  fhnPatchMatchJetLeadClus = new THnSparseF("fhnPatchMatchJetLeadClus","fhn Patch Match to Jet Leading Cluster", nDim2, nbins2,xmin2,xmax2);
831  fhnPatchMatchJetLeadClus->GetAxis(0)->SetTitle("Centrality %"); // 0
832  fhnPatchMatchJetLeadClus->GetAxis(1)->SetTitle("Event Plane Orientation"); // 1
833  fhnPatchMatchJetLeadClus->GetAxis(2)->SetTitle("Jet p_{T}"); // 2
834  fhnPatchMatchJetLeadClus->GetAxis(3)->SetTitle("Jet #phi"); // 3
835  fhnPatchMatchJetLeadClus->GetAxis(4)->SetTitle("Jet #eta"); // 4
836  fhnPatchMatchJetLeadClus->GetAxis(5)->SetTitle("Jet Area"); // 5
837  fhnPatchMatchJetLeadClus->GetAxis(6)->SetTitle("Number of Jet Tracks"); // 6
838  fhnPatchMatchJetLeadClus->GetAxis(7)->SetTitle("Max Track p_{T} constituent of Jet"); // 7
839  fhnPatchMatchJetLeadClus->GetAxis(8)->SetTitle("Number of Jet Clusters"); // 8
840  fhnPatchMatchJetLeadClus->GetAxis(9)->SetTitle("Max Cluster Energy constituent of Jet"); // 9
841  fhnPatchMatchJetLeadClus->GetAxis(10)->SetTitle("Cluster #phi"); // 10
842  fhnPatchMatchJetLeadClus->GetAxis(11)->SetTitle("Cluster #eta"); // 11
843  fhnPatchMatchJetLeadClus->GetAxis(12)->SetTitle("Max Patch Amplitude Online"); // 12
844  fhnPatchMatchJetLeadClus->GetAxis(13)->SetTitle("Max Patch Amplitude Offline"); // 13
845  fhnPatchMatchJetLeadClus->GetAxis(14)->SetTitle("Max Patch Energy Online"); // 14
846  fhnPatchMatchJetLeadClus->GetAxis(15)->SetTitle("Max Patch Energy Offline"); // 15
847  fhnPatchMatchJetLeadClus->GetAxis(16)->SetTitle("Max Patch Geometric Center in #phi"); // 16
848  fhnPatchMatchJetLeadClus->GetAxis(17)->SetTitle("Max Patch Geometric Center in #eta"); // 17
850 
851  // Event Selection QA histo
852  fHistEventSelectionQA = new TH1F("fHistEventSelectionQA", "Trigger Selection Counter", 20, 0.5, 20.5);
854 
855  // =========== Switch on Sumw2 for all histos ===========
856  for (Int_t i=0; i<fOutput->GetEntries(); ++i) {
857  TH1 *h1 = dynamic_cast<TH1*>(fOutput->At(i));
858  if (h1){
859  h1->Sumw2();
860  continue;
861  }
862  TH2 *h2 = dynamic_cast<TH2*>(fOutput->At(i));
863  if (h2){
864  h2->Sumw2();
865  continue;
866  }
867  TH3 *h3 = dynamic_cast<TH3*>(fOutput->At(i));
868  if (h3){
869  h3->Sumw2();
870  continue;
871  }
872  THnSparse *hn = dynamic_cast<THnSparse*>(fOutput->At(i));
873  if(hn)hn->Sumw2();
874  }
875 
876  TH1::AddDirectory(oldStatus);
877 
878  PostData(1, fOutput); // Post data for ALL output slots > 0 here.
879 
880  if(binsCent) delete [] binsCent;
881  if(binsdEP) delete [] binsdEP;
882  if(binsEn) delete [] binsEn;
883  if(binsPt) delete [] binsPt;
884  if(binsPhi) delete [] binsPhi;
885  if(binsEta) delete [] binsEta;
886  if(binsArea) delete [] binsArea;
887  if(binsConst) delete [] binsConst;
888  if(binsMeanPt) delete [] binsMeanPt;
889  if(binsNEF) delete [] binsNEF;
890  if(binsz) delete [] binsz;
891  if(binsJetType) delete [] binsJetType;
892  if(binsTime) delete [] binsTime;
893  if(binsVZERO) delete [] binsVZERO;
894 
895 }
896 
897 //________________________________________________________________________
899  // Fill histograms.
900 
901  // check and fill a Event Selection QA histogram for different trigger selections
902  UInt_t trig = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();
903 
904  // get fired trigger classes
905  TString firedTrigClass = InputEvent()->GetFiredTriggerClasses();
906 
907  // fill Event Trigger QA
909 
910  // create pointer to list of input event
911  TList *list = InputEvent()->GetList();
912  if(!list) {
913  AliError(Form("ERROR: list not attached\n"));
914  return kTRUE;
915  }
916 
917  // reset collect at start of event
918  fJetTriggeredEvent->Clear();
919 
920  //Tracks
922  if (partCont) {
923  //AliPicoTrack *track = dynamic_cast<AliPicoTrack*>(partCont->GetNextAcceptParticle(0));
924  partCont->ResetCurrentID();
925  AliVTrack *track = dynamic_cast<AliVTrack*>(partCont->GetNextAcceptParticle());
926  //if(!track) cout<<"No tracks... "<<endl;
927  while(track) {
928  Double_t trkphi = track->Phi()*TMath::RadToDeg();
929  fh3PtEtaPhiTracks->Fill(track->Pt(),track->Eta(),track->Phi());
930 
931  //Select tracks which should be propagated
932  if(track->Pt()>=0.350) {
933  if (TMath::Abs(track->Eta())<=0.9 && trkphi > 10 && trkphi < 250) {
934  fh3PtEtaPhiTracksOnEmcal->Fill(track->GetTrackPtOnEMCal(),track->GetTrackEtaOnEMCal(),track->GetTrackPhiOnEMCal());
935  fh3PtEtaPhiTracksToProp->Fill(track->Pt(),track->Eta(),track->Phi());
936  if(track->GetTrackPtOnEMCal()>=0) fh3PtEtaPhiTracksProp->Fill(track->Pt(),track->Eta(),track->Phi());
937  else
938  fh3PtEtaPhiTracksNoProp->Fill(track->Pt(),track->Eta(),track->Phi());
939  } // acceptance cut
940  } // track pt cut
941  track = dynamic_cast<AliPicoTrack*>(partCont->GetNextAcceptParticle());
942  } // track exist
943  } // particle container
944 
945  //Clusters
947  if (clusCont) {
948  Int_t nclusters = clusCont->GetNClusters();
949  for (Int_t ic = 0; ic < nclusters; ic++) {
950  AliVCluster *cluster = static_cast<AliVCluster*>(clusCont->GetCluster(ic));
951  if (!cluster) {
952  AliDebug(2,Form("Could not receive cluster %d", ic));
953  continue;
954  }
955 
956  if (!cluster->IsEMCAL()) {
957  AliDebug(2,Form("%s: Cluster is not emcal",GetName()));
958  continue;
959  }
960 
961  TLorentzVector lp;
962  cluster->GetMomentum(lp, const_cast<Double_t*>(fVertex));
963  fh3EEtaPhiCluster->Fill(lp.E(),lp.Eta(),lp.Phi());
964  if(fCaloCells) {
965  Double_t leadCellE = GetEnergyLeadingCell(cluster);
966  Double_t leadCellT = cluster->GetTOF();
967  fh3EClusELeadingCellVsTime->Fill(lp.E(),leadCellE,leadCellT*1e9);
968  } // if calo cells exist
969  } // cluster loop
970  } // if cluster container exist
971 
972  //Clusters - get cluster collection
973  TClonesArray *clusters = 0x0;
974  clusters = dynamic_cast<TClonesArray*>(list->FindObject(fCaloClustersName)); // CHANGED
975  if (!clusters) {
976  AliError(Form("Pointer to clusters %s == 0", fCaloClustersName.Data())); // CHANGED
977  return kTRUE;
978  } // verify existence of clusters
979 
980  // loop over clusters
981  const Int_t Nclusters = clusters->GetEntries();
982  for (Int_t iclus = 0; iclus < Nclusters; iclus++){
983  AliVCluster* clus = static_cast<AliVCluster*>(clusters->At(iclus));
984  if(!clus){
985  AliError(Form("Couldn't get AliVCluster %d\n", iclus));
986  continue;
987  }
988 
989  // is cluster in EMCal?
990  if (!clus->IsEMCAL()) {
991  AliDebug(2,Form("%s: Cluster is not emcal",GetName()));
992  continue;
993  }
994 
995  // get some info on cluster and fill histo
996  TLorentzVector lp;
997  clus->GetMomentum(lp, const_cast<Double_t*>(fVertex));
998  fHistClusEnergy->Fill(lp.E());
999  }
1000 
1001  //Jets
1002  Double_t ptLeadJet1 = 0.;
1003  Double_t ptLeadJet2 = 0.;
1004 
1005  // background rho
1007 
1008  TArrayI *nJetsArr = new TArrayI(fh2NJetsPt->GetNbinsY()+1);
1009  nJetsArr->Reset(0);
1010  nJetsArr->Set(fh2NJetsPt->GetNbinsY()+1);
1011 
1012  // get jet container
1014  const Int_t njets = GetNJets(fJetContainer);
1015 
1016  // loop over jets
1017  for (Int_t ij = 0, jacc = 0; ij < njets; ij++) {
1019  if (!jet) continue; //jet not selected
1020 
1021  // get jetpt after background subtraction
1022  Double_t jetPt = jet->Pt() - GetRhoVal(fJetContainer)*jet->Area();
1023  if(jetPt>ptLeadJet1) ptLeadJet1=jetPt;
1024 
1025  // fill histos
1026  Double_t dEPJet = RelativeEP(jet->Phi(), fEPV0);
1027  fh3JetReacCent->Fill(jet->E(),fCent,dEPJet);
1028  fh2CentPtJet->Fill(fCent,jetPt);
1029  fh3PtEtaPhiJet->Fill(jetPt,jet->Eta(),jet->Phi());
1030  fh3PtEtaAreaJet->Fill(jetPt,jet->Eta(),jet->Area());
1031 
1032  //count jets above certain pT threshold
1033  Int_t ptbin = fh2NJetsPt->GetYaxis()->FindBin(jetPt);
1034  for(Int_t iptbin = ptbin; iptbin<=fh2NJetsPt->GetNbinsY(); iptbin++)
1035  nJetsArr->AddAt(nJetsArr->At(iptbin)+1,iptbin);
1036 
1037  // fill histos
1038  fh2PtNConstituentsCharged->Fill(jetPt,jet->GetNumberOfTracks());
1039  fh2PtNConstituents->Fill(jetPt,jet->GetNumberOfConstituents());
1040  fh2PtNEF->Fill(jetPt,jet->NEF());
1041  fh3NEFEtaPhi->Fill(jet->NEF(),jet->Eta(),jet->Phi());
1042  fh2NEFNConstituentsCharged->Fill(jet->NEF(),jet->GetNumberOfTracks());
1043  fh2NEFNConstituentsNeutral->Fill(jet->NEF(),jet->GetNumberOfClusters());
1044 
1045  // sum up charged pt of jet
1046  AliVParticle *vp;
1047  Double_t sumPtCh = 0.;
1048  for(Int_t icc=0; icc<jet->GetNumberOfTracks(); icc++) {
1049  vp = static_cast<AliVParticle*>(jet->TrackAt(icc, fTracks));
1050  if(!vp) continue;
1051  fh2Ptz->Fill(jetPt,GetZ(vp,jet));
1052  sumPtCh+=vp->Pt();
1053  }
1054 
1055  if(jet->GetNumberOfTracks()>0) fh2PtMeanPtConstituentsCharged->Fill(jetPt,sumPtCh/(double)(jet->GetNumberOfTracks()) );
1056 
1057  AliVCluster *vc = 0x0;
1058  Double_t sumPtNe = 0.;
1059  Double_t maxClusterEta = 0., maxClusterPhi = 0., maxClusterE = 0.;
1060 
1061  // apply jet pt cut
1062  if(jet->Pt() > fJetPtCut) {
1063  // check for cluster containers
1064  if (clusCont && clusCont->GetArray()) {
1065  // get leading cluster of jet
1066  AliVCluster *clustermax = jet->GetLeadingCluster(clusCont->GetArray());
1067 
1068  // check that we have a leading cluster and it is above a set bias - for MAX patch
1069  if(clustermax && clustermax->E() > fClusBias && fMaxPatch && firedTrigClass.Contains(fTriggerClass) && (!fUseALLrecalcPatches)) {
1070  TLorentzVector nPart;
1071  clustermax->GetMomentum(nPart, const_cast<Double_t*>(fVertex));
1072  maxClusterEta = nPart.Eta();
1073  maxClusterPhi = nPart.Phi();
1074  maxClusterE = clustermax->E();
1075 
1076  // get max patch location
1077  double fMaxPatchPhiGeo = fMaxPatch->GetPhiGeo();
1078  double fMaxPatchEtaGeo = fMaxPatch->GetEtaGeo();
1079  double dPhiPatchLeadCl = 1.0*TMath::Abs(fMaxPatchPhiGeo - nPart.Phi());
1080  double dEtaPatchLeadCl = 1.0*TMath::Abs(fMaxPatchEtaGeo - nPart.Eta());
1081 
1082  // get some info to fill in sparse
1083  double dEPJet = RelativeEP(jet->Phi(), fEPV0);
1084  double kAmplitudeOnline = fMaxPatch->GetADCAmp();
1085  double kAmplitudeOffline = fMaxPatch->GetADCOfflineAmp();
1086  double kEnergyOnline = fMaxPatch->GetADCAmpGeVRough();
1087  double kEnergyOffline = fMaxPatch->GetPatchE();
1088 
1089  // get patch variables
1090  double etamin = TMath::Min(fMaxPatch->GetEtaMin(), fMaxPatch->GetEtaMax());
1091  double etamax = TMath::Max(fMaxPatch->GetEtaMin(), fMaxPatch->GetEtaMax());
1092  double phimin = TMath::Min(fMaxPatch->GetPhiMin(), fMaxPatch->GetPhiMax());
1093  double phimax = TMath::Max(fMaxPatch->GetPhiMin(), fMaxPatch->GetPhiMax());
1094 
1095  for(int maxbinE = 0; maxbinE<16; maxbinE++) {
1096  if(maxClusterE > maxbinE) fHistdPhidEtaPatchJetCluster[maxbinE]->Fill(dPhiPatchLeadCl, dEtaPatchLeadCl);
1097  }
1098 
1099  // fill sparse array before and after match
1100  Double_t fillarr[8] = {fCent, jet->Pt(), maxClusterE, dPhiPatchLeadCl, dEtaPatchLeadCl, kEnergyOffline, kAmplitudeOnline, dEPJet};
1101  fhnPatchMatch->Fill(fillarr);
1102  if(maxClusterEta > etamin && maxClusterEta < etamax && maxClusterPhi > phimin && maxClusterPhi < phimax) fhnPatchMatch2->Fill(fillarr);
1103 
1104  // patch meeting offline energy cut
1105  if(fMaxPatch->GetPatchE() > fPatchECut) {
1106 
1107  // look to geometrically match patch to leading cluster of jet
1108  if(maxClusterEta > etamin && maxClusterEta < etamax && maxClusterPhi > phimin && maxClusterPhi < phimax){
1109  if(doComments) {
1110  cout<<"*********************************************"<<endl;
1111  cout<<"Proper match (cluster constituent of jet to fired max patch: ";
1112  cout<<Form("Jet # = %i, Jet Pt = %f, Jet Phi = %f, Jet Eta = %f", ij, jet->Pt(), jet->Phi(), jet->Eta())<<endl;
1113  cout<<Form("NClus in jet = %i, MaxClusterE = %f, Phi = %f, Eta = %f", jet->GetNumberOfClusters(), maxClusterE, maxClusterPhi, maxClusterEta)<<endl;
1114  cout<<Form("LeadClusE = %f, Phi = %f, Eta = %f", maxClusterE, maxClusterPhi, maxClusterEta)<<endl;
1115  cout<<"*********************************************"<<endl;
1116  } // do comments
1117 
1118  // fill sparse for match
1119  Double_t fill[18] = {fCent, dEPJet, jet->Pt(), jet->Phi(), jet->Eta(), jet->Area(), (Double_t)jet->GetNumberOfTracks(), jet->MaxTrackPt(), (Double_t)jet->GetNumberOfClusters(), maxClusterE, maxClusterPhi, maxClusterEta, kAmplitudeOnline, kAmplitudeOffline, kEnergyOnline, kEnergyOffline, fMaxPatchPhiGeo, fMaxPatchEtaGeo};
1120  fhnPatchMatchJetLeadClus->Fill(fill);
1121 
1122  // method for filling collection output array of 'saved' jets
1123  (*fJetTriggeredEvent)[jacc] = jet;
1124  ++jacc;
1125 
1126  } // MATCH!
1127  } // patch > Ecut GeV
1128  } // have max cluster
1129 
1130 
1131 // ====================================================
1132  // check that we have a leading cluster and it is above a set bias - for ALL recalculated (OFFLINE) patches
1133  if(clustermax && clustermax->E() > fClusBias && firedTrigClass.Contains(fTriggerClass) && (fUseALLrecalcPatches)) {
1134  TLorentzVector nPart;
1135  clustermax->GetMomentum(nPart, const_cast<Double_t*>(fVertex));
1136  maxClusterEta = nPart.Eta();
1137  maxClusterPhi = nPart.Phi();
1138  maxClusterE = clustermax->E();
1139 
1140  // number of recalculated patches in event
1141  Int_t nPatch = fRecalcTriggerPatches->GetEntriesFast();
1142 
1143  AliEMCALTriggerPatchInfo *patch;
1144  for(Int_t iPatch = 0; iPatch < nPatch; iPatch++) {
1145  patch = (AliEMCALTriggerPatchInfo*)fRecalcTriggerPatches->At(iPatch);
1146  if(!patch) continue;
1147 
1148  // get max patch location
1149  double fPatchPhiGeo = patch->GetPhiGeo();
1150  double fPatchEtaGeo = patch->GetEtaGeo();
1151  double dPhiPatchLeadCl = 1.0*TMath::Abs(fPatchPhiGeo - maxClusterPhi);
1152  double dEtaPatchLeadCl = 1.0*TMath::Abs(fPatchEtaGeo - maxClusterEta);
1153 
1154  // get some info to fill in sparse
1155  double dEPJet = RelativeEP(jet->Phi(), fEPV0);
1156  double kAmplitudeOnline = patch->GetADCAmp();
1157  double kAmplitudeOffline = patch->GetADCOfflineAmp();
1158  double kEnergyOnline = patch->GetADCAmpGeVRough();
1159  double kEnergyOffline = patch->GetPatchE();
1160 
1161  // get patch variables
1162  double etamin = TMath::Min(patch->GetEtaMin(), patch->GetEtaMax());
1163  double etamax = TMath::Max(patch->GetEtaMin(), patch->GetEtaMax());
1164  double phimin = TMath::Min(patch->GetPhiMin(), patch->GetPhiMax());
1165  double phimax = TMath::Max(patch->GetPhiMin(), patch->GetPhiMax());
1166 
1167  for(int maxbinE = 0; maxbinE<16; maxbinE++) {
1168  if(maxClusterE > maxbinE) fHistdPhidEtaPatchJetCluster[maxbinE]->Fill(dPhiPatchLeadCl, dEtaPatchLeadCl);
1169  }
1170 
1171  // fill sparse array before and after match
1172  Double_t fillarr[8] = {fCent, jet->Pt(), maxClusterE, dPhiPatchLeadCl, dEtaPatchLeadCl, kEnergyOffline, kAmplitudeOnline, dEPJet};
1173  fhnPatchMatch->Fill(fillarr);
1174  if(maxClusterEta > etamin && maxClusterEta < etamax && maxClusterPhi > phimin && maxClusterPhi < phimax) fhnPatchMatch2->Fill(fillarr);
1175 
1176  // patch meeting offline energy cut
1177  if(patch->GetPatchE() > fPatchECut) {
1178  // look to geometrically match patch to leading cluster of jet
1179  if(maxClusterEta > etamin && maxClusterEta < etamax && maxClusterPhi > phimin && maxClusterPhi < phimax){
1180  if(doComments) {
1181  cout<<"*********************************************"<<endl;
1182  cout<<"Proper match (cluster constituent of jet to fired ALL recalculated (OFFLINE) patch: ";
1183  cout<<Form("Jet # = %i, Jet Pt = %f, Jet Phi = %f, Jet Eta = %f", ij, jet->Pt(), jet->Phi(), jet->Eta())<<endl;
1184  cout<<Form("NClus in jet = %i, MaxClusterE = %f, Phi = %f, Eta = %f", jet->GetNumberOfClusters(), maxClusterE, maxClusterPhi, maxClusterEta)<<endl;
1185  cout<<Form("LeadClusE = %f, Phi = %f, Eta = %f", maxClusterE, maxClusterPhi, maxClusterEta)<<endl;
1186  cout<<"*********************************************"<<endl;
1187  } // do comments
1188 
1189  // fill sparse for match
1190  Double_t fill[18] = {fCent, dEPJet, jet->Pt(), jet->Phi(), jet->Eta(), jet->Area(), (Double_t)jet->GetNumberOfTracks(), jet->MaxTrackPt(), (Double_t)jet->GetNumberOfClusters(), maxClusterE, maxClusterPhi, maxClusterEta, kAmplitudeOnline, kAmplitudeOffline, kEnergyOnline, kEnergyOffline, fPatchPhiGeo, fPatchEtaGeo};
1191  fhnPatchMatchJetLeadClus->Fill(fill);
1192 
1193  // method for filling collection output array of 'saved' jets
1194  (*fJetTriggeredEvent)[jacc] = jet;
1195  ++jacc;
1196 
1197  } // MATCH!
1198  } // patch > Ecut GeV
1199  }// patch loop
1200  } // have max cluster
1201 //=======================================================
1202  } // have cluster container
1203  } // jet->pt() > cut
1204 
1205  // sum up neutral energy of jet
1206  if (clusCont) {
1207  for(Int_t icc=0; icc<jet->GetNumberOfClusters(); icc++) {
1208  vc = static_cast<AliVCluster*>(clusCont->GetCluster(icc));
1209  if(!vc) continue;
1210  TLorentzVector lp;
1211  vc->GetMomentum(lp, const_cast<Double_t*>(fVertex));
1212  sumPtNe+=lp.Pt();
1213  } // cluster loop
1214 
1215  if(jet->GetNumberOfClusters()>0) fh2PtMeanPtConstituentsNeutral->Fill(jetPt,sumPtNe/(double)(jet->GetNumberOfClusters()) );
1216  } // cluster container exists
1217  } // jet loop
1218 
1219  for(Int_t i=1; i<=fh2NJetsPt->GetNbinsY(); i++) {
1220  Int_t nJetsInEvent = nJetsArr->At(i);
1221  fh2NJetsPt->Fill(nJetsInEvent,fh2NJetsPt->GetYaxis()->GetBinCenter(i));
1222  }
1223  }
1224 
1225  // leading jet comparison with each other and max patches
1226  if(GetJetContainer(fJetContainer)) fh2PtLeadJet1VsLeadJet2->Fill(ptLeadJet1,ptLeadJet2);
1229 
1230  //Get VZERO amplitude
1231  Float_t VZEROAmp = InputEvent()->GetVZEROData()->GetTriggerChargeA() + InputEvent()->GetVZEROData()->GetTriggerChargeC();
1232  fh3PtLeadJet1PatchEnergyVZEROAmp->Fill(ptLeadJet1,fMaxPatchEnergy,VZEROAmp);
1233  fh3PtLeadJet1RawPatchEnergyVZEROAmp->Fill(ptLeadJet1,fMaxPatchADCEnergy,VZEROAmp);
1234 
1235  delete nJetsArr;
1236 
1237  //Cells - some QA plots
1238  if(fCaloCells) {
1239  const Short_t nCells = fCaloCells->GetNumberOfCells();
1240 
1241  for(Int_t iCell=0; iCell<nCells; ++iCell) {
1242  Short_t cellId = fCaloCells->GetCellNumber(iCell);
1243  Double_t cellE = fCaloCells->GetCellAmplitude(cellId);
1244  Double_t cellT = fCaloCells->GetCellTime(cellId);
1245  TVector3 pos;
1246  fGeom->GetGlobal(cellId, pos);
1247  TLorentzVector lv(pos,cellE);
1248  Double_t cellEta = lv.Eta();
1249  Double_t cellPhi = lv.Phi();
1250  if(cellPhi<0.) cellPhi+=TMath::TwoPi();
1251  if(cellPhi>TMath::TwoPi()) cellPhi-=TMath::TwoPi();
1252 
1253  AliDebug(2,Form("cell energy = %f time = %f",cellE,cellT*1e9));
1254  fh2CellEnergyVsTime->Fill(cellE,cellT*1e9);
1255  fh3EEtaPhiCell->Fill(cellE,cellEta,cellPhi);
1256  fh2ECellVsCent->Fill(fCent,cellE);
1257  }
1258  }
1259 
1260  return kTRUE;
1261 }
1262 
1263 //________________________________________________________________________
1265  // Run analysis code here, if needed. It will be executed before FillHistograms().
1266  fhTriggerbit->Fill(0.5,GetCollisionCandidates());
1267 
1268  // just in case..
1269  fGeom = AliEMCALGeometry::GetInstance("EMCAL_COMPLETEV1");
1270 
1271  //Check if event is selected (vertex & pile-up)
1272  //if(!SelectEvent()) return kFALSE;
1273 
1274  // when we have the patch object to match, peform analysis
1276 
1277  return kTRUE; // If return kFALSE FillHistogram() will NOT be executed.
1278 }
1279 
1280 //_______________________________________________________________________
1282  // Called once at the end of the analysis.
1283 }
1284 //________________________________________________________________________
1285 Double_t AliAnalysisTaskEmcalTriggerPatchJetMatch::GetZ(const AliVParticle *trk, const AliEmcalJet *jet) const {
1286  // Get Z of constituent trk
1287  return GetZ(trk->Px(),trk->Py(),trk->Pz(),jet->Px(),jet->Py(),jet->Pz());
1288 }
1289 
1290 //________________________________________________________________________
1292  // Get the z of a constituent inside of a jet
1293  Double_t pJetSq = jetPx*jetPx+jetPy*jetPy+jetPz*jetPz;
1294  if(pJetSq>0.)
1295  return (trkPx*jetPx+trkPy*jetPy+trkPz*jetPz)/pJetSq;
1296  else {
1297  AliWarning(Form("%s: strange, pjet*pjet seems to be zero pJetSq: %f",GetName(), pJetSq));
1298  return 0;
1299  }
1300 }
1301 
1302 //________________________________________________________________________
1304  //Get energy of leading cell in cluster
1305  if(!fCaloCells) return -1;
1306 
1307  Double_t emax = -1.;
1308  Int_t iCellAbsIdMax = -1;
1309  Int_t nCells = clus->GetNCells();
1310  for(Int_t i = 0; i<nCells; i++) {
1311  Int_t absId = clus->GetCellAbsId(i);
1312  Double_t cellE = fCaloCells->GetCellAmplitude(absId);
1313  if(cellE>emax) {
1314  emax = cellE;
1315  iCellAbsIdMax = absId;
1316  }
1317  }
1318  return iCellAbsIdMax;
1319 }
1320 
1321 //________________________________________________________________________
1323  //Get energy of leading cell in cluster
1324  if(!fCaloCells) return -1.;
1325 
1326  Int_t absID = GetLeadingCellId(clus);
1327  if(absID>-1) return fCaloCells->GetCellAmplitude(absID);
1328  else return -1.;
1329 }
1330 
1331 //________________________________________________________________________
1333  //Get Ecross = sum of energy of neighbouring cells (using uncalibrated energy)
1334  if(!fCaloCells) return -1.;
1335 
1336  Double_t ecross = -1.;
1337 
1338  Int_t absID1 = -1;
1339  Int_t absID2 = -1;
1340  Int_t absID3 = -1;
1341  Int_t absID4 = -1;
1342 
1343  Int_t imod = -1, iphi =-1, ieta=-1, iTower = -1, iIphi = -1, iIeta = -1;
1344  fGeom->GetCellIndex(absID,imod,iTower,iIphi,iIeta);
1345  fGeom->GetCellPhiEtaIndexInSModule(imod,iTower,iIphi, iIeta,iphi,ieta);
1346 
1347  if( iphi < AliEMCALGeoParams::fgkEMCALRows-1)
1348  absID1 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi+1, ieta);
1349  if( iphi > 0 )
1350  absID2 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi-1, ieta);
1351 
1352  if( ieta == AliEMCALGeoParams::fgkEMCALCols-1 && !(imod%2) ) {
1353  absID3 = fGeom->GetAbsCellIdFromCellIndexes(imod+1, iphi, 0);
1354  absID4 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta-1);
1355  }
1356  else if( ieta == 0 && imod%2 ) {
1357  absID3 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta+1);
1358  absID4 = fGeom->GetAbsCellIdFromCellIndexes(imod-1, iphi, AliEMCALGeoParams::fgkEMCALCols-1);
1359  }
1360  else {
1361  if( ieta < AliEMCALGeoParams::fgkEMCALCols-1 )
1362  absID3 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta+1);
1363  if( ieta > 0 )
1364  absID4 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta-1);
1365  }
1366 
1367  Double_t ecell1 = fCaloCells->GetCellAmplitude(absID1);
1368  Double_t ecell2 = fCaloCells->GetCellAmplitude(absID2);
1369  Double_t ecell3 = fCaloCells->GetCellAmplitude(absID3);
1370  Double_t ecell4 = fCaloCells->GetCellAmplitude(absID4);
1371 
1372  ecross = ecell1+ecell2+ecell3+ecell4;
1373 
1374  return ecross;
1375 }
1376 
1377 //_________________________________________________________________________
1379  // function to calculate angle between object and EP in the 1st quadrant (0,Pi/2)
1380  Double_t dphi = EPAng - objAng;
1381 
1382  // ran into trouble with a few dEP<-Pi so trying this...
1383  if( dphi<-1*TMath::Pi() )
1384  dphi = dphi + 1*TMath::Pi();
1385  if( dphi>1*TMath::Pi())
1386  dphi = dphi - 1*TMath::Pi();
1387 
1388  if( (dphi>0) && (dphi<1*TMath::Pi()/2) ){
1389  // Do nothing! we are in quadrant 1
1390  }else if( (dphi>1*TMath::Pi()/2) && (dphi<1*TMath::Pi()) ){
1391  dphi = 1*TMath::Pi() - dphi;
1392  }else if( (dphi<0) && (dphi>-1*TMath::Pi()/2) ){
1393  dphi = fabs(dphi);
1394  }else if( (dphi<-1*TMath::Pi()/2) && (dphi>-1*TMath::Pi()) ){
1395  dphi = dphi + 1*TMath::Pi();
1396  }
1397 
1398  return dphi; // dphi in [0, Pi/2]
1399 }
1400 
1401 TH1* AliAnalysisTaskEmcalTriggerPatchJetMatch::FillTriggerPatchQA(TH1* h, UInt_t trig, AliEMCALTriggerPatchInfo *fPatch) {
1402  // check and fill a QA histogram
1403  if(fPatch->IsLevel0()) h->Fill(1);
1404  if(fPatch->IsJetLow()) h->Fill(2);
1405  if(fPatch->IsJetHigh()) h->Fill(3);
1406  if(fPatch->IsGammaLow()) h->Fill(4);
1407  if(fPatch->IsGammaHigh()) h->Fill(5);
1408  if(fPatch->IsMainTrigger()) h->Fill(6);
1409  if(fPatch->IsJetLowSimple()) h->Fill(7);
1410  if(fPatch->IsJetHighSimple()) h->Fill(8);
1411  if(fPatch->IsGammaLowSimple()) h->Fill(9);
1412  if(fPatch->IsGammaHighSimple()) h->Fill(10);
1413  if(fPatch->IsMainTriggerSimple()) h->Fill(11);
1414  if(fPatch->IsOfflineSimple()) h->Fill(12);
1415  if(fPatch->IsRecalcJet()) h->Fill(13);
1416  if(fPatch->IsRecalcGamma()) h->Fill(14);
1417  if(trig & AliVEvent::kEMCEJE) h->Fill(19);
1418  if(trig & AliVEvent::kEMCEGA) h->Fill(20);
1419 
1420  h->GetXaxis()->SetBinLabel(1, "Level0");
1421  h->GetXaxis()->SetBinLabel(2, "JetLow");
1422  h->GetXaxis()->SetBinLabel(3, "JetHigh");
1423  h->GetXaxis()->SetBinLabel(4, "GammaLow");
1424  h->GetXaxis()->SetBinLabel(5, "GammaHigh");
1425  h->GetXaxis()->SetBinLabel(6, "MainTrigger");
1426  h->GetXaxis()->SetBinLabel(7, "JetLowSimple");
1427  h->GetXaxis()->SetBinLabel(8, "JetHighSimple");
1428  h->GetXaxis()->SetBinLabel(9, "GammaLowSimple");
1429  h->GetXaxis()->SetBinLabel(10, "GammaHighSimple");
1430  h->GetXaxis()->SetBinLabel(11, "MainTriggerSimple");
1431  h->GetXaxis()->SetBinLabel(12, "OfflineSimple");
1432  h->GetXaxis()->SetBinLabel(13, "RecalcJet");
1433  h->GetXaxis()->SetBinLabel(14, "RecalcGamma");
1434  h->GetXaxis()->SetBinLabel(15, "");
1435  h->GetXaxis()->SetBinLabel(16, "");
1436  h->GetXaxis()->SetBinLabel(17, "");
1437  h->GetXaxis()->SetBinLabel(18, "");
1438  h->GetXaxis()->SetBinLabel(19, "kEMCEJE");
1439  h->GetXaxis()->SetBinLabel(20, "kEMCEGA");
1440 
1441  // set x-axis labels vertically
1442  //h->LabelsOption("v");
1443  //h->LabelsDeflate("X");
1444 
1445  return h;
1446 }
1447 
1449  Bool_t hasfound = kFALSE;
1450  for(TIter patchIter = TIter(triggerpatches).Begin(); patchIter != TIter::End(); ++patchIter){
1451  AliEMCALTriggerPatchInfo *mypatch = static_cast<AliEMCALTriggerPatchInfo *>(*patchIter);
1452  Double_t etamin = TMath::Min(mypatch->GetEtaMin(), mypatch->GetEtaMax()),
1453  etamax = TMath::Max(mypatch->GetEtaMin(), mypatch->GetEtaMax()),
1454  phimin = TMath::Min(mypatch->GetPhiMin(), mypatch->GetPhiMax()),
1455  phimax = TMath::Max(mypatch->GetPhiMin(), mypatch->GetPhiMax());
1456  if(etaclust > etamin && etaclust < etamax && phiclust > phimin && phiclust < phimax){
1457  hasfound = kTRUE;
1458  break;
1459  }
1460  }
1461  return hasfound;
1462 }
1463 
1465  // check and fill a Event Selection QA histogram for different trigger selections after cuts
1466  if(trig == 0) h->Fill(1);
1467  if(trig & AliVEvent::kAny) h->Fill(2);
1468  if(trig & AliVEvent::kAnyINT) h->Fill(3);
1469  if(trig & AliVEvent::kMB) h->Fill(4);
1470  if(trig & AliVEvent::kINT7) h->Fill(5);
1471  if(trig & AliVEvent::kEMC1) h->Fill(6);
1472  if(trig & AliVEvent::kEMC7) h->Fill(7);
1473  if(trig & AliVEvent::kEMC8) h->Fill(8);
1474  if(trig & AliVEvent::kEMCEJE) h->Fill(9);
1475  if(trig & AliVEvent::kEMCEGA) h->Fill(10);
1476  if(trig & AliVEvent::kCentral) h->Fill(11);
1477  if(trig & AliVEvent::kSemiCentral) h->Fill(12);
1478  if(trig & AliVEvent::kINT8) h->Fill(13);
1479 
1480  if(trig & (AliVEvent::kEMCEJE | AliVEvent::kMB)) h->Fill(14);
1481  if(trig & (AliVEvent::kEMCEGA | AliVEvent::kMB)) h->Fill(15);
1482  if(trig & (AliVEvent::kAnyINT | AliVEvent::kMB)) h->Fill(16);
1483 
1484  if(trig & (AliVEvent::kEMCEJE & (AliVEvent::kMB | AliVEvent::kCentral | AliVEvent::kSemiCentral))) h->Fill(17);
1485  if(trig & (AliVEvent::kEMCEGA & (AliVEvent::kMB | AliVEvent::kCentral | AliVEvent::kSemiCentral))) h->Fill(18);
1486  if(trig & (AliVEvent::kAnyINT & (AliVEvent::kMB | AliVEvent::kCentral | AliVEvent::kSemiCentral))) h->Fill(19);
1487 
1488  // label bins of the analysis trigger selection summary
1489  h->GetXaxis()->SetBinLabel(1, "no trigger");
1490  h->GetXaxis()->SetBinLabel(2, "kAny");
1491  h->GetXaxis()->SetBinLabel(3, "kAnyINT");
1492  h->GetXaxis()->SetBinLabel(4, "kMB");
1493  h->GetXaxis()->SetBinLabel(5, "kINT7");
1494  h->GetXaxis()->SetBinLabel(6, "kEMC1");
1495  h->GetXaxis()->SetBinLabel(7, "kEMC7");
1496  h->GetXaxis()->SetBinLabel(8, "kEMC8");
1497  h->GetXaxis()->SetBinLabel(9, "kEMCEJE");
1498  h->GetXaxis()->SetBinLabel(10, "kEMCEGA");
1499  h->GetXaxis()->SetBinLabel(11, "kCentral");
1500  h->GetXaxis()->SetBinLabel(12, "kSemiCentral");
1501  h->GetXaxis()->SetBinLabel(13, "kINT8");
1502  h->GetXaxis()->SetBinLabel(14, "kEMCEJE or kMB");
1503  h->GetXaxis()->SetBinLabel(15, "kEMCEGA or kMB");
1504  h->GetXaxis()->SetBinLabel(16, "kAnyINT or kMB");
1505  h->GetXaxis()->SetBinLabel(17, "kEMCEJE & (kMB or kCentral or kSemiCentral)");
1506  h->GetXaxis()->SetBinLabel(18, "kEMCEGA & (kMB or kCentral or kSemiCentral)");
1507  h->GetXaxis()->SetBinLabel(19, "kAnyINT & (kMB or kCentral or kSemiCentral)");
1508 
1509  // set x-axis labels vertically
1510  h->LabelsOption("v");
1511  //h->LabelsDeflate("X");
1512 
1513  return h;
1514 }
TH1F * fhGammaLowSimplePatchEnergy
Gamma Low Patch Energy distribution.
TH3F * fh3JetReacCent
cluster energy vs energy of leading cell in cluster vs time of the leading cell
Online energy, estimated from L0 time sums.
Double_t Area() const
Definition: AliEmcalJet.h:130
virtual AliVParticle * GetNextAcceptParticle()
double Double_t
Definition: External.C:58
TH1F * fhMainTriggerPatchEnergy
Jet Low Simple patch energy distribution.
Definition: External.C:260
Bool_t CorrelateToTrigger(Double_t etaclust, Double_t phiclust, TList *triggerpatches) const
Definition: External.C:236
AliJetContainer * GetJetContainer(Int_t i=0) const
Definition: External.C:244
Double_t Eta() const
Definition: AliEmcalJet.h:121
Recalculated jet trigger patch; does not need to be above trigger threshold.
Int_t GetNJets(Int_t i=0) const
Double_t Py() const
Definition: AliEmcalJet.h:107
Double_t Phi() const
Definition: AliEmcalJet.h:117
TH3F * fh3PatchEnergyEtaPhiCenterJ2
patch energy vs eta, phi at center of patch, high threshold
TH1F * fhJetLowSimplePatchEnergy
Jet Low patch energy distribution.
TH3F * fh3PatchADCEnergyEtaPhiCenterG1G2
patch ADC energy vs eta, phi at center of patch, low threshold
Double_t fEPV0
!event plane V0
void ExecOnce()
Perform steps needed to initialize the analysis.
THnSparse * fhnPatchMatch2
// QA before matching patch sparse matrix
Offline amplitude, estimated from EMCAL cells.
TH3F * fh3PtLeadJet2VsPatchEnergy
leading jet energy vs leading patch energy vs jet trigger (J1/J2)
Double_t E() const
Definition: AliEmcalJet.h:119
TH1F * fhRecalcJetPatchEnergy
Gamma Low Simple Patch Energy distribution.
Bool_t Run()
Run function. This is the core function of the analysis and contains the user code. Therefore users have to implement this function.
Online amplitude of the patch, from L0 time sums.
AliVCluster * GetLeadingCluster(const char *opt="")
UShort_t GetNumberOfConstituents() const
Definition: AliEmcalJet.h:140
Container for particles within the EMCAL framework.
Int_t TrackAt(Int_t idx) const
Definition: AliEmcalJet.h:160
UShort_t GetNumberOfTracks() const
Definition: AliEmcalJet.h:139
Double_t Px() const
Definition: AliEmcalJet.h:106
AliParticleContainer * GetParticleContainer(Int_t i=0) const
Get particle container attached to this task.
void GetMomentum(TLorentzVector &vec) const
TH3F * fh3PtLeadJet1RawPatchEnergyVZEROAmp
leading jet energy vs leading patch energy vs VZERO amplitude
const Double_t etamin
TH1F * fhJetLowPatchEnergy
Recalculated Jet Patch Energy distribution.
TH3F * fh3EEtaPhiCluster
correlation between leading jet of the two branches
TH2F * fh2PtMeanPtConstituentsNeutral
pt, <pt> charged constituents
TH3F * fh3PatchEnergyEtaPhiCenterG2
patch energy vs eta, phi at center of patch, high threshold
int Int_t
Definition: External.C:63
TH3F * fh3PatchEnergyEtaPhiCenterG1
patch ADC energy vs eta, phi at center of patch, low + high threshold
UShort_t GetNumberOfClusters() const
Definition: AliEmcalJet.h:138
TH3F * fh3PatchEnergyEtaPhiCenterJ1J2
patch energy vs eta, phi at center of patch, low threshold
unsigned int UInt_t
Definition: External.C:33
float Float_t
Definition: External.C:68
THnSparse * fhnPatchMatchJetLeadClus
// QA after matching patch sparse matrix
TH3F * fh3EEtaPhiCell
patch ADC energy vs eta, phi at center of patch, all trigger patches
AliEMCALGeometry * fGeom
!emcal geometry
kRecalculated gamma trigger patch; does not need to be above trigger threshold
TH3F * fh3PatchADCEnergyEtaPhiCenterAll
patch ADC energy vs eta, phi at center of patch, low + high threshold
TH1F * fHistClusEnergy
jet energy vs cent vs dphi(jet,event plane)
TH2F * fh2NEFNConstituentsNeutral
NEF, # charged jet constituents.
TH3F * fh3PatchADCEnergyEtaPhiCenterG2
patch ADC energy vs eta, phi at center of patch, high threshold
TH3F * fh3PatchADCEnergyEtaPhiCenterG1
patch energy vs eta, phi at center of patch, low + high threshold
TH2F * fHistRhovsCent
histogram containing the triggerbit (fOfflineTriggerMask)
AliClusterContainer * GetClusterContainer(Int_t i=0) const
Get cluster container attached to this task.
Double_t MaxTrackPt() const
Definition: AliEmcalJet.h:155
Int_t GetNClusters() const
Double_t fCent
!event centrality
Float_t RelativeEP(Double_t objAng, Double_t EPAng) const
TH3F * fh3PatchEnergyEtaPhiCenterG1G2
patch energy vs eta, phi at center of patch, low threshold
TH3F * fh3PatchADCEnergyEtaPhiCenterJ1
patch energy vs eta, phi at center of patch, low + high threshold
AliVCluster * GetLeadingCluster(TClonesArray *clusters=0) const
AliEmcalJet * GetAcceptJetFromArray(Int_t j, Int_t c=0) const
TH3F * fh3PtLeadJet1PatchEnergyVZEROAmp
leading jet energy vs leading patch energy vs jet trigger (J1/J2)
AliVCluster * GetCluster(Int_t i) const
short Short_t
Definition: External.C:23
AliVCaloCells * fCaloCells
!cells
Double_t Pt() const
Definition: AliEmcalJet.h:109
Double_t GetRhoVal(Int_t i=0) const
TH3F * fh3PatchADCEnergyEtaPhiCenterJ1J2
patch ADC energy vs eta, phi at center of patch, low threshold
TH1 * FillTriggerPatchQA(TH1 *h, UInt_t t, AliEMCALTriggerPatchInfo *fPatch)
AliEmcalList * fOutput
!output list
TClonesArray * fTracks
!tracks
Definition: External.C:220
THnSparse * fhnPatchMatch
// patch-maxclus distributions sparse matrix
TH3F * fh3PtEtaPhiTracksToProp
pt,eta,phi of tracks at Emcal surface
Double_t fVertex[3]
!event vertex
TH3F * fh3PatchADCEnergyEtaPhiCenterJ2
patch ADC energy vs eta, phi at center of patch, high threshold
TH3F * fh3PatchEnergyEtaPhiCenterJ1
leading jet energy vs online leading patch energy vs VZERO amplitude
const Double_t etamax
void SetMakeGeneralHistograms(Bool_t g)
TClonesArray * fTriggerPatchInfo
!trigger patch info array
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:51
Double_t Pz() const
Definition: AliEmcalJet.h:108
TH2F * fHistdPhidEtaPatchJetCluster[16]
Main Trigger patch energy distribution.
const char Option_t
Definition: External.C:48
Double_t GetZ(const AliVParticle *trk, const AliEmcalJet *jet) const
void UserCreateOutputObjects()
Main initialization function on the worker.
const Int_t nbins
bool Bool_t
Definition: External.C:53
Double_t NEF() const
Definition: AliEmcalJet.h:148
Offline energy, from cells, calibrated, exluding hot towers.
Container structure for EMCAL clusters.
Definition: External.C:196
TH1F * fhGammaLowPatchEnergy
Recalculated Gamma Patch Energy distribution.
const Double_t phimin