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"
65 fUseManualEventCuts(kFALSE),
66 fUseAliEventCuts(kTRUE),
72 fPlotNeutralJets(kFALSE),
73 fPlotClustersInJets(kFALSE),
74 fPlotClusterHistograms(kTRUE),
75 fPlotCellHistograms(kTRUE),
76 fPlotClusWithoutNonLinCorr(kFALSE),
78 fPlotStandardClusterTHnSparse(kTRUE),
79 fPlotNearestNeighborDistribution(kFALSE),
80 fPlotClusterCone(kFALSE),
81 fPlotCaloCentrality(kFALSE),
82 fPlotFineGrainedEtaPhi(kFALSE),
83 fPlotEvenOddEta(kFALSE),
84 fPlotCellSMDensity(kFALSE),
100 fUseManualEventCuts(kFALSE),
101 fUseAliEventCuts(kTRUE),
107 fPlotNeutralJets(kFALSE),
108 fPlotClustersInJets(kFALSE),
109 fPlotClusterHistograms(kTRUE),
110 fPlotCellHistograms(kTRUE),
111 fPlotClusWithoutNonLinCorr(kFALSE),
112 fPlotExotics(kFALSE),
113 fPlotStandardClusterTHnSparse(kTRUE),
114 fPlotNearestNeighborDistribution(kFALSE),
115 fPlotClusterCone(kFALSE),
116 fPlotCaloCentrality(kFALSE),
117 fPlotFineGrainedEtaPhi(kFALSE),
118 fPlotEvenOddEta(kFALSE),
119 fPlotCellSMDensity(kFALSE),
168 while ((obj = next())) {
227 const Int_t nRejBins = 32;
230 const Int_t nExBins = 200;
234 AliEmcalContainer* cont = 0;
236 while ((cont = static_cast<AliEmcalContainer*>(nextClusColl()))) {
239 histname = TString::Format(
"%s/hClusterRejectionReasonEMCal", cont->GetArrayName().Data());
240 htitle = histname +
";Rejection reason;#it{E}_{clus} (GeV/)";
244 histname = TString::Format(
"%s/hClusterRejectionReasonPHOS", cont->GetArrayName().Data());
245 htitle = histname +
";Rejection reason;#it{E}_{clus} (GeV/)";
250 const Int_t nEmcalSM = 20;
251 for (
Int_t sm = 0; sm < nEmcalSM; sm++) {
252 histname = TString::Format(
"%s/BySM/hEmcalClusEnergy_SM%d", cont->GetArrayName().Data(), sm);
253 htitle = histname +
";#it{E}_{cluster} (GeV);counts";
257 for (
Int_t sm = 1; sm < 5; sm++) {
258 histname = TString::Format(
"%s/BySM/hPhosClusEnergy_SM%d", cont->GetArrayName().Data(), sm);
259 htitle = histname +
";#it{E}_{cluster} (GeV);counts";
272 title[dim] =
"Centrality %";
300 title[dim] =
"#it{E}_{clus} (GeV)";
308 title[dim] =
"#it{E}_{clus, hadcorr} or #it{E}_{core} (GeV)";
315 title[dim] =
"Matched track";
329 title[dim] =
"Ncells";
336 title[dim] =
"Dispersion cut";
345 title[dim] =
"Even/odd eta";
354 title[dim] =
"#DeltaR_{NN}";
364 title[dim] =
"Cone type";
378 title[dim] =
"#it{E}_{cone} (GeV)";
389 title[dim] =
"#it{E}_{cell cone} (GeV)";
396 title[dim] =
"Ncells cone";
403 title[dim] =
"#it{E}_{cell SM} (GeV)";
410 title[dim] =
"Ncells SM";
419 TString thnname = TString::Format(
"%s/clusterObservables", cont->GetArrayName().Data());
421 for (
Int_t i = 0; i < dim; i++) {
422 hn->GetAxis(i)->SetTitle(title[i]);
423 hn->SetBinEdges(i, binEdges[i]);
428 histname = TString::Format(
"%s/hFcrossEMCal", cont->GetArrayName().Data());
429 htitle = histname +
";Centrality (%);Fcross;#it{E}_{clus} (GeV/)";
449 histname = TString::Format(
"Cells/hCellEnergyAll");
450 htitle = histname +
";#it{E}_{cell} (GeV);Centrality (%); Cluster type";
454 histname = TString::Format(
"Cells/hCellEnergyAccepted");
455 htitle = histname +
";#it{E}_{cell} (GeV);Centrality (%); Cluster type";
459 histname = TString::Format(
"Cells/hCellEnergyLeading");
460 htitle = histname +
";#it{E}_{cell} (GeV);Centrality (%); Cluster type";
464 const Int_t nEmcalSM = 20;
465 for (
Int_t sm = 0; sm < nEmcalSM; sm++) {
466 histname = TString::Format(
"Cells/BySM/hEmcalPatchEnergy_SM%d", sm);
467 htitle = histname +
";#it{E}_{cell patch} (GeV);Centrality (%)";
471 for (
Int_t sm = 1; sm < 5; sm++) {
472 histname = TString::Format(
"Cells/BySM/hPhosPatchEnergy_SM%d", sm);
473 htitle = histname +
";#it{E}_{cell patch} (GeV);Centrality (%)";
486 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
489 Int_t nbinsJet[30] = {0};
496 axisTitle[dimJet] =
"Centrality (%)";
504 axisTitle[dimJet] =
"#eta_{jet}";
505 nbinsJet[dimJet] = 28;
506 minJet[dimJet] = -0.7;
507 maxJet[dimJet] = 0.7;
511 axisTitle[dimJet] =
"#phi_{jet} (rad)";
512 nbinsJet[dimJet] = 100;
518 axisTitle[dimJet] =
"#it{E}_{T} (GeV)";
525 axisTitle[dimJet] =
"#rho (GeV/#it{c})";
526 nbinsJet[dimJet] = 100;
528 maxJet[dimJet] = 1000.;
532 axisTitle[dimJet] =
"N_{clusters}";
533 nbinsJet[dimJet] = 20;
534 minJet[dimJet] = -0.5;
535 maxJet[dimJet] = 19.5;
539 axisTitle[dimJet] =
"#it{E}_{T}, acc clus within R (GeV)";
546 axisTitle[dimJet] =
"#it{E}_{T}, acc cell within R (GeV)";
553 TString thnname = TString::Format(
"%s/hClusterJetObservables", jets->GetArrayName().Data());
555 for (
Int_t i = 0; i < dimJet; i++) {
556 hn->GetAxis(i)->SetTitle(axisTitle[i]);
557 hn->SetBinEdges(i, binEdgesJet[i]);
574 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
586 title[dim] =
"Centrality %";
594 title[dim] =
"#it{E}_{clus} (GeV)";
601 title[dim] =
"#it{p}_{T,jet}^{corr}";
608 title[dim] =
"#eta_{jet}";
615 title[dim] =
"#phi_{jet}";
622 TString thnname = TString::Format(
"%s/hClustersInJets", jets->GetArrayName().Data());
624 for (
Int_t i = 0; i < dim; i++) {
625 hn->GetAxis(i)->SetTitle(title[i]);
626 hn->SetBinEdges(i, binEdges[i]);
630 histname = TString::Format(
"%s/hCaloJESshift", jets->GetArrayName().Data());
631 htitle = histname +
";type;#it{p}_{T}^{corr} (GeV/#it{c});#Delta_{JES}";
632 fHistManager.
CreateTH3(histname.Data(), htitle.Data(), 3, -0.5, 2.5,
nPtBins, 0,
fMaxPt, 100, 0, 20);
648 fPHOSGeo = AliPHOSGeometry::GetInstance();
650 AliInfo(
"Found instance of PHOS geometry!");
653 AliInfo(
"Creating PHOS geometry!");
654 Int_t runNum = InputEvent()->GetRunNumber();
656 fPHOSGeo = AliPHOSGeometry::GetInstance(
"IHEP");
658 fPHOSGeo = AliPHOSGeometry::GetInstance(
"Run2");
661 AliOADBContainer geomContainer(
"phosGeo");
662 geomContainer.InitFromFile(
"$ALICE_PHYSICS/OADB/PHOS/PHOSMCGeometry.root",
"PHOSMCRotationMatrixes");
663 TObjArray* matrixes = (
TObjArray*)geomContainer.GetObject(runNum,
"PHOSRotationMatrixes");
664 for(
Int_t mod=0; mod<6; mod++) {
665 if(!matrixes->At(mod))
continue;
666 fPHOSGeo->SetMisalMatrix(((TGeoHMatrix*)matrixes->At(mod)),mod);
667 printf(
".........Adding Matrix(%d), geo=%p\n",mod,
fPHOSGeo);
668 ((TGeoHMatrix*)matrixes->At(mod))->
Print();
748 AliVCaloCells* phosCaloCells = InputEvent()->GetPHOSCells();
752 const AliVCluster* clus;
755 while ((clusters = static_cast<AliClusterContainer*>(nextClusColl()))) {
757 clustersName = clusters->GetArrayName();
764 if (clus->IsEMCAL()) {
765 Double_t phi = it->first.Phi_0_2pi();
769 }
else if (isDcal == 1) {
772 }
else if (clus->GetType() == AliVCluster::kPHOSNeutral){
777 if (clus->IsEMCAL()) {
778 histname = TString::Format(
"%s/hClusterRejectionReasonEMCal", clusters->GetArrayName().Data());
779 UInt_t rejectionReason = 0;
780 if (!clusters->
AcceptCluster(it.current_index(), rejectionReason)) {
781 fHistManager.
FillTH2(histname, clusters->GetRejectionReasonBitPosition(rejectionReason), it->first.E());
784 }
else if (clus->GetType() == AliVCluster::kPHOSNeutral){
785 histname = TString::Format(
"%s/hClusterRejectionReasonPHOS", clusters->GetArrayName().Data());
786 UInt_t rejectionReason = 0;
787 if (!clusters->
AcceptCluster(it.current_index(), rejectionReason)) {
788 fHistManager.
FillTH2(histname, clusters->GetRejectionReasonBitPosition(rejectionReason), it->first.E());
798 if (clus->IsEMCAL()) {
800 Ehadcorr = clus->GetHadCorrEnergy();
801 Enonlin = clus->GetNonLinCorrEnergy();
807 histname = TString::Format(
"%s/hFcrossEMCal", clusters->GetArrayName().Data());
812 Int_t sm =
fGeom->GetSuperModuleNumber(clus->GetCellAbsId(0));
813 if (sm >=0 && sm < 20) {
814 histname = TString::Format(
"%s/BySM/hEmcalClusEnergy_SM%d", clusters->GetArrayName().Data(), sm);
818 AliError(Form(
"Supermodule %d does not exist!", sm));
822 histname = TString::Format(
"Cells/hCellEnergyAccepted");
824 for (
Int_t iCell = 0; iCell < clus->GetNCells(); iCell++){
825 absId = clus->GetCellAbsId(iCell);
828 if (ecell > leadEcell) {
834 histname = TString::Format(
"Cells/hCellEnergyLeading");
837 }
else if (clus->GetType() == AliVCluster::kPHOSNeutral){
839 Ehadcorr = clus->GetCoreEnergy();
844 fPHOSGeo->AbsToRelNumbering(clus->GetCellAbsId(0), relid);
846 if (sm >=1 && sm < 5) {
847 histname = TString::Format(
"%s/BySM/hPhosClusEnergy_SM%d", clusters->GetArrayName().Data(), sm);
851 AliError(Form(
"Supermodule %d does not exist!", sm));
856 histname = TString::Format(
"Cells/hCellEnergyAccepted");
858 for (
Int_t iCell = 0; iCell < clus->GetNCells(); iCell++){
859 absId = clus->GetCellAbsId(iCell);
860 ecell = phosCaloCells->GetCellAmplitude(absId);
862 if (ecell > leadEcell) {
867 histname = TString::Format(
"Cells/hCellEnergyLeading");
872 Int_t hasMatchedTrack = -1;
873 Int_t nMatchedTracks = clus->GetNTracksMatched();
874 if (nMatchedTracks == 0) {
876 }
else if (nMatchedTracks > 0) {
881 Int_t passedDispersionCut = 0;
882 if (clus->Chi2() < 2.5*2.5) {
883 passedDispersionCut = 1;
888 Double_t phi = it->first.Phi_0_2pi();
890 Int_t nCells = clus->GetNCells();
895 Int_t nSupMod, nModule, nIphi, nIeta, iphi, ieta;
896 if (clus->IsEMCAL()) {
897 fGeom->GetCellIndex(leadAbsId, nSupMod, nModule, nIphi, nIeta);
898 fGeom->GetCellPhiEtaIndexInSModule(nSupMod, nModule, nIphi, nIeta, iphi, ieta);
904 FillClusterTHnSparse(clustersName, eta, phi, Enonlin, Ehadcorr, hasMatchedTrack, M02, nCells, passedDispersionCut, distNN, isOddEta);
915 sm =
fGeom->GetSuperModuleNumber(clus->GetCellAbsId(0));
917 if (clusType ==
kPHOS) {
919 fPHOSGeo->AbsToRelNumbering(clus->GetCellAbsId(0), relid);
924 if ( (clusType ==
kEMCal && sm < 10 ) || (clusType ==
kPHOS && sm < 4) ) {
934 FillClusterTHnSparse(clustersName, eta, phi, Enonlin, eCellCone, eCellSM, nCellsCone, nCellsSM);
944 FillClusterTHnSparse(clustersName, eta, phi, Enonlin, Ehadcorr, hasMatchedTrack, M02, nCells, passedDispersionCut, distNN, isOddEta, 0, 0.05,
GetConeClusterEnergy(eta, phi, 0.05));
946 FillClusterTHnSparse(clustersName, eta, phi, Enonlin, Ehadcorr, hasMatchedTrack, M02, nCells, passedDispersionCut, distNN, isOddEta, 0, 0.1,
GetConeClusterEnergy(eta, phi, 0.1));
948 FillClusterTHnSparse(clustersName, eta, phi, Enonlin, Ehadcorr, hasMatchedTrack, M02, nCells, passedDispersionCut, distNN, isOddEta, 1, 0.05,
GetConeCellEnergy(eta, phi, 0.05));
950 FillClusterTHnSparse(clustersName, eta, phi, Enonlin, Ehadcorr, hasMatchedTrack, M02, nCells, passedDispersionCut, distNN, isOddEta, 1, 0.1,
GetConeCellEnergy(eta, phi, 0.1));
961 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)
964 TString histname = TString::Format(
"%s/clusterObservables", clustersName.Data());
966 if (!histClusterObservables)
return;
967 for (
Int_t i = 0; i < histClusterObservables->GetNdimensions(); i++) {
968 TString title(histClusterObservables->GetAxis(i)->GetTitle());
969 if (
title==
"Centrality %")
971 else if (
title==
"#eta")
973 else if (
title==
"#phi")
975 else if (
title==
"#it{E}_{clus} (GeV)")
976 contents[i] = Enonlin;
977 else if (
title==
"#it{E}_{clus, hadcorr} or #it{E}_{core} (GeV)")
978 contents[i] = Ehadcorr;
979 else if (
title==
"Matched track")
980 contents[i] = hasMatchedTrack;
981 else if (
title==
"M02")
983 else if (
title==
"Ncells")
984 contents[i] = nCells;
985 else if (
title==
"Dispersion cut")
986 contents[i] = passedDispersionCut;
987 else if (
title==
"#DeltaR_{NN}")
988 contents[i] = distNN;
989 else if (
title==
"Even/odd eta")
990 contents[i] = isOddEta;
991 else if (
title==
"Cone type")
992 contents[i] = coneType;
995 else if (
title==
"#it{E}_{cone} (GeV)")
998 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1000 histClusterObservables->Fill(contents);
1010 TString histname = TString::Format(
"%s/clusterObservables", clustersName.Data());
1012 if (!histClusterObservables)
return;
1013 for (
Int_t i = 0; i < histClusterObservables->GetNdimensions(); i++) {
1014 TString title(histClusterObservables->GetAxis(i)->GetTitle());
1015 if (
title==
"Centrality %")
1016 contents[i] =
fCent;
1017 else if (
title==
"#eta")
1019 else if (
title==
"#phi")
1021 else if (
title==
"#it{E}_{clus} (GeV)")
1022 contents[i] = Enonlin;
1023 else if (
title==
"#it{E}_{cell cone} (GeV)")
1024 contents[i] = eCellCone;
1025 else if (
title==
"Ncells cone")
1026 contents[i] = nCellsCone;
1027 else if (
title==
"#it{E}_{cell SM} (GeV)")
1028 contents[i] = eCellSM;
1029 else if (
title==
"Ncells SM")
1030 contents[i] = nCellsSM;
1032 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1034 histClusterObservables->Fill(contents);
1050 AliVCaloCells* phosCaloCells = InputEvent()->GetPHOSCells();
1063 histname = TString::Format(
"Cells/hCellEnergyAll");
1067 sm =
fGeom->GetSuperModuleNumber(absId);
1068 if (sm >=0 && sm < 20) {
1069 patchSumEMCal[sm] += ecell;
1074 for (
Int_t i=0; i<phosCaloCells->GetNumberOfCells(); i++) {
1076 absId = phosCaloCells->GetCellNumber(i);
1077 ecell = phosCaloCells->GetCellAmplitude(absId);
1080 histname = TString::Format(
"Cells/hCellEnergyAll");
1084 fPHOSGeo->AbsToRelNumbering(absId, relid);
1086 if (sm >=1 && sm < 5) {
1087 patchSumPHOS[sm-1] += ecell;
1092 for (
Int_t sm = 0; sm < 20; sm++) {
1093 histname = TString::Format(
"Cells/BySM/hEmcalPatchEnergy_SM%d", sm);
1097 for (
Int_t sm = 1; sm < 5; sm++) {
1098 histname = TString::Format(
"Cells/BySM/hPhosPatchEnergy_SM%d", sm);
1111 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
1115 TString histname = TString::Format(
"%s/hClusterJetObservables", jets->GetArrayName().Data());
1117 if (!histJetObservables)
return;
1119 for (
auto jet : jets->
accepted()) {
1121 for (
Int_t i = 0; i < histJetObservables->GetNdimensions(); i++) {
1122 TString title(histJetObservables->GetAxis(i)->GetTitle());
1123 if (
title==
"Centrality (%)")
1124 contents[i] =
fCent;
1125 else if (
title==
"#eta_{jet}")
1126 contents[i] = jet->Eta();
1127 else if (
title==
"#phi_{jet} (rad)")
1128 contents[i] = jet->Phi_0_2pi();
1129 else if (
title==
"#it{E}_{T} (GeV)")
1130 contents[i] = jet->Pt();
1131 else if (
title==
"#rho (GeV/#it{c})")
1132 contents[i] = jet->Pt() / jet->Area();
1133 else if (
title==
"N_{clusters}")
1134 contents[i] = jet->GetNumberOfClusters();
1135 else if (
title==
"#it{E}_{T}, acc clus within R (GeV)")
1137 else if (
title==
"#it{E}_{T}, acc cell within R (GeV)")
1140 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1142 histJetObservables->Fill(contents);
1157 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
1161 for (
const auto jet : jets->
accepted()) {
1165 histname = TString::Format(
"%s/hClustersInJets", jets->GetArrayName().Data());
1166 Int_t nClusters = jet->GetNumberOfClusters();
1168 for (
Int_t iClus = 0; iClus < nClusters; iClus++) {
1169 clus = jet->Cluster(iClus);
1181 for (
Int_t iClus = 0; iClus < nClusters; iClus++) {
1182 clus = jet->Cluster(iClus);
1185 shift = 0.79 * TMath::Exp(-0.5 * ((eclus - 3.81) / 1.50)*((eclus - 3.81) / 1.50) );
1189 histname = TString::Format(
"%s/hCaloJESshift", jets->GetArrayName().Data());
1213 Double_t deltaEta = TMath::Abs(part.Eta() - etaRef);
1214 Double_t deltaR = TMath::Sqrt( deltaPhi*deltaPhi + deltaEta*deltaEta );
1223 Double_t deltaPhi = TMath::Abs(phi1-phi2);
1224 Double_t deltaEta = TMath::Abs(eta1-eta2);
1225 Double_t deltaR = TMath::Sqrt( deltaPhi*deltaPhi + deltaEta*deltaEta );
1254 Int_t AbsIdseed = -1;
1256 for (
Int_t i = 0; i < cluster->GetNCells(); i++) {
1257 if (cells->GetCellAmplitude(cluster->GetCellAbsId(i)) > Eseed) {
1258 Eseed = cells->GetCellAmplitude(cluster->GetCellAbsId(i));
1259 AbsIdseed = cluster->GetCellAbsId(i);
1267 Int_t imod = -1, iphi =-1, ieta=-1,iTower = -1, iIphi = -1, iIeta = -1;
1268 fGeom->GetCellIndex(AbsIdseed,imod,iTower,iIphi,iIeta);
1269 fGeom->GetCellPhiEtaIndexInSModule(imod,iTower,iIphi,iIeta,iphi,ieta);
1276 if (iphi < AliEMCALGeoParams::fgkEMCALRows-1) {
1277 absID1 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi+1, ieta);
1280 absID2 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi-1, ieta);
1288 if (ieta == AliEMCALGeoParams::fgkEMCALCols-1 && !(imod%2)) {
1289 absID3 =
fGeom->GetAbsCellIdFromCellIndexes(imod+1, iphi, 0);
1290 absID4 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta-1);
1292 else if (ieta == 0 && imod%2) {
1293 absID3 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta+1);
1294 absID4 =
fGeom->GetAbsCellIdFromCellIndexes(imod-1, iphi, AliEMCALGeoParams::fgkEMCALCols-1);
1297 if (ieta < AliEMCALGeoParams::fgkEMCALCols-1) {
1298 absID3 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta+1);
1301 absID4 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta-1);
1305 Double_t ecell1 = cells->GetCellAmplitude(absID1);
1306 Double_t ecell2 = cells->GetCellAmplitude(absID2);
1307 Double_t ecell3 = cells->GetCellAmplitude(absID3);
1308 Double_t ecell4 = cells->GetCellAmplitude(absID4);
1310 Double_t Ecross = ecell1 + ecell2 + ecell3 + ecell4;
1312 Double_t Fcross = 1 - Ecross/Eseed;
1323 Double_t etaRef = clusterRef.Eta();
1331 clusNNcand = clusIterator.first;
1335 if (distNNcand < distNN && distNNcand > 0.001) {
1336 distNN = distNNcand;
1356 clus = clusIterator.first;
1358 if (
GetDeltaR(clus, etaRef, phiRef) < R) {
1376 AliVCaloCells* phosCaloCells = InputEvent()->GetPHOSCells();
1389 fGeom->EtaPhiFromIndex(absId, eta, phi);
1390 phi = TVector2::Phi_0_2pi(phi);
1392 if (
GetDeltaR(eta, phi, etaRef, phiRef) < R) {
1398 energy +=
fCaloCells->GetCellAmplitude(absId);
1404 for (
Int_t i=0; i<phosCaloCells->GetNumberOfCells(); i++) {
1406 absId = phosCaloCells->GetCellNumber(i);
1408 fPHOSGeo->AbsToRelNumbering(absId, relid);
1410 if (sm < 1 || sm > 4) {
1414 fPHOSGeo->RelPosInAlice(absId, pos);
1417 phi = TVector2::Phi_0_2pi(phi);
1419 if (
GetDeltaR(eta, phi, etaRef, phiRef) < R) {
1425 energy += phosCaloCells->GetCellAmplitude(absId);
1450 if (clusType ==
kEMCal) {
1457 cellSM =
fGeom->GetSuperModuleNumber(absId);
1465 energy +=
fCaloCells->GetCellAmplitude(absId);
1472 if (clusType ==
kPHOS) {
1474 AliVCaloCells* phosCaloCells = InputEvent()->GetPHOSCells();
1476 for (
Int_t i=0; i<phosCaloCells->GetNumberOfCells(); i++) {
1478 absId = phosCaloCells->GetCellNumber(i);
1480 fPHOSGeo->AbsToRelNumbering(absId, relid);
1489 energy += phosCaloCells->GetCellAmplitude(absId);
1509 AliVCluster* cluster;
1512 Bool_t skipCell = kFALSE;
1518 if (!clusCont->
AcceptCluster(it.current_index(), rejectionReason)) {
1520 cluster = it->second;
1523 if (cluster->IsEMCAL()) {
1526 if (cluster->GetType() == AliVCluster::kPHOSNeutral) {
1529 if (clusType != cellType) {
1534 for (
Int_t i = 0; i < cluster->GetNCells(); i++) {
1536 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()
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
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
virtual Bool_t IsEventSelected()
Performing event selection.
static Double_t * GenerateFixedBinArray(Int_t n, Double_t min, Double_t max)
void AllocateCaloHistograms()
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