6 #include "CLHEP/Vector/LorentzVector.h"
23 int numLightLeptons = 0;
26 if (
m_NLeptons!=3)
ATH_MSG_ERROR(
"TwoSameSignLightLeptonsOneHadTau request possible only for NLeptons = 3. Check your jobOptions.");
33 const HepMC::GenEvent* genEvt = *itr;
34 for (
const auto& pitr: *genEvt) {
37 if (pitr->momentum().perp() >=
m_minPt && std::abs(pitr->momentum().pseudoRapidity()) <=
m_maxEta) {
41 if (numLightLeptons==1) {
if (pitr->pdg_id() < 0) { charge1 = -1; }
else { charge1 = 1; } }
42 if (numLightLeptons==2) {
if (pitr->pdg_id() < 0) { charge2 = -1; }
else { charge2 = 1; } }
54 if(!tau->end_vertex())
continue;
60 for (
const auto& citr: *(tau->end_vertex())) {
62 if (pitr->pdg_id() == citr->pdg_id()) {
69 if (std::abs(citr->pdg_id()) == 13 || std::abs(citr->pdg_id()) == 11) {
75 if (std::abs(citr->pdg_id()) == 16) {
82 CLHEP::HepLorentzVector tauVisMom = CLHEP::HepLorentzVector(tau->momentum().px() - taunu->momentum().px(),
83 tau->momentum().py() - taunu->momentum().py(),
84 tau->momentum().pz() - taunu->momentum().pz(),
85 tau->momentum().e() - taunu->momentum().e());
95 bool passed_event =
false;
97 if ( ((numLightLeptons+numHadTaus)==numLeptons) && numLightLeptons == 2 && numHadTaus == 1 && charge1==charge2 ) {
98 ATH_MSG_DEBUG(
"Found " << numLeptons <<
" Leptons: two same sign ligh leptons + one hadronic tau! Event passed.");
103 ATH_MSG_DEBUG(
"Found " << numLeptons <<
" Leptons. Event passed.");
107 setFilterPassed(passed_event);
109 return StatusCode::SUCCESS;