31 #include <TClonesArray.h>
36 #include <THnSparse.h>
38 #include <TLorentzVector.h>
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"
52 #include "AliAODCaloTrigger.h"
53 #include "AliEMCALGeometry.h"
54 #include "AliVCaloCells.h"
58 #include "AliEMCALTriggerPatchInfo.h"
59 #include "AliAODHeader.h"
72 fDebug(kFALSE), fAttachToEvent(kTRUE),
75 fMaxPatchEnergy(0), fMaxPatchADCEnergy(0),
78 fMainTrigCat(kTriggerLevel1Jet),
81 fTriggerCategory(kTriggerRecalcGamma),
82 fMainTrigSimple(kFALSE),
85 fTrkBias(0), fClusBias(0),
86 doComments(0), fUseALLrecalcPatches(0),
87 fJetTriggeredEventname("JETthatTriggeredEvent"), fCaloClustersName(""),
89 fMainPatchType(kManual),
93 fh3PtEtaPhiTracks(0), fh3PtEtaPhiTracksOnEmcal(0), fh3PtEtaPhiTracksToProp(0), fh3PtEtaPhiTracksProp(0), fh3PtEtaPhiTracksNoProp(0),
98 fh2PtNConstituentsCharged(0), fh2PtNConstituents(0),
99 fh2PtMeanPtConstituentsCharged(0), fh2PtMeanPtConstituentsNeutral(0),
102 fh2NEFNConstituentsCharged(0), fh2NEFNConstituentsNeutral(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),
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)
124 for(
Int_t j=0; j<16; j++) {
125 fHistdPhidEtaPatchJetCluster[j] = 0;
128 SetMakeGeneralHistograms(kTRUE);
134 fDebug(kFALSE), fAttachToEvent(kTRUE),
137 fMaxPatchEnergy(0), fMaxPatchADCEnergy(0),
140 fMainTrigCat(kTriggerLevel1Jet),
143 fTriggerCategory(kTriggerRecalcGamma),
144 fMainTrigSimple(kFALSE),
147 fTrkBias(0), fClusBias(0),
148 doComments(0), fUseALLrecalcPatches(0),
149 fJetTriggeredEventname(
"JETthatTriggeredEvent"), fCaloClustersName(
""),
151 fMainPatchType(kManual),
155 fh3PtEtaPhiTracks(0), fh3PtEtaPhiTracksOnEmcal(0), fh3PtEtaPhiTracksToProp(0), fh3PtEtaPhiTracksProp(0), fh3PtEtaPhiTracksNoProp(0),
160 fh2PtNConstituentsCharged(0), fh2PtNConstituents(0),
161 fh2PtMeanPtConstituentsCharged(0), fh2PtMeanPtConstituentsNeutral(0),
164 fh2NEFNConstituentsCharged(0), fh2NEFNConstituentsNeutral(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),
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)
186 for(
Int_t j=0; j<16; j++) {
216 AliFatal(Form(
"%s: Container with same name %s already present. Aborting", GetName(),
fJetTriggeredEventname.Data()));
239 TString firedTrigClass = InputEvent()->GetFiredTriggerClasses();
242 if(!firedTrigClass.Contains(trigType1.Data()) || !firedTrigClass.Contains(trigType2.Data()) )
246 else if(
fTriggerClass.Contains(trigType1.Data()) && firedTrigClass.Contains(trigType2.Data()))
260 AliFatal(Form(
"%s: TriggerPatchInfo object %s does not exist. Aborting", GetName(),
fJetTriggeredEventname.Data()));
265 UInt_t trig = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();
330 Int_t nG1 = 0, nG2 = 0, nJ1 = 0, nJ2 = 0, nL0 = 0;
333 UInt_t trig = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();
336 TString firedTrigClass = InputEvent()->GetFiredTriggerClasses();
339 AliEMCALTriggerPatchInfo *patch;
341 for (
Int_t iPatch = 0, patchacc = 0; iPatch < nPatch; iPatch++) {
343 if (!patch)
continue;
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++;
369 if(!patch->IsRecalcGamma())
continue;
371 if(!patch->IsRecalcGamma())
continue;
375 (*fRecalcTriggerPatches)[patchacc] = patch;
382 if(patch->GetPatchE()>emax) {
384 emax = patch->GetPatchE();
393 AliError(Form(
"ERROR: Cluster container doesn't exist\n"));
397 if(!leadclus)
return;
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();
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();
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();
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;
434 Double_t fill[7] = {dEtaGeo, dEtaCM, dPhiGeo, dPhiCM, maxPatchADC, maxPatchE, leadclusE};
451 Bool_t oldStatus = TH1::AddDirectoryStatus();
452 TH1::AddDirectory(kFALSE);
454 fhNEvents =
new TH1F(
"fhNEvents",
"fhNEvents;selection;N_{evt}",5,0,5);
457 fhTriggerbit =
new TProfile(
"fhTriggerbit",
"fhTriggerbit;;TriggerBit",1,0,1);
460 fHistRhovsCent =
new TH2F(
"fHistRhovsCent",
"fHistRhovsCent", 101, -1, 100, 300, 0., 300.);
462 fHistRhovsCent->GetYaxis()->SetTitle(
"s#rho_{ch} (GeV/c * rad^{-1})");
465 Int_t fgkNCentBins = 21;
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;
473 Int_t fgkNdEPBins = 18*8;
475 Float_t kMaxdEP = 1.*TMath::Pi()/2.;
477 for(
Int_t i=0; i<=fgkNdEPBins; i++) binsdEP[i]=(
Double_t)kMindEP + (kMaxdEP-kMindEP)/fgkNdEPBins*(
Double_t)i ;
479 Int_t fgkNPtBins = 200;
483 for(
Int_t i=0; i<=fgkNPtBins; i++) binsPt[i]=(
Double_t)kMinPt + (kMaxPt-kMinPt)/fgkNPtBins*(
Double_t)i ;
485 Int_t fgkNPhiBins = 18*8;
487 Float_t kMaxPhi = 2.*TMath::Pi();
489 for(
Int_t i=0; i<=fgkNPhiBins; i++) binsPhi[i]=(
Double_t)kMinPhi + (kMaxPhi-kMinPhi)/fgkNPhiBins*(
Double_t)i ;
491 Int_t fgkNEtaBins = 100;
495 for(
Int_t i=0; i<=fgkNEtaBins; i++) binsEta[i]=(
Double_t)fgkEtaMin + (fgkEtaMax-fgkEtaMin)/fgkNEtaBins*(
Double_t)i ;
497 Int_t fgkNAreaBins = 100;
501 for(
Int_t i=0; i<=fgkNAreaBins; i++) binsArea[i]=(
Double_t)kMinArea + (kMaxArea-kMinArea)/fgkNAreaBins*(
Double_t)i ;
503 Int_t fgkNConstBins = 100;
507 for(
Int_t i=0; i<=fgkNConstBins; i++) binsConst[i]=(
Double_t)kMinConst + (kMaxConst-kMinConst)/fgkNConstBins*(
Double_t)i ;
509 Int_t fgkNMeanPtBins = 100;
513 for(
Int_t i=0; i<=fgkNMeanPtBins; i++) binsMeanPt[i]=(
Double_t)kMinMeanPt + (kMaxMeanPt-kMinMeanPt)/fgkNMeanPtBins*(
Double_t)i ;
515 Int_t fgkNNEFBins = 101;
519 for(
Int_t i=0; i<=fgkNNEFBins; i++) binsNEF[i]=(
Double_t)kMinNEF + (kMaxNEF-kMinNEF)/fgkNNEFBins*(
Double_t)i ;
521 Int_t fgkNzBins = 101;
527 Int_t fgkNJetTypeBins = 2;
531 for(
Int_t i=0; i<=fgkNJetTypeBins; i++) binsJetType[i]=(
Double_t)kMinJetType + (kMaxJetType-kMinJetType)/fgkNJetTypeBins*(
Double_t)i ;
533 Int_t fgkNTimeBins = 100;
537 for(
Int_t i=0; i<=fgkNTimeBins; i++) binsTime[i]=(
Double_t)kMinTime + (kMaxTime-kMinTime)/fgkNTimeBins*(
Double_t)i ;
539 Int_t fgkNVZEROBins = 100;
543 for(
Int_t i=0; i<=fgkNVZEROBins; i++) binsVZERO[i]=(
Double_t)kMinVZERO + (kMaxVZERO-kMinVZERO)/fgkNVZEROBins*(
Double_t)i ;
546 enBinEdges[0][0] = 1.;
547 enBinEdges[0][1] = 0.1;
548 enBinEdges[1][0] = 5.;
549 enBinEdges[1][1] = 0.5;
550 enBinEdges[2][0] = 100.;
551 enBinEdges[2][1] = 1.;
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];
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;
563 Int_t fgkNEnBins=nbin13;
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) ;
571 fh3PtEtaPhiTracks =
new TH3F(
"fh3PtEtaPhiTracks",
"fh3PtEtaPhiTracks;#it{p}_{T}^{track}_{vtx};#eta_{vtx};#varphi_{vtx}",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
574 fh3PtEtaPhiTracksOnEmcal =
new TH3F(
"fh3PtEtaPhiTracksOnEmcal",
"fh3PtEtaPhiTracksOnEmcal;#it{p}_{T}^{track}_{emc};#eta_{emc};#varphi_{emc}",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
577 fh3PtEtaPhiTracksToProp =
new TH3F(
"fh3PtEtaPhiTracksToProp",
"fh3PtEtaPhiTracksToProp;#it{p}_{T}^{track}_{vtx};#eta_{vtx};#varphi_{vtx}",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
580 fh3PtEtaPhiTracksProp =
new TH3F(
"fh3PtEtaPhiTracksProp",
"fh3PtEtaPhiTracksProp;#it{p}_{T}^{track}_{vtx};#eta_{vtx};#varphi_{vtx}",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
583 fh3PtEtaPhiTracksNoProp =
new TH3F(
"fh3PtEtaPhiTracksNoProp",
"fh3PtEtaPhiTracksNoProp;#it{p}_{T}^{track}_{vtx};#eta_{vtx};#varphi_{vtx}",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
586 fh2CentPtJet =
new TH2F(
"fh2CentPtJet",
"fh2CentPtJet;cent;#it{p}_{T}^{jet}",fgkNCentBins,binsCent,fgkNPtBins,binsPt);
589 fh3PtEtaPhiJet =
new TH3F(
"fh3PtEtaPhiJet",
"fh3PtEtaPhiJet;#it{p}_{T}^{jet};#eta;#varphi",fgkNPtBins,binsPt,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
592 fh2NJetsPt =
new TH2F(
"fh2NJetsPt",
"fh2NJetsPt;N_{jets};#it{p}_{T}^{jet}",20,-0.5,19.5,fgkNPtBins,binsPt);
595 fh3PtEtaAreaJet =
new TH3F(
"fh3PtEtaAreaJet",
"fh3PtEtaAreaJet;#it{p}_{T}^{jet};#eta;A",fgkNPtBins,binsPt,fgkNEtaBins,binsEta,fgkNAreaBins,binsArea);
598 fh2PtNConstituentsCharged =
new TH2F(
"fh2PtNConstituentsCharged",
"fh2PtNConstituentsCharged;#it{p}_{T}^{jet};N_{charged constituents}",fgkNPtBins,binsPt,fgkNConstBins,binsConst);
601 fh2PtNConstituents =
new TH2F(
"fh2PtNConstituents",
"fh2PtNConstituents;#it{p}_{T}^{jet};N_{constituents}",fgkNPtBins,binsPt,fgkNConstBins,binsConst);
604 fh2PtMeanPtConstituentsCharged =
new TH2F(
"fh2PtMeanPtConstituentsCharged",
"fh2PtMeanPtConstituentsCharged;#it{p}_{T}^{jet};charged #langle #it{p}_{T} #rangle",fgkNPtBins,binsPt,fgkNMeanPtBins,binsMeanPt);
607 fh2PtMeanPtConstituentsNeutral =
new TH2F(
"fh2PtMeanPtConstituentsNeutral",
"fh2PtMeanPtConstituentsNeutral;#it{p}_{T}^{jet};neutral langle #it{p}_{T} #rangle",fgkNPtBins,binsPt,fgkNMeanPtBins,binsMeanPt);
610 fh2PtNEF =
new TH2F(
"fh2PtNEF",
"fh2PtNEF;#it{p}_{T}^{jet};NEF",fgkNPtBins,binsPt,fgkNNEFBins,binsNEF);
613 fh3NEFEtaPhi =
new TH3F(
"fh3NEFEtaPhi",
"fh3NEFEtaPhi;NEF;#eta;#varphi",fgkNNEFBins,binsNEF,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
616 fh2NEFNConstituentsCharged =
new TH2F(
"fh2NEFNConstituentsCharged",
"fh2NEFNConstituentsCharged;NEF;N_{charged constituents}",fgkNNEFBins,binsNEF,fgkNConstBins,binsConst);
619 fh2NEFNConstituentsNeutral =
new TH2F(
"fh2NEFNConstituentsNeutral",
"fh2NEFNConstituentsNeutral;NEF;N_{clusters}",fgkNNEFBins,binsNEF,fgkNConstBins,binsConst);
622 fh2Ptz =
new TH2F(
"fh2Ptz",
"fh2Ptz;#it{p}_{T}^{jet};z=p_{t,trk}^{proj}/p_{jet}",fgkNPtBins,binsPt,fgkNzBins,binsz);
625 fh2PtLeadJet1VsLeadJet2 =
new TH2F(
"fh2PtLeadJet1VsLeadJet2",
"fh2PtLeadJet1VsLeadJet2;#it{p}_{T}^{jet 1};#it{p}_{T}^{jet 2}",fgkNPtBins,binsPt,fgkNPtBins,binsPt);
628 fh3EEtaPhiCluster =
new TH3F(
"fh3EEtaPhiCluster",
"fh3EEtaPhiCluster;E_{clus};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
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);
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);
641 fh3PatchEnergyEtaPhiCenterJ1 =
new TH3F(
"fh3PatchEnergyEtaPhiCenterJ1",
"fh3PatchEnergyEtaPhiCenterJ1;E_{patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
644 fh3PatchEnergyEtaPhiCenterJ2 =
new TH3F(
"fh3PatchEnergyEtaPhiCenterJ2",
"fh3PatchEnergyEtaPhiCenterJ2;E_{patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
647 fh3PatchEnergyEtaPhiCenterJ1J2 =
new TH3F(
"fh3PatchEnergyEtaPhiCenterJ1J2",
"fh3PatchEnergyEtaPhiCenterJ1J2;E_{patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
650 fh3PatchADCEnergyEtaPhiCenterJ1 =
new TH3F(
"fh3PatchADCEnergyEtaPhiCenterJ1",
"fh3PatchADCEnergyEtaPhiCenterJ1;E_{ADC,patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
653 fh3PatchADCEnergyEtaPhiCenterJ2 =
new TH3F(
"fh3PatchADCEnergyEtaPhiCenterJ2",
"fh3PatchADCEnergyEtaPhiCenterJ2;E_{ADC,patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
656 fh3PatchADCEnergyEtaPhiCenterJ1J2 =
new TH3F(
"fh3PatchADCEnergyEtaPhiCenterJ1J2",
"fh3PatchADCEnergyEtaPhiCenterJ1J2;E_{ADC,patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
659 fh3PatchEnergyEtaPhiCenterG1 =
new TH3F(
"fh3PatchEnergyEtaPhiCenterG1",
"fh3PatchEnergyEtaPhiCenterG1;E_{patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
662 fh3PatchEnergyEtaPhiCenterG2 =
new TH3F(
"fh3PatchEnergyEtaPhiCenterG2",
"fh3PatchEnergyEtaPhiCenterG2;E_{patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
665 fh3PatchEnergyEtaPhiCenterG1G2 =
new TH3F(
"fh3PatchEnergyEtaPhiCenterG1G2",
"fh3PatchEnergyEtaPhiCenterG1G2;E_{patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
668 fh3PatchADCEnergyEtaPhiCenterG1 =
new TH3F(
"fh3PatchADCEnergyEtaPhiCenterG1",
"fh3PatchADCEnergyEtaPhiCenterG1;E_{ADC,patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
671 fh3PatchADCEnergyEtaPhiCenterG2 =
new TH3F(
"fh3PatchADCEnergyEtaPhiCenterG2",
"fh3PatchADCEnergyEtaPhiCenterG2;E_{ADC,patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
674 fh3PatchADCEnergyEtaPhiCenterG1G2 =
new TH3F(
"fh3PatchADCEnergyEtaPhiCenterG1G2",
"fh3PatchADCEnergyEtaPhiCenterG1G2;E_{ADC,patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
677 fh3PatchADCEnergyEtaPhiCenterAll =
new TH3F(
"fh3PatchADCEnergyEtaPhiCenterAll",
"fh3PatchADCEnergyEtaPhiCenterAll;E_{ADC,patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
680 fh3EEtaPhiCell =
new TH3F(
"fh3EEtaPhiCell",
"fh3EEtaPhiCell;E_{cell};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
683 fh2ECellVsCent =
new TH2F(
"fh2ECellVsCent",
"fh2ECellVsCent;centrality;E_{cell}",101,-1,100,500,0.,5.);
686 fh2CellEnergyVsTime =
new TH2F(
"fh2CellEnergyVsTime",
"fh2CellEnergyVsTime;E_{cell};time",fgkNEnBins,binsEn,fgkNTimeBins,binsTime);
689 fh3EClusELeadingCellVsTime =
new TH3F(
"fh3EClusELeadingCellVsTime",
"fh3EClusELeadingCellVsTime;E_{cluster};E_{leading cell};time_{leading cell}",fgkNEnBins,binsEn,fgkNEnBins,binsEn,fgkNTimeBins,binsTime);
692 fh3JetReacCent =
new TH3F(
"fh3JetReacCent",
"fh3JetReacCent;E_{Jet};Centrality;dEP",fgkNEnBins,binsEn,fgkNCentBins,binsCent,fgkNdEPBins,binsdEP);
695 fhQAinfoAllPatchesCounter =
new TH1F(
"fhQAinfoAllPatchesCounter",
"QA trigger info counters for all patches", 20, 0.5, 20.5);
698 fhQAinfoCounter =
new TH1F(
"fhQAinfoCounter",
"QA trigger info counters", 20, 0.5, 20.5);
701 fhQAmaxinfoCounter =
new TH1F(
"fhQAmaxinfoCounter",
"QA Max patch trigger info counters", 20, 0.5, 20.5);
713 fhRecalcJetPatchEnergy =
new TH1F(
"fhRecalcJetPatchEnergy",
"Recalculated Jet Patch Energy", 200, 0, 100);
716 fhJetLowPatchEnergy =
new TH1F(
"fhJetLowPatchEnergy",
"Jet Low Patch Energy", 200, 0, 100);
725 fHistClusEnergy =
new TH1F(
"fHistClusEnergy",
"Cluster Energy distribution", 200, 0, 50);
729 fHistClusofJetEnergy =
new TH1F(
"fHistClusofJetEnergy",
"Cluster of Jet Energy distribution", 200, 0, 20);
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);
741 for (
Int_t i=0; i<nDim; i++){
747 nbins[4]=100; xmax[4]=100;
748 nbins[5]=100; xmax[5]=100.;
749 nbins[6]=100; xmax[6]=100.;
751 fhnPatchMaxClus =
new THnSparseF(
"fhnPatchMaxClus",
"fhn Patch Max Cluster Distributions", nDim,nbins,xmin,xmax);
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;
776 fhnPatchMatch =
new THnSparseF(
"fhnPatchMatch",
"fhn Patch Match before cuts", nDim1,nbins1,xmin1,xmax1);
784 fhnPatchMatch->GetAxis(7)->SetTitle(
"Event Plane - Jet Angle");
788 fhnPatchMatch2 =
new THnSparseF(
"fhnPatchMatch2",
"fhn Patch Match after cuts", nDim1,nbins1,xmin1,xmax1);
804 for (
Int_t i=0; i<nDim2; i++){
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;
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;
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;
830 fhnPatchMatchJetLeadClus =
new THnSparseF(
"fhnPatchMatchJetLeadClus",
"fhn Patch Match to Jet Leading Cluster", nDim2, nbins2,xmin2,xmax2);
852 fHistEventSelectionQA =
new TH1F(
"fHistEventSelectionQA",
"Trigger Selection Counter", 20, 0.5, 20.5);
872 THnSparse *hn =
dynamic_cast<THnSparse*
>(
fOutput->At(i));
876 TH1::AddDirectory(oldStatus);
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;
902 UInt_t trig = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();
905 TString firedTrigClass = InputEvent()->GetFiredTriggerClasses();
913 AliError(Form(
"ERROR: list not attached\n"));
924 partCont->ResetCurrentID();
928 Double_t trkphi = track->Phi()*TMath::RadToDeg();
932 if(track->Pt()>=0.350) {
933 if (TMath::Abs(track->Eta())<=0.9 && trkphi > 10 && trkphi < 250) {
936 if(track->GetTrackPtOnEMCal()>=0)
fh3PtEtaPhiTracksProp->Fill(track->Pt(),track->Eta(),track->Phi());
949 for (
Int_t ic = 0; ic < nclusters; ic++) {
950 AliVCluster *cluster =
static_cast<AliVCluster*
>(clusCont->
GetCluster(ic));
952 AliDebug(2,Form(
"Could not receive cluster %d", ic));
956 if (!cluster->IsEMCAL()) {
957 AliDebug(2,Form(
"%s: Cluster is not emcal",GetName()));
962 cluster->GetMomentum(lp, const_cast<Double_t*>(
fVertex));
966 Double_t leadCellT = cluster->GetTOF();
973 TClonesArray *clusters = 0x0;
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));
985 AliError(Form(
"Couldn't get AliVCluster %d\n", iclus));
990 if (!clus->IsEMCAL()) {
991 AliDebug(2,Form(
"%s: Cluster is not emcal",GetName()));
997 clus->GetMomentum(lp, const_cast<Double_t*>(
fVertex));
1017 for (
Int_t ij = 0, jacc = 0; ij < njets; ij++) {
1023 if(jetPt>ptLeadJet1) ptLeadJet1=jetPt;
1035 nJetsArr->AddAt(nJetsArr->At(iptbin)+1,iptbin);
1057 AliVCluster *vc = 0x0;
1059 Double_t maxClusterEta = 0., maxClusterPhi = 0., maxClusterE = 0.;
1064 if (clusCont && clusCont->GetArray()) {
1070 TLorentzVector nPart;
1071 clustermax->GetMomentum(nPart, const_cast<Double_t*>(
fVertex));
1072 maxClusterEta = nPart.Eta();
1073 maxClusterPhi = nPart.Phi();
1074 maxClusterE = clustermax->E();
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());
1095 for(
int maxbinE = 0; maxbinE<16; maxbinE++) {
1102 if(maxClusterEta > etamin && maxClusterEta < etamax && maxClusterPhi > phimin && maxClusterPhi < phimax)
fhnPatchMatch2->Fill(fillarr);
1108 if(maxClusterEta > etamin && maxClusterEta < etamax && maxClusterPhi > phimin && maxClusterPhi < phimax){
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;
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};
1123 (*fJetTriggeredEvent)[jacc] = jet;
1134 TLorentzVector nPart;
1136 maxClusterEta = nPart.Eta();
1137 maxClusterPhi = nPart.Phi();
1138 maxClusterE = clustermax->E();
1143 AliEMCALTriggerPatchInfo *patch;
1144 for(
Int_t iPatch = 0; iPatch < nPatch; iPatch++) {
1146 if(!patch)
continue;
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);
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());
1167 for(
int maxbinE = 0; maxbinE<16; maxbinE++) {
1174 if(maxClusterEta > etamin && maxClusterEta < etamax && maxClusterPhi > phimin && maxClusterPhi < phimax)
fhnPatchMatch2->Fill(fillarr);
1179 if(maxClusterEta > etamin && maxClusterEta < etamax && maxClusterPhi > phimin && maxClusterPhi < phimax){
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;
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};
1194 (*fJetTriggeredEvent)[jacc] = jet;
1208 vc =
static_cast<AliVCluster*
>(clusCont->
GetCluster(icc));
1220 Int_t nJetsInEvent = nJetsArr->At(i);
1231 Float_t VZEROAmp = InputEvent()->GetVZEROData()->GetTriggerChargeA() + InputEvent()->GetVZEROData()->GetTriggerChargeC();
1241 for(
Int_t iCell=0; iCell<nCells; ++iCell) {
1246 fGeom->GetGlobal(cellId, pos);
1247 TLorentzVector lv(pos,cellE);
1250 if(cellPhi<0.) cellPhi+=TMath::TwoPi();
1251 if(cellPhi>TMath::TwoPi()) cellPhi-=TMath::TwoPi();
1253 AliDebug(2,Form(
"cell energy = %f time = %f",cellE,cellT*1e9));
1269 fGeom = AliEMCALGeometry::GetInstance(
"EMCAL_COMPLETEV1");
1287 return GetZ(trk->Px(),trk->Py(),trk->Pz(),jet->
Px(),jet->
Py(),jet->
Pz());
1293 Double_t pJetSq = jetPx*jetPx+jetPy*jetPy+jetPz*jetPz;
1295 return (trkPx*jetPx+trkPy*jetPy+trkPz*jetPz)/pJetSq;
1297 AliWarning(Form(
"%s: strange, pjet*pjet seems to be zero pJetSq: %f",GetName(), pJetSq));
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);
1315 iCellAbsIdMax = absId;
1318 return iCellAbsIdMax;
1327 if(absID>-1)
return fCaloCells->GetCellAmplitude(absID);
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);
1347 if( iphi < AliEMCALGeoParams::fgkEMCALRows-1)
1348 absID1 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi+1, ieta);
1350 absID2 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi-1, ieta);
1352 if( ieta == AliEMCALGeoParams::fgkEMCALCols-1 && !(imod%2) ) {
1353 absID3 =
fGeom->GetAbsCellIdFromCellIndexes(imod+1, iphi, 0);
1354 absID4 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta-1);
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);
1361 if( ieta < AliEMCALGeoParams::fgkEMCALCols-1 )
1362 absID3 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta+1);
1364 absID4 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta-1);
1372 ecross = ecell1+ecell2+ecell3+ecell4;
1383 if( dphi<-1*TMath::Pi() )
1384 dphi = dphi + 1*TMath::Pi();
1385 if( dphi>1*TMath::Pi())
1386 dphi = dphi - 1*TMath::Pi();
1388 if( (dphi>0) && (dphi<1*TMath::Pi()/2) ){
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) ){
1394 }
else if( (dphi<-1*TMath::Pi()/2) && (dphi>-1*TMath::Pi()) ){
1395 dphi = dphi + 1*TMath::Pi();
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);
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");
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){
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);
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);
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);
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)");
1510 h->LabelsOption(
"v");
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.
TH3F * fh3PtEtaPhiJet
cent, pt of jets
TH2F * fh2NEFNConstituentsCharged
NEF, eta, phi.
TH3F * fh3PtEtaPhiTracksProp
pt,eta,phi of tracks at vertex
TH2F * fh2PtNEF
pt, <pt> neutral constituents
virtual AliVParticle * GetNextAcceptParticle()
TH1F * fhMainTriggerPatchEnergy
Jet Low Simple patch energy distribution.
Bool_t CorrelateToTrigger(Double_t etaclust, Double_t phiclust, TList *triggerpatches) const
virtual ~AliAnalysisTaskEmcalTriggerPatchJetMatch()
TH3F * fh3PtEtaPhiTracksOnEmcal
pt,eta,phi of tracks at vertex
TH1F * fhNEvents
method to select main patch
TString fJetTriggeredEventname
AliJetContainer * GetJetContainer(Int_t i=0) const
TH1F * fHistClusofJetEnergy
AliAnalysisTaskEmcalTriggerPatchJetMatch()
Recalculated jet trigger patch; does not need to be above trigger threshold.
Int_t GetNJets(Int_t i=0) const
TClonesArray * fRecalcTriggerPatches
jets
TH3F * fh3PatchEnergyEtaPhiCenterJ2
patch energy vs eta, phi at center of patch, high threshold
TH1F * fhJetLowSimplePatchEnergy
Jet Low patch energy distribution.
TH3F * fh3PtEtaPhiTracksNoProp
pt,eta,phi of tracks at vertex
TH3F * fh3PatchADCEnergyEtaPhiCenterG1G2
patch ADC energy vs eta, phi at center of patch, low threshold
Double_t GetECross(Int_t absID) const
Double_t fEPV0
!event plane V0
TList * list
TDirectory file where lists per trigger are stored in train ouput.
void ExecOnce()
Perform steps needed to initialize the analysis.
THnSparse * fhnPatchMatch2
// QA before matching patch sparse matrix
Double_t GetEnergyLeadingCell(const AliVCluster *clus) const
Offline amplitude, estimated from EMCAL cells.
TClonesArray * fJetTriggeredEvent
TProfile * fhTriggerbit
Histo number of events.
TH3F * fh3PtLeadJet2VsPatchEnergy
leading jet energy vs leading patch energy vs jet trigger (J1/J2)
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.
Bool_t FillHistograms()
Function filling histograms.
AliVCluster * GetLeadingCluster(const char *opt="")
UShort_t GetNumberOfConstituents() const
Container for particles within the EMCAL framework.
TH2F * fh2ECellVsCent
cell E, eta, phi
Int_t TrackAt(Int_t idx) const
Bool_t fUseALLrecalcPatches
void FillTriggerPatchHistos()
UShort_t GetNumberOfTracks() const
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
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
TH2F * fh2PtNConstituents
pt, # charged jet constituents
TH3F * fh3PatchEnergyEtaPhiCenterG1
patch ADC energy vs eta, phi at center of patch, low + high threshold
UShort_t GetNumberOfClusters() const
TH3F * fh3PatchEnergyEtaPhiCenterJ1J2
patch energy vs eta, phi at center of patch, low threshold
void UserCreateOutputObjects()
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
TString fCaloClustersName
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.
THnSparse * fhnPatchMaxClus
recalculated patches
Double_t MaxTrackPt() const
AliVCluster * GetLeadingCluster(TClonesArray *clusters) const
Int_t GetNClusters() const
TH1F * fhRecalcGammaPatchEnergy
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
TH1 * FillEventTriggerQA(TH1 *h, UInt_t t)
TH3F * fh3PatchADCEnergyEtaPhiCenterJ1
patch energy vs eta, phi at center of patch, low + high threshold
AliEmcalJet * GetAcceptJetFromArray(Int_t j, Int_t c=0) const
TH3F * fh3PtLeadJet1PatchEnergyVZEROAmp
leading jet energy vs leading patch energy vs jet trigger (J1/J2)
TH3F * fh3NEFEtaPhi
pt, NEF (neutral energy fraction)
TH1F * fhQAmaxinfoCounter
AliVCluster * GetCluster(Int_t i) const
AliVCaloCells * fCaloCells
!cells
TriggerCategory fTriggerCategory
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
TH3F * fh3PtEtaAreaJet
NJets per event vs pT,jet.
TH2F * fh2PtNConstituentsCharged
pt,eta,area of jet
TH2F * fh2PtLeadJet1VsLeadJet2
pt, z=pT,h,proj/p,jet jet
TClonesArray * fTracks
!tracks
TH1F * fHistEventSelectionQA
TH2F * fh2PtMeanPtConstituentsCharged
pt, # jet constituents
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
Double_t fMaxPatchADCEnergy
TH3F * fh3EClusELeadingCellVsTime
emcal cell energy vs time
void SetMakeGeneralHistograms(Bool_t g)
TH2F * fh2CellEnergyVsTime
cell E vs centrality
TH3F * fh3PtEtaPhiTracks
rho vs. centrality
Int_t GetLeadingCellId(const AliVCluster *clus) const
TClonesArray * fTriggerPatchInfo
!trigger patch info array
Base task in the EMCAL jet framework.
AliEMCALTriggerPatchInfo * fMaxPatch
Represent a jet reconstructed using the EMCal jet framework.
void Terminate(Option_t *option)
TH2F * fHistdPhidEtaPatchJetCluster[16]
Main Trigger patch energy distribution.
TH3F * fh3PtLeadJet1VsPatchEnergy
cluster E, eta, phi
Double_t GetZ(const AliVParticle *trk, const AliEmcalJet *jet) const
void UserCreateOutputObjects()
Main initialization function on the worker.
Offline energy, from cells, calibrated, exluding hot towers.
TH2F * fh2CentPtJet
pt,eta,phi of tracks at vertex
Container structure for EMCAL clusters.
TH1F * fhQAinfoAllPatchesCounter
trigger event class QA
TH2F * fh2Ptz
NEF, # neutral jet constituents.
TH2F * fh2NJetsPt
pt,eta,phi of jets
TH1F * fhGammaLowPatchEnergy
Recalculated Gamma Patch Energy distribution.