Skip to content

Commit

Permalink
Merge pull request #33491 from rmanzoni/from-CMSSW_12_0_X_2021-04-19-…
Browse files Browse the repository at this point in the history
…2300

Consider charge conjugation in decay products in PythiaFilterMultiAncestor
  • Loading branch information
cmsbuild committed Apr 27, 2021
2 parents 4112ef6 + 3f2f8ce commit c635404
Showing 1 changed file with 14 additions and 1 deletion.
Expand Up @@ -181,6 +181,7 @@ bool PythiaFilterMultiAncestor::filter(edm::StreamID, edm::Event& iEvent, const
// use a counter, if there's enough daughters that match the pdg and kinematic
// criteria accept the event
uint good_dau = 0;
uint good_dau_cc = 0;
for (HepMC::GenVertex::particle_iterator dau = (*p)->end_vertex()->particles_begin(HepMC::children);
dau != (*p)->end_vertex()->particles_end(HepMC::children);
++dau) {
Expand All @@ -198,9 +199,21 @@ bool PythiaFilterMultiAncestor::filter(edm::StreamID, edm::Event& iEvent, const
continue;
++good_dau;
}
// check charge conjugation
if (-(*dau)->pdg_id() == daughterIDs[i]) { // notice minus sign
if ((*dau)->momentum().perp() < daughterMinPts[i])
continue;
if ((*dau)->momentum().perp() > daughterMaxPts[i])
continue;
if ((*dau)->momentum().eta() < daughterMinEtas[i])
continue;
if ((*dau)->momentum().eta() > daughterMaxEtas[i])
continue;
++good_dau_cc;
}
}
}
if (good_dau < daughterIDs.size())
if (good_dau < daughterIDs.size() && good_dau_cc < daughterIDs.size())
accepted = false;
}
}
Expand Down

0 comments on commit c635404

Please sign in to comment.