30 #include <TClonesArray.h>
35 #include <THnSparse.h>
37 #include <AliVCluster.h>
38 #include <AliVParticle.h>
47 #include "AliEMCALGeometry.h"
48 #include "AliPHOSGeometry.h"
49 #include "AliOADBContainer.h"
62 fPlotClusterHistograms(kTRUE),
63 fPlotNeutralJets(kFALSE),
64 fPlotClustersInJets(kFALSE),
65 fPlotCellHistograms(kTRUE),
66 fPlotClusWithoutNonLinCorr(kFALSE),
68 fPlotStandardClusterTHnSparse(kTRUE),
69 fPlotNearestNeighborDistribution(kFALSE),
70 fPlotClusterCone(kFALSE),
71 fPlotCaloCentrality(kFALSE),
72 fPlotFineGrainedEtaPhi(kFALSE),
73 fPlotEvenOddEta(kFALSE),
74 fPlotCellSMDensity(kFALSE),
75 fExcludeRejectedCells(kFALSE),
76 fPlotFineGrainedCentrality(kFALSE),
84 fUseAliEventCuts(kTRUE),
87 fUseManualEventCuts(kFALSE),
101 fPlotClusterHistograms(kTRUE),
102 fPlotNeutralJets(kFALSE),
103 fPlotClustersInJets(kFALSE),
104 fPlotCellHistograms(kTRUE),
105 fPlotClusWithoutNonLinCorr(kFALSE),
106 fPlotExotics(kFALSE),
107 fPlotStandardClusterTHnSparse(kTRUE),
108 fPlotNearestNeighborDistribution(kFALSE),
109 fPlotClusterCone(kFALSE),
110 fPlotCaloCentrality(kFALSE),
111 fPlotFineGrainedEtaPhi(kFALSE),
112 fPlotEvenOddEta(kFALSE),
113 fPlotCellSMDensity(kFALSE),
114 fExcludeRejectedCells(kFALSE),
115 fPlotFineGrainedCentrality(kFALSE),
123 fUseAliEventCuts(kTRUE),
126 fUseManualEventCuts(kFALSE),
184 while ((obj = next())) {
242 const Int_t nRejBins = 32;
245 const Int_t nExBins = 200;
249 AliEmcalContainer* cont = 0;
251 while ((cont = static_cast<AliEmcalContainer*>(nextClusColl()))) {
254 histname = TString::Format(
"%s/hClusterRejectionReasonEMCal", cont->GetArrayName().Data());
255 htitle = histname +
";Rejection reason;#it{E}_{clus} (GeV/)";
259 histname = TString::Format(
"%s/hClusterRejectionReasonPHOS", cont->GetArrayName().Data());
260 htitle = histname +
";Rejection reason;#it{E}_{clus} (GeV/)";
265 const Int_t nEmcalSM = 20;
266 for (
Int_t sm = 0; sm < nEmcalSM; sm++) {
267 histname = TString::Format(
"%s/BySM/hEmcalClusEnergy_SM%d", cont->GetArrayName().Data(), sm);
268 htitle = histname +
";#it{E}_{cluster} (GeV);counts";
272 for (
Int_t sm = 1; sm < 5; sm++) {
273 histname = TString::Format(
"%s/BySM/hPhosClusEnergy_SM%d", cont->GetArrayName().Data(), sm);
274 htitle = histname +
";#it{E}_{cluster} (GeV);counts";
287 title[dim] =
"Centrality %";
323 title[dim] =
"#it{E}_{clus} (GeV)";
331 title[dim] =
"#it{E}_{clus, hadcorr} or #it{E}_{core} (GeV)";
338 title[dim] =
"Matched track";
352 title[dim] =
"Ncells";
359 title[dim] =
"Dispersion cut";
368 title[dim] =
"Even/odd eta";
377 title[dim] =
"#DeltaR_{NN}";
387 title[dim] =
"Cone type";
401 title[dim] =
"#it{E}_{cone} (GeV)";
412 title[dim] =
"#it{#rho}_{cell cone} (GeV)";
419 title[dim] =
"Ncells cone";
427 title[dim] =
"#it{E}_{cell SM} (GeV)";
434 title[dim] =
"Ncells SM";
444 TString thnname = TString::Format(
"%s/clusterObservables", cont->GetArrayName().Data());
446 for (
Int_t i = 0; i < dim; i++) {
447 hn->GetAxis(i)->SetTitle(title[i]);
448 hn->SetBinEdges(i, binEdges[i]);
453 histname = TString::Format(
"%s/hFcrossEMCal", cont->GetArrayName().Data());
454 htitle = histname +
";Centrality (%);Fcross;#it{E}_{clus} (GeV/)";
474 histname = TString::Format(
"Cells/hCellEnergyAll");
475 htitle = histname +
";#it{E}_{cell} (GeV);Centrality (%); Cluster type";
479 histname = TString::Format(
"Cells/hCellEnergyAccepted");
480 htitle = histname +
";#it{E}_{cell} (GeV);Centrality (%); Cluster type";
484 histname = TString::Format(
"Cells/hCellEnergyLeading");
485 htitle = histname +
";#it{E}_{cell} (GeV);Centrality (%); Cluster type";
489 const Int_t nEmcalSM = 20;
490 for (
Int_t sm = 0; sm < nEmcalSM; sm++) {
491 histname = TString::Format(
"Cells/BySM/hEmcalPatchEnergy_SM%d", sm);
492 htitle = histname +
";#it{E}_{cell patch} (GeV);Centrality (%)";
496 for (
Int_t sm = 1; sm < 5; sm++) {
497 histname = TString::Format(
"Cells/BySM/hPhosPatchEnergy_SM%d", sm);
498 htitle = histname +
";#it{E}_{cell patch} (GeV);Centrality (%)";
511 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
514 Int_t nbinsJet[30] = {0};
521 axisTitle[dimJet] =
"Centrality (%)";
529 axisTitle[dimJet] =
"#eta_{jet}";
530 nbinsJet[dimJet] = 28;
531 minJet[dimJet] = -0.7;
532 maxJet[dimJet] = 0.7;
536 axisTitle[dimJet] =
"#phi_{jet} (rad)";
537 nbinsJet[dimJet] = 100;
543 axisTitle[dimJet] =
"#it{E}_{T} (GeV)";
550 axisTitle[dimJet] =
"#rho (GeV/#it{c})";
551 nbinsJet[dimJet] = 100;
553 maxJet[dimJet] = 1000.;
557 axisTitle[dimJet] =
"N_{clusters}";
558 nbinsJet[dimJet] = 20;
559 minJet[dimJet] = -0.5;
560 maxJet[dimJet] = 19.5;
564 axisTitle[dimJet] =
"#it{E}_{T}, acc clus within R (GeV)";
571 axisTitle[dimJet] =
"#it{E}_{T}, acc cell within R (GeV)";
578 TString thnname = TString::Format(
"%s/hClusterJetObservables", jets->GetArrayName().Data());
580 for (
Int_t i = 0; i < dimJet; i++) {
581 hn->GetAxis(i)->SetTitle(axisTitle[i]);
582 hn->SetBinEdges(i, binEdgesJet[i]);
599 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
611 title[dim] =
"Centrality %";
619 title[dim] =
"#it{E}_{clus} (GeV)";
626 title[dim] =
"#it{p}_{T,jet}^{corr}";
633 title[dim] =
"#eta_{jet}";
640 title[dim] =
"#phi_{jet}";
647 TString thnname = TString::Format(
"%s/hClustersInJets", jets->GetArrayName().Data());
649 for (
Int_t i = 0; i < dim; i++) {
650 hn->GetAxis(i)->SetTitle(title[i]);
651 hn->SetBinEdges(i, binEdges[i]);
655 histname = TString::Format(
"%s/hCaloJESshift", jets->GetArrayName().Data());
656 htitle = histname +
";type;#it{p}_{T}^{corr} (GeV/#it{c});#Delta_{JES}";
657 fHistManager.
CreateTH3(histname.Data(), htitle.Data(), 3, -0.5, 2.5,
nPtBins, 0,
fMaxPt, 100, 0, 20);
673 fPHOSGeo = AliPHOSGeometry::GetInstance();
675 AliInfo(
"Found instance of PHOS geometry!");
678 AliInfo(
"Creating PHOS geometry!");
679 Int_t runNum = InputEvent()->GetRunNumber();
681 fPHOSGeo = AliPHOSGeometry::GetInstance(
"IHEP");
683 fPHOSGeo = AliPHOSGeometry::GetInstance(
"Run2");
686 AliOADBContainer geomContainer(
"phosGeo");
687 geomContainer.InitFromFile(
"$ALICE_PHYSICS/OADB/PHOS/PHOSMCGeometry.root",
"PHOSMCRotationMatrixes");
688 TObjArray* matrixes = (
TObjArray*)geomContainer.GetObject(runNum,
"PHOSRotationMatrixes");
689 for(
Int_t mod=0; mod<6; mod++) {
690 if(!matrixes->At(mod))
continue;
691 fPHOSGeo->SetMisalMatrix(((TGeoHMatrix*)matrixes->At(mod)),mod);
692 printf(
".........Adding Matrix(%d), geo=%p\n",mod,
fPHOSGeo);
693 ((TGeoHMatrix*)matrixes->At(mod))->
Print();
773 AliVCaloCells* phosCaloCells = InputEvent()->GetPHOSCells();
777 const AliVCluster* clus;
780 while ((clusters = static_cast<AliClusterContainer*>(nextClusColl()))) {
782 clustersName = clusters->GetArrayName();
789 if (clus->IsEMCAL()) {
790 Double_t phi = it->first.Phi_0_2pi();
794 }
else if (isDcal == 1) {
797 }
else if (clus->GetType() == AliVCluster::kPHOSNeutral){
802 if (clus->IsEMCAL()) {
803 histname = TString::Format(
"%s/hClusterRejectionReasonEMCal", clusters->GetArrayName().Data());
804 UInt_t rejectionReason = 0;
805 if (!clusters->
AcceptCluster(it.current_index(), rejectionReason)) {
806 fHistManager.
FillTH2(histname, clusters->GetRejectionReasonBitPosition(rejectionReason), it->first.E());
809 }
else if (clus->GetType() == AliVCluster::kPHOSNeutral){
810 histname = TString::Format(
"%s/hClusterRejectionReasonPHOS", clusters->GetArrayName().Data());
811 UInt_t rejectionReason = 0;
812 if (!clusters->
AcceptCluster(it.current_index(), rejectionReason)) {
813 fHistManager.
FillTH2(histname, clusters->GetRejectionReasonBitPosition(rejectionReason), it->first.E());
823 if (clus->IsEMCAL()) {
825 Ehadcorr = clus->GetHadCorrEnergy();
826 Enonlin = clus->GetNonLinCorrEnergy();
832 histname = TString::Format(
"%s/hFcrossEMCal", clusters->GetArrayName().Data());
837 Int_t sm =
fGeom->GetSuperModuleNumber(clus->GetCellAbsId(0));
838 if (sm >=0 && sm < 20) {
839 histname = TString::Format(
"%s/BySM/hEmcalClusEnergy_SM%d", clusters->GetArrayName().Data(), sm);
843 AliError(Form(
"Supermodule %d does not exist!", sm));
847 histname = TString::Format(
"Cells/hCellEnergyAccepted");
849 for (
Int_t iCell = 0; iCell < clus->GetNCells(); iCell++){
850 absId = clus->GetCellAbsId(iCell);
853 if (ecell > leadEcell) {
859 histname = TString::Format(
"Cells/hCellEnergyLeading");
862 }
else if (clus->GetType() == AliVCluster::kPHOSNeutral){
864 Ehadcorr = clus->GetCoreEnergy();
869 fPHOSGeo->AbsToRelNumbering(clus->GetCellAbsId(0), relid);
871 if (sm >=1 && sm < 5) {
872 histname = TString::Format(
"%s/BySM/hPhosClusEnergy_SM%d", clusters->GetArrayName().Data(), sm);
876 AliError(Form(
"Supermodule %d does not exist!", sm));
881 histname = TString::Format(
"Cells/hCellEnergyAccepted");
883 for (
Int_t iCell = 0; iCell < clus->GetNCells(); iCell++){
884 absId = clus->GetCellAbsId(iCell);
885 ecell = phosCaloCells->GetCellAmplitude(absId);
887 if (ecell > leadEcell) {
892 histname = TString::Format(
"Cells/hCellEnergyLeading");
897 Int_t hasMatchedTrack = -1;
898 Int_t nMatchedTracks = clus->GetNTracksMatched();
899 if (nMatchedTracks == 0) {
901 }
else if (nMatchedTracks > 0) {
906 Int_t passedDispersionCut = 0;
907 if (clus->Chi2() < 2.5*2.5) {
908 passedDispersionCut = 1;
913 Double_t phi = it->first.Phi_0_2pi();
915 Int_t nCells = clus->GetNCells();
920 Int_t nSupMod, nModule, nIphi, nIeta, iphi, ieta;
921 if (clus->IsEMCAL()) {
922 fGeom->GetCellIndex(leadAbsId, nSupMod, nModule, nIphi, nIeta);
923 fGeom->GetCellPhiEtaIndexInSModule(nSupMod, nModule, nIphi, nIeta, iphi, ieta);
929 FillClusterTHnSparse(clustersName, eta, phi, Enonlin, Ehadcorr, hasMatchedTrack, M02, nCells, passedDispersionCut, distNN, isOddEta);
935 Int_t nCellsCone = 0;
938 Double_t areaCone = TMath::Pi() * 0.07 * 0.07;
945 sm =
fGeom->GetSuperModuleNumber(clus->GetCellAbsId(0));
946 areaCell = 0.014*0.014;
948 if (clusType ==
kPHOS) {
950 fPHOSGeo->AbsToRelNumbering(clus->GetCellAbsId(0), relid);
952 areaCell = 0.014*0.014*(2.2/6.0)*(2.2/6.0);
956 if ( (clusType ==
kEMCal && sm < 10 ) || (clusType ==
kPHOS && sm < 4) ) {
961 eDensityCone = eCellCone / (areaCone - nCells*areaCell);
968 FillClusterTHnSparse(clustersName, eta, phi, Enonlin, eDensityCone, eCellSM, nCellsCone, nCellsSM);
978 FillClusterTHnSparse(clustersName, eta, phi, Enonlin, Ehadcorr, hasMatchedTrack, M02, nCells, passedDispersionCut, distNN, isOddEta, 0, 0.05,
GetConeClusterEnergy(eta, phi, 0.05));
980 FillClusterTHnSparse(clustersName, eta, phi, Enonlin, Ehadcorr, hasMatchedTrack, M02, nCells, passedDispersionCut, distNN, isOddEta, 0, 0.1,
GetConeClusterEnergy(eta, phi, 0.1));
982 FillClusterTHnSparse(clustersName, eta, phi, Enonlin, Ehadcorr, hasMatchedTrack, M02, nCells, passedDispersionCut, distNN, isOddEta, 1, 0.05,
GetConeCellEnergy(eta, phi, 0.05));
984 FillClusterTHnSparse(clustersName, eta, phi, Enonlin, Ehadcorr, hasMatchedTrack, M02, nCells, passedDispersionCut, distNN, isOddEta, 1, 0.1,
GetConeCellEnergy(eta, phi, 0.1));
995 void AliAnalysisTaskEmcalVsPhos::FillClusterTHnSparse(
TString clustersName,
Double_t eta,
Double_t phi,
Double_t Enonlin,
Double_t Ehadcorr,
Int_t hasMatchedTrack,
Double_t M02,
Int_t nCells,
Int_t passedDispersionCut,
Double_t distNN,
Int_t isOddEta,
Int_t coneType,
Double_t R,
Double_t Econe)
998 TString histname = TString::Format(
"%s/clusterObservables", clustersName.Data());
1000 if (!histClusterObservables)
return;
1001 for (
Int_t i = 0; i < histClusterObservables->GetNdimensions(); i++) {
1002 TString title(histClusterObservables->GetAxis(i)->GetTitle());
1003 if (
title==
"Centrality %")
1004 contents[i] =
fCent;
1005 else if (
title==
"#eta")
1007 else if (
title==
"#phi")
1009 else if (
title==
"#it{E}_{clus} (GeV)")
1010 contents[i] = Enonlin;
1011 else if (
title==
"#it{E}_{clus, hadcorr} or #it{E}_{core} (GeV)")
1012 contents[i] = Ehadcorr;
1013 else if (
title==
"Matched track")
1014 contents[i] = hasMatchedTrack;
1015 else if (
title==
"M02")
1017 else if (
title==
"Ncells")
1018 contents[i] = nCells;
1019 else if (
title==
"Dispersion cut")
1020 contents[i] = passedDispersionCut;
1021 else if (
title==
"#DeltaR_{NN}")
1022 contents[i] = distNN;
1023 else if (
title==
"Even/odd eta")
1024 contents[i] = isOddEta;
1025 else if (
title==
"Cone type")
1026 contents[i] = coneType;
1027 else if (
title==
"R")
1029 else if (
title==
"#it{E}_{cone} (GeV)")
1030 contents[i] = Econe;
1032 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1034 histClusterObservables->Fill(contents);
1044 TString histname = TString::Format(
"%s/clusterObservables", clustersName.Data());
1046 if (!histClusterObservables)
return;
1047 for (
Int_t i = 0; i < histClusterObservables->GetNdimensions(); i++) {
1048 TString title(histClusterObservables->GetAxis(i)->GetTitle());
1049 if (
title==
"Centrality %")
1050 contents[i] =
fCent;
1051 else if (
title==
"#eta")
1053 else if (
title==
"#phi")
1055 else if (
title==
"#it{E}_{clus} (GeV)")
1056 contents[i] = Enonlin;
1057 else if (
title==
"#it{#rho}_{cell cone} (GeV)")
1058 contents[i] = eCellCone;
1059 else if (
title==
"Ncells cone")
1060 contents[i] = nCellsCone;
1061 else if (
title==
"#it{E}_{cell SM} (GeV)")
1062 contents[i] = eCellSM;
1063 else if (
title==
"Ncells SM")
1064 contents[i] = nCellsSM;
1066 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1068 histClusterObservables->Fill(contents);
1084 AliVCaloCells* phosCaloCells = InputEvent()->GetPHOSCells();
1097 histname = TString::Format(
"Cells/hCellEnergyAll");
1101 sm =
fGeom->GetSuperModuleNumber(absId);
1102 if (sm >=0 && sm < 20) {
1103 patchSumEMCal[sm] += ecell;
1108 for (
Int_t i=0; i<phosCaloCells->GetNumberOfCells(); i++) {
1110 absId = phosCaloCells->GetCellNumber(i);
1111 ecell = phosCaloCells->GetCellAmplitude(absId);
1118 histname = TString::Format(
"Cells/hCellEnergyAll");
1122 fPHOSGeo->AbsToRelNumbering(absId, relid);
1124 if (sm >=1 && sm < 5) {
1125 patchSumPHOS[sm-1] += ecell;
1130 for (
Int_t sm = 0; sm < 20; sm++) {
1131 histname = TString::Format(
"Cells/BySM/hEmcalPatchEnergy_SM%d", sm);
1135 for (
Int_t sm = 1; sm < 5; sm++) {
1136 histname = TString::Format(
"Cells/BySM/hPhosPatchEnergy_SM%d", sm);
1149 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
1153 TString histname = TString::Format(
"%s/hClusterJetObservables", jets->GetArrayName().Data());
1155 if (!histJetObservables)
return;
1157 for (
auto jet : jets->
accepted()) {
1159 for (
Int_t i = 0; i < histJetObservables->GetNdimensions(); i++) {
1160 TString title(histJetObservables->GetAxis(i)->GetTitle());
1161 if (
title==
"Centrality (%)")
1162 contents[i] =
fCent;
1163 else if (
title==
"#eta_{jet}")
1164 contents[i] = jet->Eta();
1165 else if (
title==
"#phi_{jet} (rad)")
1166 contents[i] = jet->Phi_0_2pi();
1167 else if (
title==
"#it{E}_{T} (GeV)")
1168 contents[i] = jet->Pt();
1169 else if (
title==
"#rho (GeV/#it{c})")
1170 contents[i] = jet->Pt() / jet->Area();
1171 else if (
title==
"N_{clusters}")
1172 contents[i] = jet->GetNumberOfClusters();
1173 else if (
title==
"#it{E}_{T}, acc clus within R (GeV)")
1175 else if (
title==
"#it{E}_{T}, acc cell within R (GeV)")
1178 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1180 histJetObservables->Fill(contents);
1195 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
1199 for (
const auto jet : jets->
accepted()) {
1203 histname = TString::Format(
"%s/hClustersInJets", jets->GetArrayName().Data());
1204 Int_t nClusters = jet->GetNumberOfClusters();
1206 for (
Int_t iClus = 0; iClus < nClusters; iClus++) {
1208 clus = jet->Cluster(iClus);
1215 Double_t x[4] = {clus->E(),
GetJetPt(jet, rho), jet->Eta(), jet->Phi_0_2pi()};
1228 for (
Int_t iClus = 0; iClus < nClusters; iClus++) {
1229 clus = jet->Cluster(iClus);
1232 shift = 0.79 * TMath::Exp(-0.5 * ((eclus - 3.81) / 1.50)*((eclus - 3.81) / 1.50) );
1236 histname = TString::Format(
"%s/hCaloJESshift", jets->GetArrayName().Data());
1260 Double_t deltaEta = TMath::Abs(part.Eta() - etaRef);
1261 Double_t deltaR = TMath::Sqrt( deltaPhi*deltaPhi + deltaEta*deltaEta );
1270 Double_t deltaPhi = TMath::Abs(phi1-phi2);
1271 Double_t deltaEta = TMath::Abs(eta1-eta2);
1272 Double_t deltaR = TMath::Sqrt( deltaPhi*deltaPhi + deltaEta*deltaEta );
1301 Int_t AbsIdseed = -1;
1303 for (
Int_t i = 0; i < cluster->GetNCells(); i++) {
1304 if (cells->GetCellAmplitude(cluster->GetCellAbsId(i)) > Eseed) {
1305 Eseed = cells->GetCellAmplitude(cluster->GetCellAbsId(i));
1306 AbsIdseed = cluster->GetCellAbsId(i);
1314 Int_t imod = -1, iphi =-1, ieta=-1,iTower = -1, iIphi = -1, iIeta = -1;
1315 fGeom->GetCellIndex(AbsIdseed,imod,iTower,iIphi,iIeta);
1316 fGeom->GetCellPhiEtaIndexInSModule(imod,iTower,iIphi,iIeta,iphi,ieta);
1323 if (iphi < AliEMCALGeoParams::fgkEMCALRows-1) {
1324 absID1 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi+1, ieta);
1327 absID2 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi-1, ieta);
1335 if (ieta == AliEMCALGeoParams::fgkEMCALCols-1 && !(imod%2)) {
1336 absID3 =
fGeom->GetAbsCellIdFromCellIndexes(imod+1, iphi, 0);
1337 absID4 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta-1);
1339 else if (ieta == 0 && imod%2) {
1340 absID3 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta+1);
1341 absID4 =
fGeom->GetAbsCellIdFromCellIndexes(imod-1, iphi, AliEMCALGeoParams::fgkEMCALCols-1);
1344 if (ieta < AliEMCALGeoParams::fgkEMCALCols-1) {
1345 absID3 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta+1);
1348 absID4 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta-1);
1352 Double_t ecell1 = cells->GetCellAmplitude(absID1);
1353 Double_t ecell2 = cells->GetCellAmplitude(absID2);
1354 Double_t ecell3 = cells->GetCellAmplitude(absID3);
1355 Double_t ecell4 = cells->GetCellAmplitude(absID4);
1357 Double_t Ecross = ecell1 + ecell2 + ecell3 + ecell4;
1359 Double_t Fcross = 1 - Ecross/Eseed;
1370 Double_t etaRef = clusterRef.Eta();
1378 clusNNcand = clusIterator.first;
1382 if (distNNcand < distNN && distNNcand > 0.001) {
1383 distNN = distNNcand;
1403 clus = clusIterator.first;
1405 if (
GetDeltaR(clus, etaRef, phiRef) < R) {
1423 AliVCaloCells* phosCaloCells = InputEvent()->GetPHOSCells();
1436 fGeom->EtaPhiFromIndex(absId, eta, phi);
1437 phi = TVector2::Phi_0_2pi(phi);
1439 if (
GetDeltaR(eta, phi, etaRef, phiRef) < R) {
1447 energy +=
fCaloCells->GetCellAmplitude(absId);
1453 for (
Int_t i=0; i<phosCaloCells->GetNumberOfCells(); i++) {
1455 absId = phosCaloCells->GetCellNumber(i);
1457 fPHOSGeo->AbsToRelNumbering(absId, relid);
1459 if (sm < 1 || sm > 4) {
1463 fPHOSGeo->RelPosInAlice(absId, pos);
1466 phi = TVector2::Phi_0_2pi(phi);
1468 if (
GetDeltaR(eta, phi, etaRef, phiRef) < R) {
1476 energy += phosCaloCells->GetCellAmplitude(absId);
1501 if (clusType ==
kEMCal) {
1508 cellSM =
fGeom->GetSuperModuleNumber(absId);
1518 energy +=
fCaloCells->GetCellAmplitude(absId);
1525 if (clusType ==
kPHOS) {
1527 AliVCaloCells* phosCaloCells = InputEvent()->GetPHOSCells();
1529 for (
Int_t i=0; i<phosCaloCells->GetNumberOfCells(); i++) {
1531 absId = phosCaloCells->GetCellNumber(i);
1533 fPHOSGeo->AbsToRelNumbering(absId, relid);
1544 energy += phosCaloCells->GetCellAmplitude(absId);
1564 AliVCluster* cluster;
1567 Bool_t skipCell = kFALSE;
1573 if (!clusCont->
AcceptCluster(it.current_index(), rejectionReason)) {
1575 cluster = it->second;
1578 if (cluster->IsEMCAL()) {
1581 if (cluster->GetType() == AliVCluster::kPHOSNeutral) {
1584 if (clusType != cellType) {
1589 for (
Int_t i = 0; i < cluster->GetNCells(); i++) {
1591 if (absId == cluster->GetCellAbsId(i)) {
void Print(std::ostream &o, const char *name, Double_t dT, Double_t dVM, Double_t alldT, Double_t alldVM)
TObjArray fClusterCollArray
cluster collection array
Double_t GetRhoVal() const
Bool_t fPlotEvenOddEta
Set whether to add axis to THnSparse separating even/odd eta columns.
Bool_t fPlotClustersInJets
Set whether to plot histogram of clusters within jets.
UInt_t fOffTrigger
offline trigger for event selection
void AllocateNeutralJetHistograms()
Double_t GetSMCellEnergy(Int_t sm, Int_t clusType, Bool_t returnNcells=kFALSE)
const AliClusterIterableMomentumContainer accepted_momentum() const
bidirectional stl iterator over the EMCAL iterable container
Double_t GetFcross(const AliVCluster *cluster, AliVCaloCells *cells)
Int_t fNCentHistBins
! number of cent bins
void FillTH2(const char *hname, double x, double y, double weight=1., Option_t *opt="")
Fill a 2D histogram within the container.
Double_t * fPtHistBins
! variable pt bins
Declaration of class AliTLorentzVector.
void FillTH3(const char *hname, double x, double y, double z, double weight=1., Option_t *opt="")
Fill a 3D histogram within the container.
Bool_t fPlotCellHistograms
Set whether to plot cell histograms.
Bool_t fUseAliEventCuts
Flag to use AliEventCuts (otherwise AliAnalysisTaskEmcal will be used)
void AllocateClustersInJetsHistograms()
void AllocateCellHistograms()
Int_t fNM02HistBins
! number of variable M02 bins
Double_t FindNearestNeighborDistance(AliTLorentzVector cluster)
THistManager fHistManager
Histogram manager.
AliPHOSGeometry * fPHOSGeo
! phos geometry
void FillClusterHistograms()
void FillTHnSparse(const char *name, const double *x, double weight=1., Option_t *opt="")
Double_t GetConeCellEnergy(Double_t etaRef, Double_t phiRef, Double_t R, Bool_t returnNcells=kFALSE)
Double_t * fCentHistBins
! cent bins
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.
TObject * FindObject(const char *name) const
Find an object inside the container.
Bool_t fPlotStandardClusterTHnSparse
Set whether to plot "standard" axes in cluster THnSparse.
Int_t fNPtHistBins
! number of variable pt bins
THashList * GetListOfHistograms() const
Get the list of histograms.
Bool_t fPlotNeutralJets
Set whether to plot neutral jet histo.
AliEMCALGeometry * fGeom
!emcal geometry
UInt_t GetJetAcceptanceType() const
Bool_t IsCellRejected(Int_t absId, Int_t cellType)
Double_t Phi_0_2pi() const
void FillClustersInJetsHistograms()
void FillCellHistograms()
TH1 * CreateTH1(const char *name, const char *title, int nbins, double xmin, double xmax, Option_t *opt="")
Create a new TH1 within the container.
Bool_t fPlotClusterCone
Set whether to plot sum of energy surrounding cluster in THnSparse.
Bool_t fPlotFineGrainedEtaPhi
Set whether to plot fine-grained eta-phi bins in cluster THnSparse.
BeamType fForceBeamType
forced beam type
AliClusterContainer * GetClusterContainer(Int_t i=0) const
Get cluster container attached to this task.
virtual Bool_t AcceptCluster(Int_t i, UInt_t &rejectionReason) const
void FillNeutralJetHistograms()
Double_t fCent
!event centrality
Bool_t fExcludeRejectedCells
Set whether to exclude cells from rejected clusters in cone/SM studies.
void FillTH1(const char *hname, double x, double weight=1., Option_t *opt="")
Fill a 1D histogram within the container.
Double_t GetJetType(const AliEmcalJet *jet)
void AllocateClusterHistograms()
Bool_t fPlotCellSMDensity
Set whether to plot SM cell density when computing local density.
TObjArray fJetCollArray
jet collection array
Bool_t fPlotClusterHistograms
Set whether to plot cluster histograms.
Bool_t fUseManualEventCuts
Flag to use manual event cuts.
TList * fEventCutList
! Output list for event cut histograms
AliVCaloCells * fCaloCells
!cells
Bool_t fPlotNearestNeighborDistribution
Set whether to plot nearest neighbor axis in cluster THnSparse.
const AliClusterIterableMomentumContainer all_momentum() const
Double_t * fM02HistBins
! variable M02 bins
virtual Bool_t IsEventSelected()
Performing event selection.
static Double_t * GenerateFixedBinArray(Int_t n, Double_t min, Double_t max)
void AllocateCaloHistograms()
Bool_t fPlotFineGrainedCentrality
Set whether to plot a more fine grained centrality binning.
Float_t GetJetRadius() const
AliEmcalList * fOutput
!output list
Double_t GetDeltaR(AliTLorentzVector part, Double_t etaRef, Double_t phiRef)
Double_t GetConeClusterEnergy(Double_t etaRef, Double_t phiRef, Double_t R)
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
AliAnalysisTaskEmcalVsPhos()
virtual ~AliAnalysisTaskEmcalVsPhos()
void SetRejectionReasonLabels(TAxis *axis)
void UserCreateOutputObjects()
Main initialization function on the worker.
void UserCreateOutputObjects()
const AliJetIterableContainer accepted() const
Double_t GetJetPt(const AliEmcalJet *jet, Double_t rho)
Bool_t fPlotCaloCentrality
Set whether to bin cluster THnSparse in calorimeter local density.
Bool_t fPlotClusWithoutNonLinCorr
If true, use pre-nonlincorr energy in cluster thnsparse.
DCal acceptance – spans ONLY DCal (no PHOS or gap)
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.
Bool_t fNeedEmcalGeom
whether or not the task needs the emcal geometry
Bool_t fPlotExotics
Set whether to plot exotic cluster study.
Container for jet within the EMCAL jet framework.
TH3 * CreateTH3(const char *name, const char *title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax, int nbinsz, double zmin, double zmax, Option_t *opt="")
Create a new TH2 within the container.
Float_t fMaxPt
Histogram pt limit.
Study of EMCal vs. PHOS clusters.
AliEventCuts fEventCuts
event selection utility
void FillClusterTHnSparse(TString clustersName, Double_t eta, Double_t phi, Double_t Enonlin, Double_t Ehadcorr, Int_t hasMatchedTrack, Double_t M02, Int_t nCells, Int_t passDispersionCut, Double_t distNN, Int_t isOddEta, Int_t coneType=0, Double_t R=0., Double_t Econe=0.)
static Double_t fgkEMCalDCalPhiDivide
phi value used to distinguish between DCal and EMCal