|
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);
31 InDet::InDetSecVtxTrackSelectionTool::~InDetSecVtxTrackSelectionTool() =
default;
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>
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 )
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;
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() ) {
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." );
233 #endif // XAOD_STANDALONE
236 #pragma GCC diagnostic pop
240 #ifndef XAOD_ANALYSIS
254 UShort_t cutFamilyIndex = 0;
257 for (
const auto&
cut : cutFamily.second ) {
258 if (!
cut->result() ) {
277 #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.