@@ -84,6 +84,7 @@ struct TrackEfficiency {
8484 Configurable<float > ptHatMax{" ptHatMax" , 300 , " max pT hat of collisions" };
8585 Configurable<float > pTHatExponent{" pTHatExponent" , 6.0 , " exponent of the event weight for the calculation of pTHat" };
8686 Configurable<float > pTHatMaxFractionMCD{" pTHatMaxFractionMCD" , 999.0 , " maximum fraction of hard scattering for reconstructed track acceptance in MC" };
87+ Configurable<float > pTHatMaxFractionMCP{" pTHatMaxFractionMCP" , 999.0 , " maximum fraction of hard scattering for particle acceptance in MC" };
8788
8889 Configurable<bool > getPtHatFromHepMCXSection{" getPtHatFromHepMCXSection" , true , " test configurable, configurable should be removed once well tested" };
8990 Configurable<bool > useTrueTrackWeight{" useTrueTrackWeight" , true , " test configurable, should be set to 1 then config removed once well tested" };
@@ -170,6 +171,10 @@ struct TrackEfficiency {
170171 float centrality = checkCentFT0M ? collisions.begin ().centFT0M () : collisions.begin ().centFT0C ();
171172
172173 for (auto const & mcparticle : mcparticles) {
174+ float pTHat = simPtRef / (std::pow (weight, 1.0 / pTHatExponent));
175+ if (mcparticle.pt () > pTHatMaxFractionMCP * pTHat) {
176+ continue ;
177+ }
173178 registry.fill (HIST (" h2_centrality_particle_pt" ), centrality, mcparticle.pt (), weight);
174179 registry.fill (HIST (" h2_centrality_particle_eta" ), centrality, mcparticle.eta (), weight);
175180 registry.fill (HIST (" h2_centrality_particle_phi" ), centrality, mcparticle.phi (), weight);
@@ -643,6 +648,9 @@ struct TrackEfficiency {
643648 registry.fill (HIST (" hMcCollCutsCounts" ), 6.5 , mcCollision.weight ()); // ptHat condition
644649
645650 for (auto const & jMcParticle : jMcParticles) {
651+ if (jMcParticle.pt () > pTHatMaxFractionMCP * pTHat) {
652+ continue ;
653+ }
646654 registry.fill (HIST (" hMcPartCutsCounts" ), 0.5 , mcCollision.weight ()); // allPartsInSelMcColl
647655
648656 if (!isChargedParticle (jMcParticle.pdgCode ())) {
@@ -706,6 +714,9 @@ struct TrackEfficiency {
706714 float trueTrackCollEventWeight = useTrueTrackWeight ? trueTrackMcCollision.weight () : mcCollEventWeight;
707715
708716 auto jMcParticleFromTrack = track.mcParticle_as <JetParticlesWithOriginal>();
717+ if (jMcParticleFromTrack.pt () > pTHatMaxFractionMCP * pTHat) {
718+ continue ;
719+ }
709720 if (!jMcParticleFromTrack.isPhysicalPrimary ()) {
710721 registry.fill (HIST (" h3_track_pt_track_eta_track_phi_associatedtrack_nonprimary" ), track.pt (), track.eta (), track.phi (), trueTrackCollEventWeight);
711722 registry.fill (HIST (" h3_particle_pt_particle_eta_particle_phi_associatedtrack_nonprimary" ), jMcParticleFromTrack.pt (), jMcParticleFromTrack.eta (), jMcParticleFromTrack.phi (), trueTrackCollEventWeight);
0 commit comments