Skip to content

Commit a21d449

Browse files
authored
[PWGJE] EMCALQAtask: Add position difference histogram (#12878)
1 parent 022eca8 commit a21d449

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

PWGJE/Tasks/taskEmcExtensiveMcQa.cxx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ struct TaskEmcExtensiveMcQa {
105105
ConfigurableAxis clusterNContributor{"clusterNContributor", {20, 0.5, 20.5}, "binning for the number of contributor of a cluster"};
106106
ConfigurableAxis clusterEnergyRatio{"clusterEnergyRatio", {100, 0., 10.}, "binning for ratio of the deposited energy of the leading particle to its generated momentum cluster"};
107107
ConfigurableAxis collisionCent{"collisionCent", {10, 0., 100.}, "binning for the event centrality"};
108+
ConfigurableAxis clusterEtaReso{"clusterEtaReso", {100, -0.1, 0.1}, "binning for cluster position resolution in eta"};
109+
ConfigurableAxis clusterPhiReso{"clusterPhiReso", {100, -0.1, 0.1}, "binning for cluster position resolution in phi"};
108110

109111
std::vector<float> mCellTime;
110112

@@ -127,6 +129,10 @@ struct TaskEmcExtensiveMcQa {
127129
const AxisSpec axisLeadingEnergy{clusterEnergy, "#it{E}_{lead} (GeV)"};
128130
const AxisSpec axisLeadingGenMomentum{clusterEnergy, "#it{p}_{lead, gen} (GeV/#it{c})"};
129131
const AxisSpec axisLeadingRatio{clusterEnergy, "#it{E}_{lead}/#it{p}_{lead, gen} (#it{c})"};
132+
const AxisSpec axisEtaReso{clusterEtaReso, "#Delta#eta"};
133+
const AxisSpec axisPhiReso{clusterPhiReso, "#Delta#varphi (rad)"};
134+
135+
const AxisSpec axisSM{{20, -0.5, 19.5}, "SM"};
130136

131137
// create histograms
132138

@@ -138,6 +144,8 @@ struct TaskEmcExtensiveMcQa {
138144
mHistManager.add("hSparseClusterContributors", "THnSparse with cluster contributors and energies", HistType::kTHnSparseF, {axisEnergy, axisParticle, axisNContributor, axisLeadingEnergy, axisLeadingGenMomentum, axisLeadingRatio, axisCent});
139145
mHistManager.add("clusterEtaPhi", "Eta and phi of cluster", HistType::kTH2F, {{140, -0.7, 0.7}, {360, 0, o2::constants::math::TwoPI}});
140146

147+
mHistManager.add("hSparsePosReso", "THnSparse for cluster position resolution", HistType::kTHnSparseF, {axisEnergy, axisEtaReso, axisPhiReso, axisNCell, axisSM, axisParticle, axisNContributor, axisCent});
148+
141149
hfEvSel.addHistograms(mHistManager);
142150

143151
ccdb->setURL(ccdbUrl);
@@ -213,8 +221,12 @@ struct TaskEmcExtensiveMcQa {
213221
float momentum = mainMcParticle.p();
214222
float leadingEnergy = cluster.energy() * cluster.amplitudeA()[0];
215223
float leadingFraction = leadingEnergy / momentum;
224+
float dEta = cluster.eta() - mainMcParticle.eta();
225+
float dPhi = cluster.phi() - mainMcParticle.phi();
226+
int iSM = mGeometry->SuperModuleNumberFromEtaPhi(cluster.eta(), cluster.phi());
216227
mHistManager.fill(HIST("hSparseClusterQA"), cluster.energy(), cluster.m02(), cluster.m20(), cluster.nCells(), radius, findPoIType(mainMcParticle), cluster.mcParticle().size(), cent);
217228
mHistManager.fill(HIST("hSparseClusterContributors"), cluster.energy(), findPoIType(mainMcParticle), cluster.mcParticle().size(), leadingEnergy, momentum, leadingFraction, cent);
229+
mHistManager.fill(HIST("hSparsePosReso"), cluster.energy(), dEta, dPhi, cluster.nCells(), iSM, findPoIType(mainMcParticle), cluster.mcParticle().size(), cent);
218230
}
219231
}
220232
}

0 commit comments

Comments
 (0)