16 #include <TClonesArray.h> 23 #include <THnSparse.h> 30 #include <TClonesArray.h> 33 #include <THashList.h> 35 #include <TObjArray.h> 36 #include <TParameter.h> 38 #include <AliVCluster.h> 39 #include <AliVParticle.h> 48 #include "AliEMCALGeometry.h" 49 #include "AliVCaloCells.h" 50 #include "AliESDCaloCells.h" 51 #include "AliMCEvent.h" 52 #include "AliMCParticle.h" 53 #include "AliGenEventHeader.h" 54 #include "AliGenPythiaEventHeader.h" 57 #include "AliAnalysisUtils.h" 58 #include "AliESDEvent.h" 59 #include "AliAODEvent.h" 60 #include "AliVEvent.h" 61 #include "AliEMCALTriggerPatchInfo.h" 63 #include "AliInputEventHandler.h" 65 #include "AliMultSelection.h" 66 #include "AliMultEstimator.h" 67 #include "AliOADBContainer.h" 83 fUseRecalcPatches(false),
89 fRecoUtil(0x0), fClusterEResolution(0x0), fVaryTrkPtRes(),
94 fHistJetGammaPatchE(),
96 fHistJetGammaPatchPt(),
104 for(
int i=0;i<9;i++){
139 for(
int i=0;i<=9;i++){
164 for(
int i=0;i<=9;i++){
165 histName = TString::Format(
"fHistEMCalTowerMult_%d",i);
166 histTitle = TString::Format(
"%s;N_{tower};Counts",histName.Data());
168 fOutput->Add(fHistEMCalTowerMult[i]);
174 TString jetMCContName = jetMCCont->GetName();
181 if(jetMCContName.Contains(
"mcparticles"))
196 while ((obj = next())) {
219 THnSparse *hn =
dynamic_cast<THnSparse*
>(
fOutput->At(i));
240 while ((clusCont = static_cast<AliClusterContainer*>(next()))) {
241 groupname = clusCont->GetName();
244 histname = TString::Format(
"%s/fhnClusSparse", groupname.Data());
245 histtitle = histname +
";Multiplicity;#it{E}_{clus}{had.corr.} (GeV);#it{E}_{clus}^{non-lin.corr} (GeV); #it{E}_{clus}^{corr} (GeV);#it{p}_{trk,matched} (GeV/#it{c});E_{clus}^{non-lin.corr}/P_{trk}^{sum};#eta_{clus};#phi_{clus};M02;M20;Dumb}";
246 Int_t nbins10[11] = {300,
fNbins,
fNbins,
fNbins,
fNbins,120,24,72,100,100,0};
247 Double_t min10[11] = {0,
fMinBinPt,
fMinBinPt,
fMinBinPt,
fMinBinPt,0,-1.2, -0.5*
pi,0,0,0};
248 Double_t max10[11] = {300,
fMaxBinPt,
fMaxBinPt,
fMaxBinPt,
fMaxBinPt,1.2,1.2,1.5*
pi,1,1,0};
252 histname = TString::Format(
"%s/histClusterEnergy_%d", groupname.Data(), cent);
253 histtitle = TString::Format(
"%s;#it{E}_{cluster} (GeV);counts", histname.Data());
256 histname = TString::Format(
"%s/histClusterEnergyExotic_%d", groupname.Data(), cent);
257 histtitle = TString::Format(
"%s;#it{E}_{cluster}^{exotic} (GeV);counts", histname.Data());
260 histname = TString::Format(
"%s/histClusterNonLinCorrEnergy_%d", groupname.Data(), cent);
261 histtitle = TString::Format(
"%s;#it{E}_{cluster}^{non-lin.corr.} (GeV);counts", histname.Data());
264 histname = TString::Format(
"%s/histClusterHadCorrEnergy_%d", groupname.Data(), cent);
265 histtitle = TString::Format(
"%s;#it{E}_{cluster}^{had.corr.} (GeV);counts", histname.Data());
268 histname = TString::Format(
"%s/histClusterPhi_%d", groupname.Data(), cent);
269 histtitle = TString::Format(
"%s;#it{#phi}_{custer};counts", histname.Data());
272 histname = TString::Format(
"%s/histClusterEta_%d", groupname.Data(), cent);
273 histtitle = TString::Format(
"%s;#it{#eta}_{custer};counts", histname.Data());
276 histname = TString::Format(
"%s/fHistFcrossvEonline_%d", groupname.Data(), cent);
277 histtitle = TString::Format(
"%s;#it{E}_{cluster} (GeV);#it{F}_{cross}", histname.Data());
281 histname = TString::Format(
"%s/histNClusters_%d", groupname.Data(), cent);
282 histtitle = TString::Format(
"%s;number of clusters;events", histname.Data());
303 const AliMCEvent* mcevent =
nullptr;
316 groupname = MCCont->GetName();
320 histname = TString::Format(
"%s/fHistParticleLvlpT_%d", groupname.Data(), cent);
321 histtitle = TString::Format(
"%s;#it{p}_{T} (GeV);counts", histname.Data());
340 histname = TString::Format(
"%s/histCellEnergy_%d", groupname.Data(), cent);
341 histtitle = TString::Format(
"%s;#it{E}_{cell} (GeV);counts", histname.Data());
344 histname = TString::Format(
"%s/histNCells_%d", groupname.Data(), cent);
345 histtitle = TString::Format(
"%s;number of cells;events", histname.Data());
369 while ((partCont = static_cast<AliParticleContainer*>(next()))) {
370 groupname = partCont->GetName();
373 histname = TString::Format(
"%s/fhnTrkSparse", groupname.Data());
374 histtitle = histname +
";Multiplicity;#it{p}_{T,trk} (GeV/#it{c});#it{p}_{trk} (GeV/#it{c});#eta_{trk};#phi_{trk};TPCnClusters}";
381 histname = TString::Format(
"%s/histTrackPt_%d", groupname.Data(), cent);
382 histtitle = TString::Format(
"%s;#it{p}_{T,track} (GeV/#it{c});counts", histname.Data());
385 histname = TString::Format(
"%s/histTrackPhi_%d", groupname.Data(), cent);
386 histtitle = TString::Format(
"%s;#it{#phi}_{track};counts", histname.Data());
389 histname = TString::Format(
"%s/histTrackEta_%d", groupname.Data(), cent);
390 histtitle = TString::Format(
"%s;#it{#eta}_{track};counts", histname.Data());
393 if (TClass(partCont->GetClassName()).InheritsFrom(
"AliVTrack")) {
394 histname = TString::Format(
"%s/fHistDeltaEtaPt_%d", groupname.Data(), cent);
395 histtitle = TString::Format(
"%s;#it{p}_{T,track}^{vertex} (GeV/#it{c});#it{#eta}_{track}^{vertex} - #it{#eta}_{track}^{EMCal};counts", histname.Data());
398 histname = TString::Format(
"%s/fHistDeltaPhiPt_%d", groupname.Data(), cent);
399 histtitle = TString::Format(
"%s;#it{p}_{T,track}^{vertex} (GeV/#it{c});#it{#phi}_{track}^{vertex} - #it{#phi}_{track}^{EMCal};counts", histname.Data());
402 histname = TString::Format(
"%s/fHistDeltaPtvsPt_%d", groupname.Data(), cent);
403 histtitle = TString::Format(
"%s;#it{p}_{T,track}^{vertex} (GeV/#it{c});#it{p}_{T,track}^{vertex} - #it{p}_{T,track}^{EMCal} (GeV/#it{c});counts", histname.Data());
406 histname = TString::Format(
"%s/fHistEoverPvsP_%d", groupname.Data(), cent);
407 histtitle = TString::Format(
"%s;#it{P}_{track} (GeV/#it{c});#it{E}_{cluster} / #it{P}_{track} #it{c};counts", histname.Data());
411 histname = TString::Format(
"%s/histNTracks_%d", groupname.Data(), cent);
412 histtitle = TString::Format(
"%s;number of tracks;events", histname.Data());
437 SparseBit = 1<<0 | 1<<1 | 1<<2 | 1<<3 | 1<<4 | 1<<5 | 1<<10 | 1<<11 | 1<<12 | 1<<13 | 1<<14 | 1<<15 | 1<<16;
439 while ((jetCont = static_cast<AliJetContainer*>(next()))) {
440 groupname = jetCont->GetName();
448 histname = TString::Format(
"%s/fhnJetSparse", groupname.Data());
449 histtitle = histname +
";Multiplicity;#it{p}_{T,jet}^{uncorr} (GeV/#it{c});#it{p}_{T,leading} (GeV/#it{c};#it{E}_{leading} (GeV);#eta_{jet};#phi_{jet};#it{F}_{cross};#it{z}_{leading};#it{A}_{jet};#it{NEF};#it{N}_{constit};#it{N}_{neu};#it{N}_{chrg}";
450 Int_t nbins13[13] = {300,
fNbins,
fNbins,
fNbins,24,72,20,20,20,20,100,100,100};
451 Double_t min13[13] = {0,
fMinBinPt,
fMinBinPt,
fMinBinPt,-1.2, -0.5*
pi,0,0,0,0,0,0,0};
452 Double_t max13[13] = {300,
fMaxBinPt,
fMaxBinPt,
fMaxBinPt,1.2,1.5*
pi,1,1,1,1,1,1,1};
458 histname = TString::Format(
"%s/histJetPt_%d", groupname.Data(), cent);
459 histtitle = TString::Format(
"%s;#it{p}_{T,jet} (GeV/#it{c});counts", histname.Data());
462 histname = TString::Format(
"%s/histJetClusterEnergy_%d", groupname.Data(), cent);
463 histtitle = TString::Format(
"%s;#it{E}_{JetClus} (GeV);counts", histname.Data());
466 histname = TString::Format(
"%s/histJetTrkPt_%d", groupname.Data(), cent);
467 histtitle = TString::Format(
"%s;#it{p}_{T,JetTrk} (GeV/#it{c});counts", histname.Data());
470 histname = TString::Format(
"%s/histJetNEFvJetPt_%d", groupname.Data(), cent);
471 histtitle = TString::Format(
"%s;#it{p}_{T,Jet};NEF", histname.Data());
474 histname = TString::Format(
"%s/histNumbJetConstvJetPt_%d", groupname.Data(), cent);
475 histtitle = TString::Format(
"%s;#it{p}_{T,Jet};NumberofJetConstit", histname.Data());
478 histname = TString::Format(
"%s/histJetFF_%d", groupname.Data(), cent);
479 histtitle = TString::Format(
"%s;Z=#it{p}_{T,leading} / #it{p}_{T,Jet};counts", histname.Data());
482 histname = TString::Format(
"%s/histJetZvJetPt_%d", groupname.Data(), cent);
483 histtitle = TString::Format(
"%s;#it{p}_{T,Jet};Z=#it{p}_{T,Trk} / #it{p}_{T,Jet}", histname.Data());
490 histname = TString::Format(
"%s/histFCrossvZleading_%d", groupname.Data(), cent);
491 histtitle = TString::Format(
"%s;#it{z}_{leading};#it{F}_{Cross}", histname.Data());
495 histname = TString::Format(
"%s/fHistNumbJETrigger_%d", groupname.Data(), cent);
496 histtitle = TString::Format(
"%s;JE Trigger Normaliztion;counts", histname.Data());
499 histname = TString::Format(
"%s/fHistNumbGATrigger_%d", groupname.Data(), cent);
500 histtitle = TString::Format(
"%s;GA Trigger Normaliztion;counts", histname.Data());
503 histname = TString::Format(
"%s/fHistJetJetPatchE_%d", groupname.Data(), cent);
504 histtitle = TString::Format(
"%s;#it{E}_{JetGammaPatch} (GeV);counts", histname.Data());
507 histname = TString::Format(
"%s/fHistJetGammaPatchE_%d", groupname.Data(), cent);
508 histtitle = TString::Format(
"%s;#it{E}_{JetGammaPatch} (GeV);counts", histname.Data());
511 histname = TString::Format(
"%s/fHistJetJetPatchPt_%d", groupname.Data(), cent);
512 histtitle = TString::Format(
"%s;#it{p}_{T,JetJetPatch} (GeV/#it{c});counts", histname.Data());
515 histname = TString::Format(
"%s/fHistJetGammaPatchPt_%d", groupname.Data(), cent);
516 histtitle = TString::Format(
"%s;#it{p}_{T,JetGammaPatch} (GeV/#it{c});counts", histname.Data());
519 histname = TString::Format(
"%s/fHistTriggerPatchE_%d", groupname.Data(), cent);
520 histtitle = TString::Format(
"%s;#it{E}_{TriggerPatch} (GeV);counts", histname.Data());
523 histname = TString::Format(
"%s/fHistDeltaEtaDeltaPhiJE_%d", groupname.Data(), cent);
524 histtitle = TString::Format(
"%s;#it{#phi}_{jet} - #it{#phi}_{JE,patch};#it{#eta}_{Jet} - #it{#eta}_{JE,patch};counts", histname.Data());
527 histname = TString::Format(
"%s/fHistDeltaEtaDeltaPhiGA_%d", groupname.Data(), cent);
528 histtitle = TString::Format(
"%s;#it{#phi}_{jet} - #it{#phi}_{GA,patch};#it{#eta}_{Jet} - #it{#eta}_{GA,patch};counts", histname.Data());
531 histname = TString::Format(
"%s/fHistJetEPatchEJE_%d", groupname.Data(), cent);
532 histtitle = TString::Format(
"%s;#it{E_{JE,patch}}#it{E_{Jet,UnCorr}};counts", histname.Data());
535 histname = TString::Format(
"%s/fHistJetEPatchEGA_%d", groupname.Data(), cent);
536 histtitle = TString::Format(
"%s;#it{E_{GA,patch}};#it{E_{Jet,UnCorr}};counts", histname.Data());
540 histname = TString::Format(
"%s/histJetArea_%d", groupname.Data(), cent);
541 histtitle = TString::Format(
"%s;#it{A}_{jet};counts", histname.Data());
544 histname = TString::Format(
"%s/histJetPhi_%d", groupname.Data(), cent);
545 histtitle = TString::Format(
"%s;#it{#phi}_{jet};counts", histname.Data());
548 histname = TString::Format(
"%s/histJetEta_%d", groupname.Data(), cent);
549 histtitle = TString::Format(
"%s;#it{#eta}_{jet};counts", histname.Data());
552 histname = TString::Format(
"%s/histJetClusterPhi_%d", groupname.Data(), cent);
553 histtitle = TString::Format(
"%s;#it{#phi}_{JetClus};counts", histname.Data());
556 histname = TString::Format(
"%s/histJetClusterEta_%d", groupname.Data(), cent);
557 histtitle = TString::Format(
"%s;#it{#eta}_{JetClus};counts", histname.Data());
560 histname = TString::Format(
"%s/histNJets_%d", groupname.Data(), cent);
561 histtitle = TString::Format(
"%s;number of jets;events", histname.Data());
570 histname = TString::Format(
"%s/histJetCorrPt_%d", groupname.Data(), cent);
571 histtitle = TString::Format(
"%s;#it{p}_{T,jet}^{corr} (GeV/#it{c});counts", histname.Data());
610 while ((jetCont = static_cast<AliJetContainer*>(next()))) {
611 groupname = jetCont->GetName();
613 for(
auto jet : jetCont->
accepted()) {
617 TLorentzVector leadPart;
620 if (z == 1 || (z > 1 && z - 1 < 1e-3)) z = 0.999;
622 histname = TString::Format(
"%s/histJetPt_%d", groupname.Data(),
fCentBin);
625 histname = TString::Format(
"%s/histJetClusterEnergy_%d", groupname.Data(),
fCentBin);
628 histname = TString::Format(
"%s/histJetArea_%d", groupname.Data(),
fCentBin);
631 histname = TString::Format(
"%s/histJetPhi_%d", groupname.Data(),
fCentBin);
634 histname = TString::Format(
"%s/histJetEta_%d", groupname.Data(),
fCentBin);
637 histname = TString::Format(
"%s/histJetNEFvJetPt_%d", groupname.Data(),
fCentBin);
641 histname = TString::Format(
"%s/histNumbJetConstvJetPt_%d", groupname.Data(),
fCentBin);
644 histname = TString::Format(
"%s/histJetFF_%d", groupname.Data(),
fCentBin);
647 Double_t MatchedEta = 0.04, MatchedPhi = 0.04;
654 if (!cls.InheritsFrom(
"AliEMCALTriggerPatchInfo")) {
655 AliError(Form(
"%s: Objects of type %s in %s are not inherited from AliEMCALTriggerPatchInfo!",GetName(), cls.GetName(),
"EmcalTriggers"));
661 AliError(Form(
"%s: Unable to get trigger patch container with name %s. Aborting", GetName(),
"EmcalTriggers"));
667 AliEMCALTriggerPatchInfo *currentpatch =
static_cast<AliEMCALTriggerPatchInfo *
>(p);
670 if(currentpatch->IsGammaLowRecalc() || currentpatch->IsGammaLowSimple()){
671 histname = TString::Format(
"%s/fHistDeltaEtaDeltaPhiGA_%d", groupname.Data(),
fCentBin);
672 fHistManager.
FillTH2(histname, jet->Phi() - currentpatch->GetPhiGeo(), jet->Eta() - currentpatch->GetEtaGeo());
673 histname = TString::Format(
"%s/fHistJetEPatchEGA_%d", groupname.Data(),
fCentBin);
676 if(jet->Phi() - currentpatch->GetPhiGeo() <= MatchedPhi && jet->Eta() - currentpatch->GetEtaGeo() <= MatchedEta){
677 histname = TString::Format(
"%s/fHistNumbGATrigger_%d", groupname.Data(),
fCentBin);
679 histname = TString::Format(
"%s/fHistJetGammaPatchE_%d", groupname.Data(),
fCentBin);
681 histname = TString::Format(
"%s/fHistJetGammaPatchPt_%d", groupname.Data(),
fCentBin);
687 if(currentpatch->IsJetLowRecalc() || currentpatch->IsJetLowSimple()){
688 histname = TString::Format(
"%s/fHistDeltaEtaDeltaPhiJE_%d", groupname.Data(),
fCentBin);
689 fHistManager.
FillTH2(histname, jet->Phi() - currentpatch->GetPhiGeo(), jet->Eta() - currentpatch->GetEtaGeo());
690 histname = TString::Format(
"%s/fHistJetEPatchEJE_%d", groupname.Data(),
fCentBin);
693 if(jet->Phi() - currentpatch->GetPhiGeo() <= MatchedPhi && jet->Eta() - currentpatch->GetEtaGeo() <= MatchedEta){
694 histname = TString::Format(
"%s/fHistNumbJETrigger_%d", groupname.Data(),
fCentBin);
696 histname = TString::Format(
"%s/fHistJetJetPatchE_%d", groupname.Data(),
fCentBin);
698 histname = TString::Format(
"%s/fHistJetJetPatchPt_%d", groupname.Data(),
fCentBin);
710 for (
Int_t it = 0; it < jet->GetNumberOfTracks(); it++) {
711 AliVParticle *JetTrk = jet->TrackAt(it, tracks->GetArray());
714 histname = TString::Format(
"%s/histJetTrkPt_%d", groupname.Data(),
fCentBin);
717 Z_part =
GetZ(JetTrk->Px(),JetTrk->Py(),JetTrk->Pz(),jet->Px(),jet->Py(),jet->Pz());
719 histname = TString::Format(
"%s/histJetZvJetPt_%d", groupname.Data(),
fCentBin);
735 for(
auto cluster : JetCluster->
accepted()) {
737 cluster->GetMomentum(nPart,
fVertex);
739 histname = TString::Format(
"%s/histJetClusterEnergy_%d", groupname.Data(),
fCentBin);
741 histname = TString::Format(
"%s/histJetClusterPhi_%d", groupname.Data(),
fCentBin);
743 histname = TString::Format(
"%s/histJetClusterEta_%d", groupname.Data(),
fCentBin);
745 histname = TString::Format(
"%s/histFCrossvZleading_%d", groupname.Data(),
fCentBin);
756 AliVCluster *leadingCluster = 0x0;
759 leadingCluster = jet->GetLeadingCluster();
761 leadingclusterE = leadingCluster->E();
765 AliVParticle* leadingTrk = jet->GetLeadingTrack();
767 leadingtrackpT = leadingTrk->Pt();
774 Double_t x[13]={TrackMultiplicity,jet->Pt(),leadingtrackpT,leadingclusterE,jet->Eta(),jet->Phi(),JetFCrossLeading,z,jet->Area(),jet->NEF(),Numb,NumbNeu,NumbChrg};
775 histname = TString::Format(
"%s/fhnJetSparse", groupname.Data());
779 histname = TString::Format(
"%s/histJetCorrPt_%d", groupname.Data(),
fCentBin);
783 histname = TString::Format(
"%s/histNJets_%d", groupname.Data(),
fCentBin);
800 while ((partCont = static_cast<AliParticleContainer*>(next()))) {
801 groupname = partCont->GetName();
803 for(
auto part : partCont->
accepted()) {
807 histname = TString::Format(
"%s/histTrackPt_%d", groupname.Data(),
fCentBin);
810 histname = TString::Format(
"%s/histTrackPhi_%d", groupname.Data(),
fCentBin);
813 histname = TString::Format(
"%s/histTrackEta_%d", groupname.Data(),
fCentBin);
816 if (partCont->GetLoadedClass()->InheritsFrom(
"AliVTrack")) {
817 const AliVTrack* track =
static_cast<const AliVTrack*
>(part);
819 histname = TString::Format(
"%s/fHistDeltaEtaPt_%d", groupname.Data(),
fCentBin);
822 histname = TString::Format(
"%s/fHistDeltaPhiPt_%d", groupname.Data(),
fCentBin);
825 histname = TString::Format(
"%s/fHistDeltaPtvsPt_%d", groupname.Data(),
fCentBin);
828 Double_t x[6]={0.0,track->Pt(),track->P(),track->Eta(),track->Phi(),0.0};
829 histname = TString::Format(
"%s/fhnTrkSparse", groupname.Data());
833 Int_t iCluster = track->GetEMCALcluster();
837 histname = TString::Format(
"%s/fHistEoverPvsP_%d", groupname.Data(),
fCentBin);
846 histname = TString::Format(
"%s/histNTracks_%d", groupname.Data(),
fCentBin);
857 Double_t TrkPt = 0.0, EovP = 0.0, TrackMultiplicity =0.0, trkpSum = 0.0;
862 while ((clusCont = static_cast<AliClusterContainer*>(next()))) {
863 groupname = clusCont->GetName();
866 for(
auto cluster : clusCont->
all()) {
867 if (!cluster)
continue;
870 histname = TString::Format(
"%s/fHistFcrossvEonline_%d", groupname.Data(),
fCentBin);
873 if (cluster->GetIsExotic()) {
874 histname = TString::Format(
"%s/histClusterEnergyExotic_%d", groupname.Data(),
fCentBin);
880 for(
auto cluster : clusCont->
accepted()) {
881 if (!cluster)
continue;
885 cluster->GetMomentum(nPart,
fVertex);
887 histname = TString::Format(
"%s/histClusterEnergy_%d", groupname.Data(),
fCentBin);
890 histname = TString::Format(
"%s/histClusterNonLinCorrEnergy_%d", groupname.Data(),
fCentBin);
893 histname = TString::Format(
"%s/histClusterHadCorrEnergy_%d", groupname.Data(),
fCentBin);
896 histname = TString::Format(
"%s/histClusterPhi_%d", groupname.Data(),
fCentBin);
899 histname = TString::Format(
"%s/histClusterEta_%d", groupname.Data(),
fCentBin);
903 const AliVTrack* track = 0x0;
905 for (
Int_t itrack=0; itrack < cluster->GetNTracksMatched(); itrack++){
906 track =
dynamic_cast<AliVTrack*
>(cluster->GetTrackMatched(itrack));
909 trkpSum += track->P();
910 EovP = cluster->GetNonLinCorrEnergy() / trkpSum;
916 Double_t x[10]={TrackMultiplicity,cluster->GetHadCorrEnergy(),cluster->GetNonLinCorrEnergy(),cluster->E(),TrkPt,EovP,nPart.Eta(),nPart.
Phi_0_2pi(),cluster->GetM02(),cluster->GetM20()};
917 histname = TString::Format(
"%s/fhnClusSparse", groupname.Data());
925 histname = TString::Format(
"%s/histNClusters_%d", groupname.Data(),
fCentBin);
946 for (
Short_t pos = 0; pos < ncells; pos++) {
964 for(
auto trk : partMCCont->
all()){
965 groupname = partMCCont->GetName();
967 for(
auto part : partMCCont->
accepted()) {
970 histname = TString::Format(
"%s/fHistParticleLvlpT_%d", groupname.Data(),
fCent);
1007 TClass cls(objname);
1008 if (!cls.InheritsFrom(
"AliEMCALTriggerPatchInfo")) {
1009 AliError(Form(
"%s: Objects of type %s in %s are not inherited from AliEMCALTriggerPatchInfo!",GetName(), cls.GetName(),
"EmcalTriggers"));
1015 AliError(Form(
"%s: Unable to get trigger patch container with name %s. Aborting", GetName(),
"EmcalTriggers"));
1019 AliEMCALTriggerPatchInfo *recpatch =
static_cast<AliEMCALTriggerPatchInfo *
>(p);
1024 fClusterEResolution =
new TF1(
"fClusterEResolution",
"sqrt([0]^2+[1]^2*x+([2]*x)^2)*0.01");
1091 cout<<
"*****************************"<<endl;
1092 cout<<
"******* Task Finished *******"<<endl;
1093 cout<<
"*****************************"<<endl;
1101 return (trkPx*jetPx+trkPy*jetPy+trkPz*jetPz)/(jetPx*jetPx+jetPy*jetPy+jetPz*jetPz);
1113 Int_t nCellCount[10] = {0};
1118 for (
Short_t pos = 0; pos < ncells; pos++) {
1121 Int_t sMod =
fGeom->GetSuperModuleNumber(cellId);
1123 if(amp<0.1)
continue;
1128 for(
Int_t i=0; i<=9; i++){
1139 Int_t AbsIdseed = -1;
1141 for (
Int_t i = 0; i < cluster->GetNCells(); i++) {
1142 if (cells->GetCellAmplitude(cluster->GetCellAbsId(i)) > Eseed) {
1143 Eseed = cells->GetCellAmplitude(cluster->GetCellAbsId(i));
1144 AbsIdseed = cluster->GetCellAbsId(i);
1152 Int_t imod = -1, iphi =-1, ieta=-1,iTower = -1, iIphi = -1, iIeta = -1;
1153 fGeom->GetCellIndex(AbsIdseed,imod,iTower,iIphi,iIeta);
1154 fGeom->GetCellPhiEtaIndexInSModule(imod,iTower,iIphi,iIeta,iphi,ieta);
1161 if (iphi < AliEMCALGeoParams::fgkEMCALRows-1) {
1162 absID1 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi+1, ieta);
1165 absID2 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi-1, ieta);
1173 if (ieta == AliEMCALGeoParams::fgkEMCALCols-1 && !(imod%2)) {
1174 absID3 =
fGeom->GetAbsCellIdFromCellIndexes(imod+1, iphi, 0);
1175 absID4 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta-1);
1177 else if (ieta == 0 && imod%2) {
1178 absID3 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta+1);
1179 absID4 =
fGeom->GetAbsCellIdFromCellIndexes(imod-1, iphi, AliEMCALGeoParams::fgkEMCALCols-1);
1182 if (ieta < AliEMCALGeoParams::fgkEMCALCols-1) {
1183 absID3 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta+1);
1186 absID4 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta-1);
1190 Double_t ecell1 = cells->GetCellAmplitude(absID1);
1191 Double_t ecell2 = cells->GetCellAmplitude(absID2);
1192 Double_t ecell3 = cells->GetCellAmplitude(absID3);
1193 Double_t ecell4 = cells->GetCellAmplitude(absID4);
1195 Double_t Ecross = ecell1 + ecell2 + ecell3 + ecell4;
1197 Double_t Fcross = 1 - Ecross/Eseed;
1223 const Int_t dim = count;
1230 while(c<dim && i<32){
1235 hnTitle += Form(
";%s",label.Data());
1243 return new THnSparseF(name, hnTitle.Data(), dim,
nbins, xmin, xmax);
1261 label =
"V0 centrality (%)";
1267 label =
"Multiplicity";
1273 label =
"Jet p_{T}";
1280 label =
"Track p_{T}";
1287 label =
"Cluster E";
1308 label =
"#it{p}_{T,track}^{leading}";
1315 label =
"Matched Trigger Amp";
1322 label =
"#Delta#eta";
1329 label =
"#Delta#phi";
1336 label =
"F_{cross}";
1343 label =
"z_{leading}";
1350 label =
"#it{A}_{jet}";
1364 label =
"Numb Constit";
1371 label =
"Numb Chrg Constit";
1378 label =
"Numb Neu Constit";
THashList * CreateHistoGroup(const char *groupname)
Create a new group of histograms within a parent group.
TObjArray fClusterCollArray
cluster collection array
void AllocateCellHistograms()
EMCal Tower Histograms.
virtual THnSparse * NewTHnSparseF(const char *name, UInt_t entries)
AliMCEvent * fMCevent
! Monte-Carlo event
Double_t GetRhoVal() const
const TString & GetRhoName() const
virtual ~AliAnalysisTaskEmcalJetSpectra8TeVTriggerQA()
TF1 * fClusterEResolution
! Parameterization of cluster energy resolution from 2010 test beam results a = 4.35 b = 9.07 c = 1.63
AliJetContainer * GetJetContainer(Int_t i=0) const
const AliParticleIterableContainer all() const
Container with name, TClonesArray and cuts for particles.
void FillTH2(const char *hname, double x, double y, double weight=1., Option_t *opt="")
Fill a 2D histogram within the container.
Declaration of class AliTLorentzVector.
void Terminate(Option_t *option)
Double_t GetFcross(const AliVCluster *cluster, AliVCaloCells *cells)
Double_t fMinBinPt
min pt in histograms
AliClusterContainer * GetClusterContainer() const
THistManager fHistManager
! Histogram manager
Int_t fCentBin
!event centrality bin
Declaration of class AliAnalysisTaskEmcalJetSpectra8TeVTriggerQA.
void AllocateClusterHistograms()
EMCal Cluster Histograms.
void AllocateParticleHistograms()
Generator Level MC Histograms.
void AllocateJetHistograms()
Jet Histograms.
TH1F * fHistNumbJets
! Numb Jets Per Event
Container for particles within the EMCAL framework.
void SetCaloTriggerPatchInfoName(const char *n)
Bool_t fUseSumw2
! activate sumw2 for output histograms
AliAnalysisTaskEmcalJetSpectra8TeVTriggerQA()
TObjArray fParticleCollArray
particle/track collection array
AliMCParticleContainer * fGeneratorLevel
! generator level container
AliParticleContainer * GetParticleContainer(Int_t i=0) const
Get particle container attached to this task.
const AliClusterIterableContainer all() const
AliParticleContainer * GetParticleContainer() const
void GetLeadingHadronMomentum(TLorentzVector &mom, const AliEmcalJet *jet) const
void FillTHnSparse(const char *name, const double *x, double weight=1., Option_t *opt="")
TH2 * CreateTH2(const char *name, const char *title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax, Option_t *opt="")
Create a new TH2 within the container.
Bool_t fUseRecalcPatches
Switch between offline (FEE) and recalc (L1) patches.
TH1F * fHistEMCalTowerMult[9]
! EMCal Tower Multiplicity by SM
Bool_t IsLEDEvent() const
TH1F * fHistJetPt
! Jet Pt Dist
THashList * GetListOfHistograms() const
Get the list of histograms.
AliEMCALGeometry * fGeom
!emcal geometry
void AllocateTrackHistograms()
ITS-TPC Track Histograms.
Double_t Phi_0_2pi() const
Double_t fVaryTrkPtRes
! Variation of tracking momentum resolution
Implementation of a EMCal spectra task and QA for EMCal triggers.
TH1 * CreateTH1(const char *name, const char *title, int nbins, double xmin, double xmax, Option_t *opt="")
Create a new TH1 within the container.
BeamType fForceBeamType
forced beam type
Int_t fNcentBins
how many centrality bins
AliClusterContainer * GetClusterContainer(Int_t i=0) const
Get cluster container attached to this task.
AliVCluster * GetAcceptCluster(Int_t i) const
TH1F * fHistJetJetPatchPt
! Jet - Jet Trigger Patch Pt
const AliClusterIterableContainer accepted() const
Double_t fCent
!event centrality
TString fCaloCellsName
name of calo cell collection
AliMCParticleContainer * AddMCParticleContainer(const char *n)
Create new container for MC particles and attach it to the task.
static Double_t GetParallelFraction(AliVParticle *part1, AliVParticle *part2)
Calculates the fraction of momentum z of part 1 w.r.t. part 2 in the direction of part 2...
void FillTH1(const char *hname, double x, double weight=1., Option_t *opt="")
Fill a 1D histogram within the container.
TObjArray fJetCollArray
jet collection array
AliVCaloCells * fCaloCells
!cells
AliRhoParameter * GetRhoParameter()
AliVEvent * fRecevent
! Reconstructed event
TH1F * fHistTriggerPatchE
! EMCal Trigger Patch E
THnSparse * fhnClusQA
! EMCal Cluster QA
THnSparse * fhnMBJetSpectra
! MB Jet Spectra sparse
AliEmcalList * fOutput
!output list
TH1F * fHistJetGammaPatchE
! Jet - Gamma Trigger Patch E
Double_t fMaxBinPt
max pt in histograms
AliJetContainer * fMCJetContainer
! truth-level jet container
AliMCParticleContainer * GetMCParticleContainer(Int_t i=0) const
TH1F * fHistJetGammaPatchPt
! Jet - Gamma Trigger Patch Pt
void UserCreateOutputObjects()
Double_t fVertex[3]
!event vertex
void SetMakeGeneralHistograms(Bool_t g)
TClonesArray * fTriggerPatchInfo
!trigger patch info array
Base task in the EMCAL jet framework.
const AliParticleIterableContainer accepted() const
void UserCreateOutputObjects()
Main initialization function on the worker.
Double_t GetZ(const Double_t trkPx, const Double_t trkPy, const Double_t trkPz, const Double_t jetPx, const Double_t jetPy, const Double_t jetPz) const
const AliJetIterableContainer accepted() const
THnSparse * CreateTHnSparse(const char *name, const char *title, int ndim, const int *nbins, const double *min, const double *max, Option_t *opt="")
Create a new THnSparse within the container.
Container structure for EMCAL clusters.
THnSparse * fhnTrkQA
! Charged Track QA Sparse
Container for jet within the EMCAL jet framework.
Int_t fNbins
no. of pt bins
virtual void GetDimParams(Int_t iEntry, TString &label, Int_t &nbins, Double_t &xmin, Double_t &xmax)
TH1F * fHistJetJetPatchE
! Jet - Jet Trigger Patch E
AliEMCALRecoUtils * fRecoUtil
! Reco utility