Skip to content
Snippets Groups Projects

Updating GenFilterTool for derivations

Merged Zach Marshall requested to merge zmarshal/athena:master_FilterUpdate into master
All threads resolved!
@@ -140,7 +140,7 @@ namespace DerivationFramework {
genFiltHT = 0.;
genFiltHTinclNu = 0.; // this HT definition includes neutrinos from W/Z/tau
for (const auto *const tj : *truthjets) {
if ( tj->pt()>m_MinJetPt && fabs(tj->eta())<m_MaxJetEta ) {
if ( tj->pt()>m_MinJetPt && std::abs(tj->eta())<m_MaxJetEta ) {
ATH_MSG_VERBOSE("Adding truth jet with pt " << tj->pt()
<< ", eta " << tj->eta()
<< ", phi " << tj->phi()
@@ -158,7 +158,7 @@ namespace DerivationFramework {
if (pdgid==21 && tp->e()==0) continue; // Work around for an old generator bug
if ( tp->status() %1000 !=1 ) continue; // Stable!
if ((std::abs(pdgid)==11 || std::abs(pdgid)==13) && tp->pt()>m_MinLepPt && fabs(tp->eta())<m_MaxLepEta) {
if ((std::abs(pdgid)==11 || std::abs(pdgid)==13) && tp->pt()>m_MinLepPt && std::abs(tp->eta())<m_MaxLepEta) {
if( isPrompt(tp) ) {
ATH_MSG_VERBOSE("Adding prompt lepton with pt " << tp->pt()
<< ", eta " << tp->eta()
@@ -205,7 +205,7 @@ namespace DerivationFramework {
if (pitr1->status()!=1) continue;
// Pick electrons or muons with Pt > MinPt_PTZ and |eta| < m_maxEta
if (std::abs(pdgId1) == 11 || std::abs(pdgId1) == 13) {
if (pitr1->pt() >= MinPt_PTZ && fabs(pitr1->eta()) <= MaxEta_PTZ){
if (pitr1->pt() >= MinPt_PTZ && std::abs(pitr1->eta()) <= MaxEta_PTZ){
for (const xAOD::TruthParticle* pitr2 : *tpc){
if (pitr2==pitr1) continue;
if (HepMC::is_simulation_particle(pitr2)) continue;
@@ -216,7 +216,7 @@ namespace DerivationFramework {
// If AllowElecMu_PTZ is true allow also Z -> emu compinations (with charge requirements as above)
if ((AllowSameCharge_PTZ && (std::abs(pdgId2) == std::abs(pdgId1) || (AllowElecMu_PTZ && (std::abs(pdgId2) == 11 || std::abs(pdgId2) == 13) ) ) ) ||
(!AllowSameCharge_PTZ && (pdgId2 == -1*pdgId1 || (AllowElecMu_PTZ && (pdgId2 == (pdgId1 < 0 ? 1 : -1) * 11 || (pdgId1 < 0 ? 1 : -1) * pdgId2 == 13) ) ) ) ) {
if (pitr2->pt() >= MinPt_PTZ && fabs(pitr2->eta()) <= MaxEta_PTZ){
if (pitr2->pt() >= MinPt_PTZ && std::abs(pitr2->eta()) <= MaxEta_PTZ){
double invMass = (pitr1->p4()+pitr2->p4()).M();
double dilepPt = (pitr1->p4()+pitr2->p4()).Pt();
// Only consider pair that fall in the mass window
Loading