10using ROOT::Math::PtEtaPhiEVector;
27 return StatusCode::SUCCESS;
32 static float mll_reco(
const T* lep0,
const T* lep1) {
33 return (lep0->p4() + lep1->p4()).M();
41 return (lep0->
p4() + lep1->
p4()).M();
48 PtEtaPhiEVector v0, v1;
49 v0.SetCoordinates(acc_pt(*lep0), acc_eta(*lep0), acc_phi(*lep0), acc_e(*lep0));
50 v1.SetCoordinates(acc_pt(*lep1), acc_eta(*lep1), acc_phi(*lep1), acc_e(*lep1));
71 bool decision =
false;
76 for (
size_t i = 0; i < electrons->size() && !decision; ++i) {
79 for (
size_t j = i + 1; j < electrons->size() && !decision; ++j) {
82 if (e0->charge() == e1->charge())
continue;
91 for (
size_t i = 0; i < muons->
size() && !decision; ++i) {
94 for (
size_t j = i + 1; j < muons->
size() && !decision; ++j) {
97 if (m0->
charge() == m1->charge())
continue;
106 for (
size_t i = 0; i < truthElectrons->
size() && !decision; ++i) {
109 for (
size_t j = i + 1; j < truthElectrons->
size() && !decision; ++j) {
112 if (e0->charge() == e1->charge())
continue;
121 for (
size_t i = 0; i < truthMuons->
size() && !decision; ++i) {
124 for (
size_t j = i + 1; j < truthMuons->
size() && !decision; ++j) {
127 if (m0->
charge() == m1->charge())
continue;
133 if (
m_veto) decision = !decision;
137 return StatusCode::SUCCESS;
CP::SysReadHandle< xAOD::TruthParticleContainer > m_electronsTruthHandle
bool inWindow(float mll) const
Gaudi::Property< float > m_mll_lower
virtual StatusCode execute() override
CP::SysListHandle m_systematicsList
CP::SysWriteSelectionHandle m_decoration
CP::SysReadHandle< xAOD::ElectronContainer > m_electronsHandle
CP::SysReadSelectionHandle m_muonTruthSelection
CP::SysReadHandle< xAOD::MuonContainer > m_muonsHandle
CP::SysReadHandle< xAOD::EventInfo > m_eventInfoHandle
virtual StatusCode initialize() override
CP::SysReadSelectionHandle m_muonSelection
Gaudi::Property< bool > m_veto
whether to veto events instead of selecting them
Gaudi::Property< bool > m_useDressedProperties
use dressed kinematics
CP::SysReadSelectionHandle m_preselection
CP::SysReadHandle< xAOD::TruthParticleContainer > m_muonsTruthHandle
CP::SysReadSelectionHandle m_electronSelection
CP::SysReadSelectionHandle m_electronTruthSelection
Gaudi::Property< float > m_mll_upper
size_type size() const noexcept
Returns the number of elements in the collection.
Helper class to provide constant type-safe access to aux data.
double charge() const
Physical charge.
virtual FourMom_t p4() const override final
The full 4-momentum of the particle.
Select isolated Photons, Electrons and Muons.
static float mll_reco(const T *lep0, const T *lep1)
static float mll_truth(const xAOD::TruthParticle *lep0, const xAOD::TruthParticle *lep1, bool useDressed)
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".
EventInfo_v1 EventInfo
Definition of the latest event info version.
TruthParticle_v1 TruthParticle
Typedef to implementation.
Muon_v1 Muon
Reference the current persistent version:
MuonContainer_v1 MuonContainer
Definition of the current "Muon container version".
TruthParticleContainer_v1 TruthParticleContainer
Declare the latest version of the truth particle container.
Electron_v1 Electron
Definition of the current "egamma version".