8#include "Math/Vector4D.h"
10using ROOT::Math::PtEtaPhiEVector;
31 return StatusCode::SUCCESS;
63 PtEtaPhiEVector lepton0, lepton1;
64 int total_leptons = 0;
65 bool isfilled0(
false), isfilled1(
false);
72 lepton0.SetCoordinates(acc_pt_dressed(*el),
77 lepton0.SetCoordinates(el->pt(), el->eta(), el->phi(), el->e());
79 }
else if (!isfilled1){
81 lepton1.SetCoordinates(acc_pt_dressed(*el),
86 lepton1.SetCoordinates(el->pt(), el->eta(), el->phi(), el->e());
100 lepton0.SetCoordinates(acc_pt_dressed(*mu),
101 acc_eta_dressed(*mu),
102 acc_phi_dressed(*mu),
105 lepton0.SetCoordinates(mu->pt(), mu->eta(), mu->phi(), mu->e());
107 }
else if (!isfilled1){
109 lepton1.SetCoordinates(acc_pt_dressed(*mu),
110 acc_eta_dressed(*mu),
111 acc_phi_dressed(*mu),
114 lepton1.SetCoordinates(mu->pt(), mu->eta(), mu->phi(), mu->e());
123 if (total_leptons != 2){
124 ATH_MSG_ERROR(
"Exactly two leptons are required to compute the MLL!");
125 return StatusCode::FAILURE;
129 float mll = (lepton0 + lepton1).M();
135 return StatusCode::SUCCESS;
CP::SysReadSelectionHandle m_electronSelection
the electrons selection
CP::SysReadSelectionHandle m_preselection
the preselection
SignEnum::ComparisonOperator m_signEnum
the operator version of the comparison (>, <, etc)
CP::SysReadSelectionHandle m_muonSelection
the muons selection
virtual StatusCode initialize() override
CP::SysReadHandle< xAOD::EventInfo > m_eventInfoHandle
the event info handle
CP::SysWriteSelectionHandle m_decoration
the output selection decoration
CP::SysReadHandle< xAOD::IParticleContainer > m_muonsHandle
the muons handle
Gaudi::Property< std::string > m_sign
the comparison (GT, LT, etc)
virtual StatusCode execute() override
CP::SysReadHandle< xAOD::IParticleContainer > m_electronsHandle
the electrons handle
DileptonInvariantMassSelectorAlg(const std::string &name, ISvcLocator *pSvcLocator)
the standard constructor
Gaudi::Property< float > m_mllref
the 2-lepton mass against which to compare
Gaudi::Property< bool > m_useDressedProperties
use dressed kinematics
CP::SysListHandle m_systematicsList
the systematics
AnaAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
constructor with parameters
Helper class to provide constant type-safe access to aux data.
Class providing the definition of the 4-vector interface.
Select isolated Photons, Electrons and Muons.
This module defines the arguments passed from the BATCH driver to the BATCH worker.
bool checkValue(T reference, ComparisonOperator sign, T test)
the comparison test given the specified sign and two test values
static const std::map< std::string, ComparisonOperator > stringToOperator
the map between user inputs and comparison operators
EventInfo_v1 EventInfo
Definition of the latest event info version.
DataVector< IParticle > IParticleContainer
Simple convenience declaration of IParticleContainer.