Skip to content

Commit 25dcd41

Browse files
joonsukbaeclaude
andauthored
[PWGJE] Add hybrid response matrix (UE-sub reco x raw truth) to jetSpectraCharged (#15600)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 00146e5 commit 25dcd41

File tree

2 files changed

+24
-21
lines changed

2 files changed

+24
-21
lines changed

PWGJE/Tasks/jetSpectraCharged.cxx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ struct JetSpectraCharged {
6363
Configurable<float> pTHatMaxMCD{"pTHatMaxMCD", 999.0, "maximum fraction of hard scattering for jet acceptance in detector MC"};
6464
Configurable<float> pTHatMaxMCP{"pTHatMaxMCP", 999.0, "maximum fraction of hard scattering for jet acceptance in particle MC"};
6565
Configurable<float> pTHatExponent{"pTHatExponent", 6.0, "exponent of the event weight for the calculation of pTHat"};
66+
Configurable<float> simPtRef{"simPtRef", 10.0, "reference pT for the back-calculation of pTHat from the event weight"};
6667
Configurable<float> pTHatAbsoluteMin{"pTHatAbsoluteMin", -99.0, "minimum value of pTHat"};
6768
Configurable<double> jetPtMax{"jetPtMax", 200., "set jet pT bin max"};
6869
Configurable<float> jetEtaMin{"jetEtaMin", -0.7, "minimum jet pseudorapidity"};
@@ -261,6 +262,7 @@ struct JetSpectraCharged {
261262
if (doprocessJetsMatchedAreaSub || doprocessJetsMatchedAreaSubWeighted) {
262263
registry.add("h2_jet_pt_mcd_jet_pt_mcp_matchedgeo_rhoareasubtracted_mcdetaconstraint", "corr pT mcd vs. corr cpT mcp;#it{p}_{T,jet}^{mcd} (GeV/#it{c});#it{p}_{T,jet}^{mcp} (GeV/#it{c})", {HistType::kTH2F, {jetPtAxisRhoAreaSub, jetPtAxisRhoAreaSub}}, doSumw2);
263264
registry.add("h2_jet_pt_mcd_jet_pt_mcp_matchedgeo_rhoareasubtracted_mcpetaconstraint", "corr pT mcd vs. corr cpT mcp;#it{p}_{T,jet}^{mcd} (GeV/#it{c});#it{p}_{T,jet}^{mcp} (GeV/#it{c})", {HistType::kTH2F, {jetPtAxisRhoAreaSub, jetPtAxisRhoAreaSub}}, doSumw2);
265+
registry.add("h2_jet_pt_mcd_rhoareasubtracted_jet_pt_mcp_matchedgeo_mcdetaconstraint", "UEsub pT mcd vs. raw pT mcp;#it{p}_{T,jet}^{mcd} - #rho#it{A} (GeV/#it{c});#it{p}_{T,jet}^{mcp} (GeV/#it{c})", {HistType::kTH2F, {jetPtAxisRhoAreaSub, jetPtAxis}}, doSumw2);
264266
registry.add("h2_jet_pt_mcp_jet_pt_diff_matchedgeo_rhoareasubtracted", "jet mcp corr pT vs. corr delta pT / jet mcp corr pt;#it{p}_{T,jet}^{mcp} (GeV/#it{c}); (#it{p}_{T,jet}^{mcp} (GeV/#it{c}) - #it{p}_{T,jet}^{mcd} (GeV/#it{c})) / #it{p}_{T,jet}^{mcp} (GeV/#it{c})", {HistType::kTH2F, {jetPtAxisRhoAreaSub, {1000, -5.0, 5.0}}}, doSumw2);
265267
registry.add("h2_jet_pt_mcd_jet_pt_diff_matchedgeo_rhoareasubtracted", "jet mcd corr pT vs. corr delta pT / jet mcd corr pt;#it{p}_{T,jet}^{mcd} (GeV/#it{c}); (#it{p}_{T,jet}^{mcd} (GeV/#it{c}) - #it{p}_{T,jet}^{mcp} (GeV/#it{c})) / #it{p}_{T,jet}^{mcd} (GeV/#it{c})", {HistType::kTH2F, {jetPtAxisRhoAreaSub, {1000, -5.0, 5.0}}}, doSumw2);
266268
registry.add("h2_jet_pt_mcp_jet_pt_ratio_matchedgeo_rhoareasubtracted", "jet mcp corr pT vs. jet mcd corr pT / jet mcp corr pt;#it{p}_{T,jet}^{mcp} (GeV/#it{c}); #it{p}_{T,jet}^{mcd} (GeV/#it{c}) / #it{p}_{T,jet}^{mcp} (GeV/#it{c})", {HistType::kTH2F, {jetPtAxisRhoAreaSub, {1000, -5.0, 5.0}}}, doSumw2);
@@ -676,6 +678,7 @@ struct JetSpectraCharged {
676678
double dcorrpt = corrBasejetpt - corrTagjetpt;
677679
if (jetfindingutilities::isInEtaAcceptance(jetMCD, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax)) {
678680
registry.fill(HIST("h2_jet_pt_mcd_jet_pt_mcp_matchedgeo_rhoareasubtracted_mcdetaconstraint"), corrBasejetpt, corrTagjetpt, weight);
681+
registry.fill(HIST("h2_jet_pt_mcd_rhoareasubtracted_jet_pt_mcp_matchedgeo_mcdetaconstraint"), corrBasejetpt, jetMCP.pt(), weight);
679682
registry.fill(HIST("h2_jet_pt_mcd_jet_pt_diff_matchedgeo_rhoareasubtracted"), corrBasejetpt, dcorrpt / corrBasejetpt, weight);
680683
}
681684
if (jetfindingutilities::isInEtaAcceptance(jetMCP, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax)) {
@@ -715,7 +718,7 @@ struct JetSpectraCharged {
715718

716719
registry.fill(HIST("h_collisions_zvertex"), collision.posZ(), eventWeight);
717720

718-
float pTHat = 10. / (std::pow(eventWeight, 1.0 / pTHatExponent));
721+
float pTHat = simPtRef / (std::pow(eventWeight, 1.0 / pTHatExponent));
719722
registry.fill(HIST("h_coll_phat"), pTHat);
720723
registry.fill(HIST("h_coll_phat_weighted"), pTHat, eventWeight);
721724
}
@@ -744,7 +747,7 @@ struct JetSpectraCharged {
744747

745748
registry.fill(HIST("h_mccollisions_zvertex"), mccollision.posZ(), eventWeight);
746749

747-
float pTHat = 10. / (std::pow(eventWeight, 1.0 / pTHatExponent));
750+
float pTHat = simPtRef / (std::pow(eventWeight, 1.0 / pTHatExponent));
748751
registry.fill(HIST("h_mccoll_phat"), pTHat);
749752
registry.fill(HIST("h_mccoll_phat_weighted"), pTHat, eventWeight);
750753
}
@@ -853,7 +856,7 @@ struct JetSpectraCharged {
853856
if (!applyCollisionCuts(collision, fillHistograms, isWeighted, eventWeight)) {
854857
return;
855858
}
856-
float pTHat = collision.has_mcCollision() && collision.mcCollision().ptHard() < 999.0f ? collision.mcCollision().ptHard() : 10. / (std::pow(eventWeight, 1.0 / pTHatExponent));
859+
float pTHat = collision.has_mcCollision() && collision.mcCollision().ptHard() < 999.0f ? collision.mcCollision().ptHard() : simPtRef / (std::pow(eventWeight, 1.0 / pTHatExponent));
857860
float centrality = -1.0;
858861
checkCentFT0M ? centrality = collision.centFT0M() : centrality = collision.centFT0C();
859862

@@ -880,7 +883,7 @@ struct JetSpectraCharged {
880883
if (!applyCollisionCuts(collision, fillHistograms, isWeighted, eventWeight)) {
881884
return;
882885
}
883-
float pTHat = collision.has_mcCollision() && collision.mcCollision().ptHard() < 999.0f ? collision.mcCollision().ptHard() : 10. / (std::pow(eventWeight, 1.0 / pTHatExponent));
886+
float pTHat = collision.has_mcCollision() && collision.mcCollision().ptHard() < 999.0f ? collision.mcCollision().ptHard() : simPtRef / (std::pow(eventWeight, 1.0 / pTHatExponent));
884887
float centrality = -1.0;
885888
checkCentFT0M ? centrality = collision.centFT0M() : centrality = collision.centFT0C();
886889

@@ -1123,7 +1126,7 @@ struct JetSpectraCharged {
11231126
if (!applyMCCollisionCuts(mccollision, collisions, fillHistograms, isWeighted, eventWeight)) {
11241127
return;
11251128
}
1126-
float pTHat = mccollision.ptHard() < 999.0f ? mccollision.ptHard() : 10. / (std::pow(eventWeight, 1.0 / pTHatExponent));
1129+
float pTHat = mccollision.ptHard() < 999.0f ? mccollision.ptHard() : simPtRef / (std::pow(eventWeight, 1.0 / pTHatExponent));
11271130
for (auto const& jet : jets) {
11281131
if (!jetfindingutilities::isInEtaAcceptance(jet, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax)) {
11291132
continue;
@@ -1155,7 +1158,7 @@ struct JetSpectraCharged {
11551158
if (!applyMCCollisionCuts(mccollision, collisions, fillHistograms, isWeighted, eventWeight)) {
11561159
return;
11571160
}
1158-
float pTHat = mccollision.ptHard() < 999.0f ? mccollision.ptHard() : 10. / (std::pow(eventWeight, 1.0 / pTHatExponent));
1161+
float pTHat = mccollision.ptHard() < 999.0f ? mccollision.ptHard() : simPtRef / (std::pow(eventWeight, 1.0 / pTHatExponent));
11591162
registry.fill(HIST("h_mccollisions_rho"), mccollision.rho(), eventWeight);
11601163

11611164
for (auto const& jet : jets) {
@@ -1246,7 +1249,7 @@ struct JetSpectraCharged {
12461249
if (!applyCollisionCuts(collision, fillHistograms, isWeighted, eventWeight)) {
12471250
return;
12481251
}
1249-
float pTHat = collision.has_mcCollision() && collision.mcCollision().ptHard() < 999.0f ? collision.mcCollision().ptHard() : 10. / (std::pow(eventWeight, 1.0 / pTHatExponent));
1252+
float pTHat = collision.has_mcCollision() && collision.mcCollision().ptHard() < 999.0f ? collision.mcCollision().ptHard() : simPtRef / (std::pow(eventWeight, 1.0 / pTHatExponent));
12501253
for (const auto& mcdjet : mcdjets) {
12511254
if (!isAcceptedJet<aod::JetTracks>(mcdjet)) {
12521255
continue;
@@ -1289,7 +1292,7 @@ struct JetSpectraCharged {
12891292
if (!applyCollisionCuts(collision, fillHistograms, isWeighted, eventWeight)) {
12901293
return;
12911294
}
1292-
float pTHat = collision.has_mcCollision() && collision.mcCollision().ptHard() < 999.0f ? collision.mcCollision().ptHard() : 10. / (std::pow(eventWeight, 1.0 / pTHatExponent));
1295+
float pTHat = collision.has_mcCollision() && collision.mcCollision().ptHard() < 999.0f ? collision.mcCollision().ptHard() : simPtRef / (std::pow(eventWeight, 1.0 / pTHatExponent));
12931296

12941297
double mcrho = collision.has_mcCollision() ? collision.mcCollision_as<JetBkgRhoMcCollisions>().rho() : -1;
12951298

PWGJE/Tasks/trackEfficiency.cxx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ struct TrackEfficiency {
8686
Configurable<float> ptHatMin{"ptHatMin", -999, "min pT hat of collisions"};
8787
Configurable<float> ptHatMax{"ptHatMax", 999, "max pT hat of collisions"};
8888
Configurable<float> pTHatExponent{"pTHatExponent", 4.0, "exponent of the event weight for the calculation of pTHat"};
89+
Configurable<float> simPtRef{"simPtRef", 10.0, "reference pT for the back-calculation of pTHat from the event weight"};
8990
Configurable<float> pTHatMaxFractionMCD{"pTHatMaxFractionMCD", 999.0, "maximum fraction of hard scattering for reconstructed track acceptance in MC"};
9091
Configurable<float> pTHatMaxFractionMCP{"pTHatMaxFractionMCP", 999.0, "maximum fraction of hard scattering for particle acceptance in MC"};
9192

@@ -105,7 +106,6 @@ struct TrackEfficiency {
105106

106107
std::vector<int> eventSelectionBits;
107108
int trackSelection = -1;
108-
float simPtRef = 10.;
109109

110110
enum AcceptSplitCollisionsOptions {
111111
NonSplitOnly = 0,
@@ -476,7 +476,7 @@ struct TrackEfficiency {
476476
}
477477
registry.fill(HIST("hMcCollCutsCounts"), 5.5); // at least one of the reconstructed collisions associated with this mcCollision is selected with regard to centrality
478478

479-
float pTHat = mcCollision.ptHard() < 999.0f ? mcCollision.ptHard() : 10. / (std::pow(mcCollision.weight(), 1.0 / pTHatExponent));
479+
float pTHat = mcCollision.ptHard() < 999.0f ? mcCollision.ptHard() : simPtRef / (std::pow(mcCollision.weight(), 1.0 / pTHatExponent));
480480
if (pTHat < ptHatMin || pTHat > ptHatMax) { // only allows mcCollisions with weight in between min and max
481481
return;
482482
}
@@ -819,7 +819,7 @@ struct TrackEfficiency {
819819
return;
820820
}
821821

822-
float pTHat = collision.mcCollision().ptHard() < 999.0f ? collision.mcCollision().ptHard() : 10. / (std::pow(collision.mcCollision().weight(), 1.0 / pTHatExponent));
822+
float pTHat = collision.mcCollision().ptHard() < 999.0f ? collision.mcCollision().ptHard() : simPtRef / (std::pow(collision.mcCollision().weight(), 1.0 / pTHatExponent));
823823
if (pTHat < ptHatMin || pTHat > ptHatMax) { // only allows mcCollisions with weight in between min and max
824824
return;
825825
}
@@ -848,7 +848,7 @@ struct TrackEfficiency {
848848
return;
849849
}
850850

851-
float pTHat = collision.mcCollision().ptHard() < 999.0f ? collision.mcCollision().ptHard() : 10. / (std::pow(eventWeight, 1.0 / pTHatExponent));
851+
float pTHat = collision.mcCollision().ptHard() < 999.0f ? collision.mcCollision().ptHard() : simPtRef / (std::pow(eventWeight, 1.0 / pTHatExponent));
852852
if (pTHat < ptHatMin || pTHat > ptHatMax) { // only allows mcCollisions with weight in between min and max
853853
return;
854854
}
@@ -873,7 +873,7 @@ struct TrackEfficiency {
873873
return;
874874
}
875875

876-
float pTHat = mcCollision.ptHard() < 999.0f ? mcCollision.ptHard() : 10. / (std::pow(mcCollision.weight(), 1.0 / pTHatExponent));
876+
float pTHat = mcCollision.ptHard() < 999.0f ? mcCollision.ptHard() : simPtRef / (std::pow(mcCollision.weight(), 1.0 / pTHatExponent));
877877
if (pTHat < ptHatMin || pTHat > ptHatMax) { // only allows mcCollisions with weight in between min and max
878878
return;
879879
}
@@ -936,7 +936,7 @@ struct TrackEfficiency {
936936
return;
937937
}
938938

939-
float pTHat = mcCollision.ptHard() < 999.0f ? mcCollision.ptHard() : 10. / (std::pow(eventWeight, 1.0 / pTHatExponent));
939+
float pTHat = mcCollision.ptHard() < 999.0f ? mcCollision.ptHard() : simPtRef / (std::pow(eventWeight, 1.0 / pTHatExponent));
940940
if (pTHat < ptHatMin || pTHat > ptHatMax) { // only allows mcCollisions with weight in between min and max
941941
return;
942942
}
@@ -1030,7 +1030,7 @@ struct TrackEfficiency {
10301030
registry.fill(HIST("h_collisions"), 3.5);
10311031
registry.fill(HIST("h2_centrality_collisions"), centrality, 3.5);
10321032

1033-
float pTHat = collision.mcCollision().ptHard() < 999.0f ? collision.mcCollision().ptHard() : 10. / (std::pow(collision.mcCollision().weight(), 1.0 / pTHatExponent));
1033+
float pTHat = collision.mcCollision().ptHard() < 999.0f ? collision.mcCollision().ptHard() : simPtRef / (std::pow(collision.mcCollision().weight(), 1.0 / pTHatExponent));
10341034
if (pTHat < ptHatMin || pTHat > ptHatMax) { // only allows mcCollisions with weight in between min and max
10351035
return;
10361036
}
@@ -1067,7 +1067,7 @@ struct TrackEfficiency {
10671067
registry.fill(HIST("h_collisions"), 3.5);
10681068
registry.fill(HIST("h_collisions_weighted"), 3.5, eventWeight);
10691069

1070-
float pTHat = collision.mcCollision().ptHard() < 999.0f ? collision.mcCollision().ptHard() : 10. / (std::pow(eventWeight, 1.0 / pTHatExponent));
1070+
float pTHat = collision.mcCollision().ptHard() < 999.0f ? collision.mcCollision().ptHard() : simPtRef / (std::pow(eventWeight, 1.0 / pTHatExponent));
10711071
if (pTHat < ptHatMin || pTHat > ptHatMax) { // only allows mcCollisions with weight in between min and max
10721072
return;
10731073
}
@@ -1082,8 +1082,8 @@ struct TrackEfficiency {
10821082
// float centrality = checkCentFT0M ? mcCollision.centFT0M() : mcCollision.centFT0C(); mcCollision.centFT0C() isn't filled at the moment; can be added back when it is
10831083

10841084
float eventWeight = mcCollision.weight();
1085-
float pTHat = mcCollision.ptHard() < 999.0f ? mcCollision.ptHard() : 10. / (std::pow(eventWeight, 1.0 / pTHatExponent));
1086-
registry.fill(HIST("h2_mccollision_pthardfromweight_pthardfromhepmcxsection"), 10. / (std::pow(eventWeight, 1.0 / pTHatExponent)), mcCollision.ptHard());
1085+
float pTHat = mcCollision.ptHard() < 999.0f ? mcCollision.ptHard() : simPtRef / (std::pow(eventWeight, 1.0 / pTHatExponent));
1086+
registry.fill(HIST("h2_mccollision_pthardfromweight_pthardfromhepmcxsection"), simPtRef / (std::pow(eventWeight, 1.0 / pTHatExponent)), mcCollision.ptHard());
10871087

10881088
float centrality = -1;
10891089
bool hasSel8Coll = false;
@@ -1154,9 +1154,9 @@ struct TrackEfficiency {
11541154
// float centrality = checkCentFT0M ? mcCollision.centFT0M() : mcCollision.centFT0C(); mcCollision.centFT0C() isn't filled at the moment; can be added back when it is
11551155

11561156
float eventWeight = mcCollision.weight();
1157-
float pTHat = mcCollision.ptHard() < 999.0f ? mcCollision.ptHard() : 10. / (std::pow(eventWeight, 1.0 / pTHatExponent));
1158-
registry.fill(HIST("h2_mccollision_pthardfromweight_pthardfromhepmcxsection"), 10. / (std::pow(eventWeight, 1.0 / pTHatExponent)), mcCollision.ptHard());
1159-
registry.fill(HIST("h2_mccollision_pthardfromweight_pthardfromhepmcxsection_weighted"), 10. / (std::pow(eventWeight, 1.0 / pTHatExponent)), mcCollision.ptHard(), eventWeight);
1157+
float pTHat = mcCollision.ptHard() < 999.0f ? mcCollision.ptHard() : simPtRef / (std::pow(eventWeight, 1.0 / pTHatExponent));
1158+
registry.fill(HIST("h2_mccollision_pthardfromweight_pthardfromhepmcxsection"), simPtRef / (std::pow(eventWeight, 1.0 / pTHatExponent)), mcCollision.ptHard());
1159+
registry.fill(HIST("h2_mccollision_pthardfromweight_pthardfromhepmcxsection_weighted"), simPtRef / (std::pow(eventWeight, 1.0 / pTHatExponent)), mcCollision.ptHard(), eventWeight);
11601160

11611161
float centrality = -1;
11621162
bool hasSel8Coll = false;

0 commit comments

Comments
 (0)