Forked from
atlas / athena
3199 commits behind the upstream repository.
-
main-cppcheck-EventSelectionAlgorithms
main-cppcheck-EventSelectionAlgorithms
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
TransverseMassSelectorAlg.h 3.49 KiB
/*
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
/// @author Baptiste Ravina
#ifndef EVENT_SELECTOR_TRANSVERSEMASSSELECTORALG_H
#define EVENT_SELECTOR_TRANSVERSEMASSSELECTORALG_H
// Algorithm includes
#include <AnaAlgorithm/AnaAlgorithm.h>
#include <AsgTools/PropertyWrapper.h>
#include <SystematicsHandles/SysReadHandle.h>
#include <SelectionHelpers/SysReadSelectionHandle.h>
#include <SelectionHelpers/SysWriteSelectionHandle.h>
#include <SystematicsHandles/SysReadDecorHandle.h>
#include <SystematicsHandles/SysWriteDecorHandle.h>
// Framework includes
#include <xAODBase/IParticleContainer.h>
#include <xAODMissingET/MissingETContainer.h>
#include <xAODEventInfo/EventInfo.h>
#include <EventSelectionAlgorithms/SignEnums.h>
namespace CP {
/// \brief an algorithm to select an event with W-boson mass compared
/// to a specified MWT value
class TransverseMassSelectorAlg final : public EL::AnaAlgorithm {
/// \brief the standard constructor
public:
TransverseMassSelectorAlg(const std::string &name, ISvcLocator *pSvcLocator);
virtual StatusCode initialize() override;
virtual StatusCode execute() override;
private:
/// \brief the MWT cut against which to compare
Gaudi::Property<float> m_mwtref {this, "refMWT", 0., "MWT cut (in MeV)"};
/// \brief the comparison (GT, LT, etc)
Gaudi::Property<std::string> m_sign {this, "sign", "SetMe", "comparison sign to use"};
/// \brief the operator version of the comparison (>, <, etc)
SignEnum::ComparisonOperator m_signEnum{};
/// \brief use dressed kinematics
Gaudi::Property<bool> m_useDressedProperties{this, "useDressedProperties", false,
"whether to use dressed electron and muon kinematics rather than simple "
"P4 kinematics"};
/// \brief the systematics
CP::SysListHandle m_systematicsList {this};
/// \brief the electron handle
CP::SysReadHandle<xAOD::IParticleContainer> m_electronsHandle {
this, "electrons", "", "the electron container to use"
};
/// \brief the electron selection
CP::SysReadSelectionHandle m_electronSelection {
this, "electronSelection", "", "the selection on the input electrons"
};
/// \brief the muons handle
CP::SysReadHandle<xAOD::IParticleContainer> m_muonsHandle {
this, "muons", "", "the muon container to use"
};
/// \brief the muon selection
CP::SysReadSelectionHandle m_muonSelection {
this, "muonSelection", "", "the selection on the input muons"
};
/// \brief the MET handle
CP::SysReadHandle<xAOD::MissingETContainer> m_metHandle {
this, "met", "SetMe", "the MET container to use"
};
/// \brief the MET term
Gaudi::Property<std::string> m_metTerm {this, "metTerm", "Final", "the MET term to use"};
/// \brief the event info handle
CP::SysReadHandle<xAOD::EventInfo> m_eventInfoHandle {
this, "eventInfo", "EventInfo", "the EventInfo container to read selection decisions from"
};
/// \brief the preselection
CP::SysReadSelectionHandle m_preselection {
this, "eventPreselection", "SetMe", "name of the preselection to check before applying this one"
};
/// \brief the output selection decoration
CP::SysWriteSelectionHandle m_decoration {
this, "decorationName", "SetMe", "decoration name for the MWT selector"
};
}; // class
} // namespace CP
#endif // EVENT_SELECTOR_TRANSVERSEMASSSELECTORALG_H