Skip to content

Commit

Permalink
Merge pull request cms-sw#19 from bainbrid/test2
Browse files Browse the repository at this point in the history
hack to accommodate eles from B->K,J/psi
  • Loading branch information
Mauro Verzetti authored Oct 19, 2018
2 parents 4feeab3 + 664f95c commit d0574b7
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions plugins/TrackerElectronsFeatures.cc
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,17 @@ TrackerElectronsFeatures::analyze(const Event& iEvent, const EventSetup& iSetup)
for(size_t idx=0; idx < gen_particles->size(); idx++) {
reco::GenParticleRef genp(gen_particles, idx);
bool is_ele = genp->isLastCopy() && std::abs(genp->pdgId()) == 11;
bool comes_from_B = genp->numberOfMothers() >= 1 && genp->mother()->pdgId() > 510 &&
genp->mother()->pdgId() < 546;
bool comes_from_B = genp->numberOfMothers() >= 1 &&
genp->mother()->pdgId() > 510 &&
genp->mother()->pdgId() < 546;
if (!comes_from_B && // check resonant (J/psi) production?
genp->numberOfMothers() >= 1 && genp->mother() && // has mother
genp->mother()->pdgId() == 443 && // mother is J/psi
genp->mother()->numberOfMothers() >= 1 && genp->mother()->mother() && // has grandmother
genp->mother()->mother()->pdgId() > 510 &&
genp->mother()->mother()->pdgId() < 546 ) { // grandmother is B
comes_from_B = true;
}
if(is_ele && (comes_from_B || !check_from_B_)) { //is coming from a B
electrons_from_B.insert(genp);
}
Expand Down

0 comments on commit d0574b7

Please sign in to comment.