|
ATLAS Offline Software
|
Go to the documentation of this file.
12 :
EL::AnaAlgorithm(
name, pSvcLocator)
30 return StatusCode::SUCCESS;
65 int total_leptons = 0;
70 total_charge +=
el->charge();
78 total_charge +=
mu->charge();
88 total_charge +=
el->charge();
96 total_charge +=
mu->charge();
104 if (total_leptons != 2 ) {
105 ATH_MSG_ERROR(
"Exactly two leptons are required to check whether the event is OS or SS!");
106 return StatusCode::FAILURE;
110 bool decision =
m_OSmode ? total_charge == 0 : std::abs(total_charge) == 2;
113 return StatusCode::SUCCESS;
CP::SysReadHandle< xAOD::ElectronContainer > m_electronsHandle
the electron input handle
virtual StatusCode initialize() override
CP::SysReadHandle< xAOD::TruthParticleContainer > m_muonsTruthHandle
the truth muon input handle
::StatusCode retrieve(const T *&object, const CP::SystematicSet &sys) const
retrieve the object for the given name
const std::vector< CP::SystematicSet > & systematicsVector() const
the list of systematics to loop over
Select isolated Photons, Electrons and Muons.
void setBool(const SG::AuxElement &element, bool selection, const CP::SystematicSet &sys) const
set the selection decoration
CP::SysReadSelectionHandle m_electronSelection
the electron selection handle
CP::SysReadHandle< xAOD::MuonContainer > m_muonsHandle
the muon input handle
CP::SysReadSelectionHandle m_preselection
the preselection
StatusCode initialize(SysListHandle &sysListHandle)
initialize this handle
::StatusCode initialize()
intialize this property
bool getBool(const SG::AuxElement &element, const CP::SystematicSet &sys) const
get the selection as a bool
ChargeSelectorAlg(const std::string &name, ISvcLocator *pSvcLocator)
the standard constructor
::StatusCode StatusCode
StatusCode definition for legacy code.
Class describing a truth particle in the MC record.
virtual StatusCode execute() override
This module defines the arguments passed from the BATCH driver to the BATCH worker.
CP::SysWriteSelectionHandle m_decoration
the output decoration handle
Class describing the basic event information.
CP::SysReadHandle< xAOD::EventInfo > m_eventInfoHandle
the event info handle
CP::SysReadSelectionHandle m_muonSelection
the muon selection handle
StatusCode initialize(SysListHandle &sysListHandle, const ISysHandleBase &objectHandle)
initialize the accessor
Gaudi::Property< bool > m_OSmode
whether or not to select 2 opposite-sign leptons
CP::SysReadSelectionHandle m_electronTruthSelection
the truth electron selection handle
CP::SysReadSelectionHandle m_muonTruthSelection
the truth muon selection handle
CP::SysReadHandle< xAOD::TruthParticleContainer > m_electronsTruthHandle
the truth electron input handle
CP::SysListHandle m_systematicsList
the systematics list
StatusCode initialize(SysListHandle &sysListHandle, const ISysHandleBase &objectHandle)
initialize the accessor