19InDet::InDetSecVtxTrackSelectionTool::InDetSecVtxTrackSelectionTool(
const std::string& name )
21 , m_acceptInfo(
"InDetSecVtxTrackSelection" )
24#ifndef XAOD_STANDALONE
25 declareInterface<IInDetTrackSelectionTool>(
this);
36 StatusCode ini = StatusCode::SUCCESS ;
38 ATH_MSG_ERROR(
"Tool has already been initialized. This is illegitimate." );
39 ATH_MSG_ERROR(
"This call to initialize() will do nothing." );
59 auto minPixelHits = std::make_unique< FuncSummaryValueCut<3> >
60 (
this, std::array<xAOD::SummaryType,3>
67 minPixelHits->setFunction( [=] (
const std::array<uint8_t, 3>& vals )
71 m_trackCuts[
"minPixelHits0TRT"].push_back( std::move( minPixelHits ) );
79 auto mintotHits = std::make_unique< FuncSummaryValueCut<4> >
80 (
this, std::array<xAOD::SummaryType,4>
87 mintotHits->setFunction( [=] (
const std::array<uint8_t, 4>& vals )
88 {
return ( vals[0] + vals[1] + vals[2] + vals[3] ) >=
m_minInDetHits ; }
91 m_trackCuts[
"minTotalHits"].push_back( std::move( mintotHits ) );
97 for (
const auto& cut : cutFamily.second) {
100 const std::string& cutFamilyName = cutFamily.first;
102 if (
m_acceptInfo.addCut( cutFamilyName,
"Selection of SecVtx tracks according to " + cutFamilyName ) < 0) {
103 ATH_MSG_ERROR(
"Failed to add cut family " << cutFamilyName <<
" because the TAccept object is full." );
104 return StatusCode::FAILURE;
116 StatusCode fin = StatusCode::SUCCESS ;
119 ATH_MSG_ERROR(
"You are attempting to finalize a tool that has not been initialized()." );
123 ATH_MSG_INFO(
"No tracks processed in selection tool." );
146 ATH_MSG_ERROR(
"accept(...) Function received a non-track" );
159 return accept( *trk,
nullptr );
169 ATH_MSG_WARNING(
"Tool is not initialized! Calling accept() will not be very helpful." );
179 if( ! accessor.second->access( trk, vtx ).isSuccess() ) {
180 ATH_MSG_WARNING(
"Track access for " << accessor.first <<
" unsuccessful.");
185 UShort_t cutFamilyIndex = 0;
189 for (
const auto& cut : cutFamily.second ) {
190 if (! cut->result() ) {
225#pragma GCC diagnostic push
226#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
230#ifndef XAOD_STANDALONE
231 ATH_MSG_WARNING(
"InDetTrackSelectionTool::setCutLevel() is not designed to be called manually in Athena." );
232 ATH_MSG_WARNING(
"It may not behave as intended. Instead, configure it in the job options through the CutLevel property." );
236#pragma GCC diagnostic pop
254 UShort_t cutFamilyIndex = 0;
257 for (
const auto& cut : cutFamily.second ) {
258 if (! cut->result() ) {
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
This class is a simplest representation of a vertex candidate.
void setCutResult(const std::string &cutName, bool cutResult)
Set the result of a cut, based on the cut name (safer)
Class providing the definition of the 4-vector interface.
@ TrackParticle
The object is a charged track particle.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Vertex_v1 Vertex
Define the latest version of the vertex class.
@ numberOfTRTHits
number of TRT hits [unit8_t].
@ numberOfSCTHits
number of hits in SCT [unit8_t].
@ numberOfInnermostPixelLayerHits
these are the hits in the 0th pixel barrel layer
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
@ numberOfPixelDeadSensors
number of dead pixel sensors crossed [unit8_t].