25 StatusCode InDetTrackSelectionAlg ::
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 =
46 InDet::TrackSystematicMap.at(InDet::TRK_FAKE_RATE_TIGHT),
47 InDet::TrackSystematicMap.at(InDet::TRK_EFF_TIGHT_GLOBAL),
48 InDet::TrackSystematicMap.at(InDet::TRK_EFF_TIGHT_IBL),
49 InDet::TrackSystematicMap.at(InDet::TRK_EFF_TIGHT_PP0),
50 InDet::TrackSystematicMap.at(InDet::TRK_EFF_TIGHT_PHYSMODEL),
55 ATH_MSG_INFO(
"The TruthFilterTool is set up with the LOOSE selection "
56 "working point. Will run the appropriate systematics" );
57 recommendedSystematics =
59 InDet::TrackSystematicMap.at(InDet::TRK_FAKE_RATE_LOOSE),
60 InDet::TrackSystematicMap.at(InDet::TRK_EFF_LOOSE_GLOBAL),
61 InDet::TrackSystematicMap.at(InDet::TRK_EFF_LOOSE_IBL),
62 InDet::TrackSystematicMap.at(InDet::TRK_EFF_LOOSE_PP0),
63 InDet::TrackSystematicMap.at(InDet::TRK_EFF_LOOSE_PHYSMODEL),
68 ATH_MSG_ERROR(
"The TruthFilterTool was requested with the unsupported selection working "
69 "point "+
m_filterWP +
". Please use the cut levels 'Loose' or 'TightPrimary'." );
70 return StatusCode::FAILURE;
76 for (
auto& sys : recommendedSystematics)
78 if (affectingSystematics.
find(sys.name()) == affectingSystematics.
end())
80 ATH_MSG_ERROR(
"Systematic " + sys.name() +
" was expected for the FilterTool "
81 "based on the working point " +
m_filterWP +
" but not found "
82 "in affectingSystematics.");
83 return StatusCode::FAILURE;
102 if (
m_acceptInfo.addCut(
"truthFilter",
"Selection of tracks according to the InDetTrackTruthFilterTool" ) < 0)
104 ATH_MSG_ERROR(
"Failed to add cut 'truthFilter' because the TAccept object is full." );
105 return StatusCode::FAILURE;
119 return StatusCode::SUCCESS;
124 StatusCode InDetTrackSelectionAlg ::
142 for (
unsigned int i = 0; i < selectAccept.
getNCuts(); i++)
174 return StatusCode::SUCCESS;
ServiceHandle< ISelectionNameSvc > m_nameSvc
the ISelectionNameSvc
SysReadHandle< xAOD::TrackParticleContainer > m_tracksHandle
the track collection we run on
ToolHandle< InDet::IInDetTrackSelectionTool > m_selectionTool
the smearing tool
SysWriteSelectionHandle m_selectionHandle
the decoration for the asg selection
SysReadSelectionHandle m_preselection
the preselection we apply to our input
Gaudi::Property< std::string > m_filterWP
asg::AcceptInfo m_acceptInfo
SelectionType m_setOnFail
the bits to set for an object failing the preselection
SysListHandle m_systematicsList
the systematics list we run
ToolHandle< InDet::IInDetTrackTruthFilterTool > m_filterTool
the filter tool
Class to wrap a set of SystematicVariations.
const_iterator end() const
description: const iterator to the end of the set
iterator find(const SystematicVariation &sys) const
description: find an element in the set
unsigned int getNCuts() const
Get the number of cuts defined.
void setCutResult(const std::string &cutName, bool cutResult)
Set the result of a cut, based on the cut name (safer)
const std::string & getCutName(unsigned int cutPosition) const
Get the name of a cut, based on the cut position (slow, avoid usage)
void clear()
Clear all bits.
bool getCutResult(const std::string &cutName) const
Get the result of a cut, based on the cut name (safer)
Select isolated Photons, Electrons and Muons.
SelectionType selectionFromAccept(const asg::AcceptData &accept)
the selection decoration made from the given AcceptData object
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".