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),
51 InDet::TrackSystematicMap.at(InDet::TRK_EFF_TIGHT_COMBINED)
56 ATH_MSG_INFO(
"The TruthFilterTool is set up with the LOOSE selection "
57 "working point. Will run the appropriate systematics" );
58 recommendedSystematics =
60 InDet::TrackSystematicMap.at(InDet::TRK_FAKE_RATE_LOOSE),
61 InDet::TrackSystematicMap.at(InDet::TRK_EFF_LOOSE_GLOBAL),
62 InDet::TrackSystematicMap.at(InDet::TRK_EFF_LOOSE_IBL),
63 InDet::TrackSystematicMap.at(InDet::TRK_EFF_LOOSE_PP0),
64 InDet::TrackSystematicMap.at(InDet::TRK_EFF_LOOSE_PHYSMODEL),
65 InDet::TrackSystematicMap.at(InDet::TRK_EFF_LOOSE_COMBINED)
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;
126 StatusCode InDetTrackSelectionAlg ::
144 for (
unsigned int i = 0; i < selectAccept.
getNCuts(); i++)
176 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".