|
ATLAS Offline Software
|
Go to the documentation of this file.
19 InDet::InDetSecVtxTrackSelectionTool::InDetSecVtxTrackSelectionTool(
const std::string&
name )
21 , m_acceptInfo(
"InDetSecVtxTrackSelection" )
24 #ifndef XAOD_STANDALONE
25 declareInterface<IInDetTrackSelectionTool>(
this);
29 declareProperty(
"minNPixelHitsAtZeroTRT", m_NPixel0TRT ,
"Minimum number of Pixel hit upon zero TRT hit" ) ;
30 declareProperty(
"minTotalHits", m_minInDetHits ,
"Minimum number of Pixel + Sct + TRT hits" ) ;
35 InDet::InDetSecVtxTrackSelectionTool::~InDetSecVtxTrackSelectionTool() =
default;
42 ATH_MSG_ERROR(
"Tool has already been initialized. This is illegitimate." );
43 ATH_MSG_ERROR(
"This call to initialize() will do nothing." );
63 auto minPixelHits = std::make_unique< FuncSummaryValueCut<3> >
64 (
this, std::array<xAOD::SummaryType,3>
83 auto mintotHits = std::make_unique< FuncSummaryValueCut<4> >
84 (
this, std::array<xAOD::SummaryType,4>
91 mintotHits->setFunction( [=] (
const std::array<uint8_t, 4>&
vals )
95 m_trackCuts[
"minTotalHits"].push_back( std::move( mintotHits ) );
101 for (
const auto&
cut : cutFamily.second) {
104 const std::string& cutFamilyName = cutFamily.first;
106 if (
m_acceptInfo.
addCut( cutFamilyName,
"Selection of SecVtx tracks according to " + cutFamilyName ) < 0) {
107 ATH_MSG_ERROR(
"Failed to add cut family " << cutFamilyName <<
" because the TAccept object is full." );
108 return StatusCode::FAILURE;
123 ATH_MSG_ERROR(
"You are attempting to finalize a tool that has not been initialized()." );
127 ATH_MSG_INFO(
"No tracks processed in selection tool." );
150 ATH_MSG_ERROR(
"accept(...) Function received a non-track" );
163 return accept( *trk,
nullptr );
173 ATH_MSG_WARNING(
"Tool is not initialized! Calling accept() will not be very helpful." );
183 if( !
accessor.second->access( trk, vtx ).isSuccess() ) {
189 UShort_t cutFamilyIndex = 0;
193 for (
const auto&
cut : cutFamily.second ) {
194 if (!
cut->result() ) {
229 #pragma GCC diagnostic push
230 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
234 #ifndef XAOD_STANDALONE
235 ATH_MSG_WARNING(
"InDetTrackSelectionTool::setCutLevel() is not designed to be called manually in Athena." );
236 ATH_MSG_WARNING(
"It may not behave as intended. Instead, configure it in the job options through the CutLevel property." );
237 #endif // XAOD_STANDALONE
240 #pragma GCC diagnostic pop
244 #ifndef XAOD_ANALYSIS
258 UShort_t cutFamilyIndex = 0;
261 for (
const auto&
cut : cutFamily.second ) {
262 if (!
cut->result() ) {
281 #endif // XAOD_ANALYSIS
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
@ numberOfTRTHits
number of TRT hits [unit8_t].
#define ATH_MSG_VERBOSE(x)
Class providing the definition of the 4-vector interface.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
::StatusCode StatusCode
StatusCode definition for legacy code.
cut
This script demonstrates how to call a C++ class from Python Also how to use PyROOT is shown.
const AccessorWrapper< T > * accessor(xAOD::JetAttribute::AttributeID id)
Returns an attribute accessor corresponding to an AttributeID.
void setCutResult(const std::string &cutName, bool cutResult)
Set the result of a cut, based on the cut name (safer)
Class describing a Vertex.
#define ATH_MSG_WARNING(x)
@ numberOfSCTHits
number of hits in SCT [unit8_t].
@ numberOfPixelDeadSensors
number of dead pixel sensors crossed [unit8_t].
Class describing a TrackParticle.
@ numberOfInnermostPixelLayerHits
these are the hits in the 0th pixel barrel layer
int addCut(const std::string &cutName, const std::string &cutDescription)
Add a cut; returning the cut position.