Skip to content

Commit a2c6af3

Browse files
authored
[PWGCF] add QA for weighted centrality (#12337)
1 parent d02db97 commit a2c6af3

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

PWGCF/TwoParticleCorrelations/Tasks/diHadronCor.cxx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,9 @@ struct DiHadronCor {
262262
registry.add("pTCorrected", "pTCorrected", {HistType::kTH1D, {axisPtTrigger}});
263263
registry.add("Nch", "N_{ch}", {HistType::kTH1D, {axisMultiplicity}});
264264
registry.add("Nch_used", "N_{ch}", {HistType::kTH1D, {axisMultiplicity}}); // histogram to see how many events are in the same and mixed event
265-
registry.add("Centrality", hCentTitle.c_str(), {HistType::kTH1D, {axisCentrality}});
266-
registry.add("Centrality_used", hCentTitle.c_str(), {HistType::kTH1D, {axisCentrality}}); // histogram to see how many events are in the same and mixed event
265+
registry.add("Centrality", hCentTitle.c_str(), {HistType::kTH1D, {{100, 0, 100}}});
266+
registry.add("CentralityWeighted", hCentTitle.c_str(), {HistType::kTH1D, {{100, 0, 100}}});
267+
registry.add("Centrality_used", hCentTitle.c_str(), {HistType::kTH1D, {{100, 0, 100}}}); // histogram to see how many events are in the same and mixed event
267268
registry.add("zVtx", "zVtx", {HistType::kTH1D, {axisVertex}});
268269
registry.add("zVtx_used", "zVtx_used", {HistType::kTH1D, {axisVertex}});
269270
registry.add("Trig_hist", "", {HistType::kTHnSparseF, {{axisSample, axisVertex, axisPtTrigger}}});
@@ -718,13 +719,16 @@ struct DiHadronCor {
718719
return;
719720
auto bc = collision.bc_as<aod::BCsWithTimestamps>();
720721
float cent = -1.;
721-
if (!cfgCentTableUnavailable)
722-
cent = getCentrality(collision);
722+
float weightCent = 1.0f;
723723
if (cfgUseAdditionalEventCut && !eventSelected(collision, tracks.size(), cent, true))
724724
return;
725-
726-
if (!cfgCentTableUnavailable)
725+
loadCorrection(bc.timestamp());
726+
if (!cfgCentTableUnavailable) {
727+
cent = getCentrality(collision);
728+
getCentralityWeight(weightCent, cent);
727729
registry.fill(HIST("Centrality"), cent);
730+
registry.fill(HIST("CentralityWeighted"), cent, weightCent);
731+
}
728732
registry.fill(HIST("Nch"), tracks.size());
729733
registry.fill(HIST("zVtx"), collision.posZ());
730734

@@ -735,12 +739,8 @@ struct DiHadronCor {
735739
return;
736740
}
737741

738-
loadCorrection(bc.timestamp());
739742
registry.fill(HIST("eventcount"), SameEvent); // because its same event i put it in the 1 bin
740743
fillYield(collision, tracks);
741-
float weightCent = 1.0f;
742-
if (!cfgCentTableUnavailable)
743-
getCentralityWeight(weightCent, cent);
744744

745745
same->fillEvent(tracks.size(), CorrelationContainer::kCFStepReconstructed);
746746
fillCorrelations<CorrelationContainer::kCFStepReconstructed>(tracks, tracks, collision.posZ(), SameEvent, getMagneticField(bc.timestamp()), cent, weightCent);

0 commit comments

Comments
 (0)