Skip to content

Commit 277911e

Browse files
committed
while checking pt of decay products of sister particle, allow multiple leptons and tracks
1 parent b560706 commit 277911e

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

GeneratorInterface/GenFilters/plugins/PythiaFilterMotherSister.cc

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,19 @@ bool PythiaFilterMotherSister::filter(edm::StreamID, edm::Event& iEvent, const e
6868
++dau) {
6969
// find the daugther you're interested in
7070
if (abs((*dau)->pdg_id()) == abs(sisterID)) {
71-
bool passTrackPt = false;
72-
bool passLeptonPt = false;
71+
int failTrackPt = 0;
72+
int failLeptonPt = 0;
7373
// check pt of the nephews
7474
for (HepMC::GenVertex::particle_iterator nephew = (*dau)->end_vertex()->particles_begin(HepMC::children);
7575
nephew != (*dau)->end_vertex()->particles_end(HepMC::children);
7676
++nephew) {
7777
int nephew_pdgId = abs((*nephew)->pdg_id());
78-
// implicit requirement that only one newphew is a lepton
79-
if (nephew_pdgId == 11 or nephew_pdgId == 13 or nephew_pdgId == 15)
80-
passLeptonPt = ((*nephew)->momentum().perp() > minLeptonPt);
81-
if (nephew_pdgId == 211)
82-
passTrackPt = ((*nephew)->momentum().perp() > minTrackPt);
78+
if (minLeptonPt > 0. and (nephew_pdgId == 11 or nephew_pdgId == 13 or nephew_pdgId == 15))
79+
failLeptonPt += ((*nephew)->momentum().perp() < minLeptonPt);
80+
if (minTrackPt > 0. and nephew_pdgId == 211)
81+
failTrackPt += ((*nephew)->momentum().perp() < minTrackPt);
8382
}
84-
if (not passLeptonPt or not passTrackPt)
83+
if (failLeptonPt > 0 or failTrackPt > 0)
8584
return false;
8685
// calculate displacement of the sister particle, from production to decay
8786
HepMC::GenVertex* v1 = (*dau)->production_vertex();

0 commit comments

Comments
 (0)