 |
ATLAS Offline Software
|
Go to the documentation of this file.
34 ATH_MSG_ERROR(
"The TruthFilterTool was requested without initializing the SelectionTool. "
35 "This is not supported. Please check that the SelectionTool is used." );
36 return StatusCode::FAILURE;
42 ATH_MSG_INFO(
"The TruthFilterTool is set up with the TIGHT selection "
43 "working point. Will run the appropriate systematics" );
44 recommendedSystematics =
56 ATH_MSG_INFO(
"The TruthFilterTool is set up with the LOOSE selection "
57 "working point. Will run the appropriate systematics" );
58 recommendedSystematics =
70 ATH_MSG_ERROR(
"The TruthFilterTool was requested with the unsupported selection working "
71 "point "+
m_filterWP +
". Please use the cut levels 'Loose' or 'TightPrimary'." );
72 return StatusCode::FAILURE;
78 for (
auto&
sys : recommendedSystematics)
80 if (affectingSystematics.
find(
sys.name()) == affectingSystematics.
end())
82 ATH_MSG_ERROR(
"Systematic " +
sys.name() +
" was expected for the FilterTool "
83 "based on the working point " +
m_filterWP +
" but not found "
84 "in affectingSystematics.");
85 return StatusCode::FAILURE;
104 if (
m_acceptInfo.
addCut(
"truthFilter",
"Selection of tracks according to the InDetTrackTruthFilterTool" ) < 0)
106 ATH_MSG_ERROR(
"Failed to add cut 'truthFilter' because the TAccept object is full." );
107 return StatusCode::FAILURE;
121 return StatusCode::SUCCESS;
144 for (
unsigned int i = 0;
i < selectAccept.
getNCuts();
i++)
176 return StatusCode::SUCCESS;
void setBits(const SG::AuxElement &element, SelectionType selection, const CP::SystematicSet &sys) const
set the selection decoration
unsigned int getNCuts() const
Get the number of cuts defined.
Gaudi::Property< std::string > m_filterWP
StatusCode execute() override
SelectionType selectionFromAccept(const asg::AcceptData &accept)
the selection decoration made from the given AcceptData object
Class to wrap a set of SystematicVariations.
SelectionType m_setOnFail
the bits to set for an object failing the preselection
StatusCode addSystematics(const CP::SystematicSet &recommended, const CP::SystematicSet &affecting)
register a set of affecting variables for the current algorithm (usually obtained from an CP::ISystem...
const std::vector< CP::SystematicSet > & systematicsVector() const
the list of systematics to loop over
StatusCode initialize() override
Select isolated Photons, Electrons and Muons.
void setBool(const SG::AuxElement &element, bool selection, const CP::SystematicSet &sys) const
set the selection decoration
std::string getLabel() const
get the name/label of the decoration
::StatusCode initialize()
intialize this property
bool getBool(const SG::AuxElement &element, const CP::SystematicSet &sys) const
get the selection as a bool
ToolHandle< InDet::IInDetTrackSelectionTool > m_selectionTool
the smearing tool
static const std::unordered_map< InDet::TrackSystematic, CP::SystematicVariation, std::hash< int > > TrackSystematicMap
@ TRK_EFF_LOOSE_PHYSMODEL
::StatusCode StatusCode
StatusCode definition for legacy code.
const_iterator end() const
description: const iterator to the end of the set
ToolHandle< InDet::IInDetTrackTruthFilterTool > m_filterTool
the filter tool
const std::string & getCutName(unsigned int cutPosition) const
Get the name of a cut, based on the cut position (slow, avoid usage)
SysReadHandle< xAOD::TrackParticleContainer > m_tracksHandle
the track collection we run on
ServiceHandle< ISelectionNameSvc > m_nameSvc
the ISelectionNameSvc
SysReadSelectionHandle m_preselection
the preselection we apply to our input
@ TRK_EFF_TIGHT_PHYSMODEL
iterator find(const SystematicVariation &sys) const
description: find an element in the set
void setCutResult(const std::string &cutName, bool cutResult)
Set the result of a cut, based on the cut name (safer)
void clear()
Clear all bits.
bool getCutResult(const std::string &cutName) const
Get the result of a cut, based on the cut name (safer)
SysListHandle m_systematicsList
the systematics list we run
StatusCode initialize(SysListHandle &sysListHandle, const ISysHandleBase &objectHandle)
initialize the accessor
SysWriteSelectionHandle m_selectionHandle
the decoration for the asg selection
Class describing a TrackParticle.
asg::AcceptInfo m_acceptInfo
StatusCode initialize(SysListHandle &sysListHandle, const ISysHandleBase &objectHandle)
initialize the accessor
int addCut(const std::string &cutName, const std::string &cutDescription)
Add a cut; returning the cut position.