Skip to content

Commit 3144327

Browse files
authored
[PWGJE] Fix max pt lead bug for generated jets in jetSpectraESetask (#18317)
1 parent 1988078 commit 3144327

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎PWGJE/Tasks/jetSpectraEseTask.cxx‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ struct JetSpectraEseTask {
8888
Configurable<bool> cfgUseMCEventWeights{"cfgUseMCEventWeights", false, "Flag for using MC event weights"};
8989
Configurable<float> leadingConstituentPtMin{"leadingConstituentPtMin", -99.0, "minimum pT selection on jet constituent"};
9090
Configurable<float> leadingConstituentPtMax{"leadingConstituentPtMax", 9999.0, "maximum pT selection on jet constituent"};
91-
Configurable<bool> checkLeadConstituentMinPtForMcpJets{"checkLeadConstituentMinPtForMcpJets", false, "flag to choose whether particle level jets should have their lead track pt above leadingConstituentPtMin to be accepted; off by default, as leadingConstituentPtMin cut is only applied on MCD jets for the Pb-Pb analysis using pp MC anchored to Pb-Pb for the response matrix"};
91+
Configurable<bool> checkLeadConstituentPtForMcpJets{"checkLeadConstituentPtForMcpJets", false, "flag to choose whether particle level jets should have their lead track pt above leadingConstituentPtMin to be accepted; off by default, as leadingConstituentPtMin cut is only applied on MCD jets for the Pb-Pb analysis using pp MC anchored to Pb-Pb for the response matrix"};
9292
Configurable<float> pTHatMaxMCD{"pTHatMaxMCD", 999.0, "maximum fraction of hard scattering for jet acceptance in detector MC"};
9393
Configurable<float> pTHatMaxMCP{"pTHatMaxMCP", 999.0, "maximum fraction of hard scattering for jet acceptance in particle MC"};
9494
Configurable<float> pTHatExponent{"pTHatExponent", 6.0, "exponent of the event weight for the calculation of pTHat"};
@@ -2077,6 +2077,9 @@ struct JetSpectraEseTask {
20772077
if (!checkConstituentMinPt && !checkConstituentMaxPt) {
20782078
checkConstituentPt = false;
20792079
}
2080+
if (mcLevelIsParticleLevel && !checkLeadConstituentPtForMcpJets) {
2081+
checkConstituentPt = false;
2082+
}
20802083

20812084
if (checkConstituentPt) {
20822085
bool isMinLeadingConstituent = !checkConstituentMinPt;
@@ -2085,7 +2088,7 @@ struct JetSpectraEseTask {
20852088
for (const auto& constituent : jet.template tracks_as<TTracks>()) {
20862089
double pt = constituent.pt();
20872090

2088-
if ((!checkLeadConstituentMinPtForMcpJets && mcLevelIsParticleLevel) || (checkConstituentMinPt && pt >= leadingConstituentPtMin)) { // if the jet is mcp level and checkLeadConstituentMinPtForMcpJets is true, then the pt of the leading track of that jet does not need to be below the defined leadingConstituentPtMin cut
2091+
if ((checkConstituentMinPt && pt >= leadingConstituentPtMin)) {
20892092
isMinLeadingConstituent = true;
20902093
}
20912094
if (checkConstituentMaxPt && pt > leadingConstituentPtMax) {

0 commit comments

Comments
 (0)