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),
77 fPlotEventHistograms(kFALSE),
85 fUseAliEventCuts(kTRUE),
88 fUseManualEventCuts(kFALSE),
186 while ((obj = next())) {
248 const Int_t nRejBins = 32;
251 const Int_t nExBins = 200;
255 AliEmcalContainer* cont = 0;
257 while ((cont = static_cast<AliEmcalContainer*>(nextClusColl()))) {
260 histname = TString::Format(
"%s/hClusterRejectionReasonEMCal", cont->GetArrayName().Data());
261 htitle = histname +
";Rejection reason;#it{E}_{clus} (GeV/)";
265 histname = TString::Format(
"%s/hClusterRejectionReasonPHOS", cont->GetArrayName().Data());
266 htitle = histname +
";Rejection reason;#it{E}_{clus} (GeV/)";
270 histname = TString::Format(
"%s/hClusterRejectionReasonMC", cont->GetArrayName().Data());
271 htitle = histname +
";Rejection reason;#it{E}_{clus} (GeV/)";
276 const Int_t nEmcalSM = 20;
277 for (
Int_t sm = 0; sm < nEmcalSM; sm++) {
278 histname = TString::Format(
"%s/BySM/hEmcalClusEnergy_SM%d", cont->GetArrayName().Data(), sm);
279 htitle = histname +
";#it{E}_{cluster} (GeV);counts";
283 for (
Int_t sm = 1; sm < 5; sm++) {
284 histname = TString::Format(
"%s/BySM/hPhosClusEnergy_SM%d", cont->GetArrayName().Data(), sm);
285 htitle = histname +
";#it{E}_{cluster} (GeV);counts";
298 title[dim] =
"Centrality %";
334 title[dim] =
"#it{E}_{clus} (GeV)";
342 title[dim] =
"#it{E}_{clus, hadcorr} or #it{E}_{core} (GeV)";
349 title[dim] =
"Matched track";
363 title[dim] =
"Ncells";
370 title[dim] =
"Dispersion cut";
380 title[dim] =
"Even/odd eta";
389 title[dim] =
"#DeltaR_{NN}";
399 title[dim] =
"Cone type";
413 title[dim] =
"#it{E}_{cone} (GeV)";
424 title[dim] =
"#it{#rho}_{cell cone} (GeV)";
431 title[dim] =
"Ncells cone";
439 title[dim] =
"#it{E}_{cell SM} (GeV)";
446 title[dim] =
"Ncells SM";
456 TString thnname = TString::Format(
"%s/clusterObservables", cont->GetArrayName().Data());
458 for (
Int_t i = 0; i < dim; i++) {
459 hn->GetAxis(i)->SetTitle(title[i]);
460 hn->SetBinEdges(i, binEdges[i]);
465 histname = TString::Format(
"%s/hFcrossEMCal", cont->GetArrayName().Data());
466 htitle = histname +
";Centrality (%);Fcross;#it{E}_{clus} (GeV/)";
486 histname = TString::Format(
"Cells/hCellEnergyAll");
487 htitle = histname +
";#it{E}_{cell} (GeV);Centrality (%); Cluster type";
491 histname = TString::Format(
"Cells/hCellEnergyAccepted");
492 htitle = histname +
";#it{E}_{cell} (GeV);Centrality (%); Cluster type";
496 histname = TString::Format(
"Cells/hCellEnergyLeading");
497 htitle = histname +
";#it{E}_{cell} (GeV);Centrality (%); Cluster type";
501 const Int_t nEmcalSM = 20;
502 for (
Int_t sm = 0; sm < nEmcalSM; sm++) {
503 histname = TString::Format(
"Cells/BySM/hEmcalPatchEnergy_SM%d", sm);
504 htitle = histname +
";#it{E}_{cell patch} (GeV);Centrality (%)";
508 for (
Int_t sm = 1; sm < 5; sm++) {
509 histname = TString::Format(
"Cells/BySM/hPhosPatchEnergy_SM%d", sm);
510 htitle = histname +
";#it{E}_{cell patch} (GeV);Centrality (%)";
523 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
526 Int_t nbinsJet[30] = {0};
533 axisTitle[dimJet] =
"Centrality (%)";
541 axisTitle[dimJet] =
"#eta_{jet}";
542 nbinsJet[dimJet] = 28;
543 minJet[dimJet] = -0.7;
544 maxJet[dimJet] = 0.7;
548 axisTitle[dimJet] =
"#phi_{jet} (rad)";
549 nbinsJet[dimJet] = 100;
555 axisTitle[dimJet] =
"#it{E}_{T} (GeV)";
562 axisTitle[dimJet] =
"#rho (GeV/#it{c})";
563 nbinsJet[dimJet] = 100;
565 maxJet[dimJet] = 1000.;
569 axisTitle[dimJet] =
"N_{clusters}";
570 nbinsJet[dimJet] = 20;
571 minJet[dimJet] = -0.5;
572 maxJet[dimJet] = 19.5;
576 axisTitle[dimJet] =
"#it{E}_{T}, acc clus within R (GeV)";
583 axisTitle[dimJet] =
"#it{E}_{T}, acc cell within R (GeV)";
590 TString thnname = TString::Format(
"%s/hClusterJetObservables", jets->GetArrayName().Data());
592 for (
Int_t i = 0; i < dimJet; i++) {
593 hn->GetAxis(i)->SetTitle(axisTitle[i]);
594 hn->SetBinEdges(i, binEdgesJet[i]);
611 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
623 title[dim] =
"Centrality %";
631 title[dim] =
"#it{E}_{clus} (GeV)";
638 title[dim] =
"#it{p}_{T,jet}^{corr}";
645 title[dim] =
"#eta_{jet}";
652 title[dim] =
"#phi_{jet}";
659 TString thnname = TString::Format(
"%s/hClustersInJets", jets->GetArrayName().Data());
661 for (
Int_t i = 0; i < dim; i++) {
662 hn->GetAxis(i)->SetTitle(title[i]);
663 hn->SetBinEdges(i, binEdges[i]);
667 histname = TString::Format(
"%s/hCaloJESshift", jets->GetArrayName().Data());
668 htitle = histname +
";type;#it{p}_{T}^{corr} (GeV/#it{c});#Delta_{JES}";
669 fHistManager.
CreateTH3(histname.Data(), htitle.Data(), 3, -0.5, 2.5,
nPtBins, 0,
fMaxPt, 100, 0, 20);
682 AliEmcalContainer* cont = 0;
684 while ((cont = static_cast<AliEmcalContainer*>(nextClusColl()))) {
695 title[dim] =
"Centrality %";
711 title[dim] =
"#Sigma#it{E}_{clus,EMCal} (GeV)";
718 title[dim] =
"#Sigma#it{E}_{clus,PHOS} (GeV)";
725 title[dim] =
"#Sigma#it{p}_{T,tracks} (GeV)";
732 TString thnname =
"eventObservables";
734 for (
Int_t i = 0; i < dim; i++) {
735 hn->GetAxis(i)->SetTitle(title[i]);
736 hn->SetBinEdges(i, binEdges[i]);
754 fPHOSGeo = AliPHOSGeometry::GetInstance();
756 AliInfo(
"Found instance of PHOS geometry!");
759 AliInfo(
"Creating PHOS geometry!");
760 Int_t runNum = InputEvent()->GetRunNumber();
762 fPHOSGeo = AliPHOSGeometry::GetInstance(
"IHEP");
764 fPHOSGeo = AliPHOSGeometry::GetInstance(
"Run2");
767 AliOADBContainer geomContainer(
"phosGeo");
768 geomContainer.InitFromFile(
"$ALICE_PHYSICS/OADB/PHOS/PHOSMCGeometry.root",
"PHOSMCRotationMatrixes");
769 TObjArray* matrixes = (
TObjArray*)geomContainer.GetObject(runNum,
"PHOSRotationMatrixes");
770 for(
Int_t mod=0; mod<6; mod++) {
771 if(!matrixes->At(mod))
continue;
772 fPHOSGeo->SetMisalMatrix(((TGeoHMatrix*)matrixes->At(mod)),mod);
773 printf(
".........Adding Matrix(%d), geo=%p\n",mod,
fPHOSGeo);
774 ((TGeoHMatrix*)matrixes->At(mod))->
Print();
858 AliVCaloCells* phosCaloCells = InputEvent()->GetPHOSCells();
862 const AliVCluster* clus;
865 while ((clusters = static_cast<AliClusterContainer*>(nextClusColl()))) {
867 clustersName = clusters->GetArrayName();
874 if (clus->IsEMCAL()) {
875 Double_t phi = it->first.Phi_0_2pi();
879 }
else if (isDcal == 1) {
882 }
else if (clus->GetType() == AliVCluster::kPHOSNeutral){
887 if (clus->IsEMCAL()) {
888 histname = TString::Format(
"%s/hClusterRejectionReasonEMCal", clusters->GetArrayName().Data());
889 UInt_t rejectionReason = 0;
890 if (!clusters->
AcceptCluster(it.current_index(), rejectionReason)) {
891 fHistManager.
FillTH2(histname, clusters->GetRejectionReasonBitPosition(rejectionReason), it->first.E());
894 }
else if (clus->GetType() == AliVCluster::kPHOSNeutral){
895 histname = TString::Format(
"%s/hClusterRejectionReasonPHOS", clusters->GetArrayName().Data());
896 UInt_t rejectionReason = 0;
897 if (!clusters->
AcceptCluster(it.current_index(), rejectionReason)) {
898 fHistManager.
FillTH2(histname, clusters->GetRejectionReasonBitPosition(rejectionReason), it->first.E());
908 if (clus->IsEMCAL()) {
910 Ehadcorr = clus->GetHadCorrEnergy();
911 Enonlin = clus->GetNonLinCorrEnergy();
917 histname = TString::Format(
"%s/hFcrossEMCal", clusters->GetArrayName().Data());
922 Int_t sm =
fGeom->GetSuperModuleNumber(clus->GetCellAbsId(0));
923 if (sm >=0 && sm < 20) {
924 histname = TString::Format(
"%s/BySM/hEmcalClusEnergy_SM%d", clusters->GetArrayName().Data(), sm);
928 AliError(Form(
"Supermodule %d does not exist!", sm));
932 histname = TString::Format(
"Cells/hCellEnergyAccepted");
934 for (
Int_t iCell = 0; iCell < clus->GetNCells(); iCell++){
935 absId = clus->GetCellAbsId(iCell);
938 if (ecell > leadEcell) {
944 histname = TString::Format(
"Cells/hCellEnergyLeading");
947 }
else if (clus->GetType() == AliVCluster::kPHOSNeutral){
949 Ehadcorr = clus->GetCoreEnergy();
954 fPHOSGeo->AbsToRelNumbering(clus->GetCellAbsId(0), relid);
956 if (sm >=1 && sm < 5) {
957 histname = TString::Format(
"%s/BySM/hPhosClusEnergy_SM%d", clusters->GetArrayName().Data(), sm);
961 AliError(Form(
"Supermodule %d does not exist!", sm));
966 histname = TString::Format(
"Cells/hCellEnergyAccepted");
968 for (
Int_t iCell = 0; iCell < clus->GetNCells(); iCell++){
969 absId = clus->GetCellAbsId(iCell);
970 ecell = phosCaloCells->GetCellAmplitude(absId);
972 if (ecell > leadEcell) {
977 histname = TString::Format(
"Cells/hCellEnergyLeading");
982 Int_t hasMatchedTrack = -1;
983 Int_t nMatchedTracks = clus->GetNTracksMatched();
984 if (nMatchedTracks == 0) {
986 }
else if (nMatchedTracks > 0) {
991 Int_t passedDispersionCut = 0;
992 if (clus->Chi2() < 2.5*2.5) {
993 passedDispersionCut = 1;
998 Double_t phi = it->first.Phi_0_2pi();
1000 Int_t nCells = clus->GetNCells();
1004 Int_t isOddEta = -1;
1005 Int_t nSupMod, nModule, nIphi, nIeta, iphi, ieta;
1006 if (clus->IsEMCAL()) {
1007 fGeom->GetCellIndex(leadAbsId, nSupMod, nModule, nIphi, nIeta);
1008 fGeom->GetCellPhiEtaIndexInSModule(nSupMod, nModule, nIphi, nIeta, iphi, ieta);
1009 isOddEta = ieta % 2;
1014 FillClusterTHnSparse(clustersName, eta, phi, Enonlin, Ehadcorr, hasMatchedTrack, M02, nCells, passedDispersionCut, distNN, isOddEta);
1020 Int_t nCellsCone = 0;
1023 Double_t areaCone = TMath::Pi() * 0.07 * 0.07;
1029 if (clusType ==
kEMCal) {
1030 sm =
fGeom->GetSuperModuleNumber(clus->GetCellAbsId(0));
1031 areaCell = 0.014*0.014;
1033 if (clusType ==
kPHOS) {
1035 fPHOSGeo->AbsToRelNumbering(clus->GetCellAbsId(0), relid);
1037 areaCell = 0.014*0.014*(2.2/6.0)*(2.2/6.0);
1041 if ( (clusType ==
kEMCal && sm < 10 ) || (clusType ==
kPHOS && sm < 4) ) {
1046 eDensityCone = eCellCone / (areaCone - nCells*areaCell);
1053 FillClusterTHnSparse(clustersName, eta, phi, Enonlin, eDensityCone, eCellSM, nCellsCone, nCellsSM);
1063 FillClusterTHnSparse(clustersName, eta, phi, Enonlin, Ehadcorr, hasMatchedTrack, M02, nCells, passedDispersionCut, distNN, isOddEta, 0, 0.05,
GetConeClusterEnergy(eta, phi, 0.05));
1065 FillClusterTHnSparse(clustersName, eta, phi, Enonlin, Ehadcorr, hasMatchedTrack, M02, nCells, passedDispersionCut, distNN, isOddEta, 0, 0.1,
GetConeClusterEnergy(eta, phi, 0.1));
1067 FillClusterTHnSparse(clustersName, eta, phi, Enonlin, Ehadcorr, hasMatchedTrack, M02, nCells, passedDispersionCut, distNN, isOddEta, 1, 0.05,
GetConeCellEnergy(eta, phi, 0.05));
1069 FillClusterTHnSparse(clustersName, eta, phi, Enonlin, Ehadcorr, hasMatchedTrack, M02, nCells, passedDispersionCut, distNN, isOddEta, 1, 0.1,
GetConeCellEnergy(eta, phi, 0.1));
1080 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)
1083 TString histname = TString::Format(
"%s/clusterObservables", clustersName.Data());
1085 if (!histClusterObservables)
return;
1086 for (
Int_t i = 0; i < histClusterObservables->GetNdimensions(); i++) {
1087 TString title(histClusterObservables->GetAxis(i)->GetTitle());
1088 if (
title==
"Centrality %")
1089 contents[i] =
fCent;
1090 else if (
title==
"#eta")
1092 else if (
title==
"#phi")
1094 else if (
title==
"#it{E}_{clus} (GeV)")
1095 contents[i] = Enonlin;
1096 else if (
title==
"#it{E}_{clus, hadcorr} or #it{E}_{core} (GeV)")
1097 contents[i] = Ehadcorr;
1098 else if (
title==
"Matched track")
1099 contents[i] = hasMatchedTrack;
1100 else if (
title==
"M02")
1102 else if (
title==
"Ncells")
1103 contents[i] = nCells;
1104 else if (
title==
"Dispersion cut")
1105 contents[i] = passedDispersionCut;
1106 else if (
title==
"#DeltaR_{NN}")
1107 contents[i] = distNN;
1108 else if (
title==
"Even/odd eta")
1109 contents[i] = isOddEta;
1110 else if (
title==
"Cone type")
1111 contents[i] = coneType;
1112 else if (
title==
"R")
1114 else if (
title==
"#it{E}_{cone} (GeV)")
1115 contents[i] = Econe;
1117 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1119 histClusterObservables->Fill(contents);
1129 TString histname = TString::Format(
"%s/clusterObservables", clustersName.Data());
1131 if (!histClusterObservables)
return;
1132 for (
Int_t i = 0; i < histClusterObservables->GetNdimensions(); i++) {
1133 TString title(histClusterObservables->GetAxis(i)->GetTitle());
1134 if (
title==
"Centrality %")
1135 contents[i] =
fCent;
1136 else if (
title==
"#eta")
1138 else if (
title==
"#phi")
1140 else if (
title==
"#it{E}_{clus} (GeV)")
1141 contents[i] = Enonlin;
1142 else if (
title==
"#it{#rho}_{cell cone} (GeV)")
1143 contents[i] = eCellCone;
1144 else if (
title==
"Ncells cone")
1145 contents[i] = nCellsCone;
1146 else if (
title==
"#it{E}_{cell SM} (GeV)")
1147 contents[i] = eCellSM;
1148 else if (
title==
"Ncells SM")
1149 contents[i] = nCellsSM;
1151 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1153 histClusterObservables->Fill(contents);
1169 AliVCaloCells* phosCaloCells = InputEvent()->GetPHOSCells();
1182 histname = TString::Format(
"Cells/hCellEnergyAll");
1186 sm =
fGeom->GetSuperModuleNumber(absId);
1187 if (sm >=0 && sm < 20) {
1188 patchSumEMCal[sm] += ecell;
1193 for (
Int_t i=0; i<phosCaloCells->GetNumberOfCells(); i++) {
1195 absId = phosCaloCells->GetCellNumber(i);
1196 ecell = phosCaloCells->GetCellAmplitude(absId);
1203 histname = TString::Format(
"Cells/hCellEnergyAll");
1207 fPHOSGeo->AbsToRelNumbering(absId, relid);
1209 if (sm >=1 && sm < 5) {
1210 patchSumPHOS[sm-1] += ecell;
1215 for (
Int_t sm = 0; sm < 20; sm++) {
1216 histname = TString::Format(
"Cells/BySM/hEmcalPatchEnergy_SM%d", sm);
1220 for (
Int_t sm = 1; sm < 5; sm++) {
1221 histname = TString::Format(
"Cells/BySM/hPhosPatchEnergy_SM%d", sm);
1234 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
1238 TString histname = TString::Format(
"%s/hClusterJetObservables", jets->GetArrayName().Data());
1240 if (!histJetObservables)
return;
1242 for (
auto jet : jets->
accepted()) {
1244 for (
Int_t i = 0; i < histJetObservables->GetNdimensions(); i++) {
1245 TString title(histJetObservables->GetAxis(i)->GetTitle());
1246 if (
title==
"Centrality (%)")
1247 contents[i] =
fCent;
1248 else if (
title==
"#eta_{jet}")
1249 contents[i] = jet->Eta();
1250 else if (
title==
"#phi_{jet} (rad)")
1251 contents[i] = jet->Phi_0_2pi();
1252 else if (
title==
"#it{E}_{T} (GeV)")
1253 contents[i] = jet->Pt();
1254 else if (
title==
"#rho (GeV/#it{c})")
1255 contents[i] = jet->Pt() / jet->Area();
1256 else if (
title==
"N_{clusters}")
1257 contents[i] = jet->GetNumberOfClusters();
1258 else if (
title==
"#it{E}_{T}, acc clus within R (GeV)")
1260 else if (
title==
"#it{E}_{T}, acc cell within R (GeV)")
1263 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1265 histJetObservables->Fill(contents);
1280 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
1284 for (
const auto jet : jets->
accepted()) {
1288 histname = TString::Format(
"%s/hClustersInJets", jets->GetArrayName().Data());
1289 Int_t nClusters = jet->GetNumberOfClusters();
1291 for (
Int_t iClus = 0; iClus < nClusters; iClus++) {
1293 clus = jet->Cluster(iClus);
1296 Double_t x[5] = {
fCent, clus->GetNonLinCorrEnergy(),
GetJetPt(jet, rho), jet->Eta(), jet->Phi_0_2pi()};
1300 Double_t x[4] = {clus->GetNonLinCorrEnergy(),
GetJetPt(jet, rho), jet->Eta(), jet->Phi_0_2pi()};
1313 for (
Int_t iClus = 0; iClus < nClusters; iClus++) {
1314 clus = jet->Cluster(iClus);
1315 eclus = clus->GetNonLinCorrEnergy();
1317 shift = 0.79 * TMath::Exp(-0.5 * ((eclus - 3.81) / 1.50)*((eclus - 3.81) / 1.50) );
1321 histname = TString::Format(
"%s/hCaloJESshift", jets->GetArrayName().Data());
1342 const AliVCluster* clus;
1346 clus = clusIterator.second;
1348 if (clus->IsEMCAL()) {
1349 sumEMCal += clus->GetNonLinCorrEnergy();
1350 }
else if (clus->GetType() == AliVCluster::kPHOSNeutral){
1351 sumPHOS += clus->E();
1358 const AliVTrack* track;
1361 track = trackIterator.second;
1364 if (track->IsEMCAL()) {
1365 sumTracks += track->Pt();
1373 if (!histEventObservables)
return;
1374 for (
Int_t i = 0; i < histEventObservables->GetNdimensions(); i++) {
1375 TString title(histEventObservables->GetAxis(i)->GetTitle());
1376 if (
title==
"Centrality %")
1377 contents[i] =
fCent;
1378 else if (
title==
"#Sigma#it{E}_{clus,EMCal} (GeV)")
1379 contents[i] = sumEMCal;
1380 else if (
title==
"#Sigma#it{E}_{clus,PHOS} (GeV)")
1381 contents[i] = sumPHOS;
1382 else if (
title==
"#Sigma#it{p}_{T,tracks} (GeV)")
1383 contents[i] = sumTracks;
1385 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1387 histEventObservables->Fill(contents);
1406 Double_t deltaEta = TMath::Abs(part.Eta() - etaRef);
1407 Double_t deltaR = TMath::Sqrt( deltaPhi*deltaPhi + deltaEta*deltaEta );
1416 Double_t deltaPhi = TMath::Abs(phi1-phi2);
1417 Double_t deltaEta = TMath::Abs(eta1-eta2);
1418 Double_t deltaR = TMath::Sqrt( deltaPhi*deltaPhi + deltaEta*deltaEta );
1447 Int_t AbsIdseed = -1;
1449 for (
Int_t i = 0; i < cluster->GetNCells(); i++) {
1450 if (cells->GetCellAmplitude(cluster->GetCellAbsId(i)) > Eseed) {
1451 Eseed = cells->GetCellAmplitude(cluster->GetCellAbsId(i));
1452 AbsIdseed = cluster->GetCellAbsId(i);
1460 Int_t imod = -1, iphi =-1, ieta=-1,iTower = -1, iIphi = -1, iIeta = -1;
1461 fGeom->GetCellIndex(AbsIdseed,imod,iTower,iIphi,iIeta);
1462 fGeom->GetCellPhiEtaIndexInSModule(imod,iTower,iIphi,iIeta,iphi,ieta);
1469 if (iphi < AliEMCALGeoParams::fgkEMCALRows-1) {
1470 absID1 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi+1, ieta);
1473 absID2 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi-1, ieta);
1481 if (ieta == AliEMCALGeoParams::fgkEMCALCols-1 && !(imod%2)) {
1482 absID3 =
fGeom->GetAbsCellIdFromCellIndexes(imod+1, iphi, 0);
1483 absID4 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta-1);
1485 else if (ieta == 0 && imod%2) {
1486 absID3 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta+1);
1487 absID4 =
fGeom->GetAbsCellIdFromCellIndexes(imod-1, iphi, AliEMCALGeoParams::fgkEMCALCols-1);
1490 if (ieta < AliEMCALGeoParams::fgkEMCALCols-1) {
1491 absID3 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta+1);
1494 absID4 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta-1);
1498 Double_t ecell1 = cells->GetCellAmplitude(absID1);
1499 Double_t ecell2 = cells->GetCellAmplitude(absID2);
1500 Double_t ecell3 = cells->GetCellAmplitude(absID3);
1501 Double_t ecell4 = cells->GetCellAmplitude(absID4);
1503 Double_t Ecross = ecell1 + ecell2 + ecell3 + ecell4;
1505 Double_t Fcross = 1 - Ecross/Eseed;
1516 Double_t etaRef = clusterRef.Eta();
1524 clusNNcand = clusIterator.first;
1528 if (distNNcand < distNN && distNNcand > 0.001) {
1529 distNN = distNNcand;
1549 clus = clusIterator.first;
1551 if (
GetDeltaR(clus, etaRef, phiRef) < R) {
1569 AliVCaloCells* phosCaloCells = InputEvent()->GetPHOSCells();
1582 fGeom->EtaPhiFromIndex(absId, eta, phi);
1583 phi = TVector2::Phi_0_2pi(phi);
1585 if (
GetDeltaR(eta, phi, etaRef, phiRef) < R) {
1593 energy +=
fCaloCells->GetCellAmplitude(absId);
1599 for (
Int_t i=0; i<phosCaloCells->GetNumberOfCells(); i++) {
1601 absId = phosCaloCells->GetCellNumber(i);
1603 fPHOSGeo->AbsToRelNumbering(absId, relid);
1605 if (sm < 1 || sm > 4) {
1609 fPHOSGeo->RelPosInAlice(absId, pos);
1612 phi = TVector2::Phi_0_2pi(phi);
1614 if (
GetDeltaR(eta, phi, etaRef, phiRef) < R) {
1622 energy += phosCaloCells->GetCellAmplitude(absId);
1647 if (clusType ==
kEMCal) {
1654 cellSM =
fGeom->GetSuperModuleNumber(absId);
1664 energy +=
fCaloCells->GetCellAmplitude(absId);
1671 if (clusType ==
kPHOS) {
1673 AliVCaloCells* phosCaloCells = InputEvent()->GetPHOSCells();
1675 for (
Int_t i=0; i<phosCaloCells->GetNumberOfCells(); i++) {
1677 absId = phosCaloCells->GetCellNumber(i);
1679 fPHOSGeo->AbsToRelNumbering(absId, relid);
1690 energy += phosCaloCells->GetCellAmplitude(absId);
1710 AliVCluster* cluster;
1713 Bool_t skipCell = kFALSE;
1719 if (!clusCont->
AcceptCluster(it.current_index(), rejectionReason)) {
1721 cluster = it->second;
1724 if (cluster->IsEMCAL()) {
1727 if (cluster->GetType() == AliVCluster::kPHOSNeutral) {
1730 if (clusType != cellType) {
1735 for (
Int_t i = 0; i < cluster->GetNCells(); i++) {
1737 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)
Container with name, TClonesArray and cuts for particles.
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
AliParticleContainer * GetParticleContainer(Int_t i=0) const
Get particle container attached to this task.
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 fPlotEventHistograms
Set whether to plot some calo event 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)
void FillEventHistograms()
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
AliAnalysisTaskEmcalVsPhos()
virtual ~AliAnalysisTaskEmcalVsPhos()
const AliTrackIterableMomentumContainer accepted_momentum() const
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.
void AllocateEventHistograms()
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