ATLAS Offline Software
Loading...
Searching...
No Matches
InDet::InDetTrackSelectionTool Class Reference

Implementation of the track selector tool. More...

#include <InDetTrackSelectionTool.h>

Inheritance diagram for InDet::InDetTrackSelectionTool:

Public Member Functions

virtual void print () const
 Print the state of the tool.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const
Additional helper functions, not directly mimicking Athena
template<class T>
const T * getProperty (const std::string &name) const
 Get one of the tool's properties.
const std::string & msg_level_name () const __attribute__((deprecated))
 A deprecated function for getting the message level's name.
const std::string & getName (const void *ptr) const
 Get the name of an object that is / should be in the event store.
SG::sgkey_t getKey (const void *ptr) const
 Get the (hashed) key of an object that is in the event store.

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

ASG_TOOL_CLASS2(InDetTrackSelectionTool, IAsgSelectionTool, InDet::IInDetTrackSelectionTool) public ~InDetTrackSelectionTool ()
 Create a proper constructor for Athena.
virtual void setCutLevel (InDet::CutLevel level, bool overwrite=true) override __attribute__((deprecated("For consistency with the athena interface
 Function to set the cut level within standalone ROOT.
void setCutLevelPrivate (InDet::CutLevel level, bool overwrite=true)
template<int VERBOSE, class Trk_Helper>
StatusCode setupCuts (std::map< std::string, std::vector< std::function< bool(Trk_Helper helper, const asg::AsgMessaging &msgHelper)> > > &trackCuts)
template<class Trk_Helper>
asg::AcceptData accept (Trk_Helper helper, const std::map< std::string, std::vector< std::function< bool(Trk_Helper helper, const asg::AsgMessaging &msgHelper)> > > &trackCuts) const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>
Function(s) implementing the asg::IAsgTool interface
virtual StatusCode initialize () override
 Function initialising the tool.
virtual StatusCode finalize () override
 Function finalizing the tool.
Function(s) implementing the IAsgSelectionTool interface
virtual const asg::AcceptInfogetAcceptInfo () const override
 Get an object describing the "selection steps" of the tool.
virtual asg::AcceptData accept (const xAOD::IParticle *) const override
 Get the decision using a generic IParticle pointer.
Function(s) implementing the IInDetTrackSelectionTool interface
virtual asg::AcceptData accept (const xAOD::TrackParticle &track, const xAOD::Vertex *vertex=nullptr) const override
 Get the decision for a specific track object.
virtual asg::AcceptData accept (const Trk::Track &track, const Trk::Vertex *vertex=nullptr) const override
 Function that returns the result of the cuts to a Trk::Track.

Static Private Member Functions

static bool maxDoubleIsSet (double cutValue)
static bool maxIntIsSet (int cutValue)

Private Attributes

virtual void the cut level is best set through the CutLevel property
bool m_isInitialized = false
std::atomic_bool m_warnInit = false
std::unordered_map< std::string, std::shared_ptr< TrackAccessor > > m_trackAccessors
 list of the accessors that need to be run for each track
std::unique_ptr< asg::AsgMessagingm_msgHelper
std::map< std::string, std::vector< std::function< bool(InDetAccessor::TrackParticleHelper helper, const asg::AsgMessaging &msgHelper)> > > m_trackParticleCuts
 First element is the name of the cut family, second element is the set of cuts.
std::map< std::string, std::vector< std::function< bool(InDetAccessor::TrkTrackHelper helper, const asg::AsgMessaging &msgHelper)> > > m_trkTrackCuts
 First element is the name of the cut family, second element is the set of cuts.
std::atomic< uint64_t > m_numTracksProcessed = 0
 a counter of the number of tracks proccessed
std::atomic< uint64_t > m_numTracksPassed = 0
 a counter of the number of tracks that passed all cuts
std::vector< uint64_t > m_numTracksPassedCuts ATLAS_THREAD_SAFE
 tracks the number of tracks that passed each cut family.
std::mutex m_mutex
Gaudi::Property< double > m_minPt {this, "minPt", -1., "Minimum transverse momentum"}
Gaudi::Property< double > m_minP {this, "minP", -1., "Minimum momentum"}
Gaudi::Property< double > m_maxAbsEta {this, "maxAbsEta", LOCAL_MAX_DOUBLE, "Maximum magnitude of pseudorapidity"}
Gaudi::Property< double > m_maxZ0SinTheta {this, "maxZ0SinTheta", LOCAL_MAX_DOUBLE, "Maximum |z0|*sin(theta)"}
Gaudi::Property< double > m_maxZ0 {this, "maxZ0", LOCAL_MAX_DOUBLE, "Maximum longitudinal separation"}
Gaudi::Property< double > m_maxD0 {this, "maxD0", LOCAL_MAX_DOUBLE, "Maximum transvers separation"}
Gaudi::Property< double > m_maxSigmaD0 {this, "maxSigmaD0", LOCAL_MAX_DOUBLE, "Maximum error on d0"}
Gaudi::Property< double > m_maxSigmaZ0 {this, "maxSigmaZ0", LOCAL_MAX_DOUBLE, "Maximum error on z0"}
Gaudi::Property< double > m_maxSigmaZ0SinTheta {this, "maxSigmaZ0SinTheta", LOCAL_MAX_DOUBLE, "Maximum error on z0*sin(theta)"}
Gaudi::Property< double > m_maxD0overSigmaD0 {this, "maxD0overSigmaD0", LOCAL_MAX_DOUBLE, "Significance cut on |d0|"}
Gaudi::Property< double > m_maxZ0overSigmaZ0 {this, "maxZ0overSigmaZ0", LOCAL_MAX_DOUBLE, "Significance cut on |z0|"}
Gaudi::Property< double > m_maxZ0SinThetaoverSigmaZ0SinTheta
Gaudi::Property< int > m_minNInnermostLayerHits
Gaudi::Property< int > m_minNNextToInnermostLayerHits
Gaudi::Property< int > m_minNBothInnermostLayersHits
Gaudi::Property< int > m_maxNInnermostLayerSharedHits
Gaudi::Property< int > m_useMinBiasInnermostLayersCut
Gaudi::Property< bool > m_useHILoosePixModInnermostLayersCut
Gaudi::Property< int > m_minNSiHits {this, "minNSiHits", -1, "Minimum silicon (pixel + SCT) hits"}
Gaudi::Property< int > m_maxNSiSharedHits
Gaudi::Property< int > m_minNSiHitsIfSiSharedHits
Gaudi::Property< int > m_maxNSiHoles {this, "maxNSiHoles", LOCAL_MAX_INT, "Maximum silicon (pixel + SCT) holes"}
Gaudi::Property< int > m_minNPixelHits {this, "minNPixelHits", -1, "Required pixel hits"}
Gaudi::Property< int > m_maxNPixelSharedHits
Gaudi::Property< int > m_maxNPixelHoles
Gaudi::Property< double > m_minEtaForStrictNSiHitsCut
Gaudi::Property< int > m_minNSiHitsAboveEtaCutoff
Gaudi::Property< bool > m_maxOneSharedModule
Gaudi::Property< bool > m_useEtaDependentMaxChiSq
Gaudi::Property< int > m_minNSiHitsPhysical
Gaudi::Property< int > m_minNPixelHitsPhysical {this, "minNPixelHitsPhysical", -1, "Minimum physical pixel hits"}
Gaudi::Property< int > m_minNSctHitsPhysical {this, "minNSctHitsPhysical", -1, "Minimum physical SCT hits"}
Gaudi::Property< int > m_minNSctHits {this, "minNSctHits", -1, "Minimum SCT hits"}
Gaudi::Property< int > m_maxNSctSharedHits
Gaudi::Property< int > m_maxNSctHoles {this, "maxNSctHoles", LOCAL_MAX_INT, "Maximum SCT holes"}
Gaudi::Property< int > m_maxNSctDoubleHoles {this, "maxNSctDoubleHoles", LOCAL_MAX_INT, "Maximum SCT double holes"}
Gaudi::Property< double > m_maxTrtEtaAcceptance
Gaudi::Property< double > m_maxEtaForTrtHitCuts
Gaudi::Property< int > m_minNTrtHits {this, "minNTrtHits", -1, "Minimum TRT hits"}
Gaudi::Property< int > m_minNTrtHitsPlusOutliers {this, "minNTrtHitsPlusOutliers", -1, "Minimum TRT hits including outliers"}
Gaudi::Property< int > m_minNTrtHighThresholdHits {this, "minNTrtHighThresholdHits", -1, "Minimum high E TRT hits"}
Gaudi::Property< int > m_minNTrtHighThresholdHitsPlusOutliers
Gaudi::Property< double > m_maxTrtHighEFraction
Gaudi::Property< double > m_maxTrtHighEFractionWithOutliers
Gaudi::Property< double > m_maxTrtOutlierFraction
Gaudi::Property< double > m_maxChiSq {this, "maxChiSq", LOCAL_MAX_DOUBLE, "Maximum chi squared"}
Gaudi::Property< double > m_maxChiSqperNdf
Gaudi::Property< double > m_minProb {this, "minProb", -1., "Minimum p(chi^2, Ndof)"}
Gaudi::Property< double > m_minPtForProbCut
Gaudi::Property< double > m_minProbAbovePtCutoff
Gaudi::Property< int > m_minNUsedHitsdEdx {this, "minNUsedHitsdEdx", -1, "Minimum hits used for dEdx"}
Gaudi::Property< int > m_minNOverflowHitsdEdx {this, "minNOverflowHitsdEdx", -1, "Minimum overflow hits in IBL for dEdx"}
Gaudi::Property< bool > m_eProbHTonlyForXe
Gaudi::Property< double > m_minEProbabilityHT
Gaudi::Property< bool > m_useExperimentalInnermostLayersCut
Gaudi::Property< int > m_minNSiHitsMod
Gaudi::Property< int > m_minNSiHitsModTop
Gaudi::Property< int > m_minNSiHitsModBottom
Gaudi::Property< std::vector< double > > m_vecEtaCutoffsForSiHitsCut
Gaudi::Property< std::vector< int > > m_vecMinNSiHitsAboveEta
Gaudi::Property< std::vector< double > > m_vecEtaCutoffsForPtCut {this, "vecEtaCutoffsForPtCut", {}, "Minimum eta cutoffs for each pT cut"}
Gaudi::Property< std::vector< double > > m_vecMinPtAboveEta
Gaudi::Property< std::vector< double > > m_vecPtCutoffsForSctHitsCut
Gaudi::Property< std::vector< int > > m_vecMinNSctHitsAbovePt
Gaudi::Property< std::vector< double > > m_vecEtaCutoffsForZ0SinThetaCut
Gaudi::Property< std::vector< double > > m_vecPtCutoffsForZ0SinThetaCut
Gaudi::Property< std::vector< std::vector< double > > > m_vecvecMaxZ0SinThetaAboveEtaPt
Gaudi::Property< std::vector< double > > m_vecEtaCutoffsForD0Cut {this, "vecEtaCutoffsForD0Cut", {}, "Minimum eta cutoffs for each D0 value"}
Gaudi::Property< std::vector< double > > m_vecPtCutoffsForD0Cut {this, "vecPtCutoffsForD0Cut", {}, "Minimum pt cutoffs for each D0 value"}
Gaudi::Property< std::vector< std::vector< double > > > m_vecvecMaxD0AboveEtaPt
Gaudi::Property< std::vector< double > > m_vecEtaCutoffsForSctHolesCut
Gaudi::Property< std::vector< double > > m_vecPtCutoffsForSctHolesCut
Gaudi::Property< std::vector< std::vector< double > > > m_vecvecMaxSctHolesAboveEtaPt
Gaudi::Property< std::vector< double > > m_vecEtaCutoffsForSctHitsPlusDeadCut
Gaudi::Property< std::vector< double > > m_vecPtCutoffsForSctHitsPlusDeadCut
Gaudi::Property< std::vector< std::vector< double > > > m_vecvecMinSctHitsPlusDeadAboveEtaPt
asg::AcceptInfo m_acceptInfo
 Object used to store the last decision.
Gaudi::Property< std::string > m_cutLevel {this, "CutLevel", ""}
 The string version of the cut level so that it can be set via jobOptions.
Gaudi::Property< bool > m_initTrkTools {this, "UseTrkTrackTools", false, "Whether to initialize the Trk::Track tools"}
bool m_trackSumToolAvailable = false
 Whether the summary tool is available.
ToolHandle< Trk::ITrackSummaryToolm_trackSumTool {this, "TrackSummaryTool", "Trk::TrackSummaryTool/TrackSummaryTool"}
ToolHandle< Trk::IExtrapolatorm_extrapolator {this, "Extrapolator", "Trk::Extrapolator/Extrapolator"}
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Static Private Attributes

static constexpr double LOCAL_MAX_DOUBLE = 1.0e16
static constexpr int LOCAL_MAX_INT = std::numeric_limits<int>::max()
static const std::unordered_map< std::string, CutLevel > s_mapCutLevel

Friends

class TrackCut

Detailed Description

Implementation of the track selector tool.

Definition at line 51 of file InDetTrackSelectionTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ ~InDetTrackSelectionTool()

InDet::InDetTrackSelectionTool::~InDetTrackSelectionTool ( )
privatedefault

Create a proper constructor for Athena.

Member Function Documentation

◆ accept() [1/4]

asg::AcceptData InDet::InDetTrackSelectionTool::accept ( const Trk::Track & track,
const Trk::Vertex * vertex = nullptr ) const
overrideprivatevirtual

Function that returns the result of the cuts to a Trk::Track.

This version of accept() is included to allow the tool to be used in full-blown athena on Trk::Tracks. It is supposed to have identical functionality to the user as the xAOD version above, but of course it does need to access track information differently.

Implements InDet::IInDetTrackSelectionTool.

Definition at line 1083 of file InDetTrackSelectionTool.cxx.

1085{
1086 if (!m_isInitialized) ATH_MSG_WARNING( "Tool is not initialized! Calling accept() will not be very helpful." );
1087
1088 asg::AcceptData acceptData(&m_acceptInfo);
1089 if (m_trkTrackCuts.empty()) {
1092 return acceptData;
1093 }
1094
1095 const Trk::TrackParameters* perigee = track.perigeeParameters();
1096
1097 if ( perigee == nullptr || !perigee->covariance() ) {
1098 ATH_MSG_WARNING( "Track preselection: Zero pointer to parameterbase* received (most likely a track without perigee). This track will not pass any cuts." );
1099 return acceptData;
1100 }
1101
1102 std::unique_ptr<const Trk::TrackParameters> paramsAtVertex;
1103 if (vertex) {
1104 Trk::PerigeeSurface perigeeSurface(vertex->position());
1105 paramsAtVertex =
1106 m_extrapolator->extrapolate(Gaudi::Hive::currentContext(),
1107 *perigee,
1108 perigeeSurface,
1110 true,
1111 track.info().particleHypothesis());
1112 perigee = paramsAtVertex.get();
1113 }
1114
1115 if ( perigee == nullptr || !perigee->covariance() ) {
1116 ATH_MSG_INFO( "Track preselection: cannot make a measured perigee. This track will not pass any cuts." );
1117 if (!m_initTrkTools)
1118 ATH_MSG_INFO( "The user should set \"UseTrkTrackTools\" to true if they want the extrapolation tool to try to get a perigee." );
1119 return acceptData;
1120 }
1121
1122
1123 std::unique_ptr<Trk::TrackSummary> cleanup_summary;
1124 const Trk::TrackSummary* summary = track.trackSummary();
1125 if (summary == nullptr && m_trackSumToolAvailable) {
1126 cleanup_summary = m_trackSumTool->summary(Gaudi::Hive::currentContext(),track);
1127 summary = cleanup_summary.get();
1128 }
1129 if (summary == nullptr) {
1130 ATH_MSG_INFO( "Track preselection: cannot get a track summary. This track will not pass any cuts." );
1131 if (!m_initTrkTools)
1132 ATH_MSG_INFO( "The Trk::Track tools were not set to be initialized. The user should set the property \"UseTrkTrackTools\" to true if they wish to use the summary tool." );
1133 return acceptData;
1134 }
1135
1136 InDetAccessor::TrkTrackHelper track_helper(track,*summary, perigee);
1137 acceptData = accept( track_helper, m_trkTrackCuts);
1138 return acceptData;
1139}
#define ATH_MSG_INFO(x)
#define ATH_MSG_WARNING(x)
ToolHandle< Trk::ITrackSummaryTool > m_trackSumTool
std::atomic< uint64_t > m_numTracksPassed
a counter of the number of tracks that passed all cuts
virtual asg::AcceptData accept(const xAOD::IParticle *) const override
Get the decision using a generic IParticle pointer.
std::atomic< uint64_t > m_numTracksProcessed
a counter of the number of tracks proccessed
asg::AcceptInfo m_acceptInfo
Object used to store the last decision.
ToolHandle< Trk::IExtrapolator > m_extrapolator
bool m_trackSumToolAvailable
Whether the summary tool is available.
std::map< std::string, std::vector< std::function< bool(InDetAccessor::TrkTrackHelper helper, const asg::AsgMessaging &msgHelper)> > > m_trkTrackCuts
First element is the name of the cut family, second element is the set of cuts.
@ anyDirection
ParametersBase< TrackParametersDim, Charged > TrackParameters

◆ accept() [2/4]

asg::AcceptData InDet::InDetTrackSelectionTool::accept ( const xAOD::IParticle * p) const
overrideprivatevirtual

Get the decision using a generic IParticle pointer.

Function that returns the result of the cut through the xAOD::IParticle interface.

This is included to implement the AsgSelectionTool interface. It is not the recommended way of using the tool. If the IParticle is an xAOD::TrackParticle, then it will return the result of the explicitly xAOD::TrackParticle version below, with no vertex provided.

Parameters
pAn xAOD::IParticle pointer. If it is of type xAOD::TrackParticle, then it will be cast as such and funnelled into the corresponding function. If it is of some different type, then the particle will not pass.

Implements InDet::IInDetTrackSelectionTool.

Definition at line 1017 of file InDetTrackSelectionTool.cxx.

1018{
1019
1020 asg::AcceptData acceptData(&m_acceptInfo);
1021 // Check if this is a track:
1022 if( p->type() != xAOD::Type::TrackParticle ) {
1023 ATH_MSG_ERROR( "accept(...) Function received a non-track" );
1024 return acceptData;
1025 }
1026
1027 // Cast it to a track (we have already checked its type so we do not have to dynamic_cast):
1028 const xAOD::TrackParticle* trk = static_cast< const xAOD::TrackParticle* >( p );
1029
1030 // Let the specific function do the work:
1031 return accept( *trk, nullptr );
1032}
#define ATH_MSG_ERROR(x)
@ TrackParticle
The object is a charged track particle.
Definition ObjectType.h:43
TrackParticle_v1 TrackParticle
Reference the current persistent version:

◆ accept() [3/4]

asg::AcceptData InDet::InDetTrackSelectionTool::accept ( const xAOD::TrackParticle & trk,
const xAOD::Vertex * vtx = nullptr ) const
overrideprivatevirtual

Get the decision for a specific track object.

Function that returns the result of the cuts applied to a track in the xAOD framework.

The workhorse function of the tool that checks whether or not a track passes, and also can provide some information about why the track failed when it does. First it accesses all the data it needs from the track (but does not retrieve info it won't need to check) by looping over its InDet::TrackAccessors. It then loops over its cut families, each of which is composed of one or more InDet::TrackCuts, storing whether or not the track passes all the corresponding cuts. This design allows functionality to be added to the tool without increasing overhead in the main loop for users who don't need it. This eliminates the need for several multiple versions of the tool.

Parameters
trkThe xAOD::TrackParticle in question.
vtxAn optional pointer to a xAOD::Vertex that can be provided if the user wishes to cut on z0 with respect to the vertex's position. Note that this does not affect d0 cuts. If a vertex is not provided then the z0 cuts are performed with respect to the beamspot. More information can be found at the InDetTrackingDC14 TWiki.
Returns
A asg::AcceptData object that can be treated as a boolean for a simple pass/fail. It does store more detailed information about which cuts passed and which failed, by organizing the results into cut families. For example, TAccept::getCutResult("Z0SinTheta") will be true if the track passed cuts on Z0*Sin(theta), its uncertainty, and its significance.

Implements InDet::IInDetTrackSelectionTool.

Definition at line 1060 of file InDetTrackSelectionTool.cxx.

1062{
1063 asg::AcceptData acceptData(&m_acceptInfo);
1064 if (m_trackParticleCuts.empty()) {
1067 return acceptData;
1068 }
1069
1070 InDetAccessor::TrackParticleHelper track_helper(trk,vtx);
1071 return accept( track_helper, m_trackParticleCuts);
1072}
std::map< std::string, std::vector< std::function< bool(InDetAccessor::TrackParticleHelper helper, const asg::AsgMessaging &msgHelper)> > > m_trackParticleCuts
First element is the name of the cut family, second element is the set of cuts.

◆ accept() [4/4]

template<class Trk_Helper>
asg::AcceptData InDet::InDetTrackSelectionTool::accept ( Trk_Helper helper,
const std::map< std::string, std::vector< std::function< bool(Trk_Helper helper, const asg::AsgMessaging &msgHelper)> > > & trackCuts ) const
private

Definition at line 923 of file InDetTrackSelectionTool.cxx.

924 {
925 if (!m_isInitialized) {
926 if (!m_warnInit) {
927 ATH_MSG_WARNING( "Tool is not initialized! Calling accept() will not be very helpful." );
928 m_warnInit = true;
929 }
930 }
931
932 asg::AcceptData acceptData(&m_acceptInfo);
933 bool passAll = true;
934
935 // loop over all cuts
936 UShort_t cutFamilyIndex = 0;
937 for ( const auto& cutFamily : trackCuts ) {
938 bool pass = true;
939
940 for ( const auto& cut : cutFamily.second ) {
941 if (! cut(helper, *m_msgHelper) ) {
942 pass = false;
943 break;
944 }
945 }
946
947 // @TODO really always run through all cuts even if passed is false ?
948 passAll &= pass;
949 acceptData.setCutResult( cutFamilyIndex, pass );
950 cutFamilyIndex++;
951 }
952
953 {
954 // lock access to m_numTracksPassedCuts
955 std::lock_guard<std::mutex> lock(m_mutex);
956 for (unsigned int idx=0; idx < trackCuts.size(); ++idx) {
957 assert(idx<m_numTracksPassedCuts.size());
958 m_numTracksPassedCuts[idx] += acceptData.getCutResult(idx);
959 }
960 }
961 if (passAll) m_numTracksPassed++;
963
964 return acceptData;
965
966}
virtual void lock()=0
Interface to allow an object to lock itself when made const in SG.
std::unique_ptr< asg::AsgMessaging > m_msgHelper

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ finalize()

StatusCode InDet::InDetTrackSelectionTool::finalize ( )
overrideprivatevirtual

Function finalizing the tool.

Implements InDet::IInDetTrackSelectionTool.

Definition at line 969 of file InDetTrackSelectionTool.cxx.

970{
971 if (!m_isInitialized) {
972 ATH_MSG_ERROR( "You are attempting to finalize a tool that has not been initialized()." );
973 }
974
975#ifdef XAOD_ANALYSIS
976 if (m_numTracksProcessed == 0) {
977 ATH_MSG_INFO( "No tracks processed in selection tool." );
978 return StatusCode::SUCCESS;
979 }
980
981 // Only printed out for analysis
983 << m_numTracksPassed*100./m_numTracksProcessed << "% passed all cuts." );
984 for (const auto& cutFamily : m_trackParticleCuts) {
985 // lock(m_mutex) is not needed because this is inside of non-const finalize method.
986 uint64_t numPassed = m_numTracksPassedCuts.at(m_acceptInfo.getCutPosition(cutFamily.first));
987 ATH_MSG_INFO( numPassed << " = " << numPassed*100./m_numTracksProcessed << "% passed "
988 << cutFamily.first << " cut." );
989 }
990#endif
991
992 return StatusCode::SUCCESS;
993}

◆ getAcceptInfo()

const asg::AcceptInfo & InDet::InDetTrackSelectionTool::getAcceptInfo ( ) const
overrideprivatevirtual

Get an object describing the "selection steps" of the tool.

Accessor function to the tool's Root::TAccept object, which stores the result of the last accept(...) call.

The TAccept object itself is expensive to copy, and so should be accessed by const reference.

Implements InDet::IInDetTrackSelectionTool.

Definition at line 1000 of file InDetTrackSelectionTool.cxx.

1001{
1002 return m_acceptInfo;
1003}

◆ getKey()

SG::sgkey_t asg::AsgTool::getKey ( const void * ptr) const
inherited

Get the (hashed) key of an object that is in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::Event both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getName
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The hashed key of the object in the store. If not found, an invalid (zero) key.

Definition at line 119 of file AsgTool.cxx.

119 {
120
121#ifdef XAOD_STANDALONE
122 // In case we use @c xAOD::Event, we have a direct function call
123 // for this.
124 return evtStore()->event()->getKey( ptr );
125#else
126 const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127 return ( proxy == nullptr ? 0 : proxy->sgkey() );
128#endif // XAOD_STANDALONE
129 }
ServiceHandle< StoreGateSvc > & evtStore()

◆ getName()

const std::string & asg::AsgTool::getName ( const void * ptr) const
inherited

Get the name of an object that is / should be in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::Event both provide ways for getting the std::string name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getKey
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The string name of the object in the store. If not found, an empty string.

Definition at line 106 of file AsgTool.cxx.

106 {
107
108#ifdef XAOD_STANDALONE
109 // In case we use @c xAOD::Event, we have a direct function call
110 // for this.
111 return evtStore()->event()->getName( ptr );
112#else
113 const SG::DataProxy* proxy = evtStore()->proxy( ptr );
114 static const std::string dummy = "";
115 return ( proxy == nullptr ? dummy : proxy->name() );
116#endif // XAOD_STANDALONE
117 }

◆ getProperty()

template<class T>
const T * asg::AsgTool::getProperty ( const std::string & name) const
inherited

Get one of the tool's properties.

◆ initialize()

StatusCode InDet::InDetTrackSelectionTool::initialize ( void )
overrideprivatevirtual

Function initialising the tool.

Initializes the selection tool, setting up the cut objects as well as any additional tools it needs.

In athena, this is called automatically after the user has set the properties and so it must set the cut level without overwriting any additional cuts that have been set.

In standalone root, the cut levels can be set in a more or less intuitive way. After setting the cut levels and providing any additional configuration, this initialize() function must be called explicitly.

Implements InDet::IInDetTrackSelectionTool.

Definition at line 103 of file InDetTrackSelectionTool.cxx.

103 {
104 // Make sure we haven't already been initialized - this would be a sign of improper usage.
105 if (m_isInitialized) {
106 ATH_MSG_ERROR( "Tool has already been initialized. This is illegitimate." );
107 ATH_MSG_ERROR( "This call to initialize() will do nothing." );
108 return StatusCode::SUCCESS;
109 }
110
111 // Greet the user:
113
114 // if the CutLevel string is set to something recognizable,
115 // then do a soft set on the cuts (i.e. not overwriting those already set)
116 if (!m_cutLevel.empty()) {
117 std::unordered_map<std::string, InDet::CutLevel>::const_iterator it_mapCutLevel = s_mapCutLevel.find(m_cutLevel);
118 if ( it_mapCutLevel == s_mapCutLevel.end() ) {
119 ATH_MSG_ERROR( "The string \"" << m_cutLevel << "\" is not recognized as a cut level. No cuts will be changed." );
120 ATH_MSG_ERROR( "Cut level options are:" );
121 for (const auto& opt : s_mapCutLevel) {
122 ATH_MSG_ERROR( "\t" << opt.first );
123 }
124 } else {
125 ATH_MSG_DEBUG( "Cut level set to \"" << it_mapCutLevel->first << "\"." );
126 ATH_MSG_DEBUG( "This will not overwrite other cuts that have been set.");
127 setCutLevelPrivate( it_mapCutLevel->second, false );
128 }
129 }
130
131#ifndef XAOD_ANALYSIS
132 if (m_initTrkTools) {
134 if (!m_trackSumTool.empty()) {
135 ATH_CHECK( m_trackSumTool.retrieve() );
136 ATH_MSG_DEBUG( "Track summary tool retrieved." );
138 }
139 ATH_CHECK( m_extrapolator.retrieve() );
140 ATH_MSG_DEBUG( "Retrieved tool " << m_extrapolator );
141 } else {
142 m_extrapolator.disable();
143 m_trackSumTool.disable();
144 }
145#endif // XAOD_ANALYSIS
146
147 // Need messaging helper for cut functions
148 m_msgHelper = std::make_unique<asg::AsgMessaging>(this) ;
149
150
151#ifndef XAOD_ANALYSIS
152 // setup cut functions for Trk::Tracks
155#else
157#endif
158 // setup cut functions for xAOD::TrackParticles
159 for (const auto& cutFamily : m_trackParticleCuts) {
160 const std::string& cutFamilyName = cutFamily.first;
161 // lock(m_mutex) is not needed because this is inside of non-const initialize method.
162 m_numTracksPassedCuts.push_back(0);
163 if (m_acceptInfo.addCut( cutFamilyName, "Selection of tracks according to " + cutFamilyName ) < 0) {
164 ATH_MSG_ERROR( "Failed to add cut family " << cutFamilyName << " because the TAccept object is full." );
165 return StatusCode::FAILURE;
166 }
167 ATH_MSG_VERBOSE("Adding cut family " << cutFamilyName);
168 }
169
170 m_isInitialized = true;
171
172 return StatusCode::SUCCESS;
173}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_DEBUG(x)
StatusCode setupCuts(std::map< std::string, std::vector< std::function< bool(Trk_Helper helper, const asg::AsgMessaging &msgHelper)> > > &trackCuts)
Gaudi::Property< std::string > m_cutLevel
The string version of the cut level so that it can be set via jobOptions.
static const std::unordered_map< std::string, CutLevel > s_mapCutLevel
void setCutLevelPrivate(InDet::CutLevel level, bool overwrite=true)
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
Definition AsgTool.h:133

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ maxDoubleIsSet()

bool InDet::InDetTrackSelectionTool::maxDoubleIsSet ( double cutValue)
inlinestaticprivate

Definition at line 137 of file InDetTrackSelectionTool.h.

137{return cutValue < InDet::InDetTrackSelectionTool::LOCAL_MAX_DOUBLE && cutValue >= 0.;}

◆ maxIntIsSet()

bool InDet::InDetTrackSelectionTool::maxIntIsSet ( int cutValue)
inlinestaticprivate

Definition at line 138 of file InDetTrackSelectionTool.h.

138{return cutValue < InDet::InDetTrackSelectionTool::LOCAL_MAX_INT && cutValue >= 0;}

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msg_level_name()

const std::string & asg::AsgTool::msg_level_name ( ) const
inherited

A deprecated function for getting the message level's name.

Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:

MSG::name( msg().level() )

This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.

Returns
The string name of the current minimum message level that's printed

Definition at line 101 of file AsgTool.cxx.

101 {
102
103 return MSG::name( msg().level() );
104 }
MsgStream & msg() const
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition MsgLevel.cxx:19

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ print()

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setCutLevel()

void InDet::InDetTrackSelectionTool::setCutLevel ( InDet::CutLevel level,
bool overwrite = true )
overrideprivatevirtual

Function to set the cut level within standalone ROOT.

This function can be used to set the cut selection of the tool to a pre-defined level, as definied in the twiki for InDetTrackingPerformanceGuidelines. It is left public for use in standalone ROOT. In athena, this should be set through the jobOptions via the "CutLevel" property instead.

Parameters
levelThe CutLevel enumeration that picks the preset level to set the cuts to.
overwriteA boolean (default true) that indicates whether to force an overwrite of each cut. If false, this function does not change the cut levels if they have been altered from their default (no cut) value.

Implements InDet::IInDetTrackSelectionTool.

Definition at line 1162 of file InDetTrackSelectionTool.cxx.

1163{
1164#ifndef XAOD_STANDALONE
1165 ATH_MSG_WARNING( "InDetTrackSelectionTool::setCutLevel() is not designed to be called manually in Athena." );
1166 ATH_MSG_WARNING( "It may not behave as intended. Instead, configure it in the job options through the CutLevel property." );
1167#endif // XAOD_STANDALONE
1168 if (!m_cutLevel.empty()) {
1169 ATH_MSG_WARNING( "Cut level already set to " << m_cutLevel << ". Calling setCutLevel() is not expected." );
1170 }
1171 setCutLevelPrivate(level, overwrite);
1172}

◆ setCutLevelPrivate()

void InDet::InDetTrackSelectionTool::setCutLevelPrivate ( InDet::CutLevel level,
bool overwrite = true )
private

Definition at line 1177 of file InDetTrackSelectionTool.cxx.

1178{
1179 switch (level) {
1180 case CutLevel::NoCut :
1181 if (m_isInitialized) {
1182 // this check is in here so that it only happens once per call to setCutLevel,
1183 // but will still warn if only the private version is called somehow.
1184 ATH_MSG_WARNING( "Trying to set cut level while the tool is already initialized." );
1185 ATH_MSG_WARNING( "This will almost certainly not exhibit intended behavior." );
1186 }
1187 if (overwrite) {
1188 // minimum cuts will default to -1, so if a user wishes to remove a cut
1189 // from a preset level they can do so by setting the minimum to zero.
1190 // maximum cuts can be removed from a preset level by setting them negative.
1191 m_minPt = -1.; // in MeV
1192 m_minP = -1.;
1209 m_minNPixelHits = -1;
1213 m_minNSctHits = -1;
1218 m_minNSiHits = -1;
1225 m_maxOneSharedModule = false;
1227 m_maxEtaForTrtHitCuts = -1.; // this is really a minimum eta above which cuts are not applied
1228 m_minNTrtHits = -1;
1236 m_minProb = -1.;
1241 m_minNUsedHitsdEdx = -1;
1243 m_minEProbabilityHT = -1.;
1244 m_eProbHTonlyForXe = false;
1245#ifndef XAOD_ANALYSIS
1246 m_minNSiHitsMod = -1;
1247 m_minNSiHitsModTop = -1;
1249#endif
1250 m_vecEtaCutoffsForSiHitsCut = std::vector<double>();
1251 m_vecMinNSiHitsAboveEta = std::vector<int>();
1252 m_vecEtaCutoffsForPtCut = std::vector<double>();
1253 m_vecMinPtAboveEta = std::vector<double>();
1254 m_vecPtCutoffsForSctHitsCut = std::vector<double>();
1255 m_vecMinNSctHitsAbovePt = std::vector<int>();
1256 m_vecEtaCutoffsForZ0SinThetaCut = std::vector<double>();
1257 m_vecPtCutoffsForZ0SinThetaCut = std::vector<double>();
1258 m_vecvecMaxZ0SinThetaAboveEtaPt = std::vector<std::vector<double>>();
1259 m_vecEtaCutoffsForD0Cut = std::vector<double>();
1260 m_vecPtCutoffsForD0Cut = std::vector<double>();
1261 m_vecvecMaxD0AboveEtaPt = std::vector<std::vector<double>>();
1262 m_vecEtaCutoffsForSctHolesCut = std::vector<double>();
1263 m_vecPtCutoffsForSctHolesCut = std::vector<double>();
1264 m_vecvecMaxSctHolesAboveEtaPt = std::vector<std::vector<double>>();
1265 m_vecEtaCutoffsForSctHitsPlusDeadCut = std::vector<double>();
1266 m_vecPtCutoffsForSctHitsPlusDeadCut = std::vector<double>();
1267 m_vecvecMinSctHitsPlusDeadAboveEtaPt = std::vector<std::vector<double>>();
1268 }
1269 break;
1270 case CutLevel::Loose :
1271 setCutLevelPrivate(CutLevel::NoCut, overwrite); // if hard overwrite, reset all cuts first. will do nothing if !overwrite
1272 // change the cuts if a hard overwrite is asked for or if the cuts are unset
1273 if (overwrite || m_maxAbsEta >= LOCAL_MAX_DOUBLE) m_maxAbsEta = 2.5;
1274 if (overwrite || m_minNSiHits < 0) m_minNSiHits = 8;
1275 m_maxOneSharedModule = true;
1276 if (overwrite || m_maxNSiHoles >= LOCAL_MAX_INT) m_maxNSiHoles = 2;
1277 if (overwrite || m_maxNPixelHoles >= LOCAL_MAX_INT) m_maxNPixelHoles = 1;
1278 break;
1279 case CutLevel::LoosePrimary :
1280 setCutLevelPrivate(CutLevel::NoCut, overwrite); // implement loose cuts first
1281 if (overwrite || m_maxAbsEta >= LOCAL_MAX_DOUBLE) m_maxAbsEta = 2.5;
1282 if (overwrite || m_minNSiHits < 0) m_minNSiHits = 8;
1283 m_maxOneSharedModule = true;
1284 if (overwrite || m_maxNSiHoles >= LOCAL_MAX_INT) m_maxNSiHoles = 2;
1285 if (overwrite || m_maxNPixelHoles >= LOCAL_MAX_INT) m_maxNPixelHoles = 1;
1286 if (overwrite || m_minNSiHitsIfSiSharedHits < 0) m_minNSiHitsIfSiSharedHits = 10;
1287 break;
1288 case CutLevel::TightPrimary :
1289 setCutLevelPrivate(CutLevel::NoCut, overwrite);
1290 if (overwrite || m_maxAbsEta >= LOCAL_MAX_DOUBLE) m_maxAbsEta = 2.5;
1291 if (overwrite || m_minNSiHits < 0) m_minNSiHits = 9;
1292 m_maxOneSharedModule = true;
1293 if (overwrite || m_maxNSiHoles >= LOCAL_MAX_INT) m_maxNSiHoles = 2;
1294 if (overwrite || m_maxNPixelHoles >= LOCAL_MAX_INT) m_maxNPixelHoles = 0;
1296 if (overwrite || m_minNSiHitsAboveEtaCutoff < 0) m_minNSiHitsAboveEtaCutoff = 11;
1298 break;
1299 case CutLevel::LooseMuon :
1300 setCutLevelPrivate(CutLevel::NoCut, overwrite); // reset cuts unless we are doing a soft set
1301 if (overwrite || m_minNPixelHits < 0) m_minNPixelHits = 1;
1302 if (overwrite || m_minNSctHits < 0) m_minNSctHits = 5;
1303 if (overwrite || m_maxNSiHoles >= LOCAL_MAX_INT) m_maxNSiHoles = 2;
1305 if (overwrite || m_maxEtaForTrtHitCuts < 0.) m_maxEtaForTrtHitCuts = 1.9;
1306 if (overwrite || m_minNTrtHitsPlusOutliers < 0) m_minNTrtHitsPlusOutliers = 6;
1308 break;
1309 case CutLevel::LooseElectron :
1310 setCutLevelPrivate(CutLevel::NoCut, overwrite);
1311 if (overwrite || m_minNSiHits < 0) m_minNSiHits = 7;
1312 if (overwrite || m_minNPixelHits < 0) m_minNPixelHits = 1;
1313 break;
1314 case CutLevel::LooseTau :
1315 setCutLevelPrivate(CutLevel::NoCut, overwrite);
1316 if (overwrite || m_minPt < 0.0) m_minPt = 1000.0;
1317 if (overwrite || m_minNSiHits < 0) m_minNSiHits = 7;
1318 if (overwrite || m_minNPixelHits < 0) m_minNPixelHits = 2;
1319 if (overwrite || m_maxD0 >= LOCAL_MAX_DOUBLE) m_maxD0 = 1.0;
1320 if (overwrite || m_maxZ0 >= LOCAL_MAX_DOUBLE) m_maxZ0 = 1.5;
1321 break;
1322 case CutLevel::MinBias :
1323 setCutLevelPrivate(CutLevel::NoCut, overwrite);
1324 if (overwrite || m_useMinBiasInnermostLayersCut >= 0) m_useMinBiasInnermostLayersCut = 1; // if this is less than 0, it is turned off
1325 if (overwrite || m_minNPixelHits < 0) m_minNPixelHits = 1;
1326 if (overwrite || m_minNSctHits < 0) m_minNSctHits = 6;
1327 if (overwrite || m_minProbAbovePtCutoff < 0.) {
1328 m_minPtForProbCut = 10000.;
1330 }
1331 if (overwrite || m_maxD0 >= LOCAL_MAX_DOUBLE) m_maxD0 = 1.5;
1332 if (overwrite || m_maxZ0SinTheta >= LOCAL_MAX_DOUBLE) m_maxZ0SinTheta = 1.5;
1333 if (overwrite || m_maxAbsEta >= LOCAL_MAX_DOUBLE) m_maxAbsEta = 2.5;
1334 if (overwrite || m_minPt < 0.) m_minPt = 500.0;
1335 break;
1336 case CutLevel::HILoose:
1337 // HILoose is similar to MinBias, but not identical
1338 setCutLevelPrivate(CutLevel::NoCut, overwrite);
1339 if (overwrite || m_maxAbsEta >= LOCAL_MAX_DOUBLE) m_maxAbsEta = 2.5;
1341 if (overwrite || m_minNPixelHits < 0) m_minNPixelHits = 1;
1342 if (overwrite || (m_vecPtCutoffsForSctHitsCut.empty()
1343 && m_vecMinNSctHitsAbovePt.empty())) {
1344 m_vecPtCutoffsForSctHitsCut = std::vector<double>({0.0, 300.0, 400.0});
1345 m_vecMinNSctHitsAbovePt = std::vector<int>({2, 4, 6});
1346 }
1347 if (overwrite || m_maxD0 >= LOCAL_MAX_DOUBLE) m_maxD0 = 1.5;
1348 if (overwrite || m_maxZ0SinTheta >= LOCAL_MAX_DOUBLE) m_maxZ0SinTheta = 1.5;
1349 break;
1350 case CutLevel::HITight:
1351 setCutLevelPrivate(CutLevel::NoCut, overwrite);
1352 // HITight is like HILoose but we require 8 SCT hits and 2 pixel hits
1353 setCutLevelPrivate(CutLevel::NoCut, overwrite);
1354 if (overwrite || m_maxAbsEta >= LOCAL_MAX_DOUBLE) m_maxAbsEta = 2.5;
1356 if (overwrite || m_minNPixelHits < 0) m_minNPixelHits = 2;
1357 if (overwrite || (m_vecPtCutoffsForSctHitsCut.empty()
1358 && m_vecMinNSctHitsAbovePt.empty())) {
1359 m_vecPtCutoffsForSctHitsCut = std::vector<double>({0.0, 300.0, 400.0});
1360 m_vecMinNSctHitsAbovePt = std::vector<int>({4, 6, 8});
1361 }
1362 if (overwrite || m_maxD0 >= LOCAL_MAX_DOUBLE) m_maxD0 = 1.0;
1363 if (overwrite || m_maxZ0SinTheta >= LOCAL_MAX_DOUBLE) m_maxZ0SinTheta = 1.0;
1364 if (overwrite || m_maxChiSqperNdf >= LOCAL_MAX_DOUBLE) m_maxChiSqperNdf = 6.0;
1365 break;
1366 case CutLevel::HILooseOptimized:
1367 setCutLevelPrivate(CutLevel::NoCut, overwrite);
1368 if (overwrite || m_maxAbsEta >= LOCAL_MAX_DOUBLE) m_maxAbsEta = 2.5;
1369 if (overwrite || m_maxNPixelHoles >= LOCAL_MAX_INT) m_maxNPixelHoles = 0;
1371 if (overwrite || (m_vecEtaCutoffsForZ0SinThetaCut.empty() &&
1374 m_vecEtaCutoffsForZ0SinThetaCut = std::vector<double>({0.0, 1.1, 1.6, 2.0});
1376 std::vector<double>({500, 600, 700, 800, 900, 1000, 1500,
1377 2000, 2500, 3000, 5000, 8000, 12000});
1379 std::vector<std::vector<double>>({{2.10, 2.15, 6.00, 5.00, 3.10, 2.00, 1.75, 1.60, 1.43, 1.40, 1.05, 0.65, 0.60},
1380 {1.44, 1.47, 1.50, 1.55, 1.62, 1.45, 1.45, 1.78, 1.73, 1.50, 1.20, 0.97, 0.53},
1381 {1.40, 1.45, 1.50, 1.46, 1.41, 1.37, 1.25, 1.50, 1.50, 1.36, 1.10, 0.85, 0.52},
1382 {1.51, 1.70, 1.70, 1.71, 1.71, 1.53, 1.54, 1.49, 1.36, 1.20, 0.95, 0.60, 0.55}});
1383 }
1384 if (overwrite || (m_vecEtaCutoffsForD0Cut.empty() &&
1385 m_vecPtCutoffsForD0Cut.empty() &&
1386 m_vecvecMaxD0AboveEtaPt.empty())){
1387 m_vecEtaCutoffsForD0Cut = std::vector<double>({0.0, 1.1, 1.6, 2.0});
1389 std::vector<double>({500, 600, 700, 800, 900, 1000, 1500,
1390 2000, 2500, 3000, 5000, 8000, 12000});
1392 std::vector<std::vector<double>>({{0.81, 0.90, 0.94, 0.92, 0.90, 0.75, 0.65, 0.63, 0.62, 0.60, 0.63, 0.50, 0.55},
1393 {1.00, 0.98, 0.98, 0.92, 0.90, 0.69, 0.67, 0.86, 0.88, 0.88, 0.88, 0.87, 1.06},
1394 {1.19, 1.15, 1.10, 1.08, 1.03, 0.94, 0.85, 0.97, 0.97, 0.96, 0.95, 0.92, 1.04},
1395 {1.33, 1.23, 1.21, 1.15, 1.15, 1.07, 0.94, 0.97, 0.97, 0.97, 0.98, 1.10, 1.10}});
1396 }
1397 break;
1398 case CutLevel::HITightOptimized:
1399 setCutLevelPrivate(CutLevel::NoCut, overwrite);
1400 if (overwrite || m_maxAbsEta >= LOCAL_MAX_DOUBLE) m_maxAbsEta = 2.5;
1401 if (overwrite || m_maxNPixelHoles >= LOCAL_MAX_INT) m_maxNPixelHoles = 0;
1403 if (overwrite || (m_vecEtaCutoffsForZ0SinThetaCut.empty() &&
1406 m_vecEtaCutoffsForZ0SinThetaCut = std::vector<double>({0.0, 1.1, 1.6, 2.0});
1407 m_vecPtCutoffsForZ0SinThetaCut = std::vector<double>({500, 600, 700, 800, 900, 1000, 1500,
1408 2000, 2500, 3000, 5000, 8000, 12000});
1410 std::vector<std::vector<double>>({{0.62, 0.70, 0.82, 0.87, 0.74, 0.61, 0.50, 0.48, 0.46, 0.45, 0.30, 0.24, 0.23},
1411 {0.51, 0.53, 0.53, 0.53, 0.52, 0.43, 0.28, 0.27, 0.28, 0.30, 0.24, 0.22, 0.13},
1412 {0.91, 0.89, 0.87, 0.55, 0.59, 0.37, 0.39, 0.31, 0.34, 0.35, 0.30, 0.30, 0.20},
1413 {0.76, 0.71, 0.69, 0.48, 0.48, 0.47, 0.46, 0.42, 0.38, 0.32, 0.28, 0.20, 0.15}});
1414 }
1415 if (overwrite || (m_vecEtaCutoffsForD0Cut.empty() &&
1416 m_vecPtCutoffsForD0Cut.empty() &&
1417 m_vecvecMaxD0AboveEtaPt.empty())){
1418 m_vecEtaCutoffsForD0Cut = std::vector<double>({0.0, 1.1, 1.6, 2.0});
1419 m_vecPtCutoffsForD0Cut = std::vector<double>({500, 600, 700, 800, 900, 1000, 1500,
1420 2000, 2500, 3000, 5000, 8000, 12000});
1422 std::vector<std::vector<double>>({{0.34, 0.39, 0.47, 0.49, 0.55, 0.47, 0.44, 0.21, 0.19, 0.17, 0.12, 0.14, 0.15},
1423 {0.32, 0.32, 0.33, 0.33, 0.33, 0.27, 0.16, 0.15, 0.13, 0.15, 0.13, 0.16, 0.20},
1424 {0.95, 0.91, 0.88, 0.35, 0.37, 0.24, 0.26, 0.22, 0.23, 0.24, 0.19, 0.19, 0.23},
1425 {0.68, 0.67, 0.65, 0.42, 0.42, 0.36, 0.35, 0.31, 0.27, 0.26, 0.27, 0.28, 0.30}});
1426 }
1427 if (overwrite || (m_vecEtaCutoffsForSctHolesCut.empty() &&
1430 m_vecEtaCutoffsForSctHolesCut = std::vector<double>({0.0, 1.1, 1.6, 2.0});
1431 m_vecPtCutoffsForSctHolesCut = std::vector<double>({500, 600, 700, 800, 900, 1000, 1500,
1432 2000, 2500, 3000, 5000, 8000, 12000});
1434 std::vector<std::vector<double>>({{0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1},
1435 {0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1},
1436 {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
1437 {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}});
1438 }
1439 if (overwrite || (m_vecEtaCutoffsForSctHitsPlusDeadCut.empty() &&
1442 m_vecEtaCutoffsForSctHitsPlusDeadCut = std::vector<double>({0.0, 1.1, 1.6, 2.0});
1443 m_vecPtCutoffsForSctHitsPlusDeadCut = std::vector<double>({500, 600, 700, 800, 900, 1000, 1500,
1444 2000, 2500, 3000, 5000, 8000, 12000});
1446 std::vector<std::vector<double>>({{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1447 {0, 0, 0, 0, 0, 0, 6, 6, 6, 6, 0, 0, 0},
1448 {8, 8, 8, 7, 7, 6, 6, 6, 6, 6, 0, 0, 0},
1449 {7, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}});
1450 }
1451 break;
1452 case CutLevel::HILoosePixMod:
1453 // HILoosePixMod is similar to HILoose, but with a modified hit cut on the innermost layers
1454 setCutLevelPrivate(CutLevel::NoCut, overwrite);
1455 if (overwrite || m_maxAbsEta >= LOCAL_MAX_DOUBLE) m_maxAbsEta = 2.5;
1456 if (overwrite) m_useHILoosePixModInnermostLayersCut = true;
1457 if (overwrite || m_minNPixelHits < 0) m_minNPixelHits = 1;
1458 if (overwrite || m_vecPtCutoffsForSctHitsCut.empty()) m_vecPtCutoffsForSctHitsCut = std::vector<double>({0.0, 300.0, 400.0});
1459 if (overwrite || m_vecMinNSctHitsAbovePt.empty()) m_vecMinNSctHitsAbovePt = std::vector<int>({2, 4, 6});
1460 if (overwrite || m_maxD0 >= LOCAL_MAX_DOUBLE) m_maxD0 = 1.5;
1461 if (overwrite || m_maxZ0SinTheta >= LOCAL_MAX_DOUBLE) m_maxZ0SinTheta = 1.5;
1462 break;
1463 default:
1464 ATH_MSG_ERROR("CutLevel not recognized. Cut selection will remain unchanged.");
1465 break;
1466 }
1467}
Gaudi::Property< std::vector< double > > m_vecEtaCutoffsForSctHitsPlusDeadCut
Gaudi::Property< std::vector< double > > m_vecEtaCutoffsForSiHitsCut
Gaudi::Property< double > m_maxTrtHighEFraction
Gaudi::Property< int > m_minNSiHitsAboveEtaCutoff
Gaudi::Property< bool > m_eProbHTonlyForXe
Gaudi::Property< std::vector< std::vector< double > > > m_vecvecMaxSctHolesAboveEtaPt
Gaudi::Property< double > m_minEtaForStrictNSiHitsCut
Gaudi::Property< bool > m_useHILoosePixModInnermostLayersCut
Gaudi::Property< int > m_maxNSctDoubleHoles
Gaudi::Property< double > m_maxZ0SinThetaoverSigmaZ0SinTheta
Gaudi::Property< int > m_minNBothInnermostLayersHits
Gaudi::Property< std::vector< double > > m_vecEtaCutoffsForD0Cut
Gaudi::Property< double > m_maxZ0overSigmaZ0
Gaudi::Property< int > m_minNPixelHitsPhysical
Gaudi::Property< int > m_minNSiHitsPhysical
Gaudi::Property< double > m_minPtForProbCut
Gaudi::Property< std::vector< std::vector< double > > > m_vecvecMaxZ0SinThetaAboveEtaPt
Gaudi::Property< double > m_maxSigmaZ0SinTheta
Gaudi::Property< double > m_maxD0overSigmaD0
Gaudi::Property< std::vector< double > > m_vecPtCutoffsForSctHitsPlusDeadCut
Gaudi::Property< std::vector< double > > m_vecPtCutoffsForD0Cut
Gaudi::Property< int > m_minNSiHitsIfSiSharedHits
Gaudi::Property< double > m_maxSigmaD0
Gaudi::Property< std::vector< double > > m_vecPtCutoffsForSctHitsCut
Gaudi::Property< int > m_minNInnermostLayerHits
Gaudi::Property< std::vector< std::vector< double > > > m_vecvecMinSctHitsPlusDeadAboveEtaPt
Gaudi::Property< double > m_minEProbabilityHT
Gaudi::Property< int > m_useMinBiasInnermostLayersCut
Gaudi::Property< double > m_maxEtaForTrtHitCuts
Gaudi::Property< int > m_minNSiHitsModBottom
Gaudi::Property< int > m_maxNInnermostLayerSharedHits
Gaudi::Property< bool > m_useEtaDependentMaxChiSq
Gaudi::Property< int > m_minNOverflowHitsdEdx
Gaudi::Property< double > m_maxAbsEta
Gaudi::Property< bool > m_maxOneSharedModule
Gaudi::Property< std::vector< double > > m_vecEtaCutoffsForPtCut
Gaudi::Property< std::vector< double > > m_vecEtaCutoffsForSctHolesCut
Gaudi::Property< int > m_minNSctHitsPhysical
Gaudi::Property< double > m_minProbAbovePtCutoff
Gaudi::Property< std::vector< double > > m_vecPtCutoffsForSctHolesCut
Gaudi::Property< int > m_minNTrtHighThresholdHitsPlusOutliers
Gaudi::Property< double > m_maxChiSqperNdf
Gaudi::Property< double > m_maxTrtOutlierFraction
Gaudi::Property< int > m_minNNextToInnermostLayerHits
Gaudi::Property< int > m_maxNPixelSharedHits
Gaudi::Property< double > m_maxZ0SinTheta
Gaudi::Property< int > m_minNTrtHighThresholdHits
Gaudi::Property< std::vector< double > > m_vecMinPtAboveEta
Gaudi::Property< std::vector< int > > m_vecMinNSctHitsAbovePt
Gaudi::Property< std::vector< int > > m_vecMinNSiHitsAboveEta
Gaudi::Property< int > m_minNTrtHitsPlusOutliers
Gaudi::Property< double > m_maxTrtEtaAcceptance
Gaudi::Property< std::vector< double > > m_vecPtCutoffsForZ0SinThetaCut
Gaudi::Property< double > m_maxTrtHighEFractionWithOutliers
Gaudi::Property< double > m_maxSigmaZ0
Gaudi::Property< std::vector< std::vector< double > > > m_vecvecMaxD0AboveEtaPt
Gaudi::Property< std::vector< double > > m_vecEtaCutoffsForZ0SinThetaCut

◆ setupCuts()

template<int VERBOSE, class Trk_Helper>
StatusCode InDet::InDetTrackSelectionTool::setupCuts ( std::map< std::string, std::vector< std::function< bool(Trk_Helper helper, const asg::AsgMessaging &msgHelper)> > > & trackCuts)
private

Definition at line 180 of file InDetTrackSelectionTool.cxx.

180 {
181 // track parameter cuts
182 if (m_minPt > 0.) {
183 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum Pt: " << m_minPt << " MeV" );
184 trackCuts["Pt"].push_back( [minPt = m_minPt](Trk_Helper helper, const asg::AsgMessaging &msgHelper) -> bool { return helper.pt(msgHelper) >= minPt; } );
185 }
187 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum |Eta|: " << m_maxAbsEta );
188 trackCuts["Eta"].push_back( [maxAbsEta = m_maxAbsEta](Trk_Helper helper, const asg::AsgMessaging &msgHelper) { return std::abs(helper.eta(msgHelper)) <= maxAbsEta; } );
189 }
190 if (m_minP > 0.) {
191 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum P: " << m_minP << " MeV" );
192 trackCuts["P"].push_back( [maxInvP = 1./m_minP](Trk_Helper helper, const asg::AsgMessaging &msgHelper) { return std::abs(helper.qOverP(msgHelper)) <= maxInvP; } );
193 }
194 if (maxDoubleIsSet(m_maxD0)) {
195 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum d0: " << m_maxD0 << " mm" );
196 trackCuts["D0"].push_back( [maxD0 = m_maxD0](Trk_Helper helper, const asg::AsgMessaging &msgHelper) { return std::abs(helper.d0(msgHelper)) <= maxD0; } );
197 }
198 if (maxDoubleIsSet(m_maxZ0)) {
199 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum z0: " << m_maxZ0 << " mm");
200 trackCuts["Z0"].push_back( [maxZ0 = m_maxZ0](Trk_Helper helper, const asg::AsgMessaging &msgHelper) { return std::abs(helper.z0(msgHelper)) <= maxZ0; } );
201 }
203 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum z0*sin(theta): " << m_maxZ0SinTheta << " mm" );
204 trackCuts["Z0SinTheta"].push_back([maxZ0SinTheta = m_maxZ0SinTheta.value()](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
205 return std::abs( helper.z0(msgHelper) * std::sin(helper.theta(msgHelper))) <= maxZ0SinTheta;
206 });
207 }
209 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum uncertainty on d0: " << m_maxSigmaD0 << " mm" );
210 trackCuts["D0"].push_back([maxSigmaD0Squared = sqr(m_maxSigmaD0.value())](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
211 return getDefiningParametersCov(helper,msgHelper, InDetAccessor::d0,InDetAccessor::d0) <= maxSigmaD0Squared;
212 });
213 }
215 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum uncertainty on z0: " << m_maxSigmaZ0 << " mm" );
216 trackCuts["Z0"].push_back([maxSigmaZ0Squared = sqr(m_maxSigmaZ0.value())](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
217 return getDefiningParametersCov(helper,msgHelper, InDetAccessor::z0,InDetAccessor::z0) <= maxSigmaZ0Squared;
218 });
219 }
221 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum uncertainty on z0*sin(theta): "
222 << m_maxSigmaZ0SinTheta << " mm" );
223 trackCuts["Z0SinTheta"].push_back([maxSigmaZ0SinThetaSquared = sqr(m_maxSigmaZ0SinTheta.value())](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
224 double theta = helper.theta(msgHelper);
225 double sinTheta = std::sin(theta);
226 double cosTheta = std::cos(theta);
227 double z0 = helper.z0(msgHelper);
228
229 return ( sqr(z0)*sqr(cosTheta) * getDefiningParametersCov(helper,msgHelper, InDetAccessor::theta,InDetAccessor::theta)
230 + 2*z0 *sinTheta*cosTheta * getDefiningParametersCov(helper,msgHelper, InDetAccessor::theta,InDetAccessor::z0)
231 + sqr(sinTheta) * getDefiningParametersCov(helper,msgHelper, InDetAccessor::z0, InDetAccessor::z0) ) <= maxSigmaZ0SinThetaSquared;
232 });
233 }
235 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum significance on d0: " << m_maxD0overSigmaD0 );
236 trackCuts["D0"].push_back([maxD0overSigmaD0Squared = sqr(m_maxD0overSigmaD0.value())](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
237 return sqr(helper.d0(msgHelper)) <= maxD0overSigmaD0Squared * getDefiningParametersCov(helper,msgHelper, InDetAccessor::d0,InDetAccessor::d0);
238 });
239 }
241 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum significance on z0: " << m_maxZ0overSigmaZ0 );
242 trackCuts["Z0"].push_back([maxZ0overSigmaZ0Squared = sqr(m_maxZ0overSigmaZ0.value())](Trk_Helper helper, const asg::AsgMessaging &msgHelper) -> bool {
243 return sqr(helper.z0(msgHelper)) <= maxZ0overSigmaZ0Squared * getDefiningParametersCov(helper,msgHelper, InDetAccessor::z0,InDetAccessor::z0);
244 });
245 }
247 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum significance on z0*sin(theta): "
249 trackCuts["Z0SinTheta"].push_back([maxZ0SinThetaoverSigmaZ0SinThetaSquared = sqr(m_maxZ0SinThetaoverSigmaZ0SinTheta.value())](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
250
251 double theta = helper.theta(msgHelper);
252 double sinTheta = std::sin(theta);
253 double cosTheta = std::cos(theta);
254 double z0 = helper.z0(msgHelper);
255
256 return sqr(z0*sinTheta) <=
257 maxZ0SinThetaoverSigmaZ0SinThetaSquared * ( sqr(z0)*sqr(cosTheta) * getDefiningParametersCov(helper,msgHelper, InDetAccessor::theta,InDetAccessor::theta)
258 + 2*z0 *sinTheta*cosTheta * getDefiningParametersCov(helper,msgHelper, InDetAccessor::theta,InDetAccessor::z0)
259 + sqr(sinTheta) * getDefiningParametersCov(helper,msgHelper, InDetAccessor::z0, InDetAccessor::z0));
260 });
261 }
262
263 // hit cuts
264 if (m_minNInnermostLayerHits > 0) {
265 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum hits from innermost pixel layer: " << m_minNInnermostLayerHits );
266 if constexpr(VERBOSE>0) ATH_MSG_INFO( " (Track will pass if no hit is expected.)" );
267 trackCuts["InnermostLayersHits"].push_back([minNInnermostLayerHits = m_minNInnermostLayerHits.value()](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
268 return ( getSummary(helper, msgHelper, xAOD::numberOfInnermostPixelLayerHits) >= minNInnermostLayerHits
269 || getSummary(helper, msgHelper, xAOD::expectInnermostPixelLayerHit) == 0);
270 });
271 }
273 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum hits from next to innermost pixel layer: " << m_minNNextToInnermostLayerHits );
274 if constexpr(VERBOSE>0) ATH_MSG_INFO( " (Track will pass if no hit is expected.)" );
275 trackCuts["InnermostLayersHits"].push_back([minNNextToInnermostLayerHits = m_minNNextToInnermostLayerHits.value()](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
276 return ( getSummary(helper, msgHelper, xAOD::numberOfNextToInnermostPixelLayerHits) >= minNNextToInnermostLayerHits
277 || getSummary(helper, msgHelper, xAOD::expectNextToInnermostPixelLayerHit) == 0);
278 });
279 }
281 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum hits from both innermost pixel layers: " << m_minNBothInnermostLayersHits );
282 if constexpr(VERBOSE>0) ATH_MSG_INFO( " (If a layer has no hits but one is not expected, the" );
283 if constexpr(VERBOSE>0) ATH_MSG_INFO( " number of hits in that layer will be taken to be 1.)" );
285 ATH_MSG_WARNING( "A value of minNBothInnermostLayersHits above 2 does not make sense." );
286 ATH_MSG_WARNING( " Use 1 for \"or\" or 2 for \"and\"." );
287 }
288 trackCuts["InnermostLayersHits"].push_back([minNBothInnermostLayersHits = m_minNBothInnermostLayersHits.value()](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
289 return ( std::max( getSummary(helper, msgHelper, xAOD::numberOfInnermostPixelLayerHits),
290 static_cast<uint8_t>( !getSummary(helper, msgHelper, xAOD::expectInnermostPixelLayerHit) ))
291 +std::max( getSummary(helper, msgHelper, xAOD::numberOfNextToInnermostPixelLayerHits),
292 static_cast<uint8_t>( !getSummary(helper, msgHelper, xAOD::expectNextToInnermostPixelLayerHit )))
293 >= minNBothInnermostLayersHits);
294 });
295 }
296 if (m_useMinBiasInnermostLayersCut > 0 ) { // less than zero indicates this cut is manually turned off
297 if constexpr(VERBOSE>0) ATH_MSG_INFO( " An innermost layer hit is required if expected, otherwise" );
298 if constexpr(VERBOSE>0) ATH_MSG_INFO( " a next-to-innermost layer hit is required if it is expected." );
299 trackCuts["InnermostLayersHits"].push_back([](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
300 uint8_t expected_innermost_pixel_layer_hit = getSummary(helper, msgHelper, xAOD::expectInnermostPixelLayerHit);
301 return (expected_innermost_pixel_layer_hit > 0 && getSummary(helper, msgHelper, xAOD::numberOfInnermostPixelLayerHits)>=1)
302 || (expected_innermost_pixel_layer_hit == 0 && ( getSummary(helper, msgHelper, xAOD::expectNextToInnermostPixelLayerHit)==0
304 });
305 }
307 if constexpr(VERBOSE>0) ATH_MSG_INFO( " An innermost layer hit or next-to-innermost layer hit is required. If there are" );
308 if constexpr(VERBOSE>0) ATH_MSG_INFO( " no innermost layer or next-to-innermost layer hits, then zero expected" );
309 if constexpr(VERBOSE>0) ATH_MSG_INFO( " next-to-innermost layer hits is required." );
310 trackCuts["InnermostLayersHits"].push_back([](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
311 return (getSummary(helper, msgHelper, xAOD::numberOfInnermostPixelLayerHits)>=1)
313 || (getSummary(helper, msgHelper, xAOD::expectNextToInnermostPixelLayerHit)==0);
314 });
315 }
317 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum shared hits in innermost pixel layer: " << m_maxNInnermostLayerSharedHits );
318 trackCuts["InnermostLayersHits"].push_back([maxNInnermostLayerSharedHits = m_maxNInnermostLayerSharedHits.value()](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
319 return getSummary(helper, msgHelper, xAOD::numberOfInnermostPixelLayerSharedHits) <= maxNInnermostLayerSharedHits;
320 });
321 }
322 if (m_minNPixelHits > 0) {
323 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum pixel hits: " << m_minNPixelHits );
324 trackCuts["PixelHits"].push_back( [minNPixelHits = m_minNPixelHits.value()](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
325 return getSummarySum<2,Trk_Helper>(helper, msgHelper, {xAOD::numberOfPixelHits,xAOD::numberOfPixelDeadSensors}) >= minNPixelHits;
326 });
327 }
328 if (m_minNPixelHitsPhysical > 0) {
329 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum physical pixel hits (i.e. dead sensors do not count): "
331 trackCuts["PixelHits"].push_back([minNPixelHitsPhysical = m_minNPixelHitsPhysical.value()](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
332 return getSummary(helper, msgHelper, xAOD::numberOfPixelHits) >= minNPixelHitsPhysical;
333 });
334 }
336 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum pixel holes: " << m_maxNPixelHoles );
337 trackCuts["PixelHits"].push_back([maxNPixelHoles = m_maxNPixelHoles.value()](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
338 return getSummary(helper, msgHelper, xAOD::numberOfPixelHoles) <= maxNPixelHoles;
339 });
340 }
342 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum pixel shared hits: " << m_maxNPixelSharedHits );
343 trackCuts["PixelHits"].push_back([maxNPixelSharedHits = m_maxNPixelSharedHits.value()](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
344 return getSummary(helper, msgHelper, xAOD::numberOfPixelSharedHits) <= maxNPixelSharedHits;
345 });
346 }
347 if (m_minNSctHits > 0) {
348 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum SCT hits: " << m_minNSctHits );
349 trackCuts["SctHits"].push_back( [minNSctHits = m_minNSctHits.value()](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
350 return getSummarySum<2,Trk_Helper>(helper, msgHelper, {xAOD::numberOfSCTHits, xAOD::numberOfSCTDeadSensors}) >= minNSctHits;
351 });
352 }
353 if (m_minNSctHitsPhysical > 0) {
354 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum physical SCT hits (i.e. dead sensors do not count): "
356
357 trackCuts["SctHits"].push_back([minNSctHitsPhysical = m_minNSctHitsPhysical.value()](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
358 return getSummary(helper, msgHelper, xAOD::numberOfSCTHits) >= minNSctHitsPhysical;
359 });
360 }
362 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum SCT holes: " << m_maxNSctHoles );
363 trackCuts["SctHits"].push_back([maxNSctHoles = m_maxNSctHoles.value()](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
364 return getSummary(helper, msgHelper, xAOD::numberOfSCTHoles) <= maxNSctHoles;
365 });
366 }
368 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum SCT shared hits: " << m_maxNSctSharedHits );
369 trackCuts["SctHits"].push_back([maxNSctSharedHits = m_maxNSctSharedHits.value()](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
370 return getSummary(helper, msgHelper, xAOD::numberOfSCTSharedHits) <= maxNSctSharedHits;
371 });
372 }
374 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum SCT double holes: " << m_maxNSctDoubleHoles );
375 trackCuts["SctHits"].push_back([maxNSctDoubleHoles = m_maxNSctDoubleHoles.value()](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
376 return getSummary(helper, msgHelper, xAOD::numberOfSCTDoubleHoles) <= maxNSctDoubleHoles ;
377 });
378 }
379 if (m_minNSiHits > 0) {
380 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum silicon (pixel + SCT) hits: " << m_minNSiHits );
381 trackCuts["SiHits"].push_back([minNSiHits = m_minNSiHits.value()](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
382 return getSummarySum<4,Trk_Helper>(helper, msgHelper, {xAOD::numberOfPixelHits,
383 xAOD::numberOfSCTHits,
384 xAOD::numberOfPixelDeadSensors,
385 xAOD::numberOfSCTDeadSensors} ) >= minNSiHits ;
386 });
387 }
388 if (m_minNSiHitsPhysical > 0) {
389 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum physical silicon hits (i.e. dead sensors do not count): "
391 trackCuts["SiHits"].push_back([minNSiHitsPhysical = m_minNSiHitsPhysical.value()](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
392 return getSummarySum<2,Trk_Helper>(helper, msgHelper,{xAOD::numberOfPixelHits, xAOD::numberOfSCTHits} ) >= minNSiHitsPhysical ;
393 });
394 }
396 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum silicon holes: " << m_maxNSiHoles );
397 trackCuts["SiHits"].push_back([maxNSiHoles = m_maxNSiHoles.value()](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
398 return getSummarySum<2,Trk_Helper>(helper, msgHelper,{xAOD::numberOfPixelHoles, xAOD::numberOfSCTHoles} ) <= maxNSiHoles ;
399 });
400 }
402 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum silicon shared hits: " << m_maxNSiSharedHits );
403 trackCuts["SiHits"].push_back([maxNSiSharedHits = m_maxNSiSharedHits.value()](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
404 return getSummarySum<2,Trk_Helper>(helper, msgHelper,{xAOD::numberOfPixelSharedHits, xAOD::numberOfSCTSharedHits} ) <= maxNSiSharedHits ;
405 });
406 }
408 if constexpr(VERBOSE>0) ATH_MSG_INFO( " No more than one shared module:" );
409 if constexpr(VERBOSE>0) ATH_MSG_INFO( " i.e. max 1 shared pixel hit or" );
410 if constexpr(VERBOSE>0) ATH_MSG_INFO( " 2 shared SCT hits, and not both." );
411 trackCuts["SiHits"].push_back([](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
412 return getSummary(helper, msgHelper,xAOD::numberOfPixelSharedHits )
413 + getSummary(helper, msgHelper,xAOD::numberOfSCTSharedHits )/2 <= 1 ;
414 });
415 }
417 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum silicon hits if the track has shared hits: "
419 trackCuts["SiHits"].push_back([minNSiHitsIfSiSharedHits = m_minNSiHitsIfSiSharedHits.value()](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
420 return getSummarySum<2,Trk_Helper>(helper, msgHelper,{xAOD::numberOfPixelSharedHits, xAOD::numberOfSCTSharedHits} ) == 0
424 xAOD::numberOfSCTDeadSensors}) >=minNSiHitsIfSiSharedHits;
425 });
426 }
429 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Require " << m_minNSiHitsAboveEtaCutoff
430 << " silicon hits above eta = " << m_minEtaForStrictNSiHitsCut );
431 trackCuts["SiHits"].push_back([minEtaForStrictNSiHitsCut = m_minEtaForStrictNSiHitsCut.value(),
432 minNSiHitsAboveEtaCutoff = m_minNSiHitsAboveEtaCutoff.value()](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
433 return std::abs(helper.eta(msgHelper)) <= minEtaForStrictNSiHitsCut
434 || getSummarySum<4,Trk_Helper>(helper, msgHelper,{xAOD::numberOfPixelHits,
435 xAOD::numberOfSCTHits,
436 xAOD::numberOfPixelDeadSensors,
437 xAOD::numberOfSCTDeadSensors}) >= minNSiHitsAboveEtaCutoff;
438 });
439 }
441 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Zero pixel holes allowed, except one pix hole is allowed if there is a physical IBL hit and a BLayer hit is expected but there is no BLayer hit." );
442 trackCuts["PixHits"].push_back([](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
443 uint8_t pixel_holes = getSummary(helper, msgHelper,xAOD::numberOfPixelHoles);
444 return pixel_holes == 0 || ( pixel_holes<=1 && getSummary(helper, msgHelper,xAOD::numberOfInnermostPixelLayerHits) >= 1
446 && getSummary(helper, msgHelper,xAOD::numberOfNextToInnermostPixelLayerHits) == 0 );
447 });
448 }
449#ifndef XAOD_ANALYSIS
450 if (m_minNSiHitsMod > 0) {
451 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum modified Si hits (2*pix + sct) (does not include dead sensors)= "
452 << m_minNSiHitsMod );
453 trackCuts["SiHits"].push_back([minNSiHitsMod = m_minNSiHitsMod.value()](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
454 return getSummarySum<3,Trk_Helper>(helper, msgHelper,{xAOD::numberOfPixelHits,
455 xAOD::numberOfPixelHits, // pixel hits count twice in this definition
456 xAOD::numberOfSCTHits}) >= minNSiHitsMod;
457 });
458 }
460 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum modified Si hits in top half = "
462 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum modified Si hits in bottom half = "
464 trackCuts["SiHits"].push_back([minNSiHitsModTop = m_minNSiHitsModTop.value(),
465 minNSiHitsModBottom = m_minNSiHitsModBottom](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
466 auto [top,bottom] = getSiHitsTopBottom(helper, msgHelper);
467 return top >= minNSiHitsModTop && bottom >= minNSiHitsModBottom;
468 });
469 }
470#endif
472 if constexpr(VERBOSE>0) ATH_MSG_INFO( " -- TRT hit cuts applied above eta = " << m_maxTrtEtaAcceptance
473 << " and below eta = " << m_maxEtaForTrtHitCuts << " --" );
474 if (m_minNTrtHits > 0) {
475 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum TRT hits outside eta acceptance: " << m_minNTrtHits );
476 trackCuts["TrtHits"].push_back( MinTRTHitsCut<Trk_Helper,1>( m_maxTrtEtaAcceptance, m_maxEtaForTrtHitCuts, m_minNTrtHits,
478 }
480 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum TRT hits outside eta acceptance including outliers: " << m_minNTrtHitsPlusOutliers );
481 trackCuts["TrtHits"].push_back( MinTRTHitsCut<Trk_Helper,2>( m_maxTrtEtaAcceptance,m_maxEtaForTrtHitCuts, m_minNTrtHitsPlusOutliers,
483 }
485 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum TRT hits outside eta acceptance above high energy threshold: "
487 trackCuts["TrtHits"].push_back( MinTRTHitsCut<Trk_Helper,1>( m_maxTrtEtaAcceptance,m_maxEtaForTrtHitCuts, m_minNTrtHighThresholdHits,
489 }
491 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum TRT hits outside eta acceptance above high energy threshold including outliers: "
493 trackCuts["TrtHits"].push_back( MinTRTHitsCut<Trk_Helper,2>( m_maxTrtEtaAcceptance,m_maxEtaForTrtHitCuts, m_minNTrtHighThresholdHitsPlusOutliers,
495 }
496 if (maxDoubleIsSet(m_maxTrtHighEFraction)) { // I think this condition could be instead that it is between 0 and 1
497 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum ratio of high threshold to regular TRT hits outside eta acceptance: "
499 trackCuts["TrtHits"].push_back([maxTrtEtaAcceptance = m_maxTrtEtaAcceptance.value(),
500 maxEtaForTrtHitCuts = m_maxEtaForTrtHitCuts.value(),
501 maxTrtHighEFraction = m_maxTrtHighEFraction.value()](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
502 double absEta = std::abs( helper.eta( msgHelper) );
503 return (absEta <= maxTrtEtaAcceptance || absEta > maxEtaForTrtHitCuts)
504 || getSummary(helper, msgHelper,xAOD::numberOfTRTHighThresholdHits )
505 <= maxTrtHighEFraction * getSummary(helper, msgHelper,xAOD::numberOfTRTHits );
506 });
507 }
509 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum ratio of high threshold to regular TRT hits above eta acceptance including outliers: "
511 trackCuts["TrtHits"].push_back([maxTrtEtaAcceptance = m_maxTrtEtaAcceptance.value(),
512 maxEtaForTrtHitCuts = m_maxEtaForTrtHitCuts.value(),
513 maxTrtHighEFractionWithOutliers = m_maxTrtHighEFractionWithOutliers.value()](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
514 double absEta = std::abs( helper.eta( msgHelper) );
515 return (absEta <= maxTrtEtaAcceptance || absEta > maxEtaForTrtHitCuts)
516 || ( getSummarySum<2,Trk_Helper>(helper, msgHelper,{xAOD::numberOfTRTHighThresholdHits, xAOD::numberOfTRTHighThresholdOutliers} ))
517 <= maxTrtHighEFractionWithOutliers * ( getSummarySum<2,Trk_Helper>(helper, msgHelper,{xAOD::numberOfTRTHits, xAOD::numberOfTRTOutliers} ));
518 });
519 }
521 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum fraction of TRT hits that are outliers: " << m_maxTrtOutlierFraction );
522 trackCuts["TrtHits"].push_back([maxTrtEtaAcceptance = m_maxTrtEtaAcceptance.value(),
523 maxEtaForTrtHitCuts = m_maxEtaForTrtHitCuts.value(),
524 maxTrtOutlierFraction = m_maxTrtOutlierFraction.value()](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
525 double absEta = std::abs( helper.eta( msgHelper) );
526 uint8_t trt_outliers = getSummary(helper, msgHelper,xAOD::numberOfTRTOutliers );
527 return ( absEta <= maxTrtEtaAcceptance || absEta > maxEtaForTrtHitCuts)
528 || trt_outliers <= maxTrtOutlierFraction * ( trt_outliers + getSummary(helper, msgHelper,xAOD::numberOfTRTHits) );
529 });
530 }
531 }
532
533 // fit quality cuts
535 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Using pre-defined eta-dependent maximum chi squared (no longer recommended)." );
536 trackCuts["FitQuality"].push_back([](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
537 double eta = helper.eta(msgHelper);
538 double fit_chi_square = getFitChiSquare(helper,msgHelper);
539 double fit_ndof = getFitNDoF(helper,msgHelper);
540 if (std::abs( eta) < 1.9) {
541 return fit_chi_square <= fit_ndof * ( 4.4 + 0.32*sqr(eta) );
542 }
543 else {
544 return fit_chi_square <= fit_ndof * ( 26.9 - 19.6978*std::abs(eta) + 4.4534*sqr(eta) );
545 }
546 });
547 }
549 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum chi squared: " << m_maxChiSq );
550 trackCuts["FitQuality"].push_back([maxChiSq = m_maxChiSq.value()](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
551 return getFitChiSquare(helper,msgHelper) <= maxChiSq;
552 });
553 }
555 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum chi squared per degree of freedom: " << m_maxChiSqperNdf );
556 trackCuts["FitQuality"].push_back([maxChiSqperNdf = m_maxChiSqperNdf.value()](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
557 return getFitChiSquare(helper,msgHelper) <= maxChiSqperNdf * getFitNDoF(helper,msgHelper);
558 });
559 }
560 if (m_minProb > 0.) {
561 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum chi squared probability: " << m_minProb );
562 trackCuts["FitQuality"].push_back([minProb = m_minProb.value()](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
563 return TMath::Prob( getFitChiSquare(helper,msgHelper),getFitNDoF(helper,msgHelper)) >= minProb;
564 });
565 }
567 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum chi-sq probability of " << m_minProbAbovePtCutoff
568 << " above pt of " << m_minPtForProbCut*1e-3 << " GeV." );
569 trackCuts["FitQuality"].push_back([minPtForProbCut = m_minPtForProbCut.value(),
570 minProbAbovePtCutoff = m_minProbAbovePtCutoff.value()](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
571 return helper.pt(msgHelper) <= minPtForProbCut
572 || TMath::Prob( getFitChiSquare(helper,msgHelper),getFitNDoF(helper,msgHelper)) >= minProbAbovePtCutoff;
573 });
574 }
575
576 // dE/dx cuts
577 if (m_minNUsedHitsdEdx > 0) {
578 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum used hits for dEdx: " << m_minNUsedHitsdEdx );
579 trackCuts["dEdxHits"].push_back([minNUsedHitsdEdx = m_minNUsedHitsdEdx.value()](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
580 return getNumberOfUsedHitsdEdx(helper,msgHelper) >= minNUsedHitsdEdx;
581 });
582 }
583 if (m_minNOverflowHitsdEdx > 0) {
584 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum IBL overflow hits for dEdx: " << m_minNOverflowHitsdEdx );
585 trackCuts["dEdxHits"].push_back([minNOverflowHitsdEdx = m_minNOverflowHitsdEdx.value()](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
586 return getNumberOfIBLOverflowsdEdx(helper,msgHelper) >= minNOverflowHitsdEdx;
587 });
588 }
589 if (m_minEProbabilityHT > 0) {
590 if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum high threshold electron probability: " << m_minEProbabilityHT );
591 if (m_eProbHTonlyForXe) {
592 if constexpr(VERBOSE>0) ATH_MSG_INFO( " (only applied on tracks where all TRT hits are Xenon)" );
593 trackCuts["eProbHT"].push_back([minEProbabilityHT = m_minEProbabilityHT.value()](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
594 return getSummarySum<2,Trk_Helper>(helper, msgHelper, {xAOD::numberOfTRTHits, xAOD::numberOfTRTOutliers})
595 > getSummary(helper, msgHelper, xAOD::numberOfTRTXenonHits)
596 || getEProbabilityHT(helper,msgHelper) >= minEProbabilityHT;
597 });
598 } else {
599 trackCuts["eProbHT"].push_back([minEProbabilityHT = m_minEProbabilityHT.value()](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
600 return getEProbabilityHT(helper,msgHelper) >= minEProbabilityHT;
601 });
602 }
603 }
604
605 if (!m_vecEtaCutoffsForSiHitsCut.empty() || !m_vecMinNSiHitsAboveEta.empty()) {
606 auto cutSize = m_vecEtaCutoffsForSiHitsCut.size();
607 if (cutSize != m_vecMinNSiHitsAboveEta.size()) {
608 ATH_MSG_ERROR( "Eta cutoffs and Silicon hit cuts must be vectors of the same length." );
609 return StatusCode::FAILURE;
610 }
611 if constexpr(VERBOSE>0) {
612 for (size_t i_cut=0; i_cut<cutSize-1; ++i_cut) {
614 << " < eta < " << m_vecEtaCutoffsForSiHitsCut[i_cut+1]
615 << " ,Silicon hits >= " << m_vecMinNSiHitsAboveEta[i_cut] );
616 }
617 }
619 ATH_MSG_ERROR( "Eta values not in ascending order." );
620 return StatusCode::FAILURE;
621 }
622 if constexpr(VERBOSE>0) ATH_MSG_INFO( " for eta > " << m_vecEtaCutoffsForSiHitsCut[cutSize-1]
623 << " ,Silicon hits >= " << m_vecMinNSiHitsAboveEta[cutSize-1] );
624
625 trackCuts["SiHits"].push_back([p_vecEtaCutoffsForSiHitsCut = &std::as_const(m_vecEtaCutoffsForSiHitsCut.value()),
626 p_vecMinNSiHitsAboveEta = &std::as_const(m_vecMinNSiHitsAboveEta.value())](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
627 double abs_eta = std::abs(helper.eta(msgHelper));
628 unsigned int bin_i = findBin(*p_vecEtaCutoffsForSiHitsCut, abs_eta);
629 return bin_i >= p_vecMinNSiHitsAboveEta->size()
630 || abs_eta>5.0
631 || getSummarySum<4,Trk_Helper>(helper, msgHelper,{xAOD::numberOfPixelHits,
632 xAOD::numberOfSCTHits,
633 xAOD::numberOfPixelDeadSensors,
634 xAOD::numberOfSCTDeadSensors}) >= (*p_vecMinNSiHitsAboveEta)[bin_i];
635 });
636 }
637
638 if (!m_vecEtaCutoffsForPtCut.empty() || !m_vecMinPtAboveEta.empty()) {
639 auto cutSize = m_vecEtaCutoffsForPtCut.size();
640 if (cutSize != m_vecMinPtAboveEta.size()) {
641 ATH_MSG_ERROR( "Eta cutoffs and pT cuts must be vectors of the same length." );
642 return StatusCode::FAILURE;
643 }
644 if constexpr(VERBOSE>0) {
645 for (size_t i_cut=0; i_cut<cutSize-1; ++i_cut) {
646 ATH_MSG_INFO( " for " << m_vecEtaCutoffsForPtCut[i_cut]
647 << " < eta < " << m_vecEtaCutoffsForPtCut[i_cut+1]
648 << " ,transverse momentum >= " << m_vecMinPtAboveEta[i_cut] );
649 }
650 }
651 if (!checkOrder(m_vecEtaCutoffsForPtCut.value())) {
652 ATH_MSG_ERROR( "Eta values not in ascending order." );
653 return StatusCode::FAILURE;
654 }
655 if constexpr(VERBOSE>0) ATH_MSG_INFO( " for eta > " << m_vecEtaCutoffsForPtCut[cutSize-1]
656 << " ,transverse momentum >= " << m_vecMinPtAboveEta[cutSize-1] );
657 trackCuts["Pt"].push_back([p_vecEtaCutoffsForPtCut = &std::as_const(m_vecEtaCutoffsForPtCut.value()),
658 p_vecMinPtAboveEta = &std::as_const(m_vecMinPtAboveEta.value())](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
659 double abs_eta = std::abs(helper.eta(msgHelper));
660 unsigned int bin_i = findBin(*p_vecEtaCutoffsForPtCut, abs_eta);
661 return bin_i >= p_vecMinPtAboveEta->size() || abs_eta > 5.0 || helper.pt(msgHelper) >= (*p_vecMinPtAboveEta)[bin_i];
662 });
663 }
664
665 if (!m_vecPtCutoffsForSctHitsCut.empty() || !m_vecMinNSctHitsAbovePt.empty()) {
666 auto cutSize = m_vecPtCutoffsForSctHitsCut.size();
667 if (cutSize != m_vecMinNSctHitsAbovePt.size()) {
668 ATH_MSG_ERROR( "Pt cutoffs and SCT hit cuts must be vectors of the same length." );
669 return StatusCode::FAILURE;
670 }
671 if constexpr(VERBOSE>0) {
672 for (size_t i_cut=0; i_cut<cutSize-1; ++i_cut) {
674 << " < pt < " << m_vecPtCutoffsForSctHitsCut[i_cut+1]
675 << " MeV,\tSCT hits >= " << m_vecMinNSctHitsAbovePt[i_cut] );
676 }
677 }
679 ATH_MSG_ERROR( "Pt values not in ascending order." );
680 return StatusCode::FAILURE;
681 }
682 if constexpr(VERBOSE>0) ATH_MSG_INFO( " for pt > " << m_vecPtCutoffsForSctHitsCut[cutSize-1]
683 << " MeV,\t\tSCT hits >= " << m_vecMinNSctHitsAbovePt[cutSize-1] );
684 trackCuts["SctHits"].push_back([p_vecPtCutoffsForSctHitsCut = &std::as_const(m_vecPtCutoffsForSctHitsCut.value()),
685 p_vecMinNSctHitsAbovePt = &std::as_const(m_vecMinNSctHitsAbovePt.value())](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
686 double pt = helper.pt(msgHelper);
687 unsigned int bin_i = findBin(*p_vecPtCutoffsForSctHitsCut, pt);
688 return bin_i >= p_vecPtCutoffsForSctHitsCut->size()
689 || getSummarySum<2,Trk_Helper>(helper, msgHelper,{xAOD::numberOfSCTHits,
690 xAOD::numberOfSCTDeadSensors}) >= (*p_vecMinNSctHitsAbovePt)[bin_i];
691 });
692 }
693
694 if (!m_vecPtCutoffsForZ0SinThetaCut.empty() ||
697 auto etaSize = m_vecEtaCutoffsForZ0SinThetaCut.size();
698 auto ptSize = m_vecPtCutoffsForZ0SinThetaCut.size();
699 if (etaSize != m_vecvecMaxZ0SinThetaAboveEtaPt.size()) {
700 ATH_MSG_ERROR( "Eta cutoffs and Z0SinTheta cuts must be vectors of the same length." );
701 return StatusCode::FAILURE;
702 }
703 for (size_t i_size=0; i_size<etaSize-1; ++i_size) {
704 if (ptSize != m_vecvecMaxZ0SinThetaAboveEtaPt[i_size].size()) {
705 ATH_MSG_ERROR( "Pt cutoffs and Z0SinTheta cuts must be vectors of the same length." );
706 return StatusCode::FAILURE;
707 }
708 }
709
710 std::stringstream pTRangeBuffer;
711 std::copy(m_vecPtCutoffsForZ0SinThetaCut.begin(), m_vecPtCutoffsForZ0SinThetaCut.end(), std::ostream_iterator<double>(pTRangeBuffer, ", "));
712 std::string pTString=pTRangeBuffer.str();
713 if constexpr(VERBOSE>0) ATH_MSG_INFO("Z0SinTheta cuts (<=) for pT above "<<pTString.substr(0, pTString.size()-2)<<"MeV, respectively:");
714 for (size_t i_cut_eta=0; i_cut_eta<etaSize; ++i_cut_eta)
715 {
716 std::stringstream etaRangeBuffer;
717 etaRangeBuffer << std::setprecision(2) << std::fixed << m_vecEtaCutoffsForZ0SinThetaCut[i_cut_eta] << " < |#eta| < ";
718 if(i_cut_eta!=etaSize-1) etaRangeBuffer << std::setprecision(2) << std::fixed << m_vecEtaCutoffsForZ0SinThetaCut[i_cut_eta+1];
719 else etaRangeBuffer << std::setprecision(2) << std::fixed <<m_maxAbsEta;
720
721 std::stringstream cutBuffer;
722 std::copy(m_vecvecMaxZ0SinThetaAboveEtaPt[i_cut_eta].begin(), m_vecvecMaxZ0SinThetaAboveEtaPt[i_cut_eta].end(), std::ostream_iterator<double>(cutBuffer, ", "));
723 std::string cutString=cutBuffer.str();
724
725 if constexpr(VERBOSE>0) ATH_MSG_INFO(" for "<<etaRangeBuffer.str()<<": "<<cutString.substr(0, cutString.size()-2));
726 }
727
729 ATH_MSG_ERROR( "Eta values not in ascending order." );
730 return StatusCode::FAILURE;
731 }
733 ATH_MSG_ERROR( "Pt values not in ascending order." );
734 return StatusCode::FAILURE;
735 }
736
737 trackCuts["Z0SinTheta"].push_back([p_vecEtaCutoffsForZ0SinThetaCut = &std::as_const(m_vecEtaCutoffsForZ0SinThetaCut.value()),
738 p_vecPtCutoffsForZ0SinThetaCut = &std::as_const(m_vecPtCutoffsForZ0SinThetaCut.value()),
739 p_vecvecMaxZ0SinThetaAboveEtaPt = &std::as_const(m_vecvecMaxZ0SinThetaAboveEtaPt.value())] (Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
740 double eta = helper.eta(msgHelper);
741 unsigned int bin_eta = findBin(*p_vecEtaCutoffsForZ0SinThetaCut, std::fabs(eta));
742 double pt = helper.pt(msgHelper);
743 unsigned int bin_pt = findBin(*p_vecPtCutoffsForZ0SinThetaCut, pt);
744 return bin_eta >= p_vecEtaCutoffsForZ0SinThetaCut->size()
745 || bin_pt >= p_vecPtCutoffsForZ0SinThetaCut->size()
746 || std::fabs(helper.z0(msgHelper) * std::sin(helper.theta(msgHelper))) <= (*p_vecvecMaxZ0SinThetaAboveEtaPt)[bin_eta][bin_pt];
747 });
748 }
749
750 if (!m_vecPtCutoffsForD0Cut.empty() ||
751 !m_vecEtaCutoffsForD0Cut.empty() ||
752 !m_vecvecMaxD0AboveEtaPt.empty()) {
753 auto etaSize = m_vecEtaCutoffsForD0Cut.size();
754 auto ptSize = m_vecPtCutoffsForD0Cut.size();
755 if (etaSize != m_vecvecMaxD0AboveEtaPt.size()) {
756 ATH_MSG_ERROR( "Eta cutoffs and D0 cuts must be vectors of the same length." );
757 return StatusCode::FAILURE;
758 }
759 for (size_t i_size=0; i_size<etaSize-1; ++i_size) {
760 if (ptSize != m_vecvecMaxD0AboveEtaPt[i_size].size()) {
761 ATH_MSG_ERROR( "Pt cutoffs and D0 cuts must be vectors of the same length." );
762 return StatusCode::FAILURE;
763 }
764 }
765
766 std::stringstream pTRangeBuffer;
767 std::copy(m_vecPtCutoffsForD0Cut.begin(), m_vecPtCutoffsForD0Cut.end(), std::ostream_iterator<double>(pTRangeBuffer, ", "));
768 std::string pTString=pTRangeBuffer.str();
769 if constexpr(VERBOSE>0) ATH_MSG_INFO("D0 cuts (<=) for pT above "<<pTString.substr(0, pTString.size()-2)<<"MeV, respectively:");
770 for (size_t i_cut_eta=0; i_cut_eta<etaSize; ++i_cut_eta)
771 {
772 std::stringstream etaRangeBuffer;
773 etaRangeBuffer << std::setprecision(2) << std::fixed << m_vecEtaCutoffsForD0Cut[i_cut_eta] << " < |#eta| < ";
774 if(i_cut_eta!=etaSize-1) etaRangeBuffer << std::setprecision(2) << std::fixed << m_vecEtaCutoffsForD0Cut[i_cut_eta+1];
775 else etaRangeBuffer << std::setprecision(2) << std::fixed <<m_maxAbsEta;
776
777 std::stringstream cutBuffer;
778 std::copy(m_vecvecMaxD0AboveEtaPt[i_cut_eta].begin(), m_vecvecMaxD0AboveEtaPt[i_cut_eta].end(), std::ostream_iterator<double>(cutBuffer, ", "));
779 std::string cutString=cutBuffer.str();
780
781 if constexpr(VERBOSE>0) ATH_MSG_INFO(" for "<<etaRangeBuffer.str()<<": "<<cutString.substr(0, cutString.size()-2));
782 }
783
784 if (!checkOrder(m_vecEtaCutoffsForD0Cut.value())) {
785 ATH_MSG_ERROR( "Eta values not in ascending order." );
786 return StatusCode::FAILURE;
787 }
788 if (!checkOrder(m_vecPtCutoffsForD0Cut.value())) {
789 ATH_MSG_ERROR( "Pt values not in ascending order." );
790 return StatusCode::FAILURE;
791 }
792
793 trackCuts["D0"].push_back([p_vecEtaCutoffsForD0Cut = &std::as_const(m_vecEtaCutoffsForD0Cut.value()),
794 p_vecPtCutoffsForD0Cut = &std::as_const(m_vecPtCutoffsForD0Cut.value()),
795 p_vecvecMaxD0AboveEtaPt = &std::as_const(m_vecvecMaxD0AboveEtaPt.value())] (Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
796 double eta = helper.eta(msgHelper);
797 unsigned int bin_eta = findBin(*p_vecEtaCutoffsForD0Cut, std::fabs(eta));
798 double pt = helper.pt(msgHelper);
799 unsigned int bin_pt = findBin(*p_vecPtCutoffsForD0Cut, pt);
800 return bin_eta >= p_vecEtaCutoffsForD0Cut->size()
801 || bin_pt >= p_vecPtCutoffsForD0Cut->size()
802 || std::fabs(helper.d0(msgHelper)) <= (*p_vecvecMaxD0AboveEtaPt)[bin_eta][bin_pt];
803 });
804 }
805
806 if (!m_vecPtCutoffsForSctHolesCut.empty() ||
809 auto etaSize = m_vecEtaCutoffsForSctHolesCut.size();
810 auto ptSize = m_vecPtCutoffsForSctHolesCut.size();
811 if (etaSize != m_vecvecMaxSctHolesAboveEtaPt.size()) {
812 ATH_MSG_ERROR( "Eta cutoffs and SctHoles cuts must be vectors of the same length." );
813 return StatusCode::FAILURE;
814 }
815 for (size_t i_size=0; i_size<etaSize-1; ++i_size) {
816 if (ptSize != m_vecvecMaxSctHolesAboveEtaPt[i_size].size()) {
817 ATH_MSG_ERROR( "Pt cutoffs and SctHoles cuts must be vectors of the same length." );
818 return StatusCode::FAILURE;
819 }
820 }
821
822 std::stringstream pTRangeBuffer;
823 std::copy(m_vecPtCutoffsForSctHolesCut.begin(), m_vecPtCutoffsForSctHolesCut.end(), std::ostream_iterator<double>(pTRangeBuffer, ", "));
824 std::string pTString=pTRangeBuffer.str();
825 if constexpr(VERBOSE>0) ATH_MSG_INFO("SctHoles cuts (<=) for pT above "<<pTString.substr(0, pTString.size()-2)<<"MeV, respectively:");
826 for (size_t i_cut_eta=0; i_cut_eta<etaSize; ++i_cut_eta)
827 {
828 std::stringstream etaRangeBuffer;
829 etaRangeBuffer << std::setprecision(2) << std::fixed << m_vecEtaCutoffsForSctHolesCut[i_cut_eta] << " < |#eta| < ";
830 if(i_cut_eta!=etaSize-1) etaRangeBuffer << std::setprecision(2) << std::fixed << m_vecEtaCutoffsForSctHolesCut[i_cut_eta+1];
831 else etaRangeBuffer << std::setprecision(2) << std::fixed <<m_maxAbsEta;
832
833 std::stringstream cutBuffer;
834 std::copy(m_vecvecMaxSctHolesAboveEtaPt[i_cut_eta].begin(), m_vecvecMaxSctHolesAboveEtaPt[i_cut_eta].end(), std::ostream_iterator<double>(cutBuffer, ", "));
835 std::string cutString=cutBuffer.str();
836
837 if constexpr(VERBOSE>0) ATH_MSG_INFO(" for "<<etaRangeBuffer.str()<<": "<<cutString.substr(0, cutString.size()-2));
838 }
839
841 ATH_MSG_ERROR( "Eta values not in ascending order." );
842 return StatusCode::FAILURE;
843 }
845 ATH_MSG_ERROR( "Pt values not in ascending order." );
846 return StatusCode::FAILURE;
847 }
848
849 trackCuts["SctHits"].push_back([p_vecEtaCutoffsForSctHolesCut = &std::as_const(m_vecEtaCutoffsForSctHolesCut.value()),
850 p_vecPtCutoffsForSctHolesCut = &std::as_const(m_vecPtCutoffsForSctHolesCut.value()),
851 p_vecvecMaxSctHolesAboveEtaPt = &std::as_const(m_vecvecMaxSctHolesAboveEtaPt.value())] (Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
852 double eta = helper.eta(msgHelper);
853 unsigned int bin_eta = findBin(*p_vecEtaCutoffsForSctHolesCut, std::fabs(eta));
854 double pt = helper.pt(msgHelper);
855 unsigned int bin_pt = findBin(*p_vecPtCutoffsForSctHolesCut, pt);
856 return bin_eta >= p_vecEtaCutoffsForSctHolesCut->size()
857 || bin_pt >= p_vecPtCutoffsForSctHolesCut->size()
858 || getSummary(helper, msgHelper, xAOD::numberOfSCTHoles) <= (*p_vecvecMaxSctHolesAboveEtaPt)[bin_eta][bin_pt];
859 });
860 }
861
865 auto etaSize = m_vecEtaCutoffsForSctHitsPlusDeadCut.size();
866 auto ptSize = m_vecPtCutoffsForSctHitsPlusDeadCut.size();
867 if (etaSize != m_vecvecMinSctHitsPlusDeadAboveEtaPt.size()) {
868 ATH_MSG_ERROR( "Eta cutoffs and SctHitsPlusDead cuts must be vectors of the same length." );
869 return StatusCode::FAILURE;
870 }
871 for (size_t i_size=0; i_size<etaSize-1; ++i_size) {
872 if (ptSize != m_vecvecMinSctHitsPlusDeadAboveEtaPt[i_size].size()) {
873 ATH_MSG_ERROR( "Pt cutoffs and SctHitsPlusDead cuts must be vectors of the same length." );
874 return StatusCode::FAILURE;
875 }
876 }
877
878 std::stringstream pTRangeBuffer;
879 std::copy(m_vecPtCutoffsForSctHitsPlusDeadCut.begin(), m_vecPtCutoffsForSctHitsPlusDeadCut.end(), std::ostream_iterator<double>(pTRangeBuffer, ", "));
880 std::string pTString=pTRangeBuffer.str();
881 if constexpr(VERBOSE>0) ATH_MSG_INFO("SctHitsPlusDead cuts (>=) for pT above "<<pTString.substr(0, pTString.size()-2)<<"MeV, respectively:");
882 for (size_t i_cut_eta=0; i_cut_eta<etaSize; ++i_cut_eta)
883 {
884 std::stringstream etaRangeBuffer;
885 etaRangeBuffer << std::setprecision(2) << std::fixed << m_vecEtaCutoffsForSctHitsPlusDeadCut[i_cut_eta] << " < |#eta| < ";
886 if(i_cut_eta!=etaSize-1) etaRangeBuffer << std::setprecision(2) << std::fixed << m_vecEtaCutoffsForSctHitsPlusDeadCut[i_cut_eta+1];
887 else etaRangeBuffer << std::setprecision(2) << std::fixed <<m_maxAbsEta;
888
889 std::stringstream cutBuffer;
890 std::copy(m_vecvecMinSctHitsPlusDeadAboveEtaPt[i_cut_eta].begin(), m_vecvecMinSctHitsPlusDeadAboveEtaPt[i_cut_eta].end(), std::ostream_iterator<double>(cutBuffer, ", "));
891 std::string cutString=cutBuffer.str();
892
893 if constexpr(VERBOSE>0) ATH_MSG_INFO(" for "<<etaRangeBuffer.str()<<": "<<cutString.substr(0, cutString.size()-2));
894 }
895
897 ATH_MSG_ERROR( "Eta values not in ascending order." );
898 return StatusCode::FAILURE;
899 }
901 ATH_MSG_ERROR( "Pt values not in ascending order." );
902 return StatusCode::FAILURE;
903 }
904
905 trackCuts["SctHits"].push_back([p_vecEtaCutoffsForSctHitsPlusDeadCut = &std::as_const(m_vecEtaCutoffsForSctHitsPlusDeadCut.value()),
906 p_vecPtCutoffsForSctHitsPlusDeadCut = &std::as_const(m_vecPtCutoffsForSctHitsPlusDeadCut.value()),
907 p_vecvecMinSctHitsPlusDeadAboveEtaPt = &std::as_const(m_vecvecMinSctHitsPlusDeadAboveEtaPt.value())] (Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
908 double eta = helper.eta(msgHelper);
909 unsigned int bin_eta = findBin(*p_vecEtaCutoffsForSctHitsPlusDeadCut, std::fabs(eta));
910 double pt = helper.pt(msgHelper);
911 unsigned int bin_pt = findBin(*p_vecPtCutoffsForSctHitsPlusDeadCut, pt);
912 return bin_eta >= p_vecEtaCutoffsForSctHitsPlusDeadCut->size()
913 || bin_pt >= p_vecPtCutoffsForSctHitsPlusDeadCut->size()
914 || getSummarySum<2,Trk_Helper>(helper, msgHelper, {xAOD::numberOfSCTHits, xAOD::numberOfSCTDeadSensors}) >= (*p_vecvecMinSctHitsPlusDeadAboveEtaPt)[bin_eta][bin_pt];
915 });
916 }
917
918 return StatusCode::SUCCESS;
919}
Scalar eta() const
pseudorapidity method
#define sqr(t)
size_t size() const
Number of registered mappings.
static bool maxDoubleIsSet(double cutValue)
Gaudi::Property< bool > m_useExperimentalInnermostLayersCut
static bool maxIntIsSet(int cutValue)
double getFitChiSquare(const Trk_Helper &helper, const asg::AsgMessaging &msgHelper)
uint8_t getSummarySum(const T_TrkHelper helper, const asg::AsgMessaging &msgHelper, std::array< xAOD::SummaryType, n_summary_types > sumTypes)
double getFitNDoF(const TrkHelper &helper, const asg::AsgMessaging &msgHelper)
float getEProbabilityHT(const Trk_Helper &helper, const asg::AsgMessaging &msgHelper)
uint8_t getSummary(const T_TrkHelper &helper, const asg::AsgMessaging &msgHelper, xAOD::SummaryType sumType)
@ expectInnermostPixelLayerHit
Do we expect a 0th-layer barrel hit for this track?
@ numberOfPixelHoles
number of pixel layers on track with absence of hits [unit8_t].
@ numberOfTRTHighThresholdOutliers
number of TRT high threshold outliers (only xenon counted) [unit8_t].
@ numberOfTRTXenonHits
number of TRT hits on track in straws with xenon [unit8_t].
@ numberOfTRTHits
number of TRT hits [unit8_t].
@ numberOfNextToInnermostPixelLayerHits
these are the hits in the 1st pixel barrel layer
@ numberOfSCTDeadSensors
number of dead SCT sensors crossed [unit8_t].
@ expectNextToInnermostPixelLayerHit
Do we expect a 1st-layer barrel hit for this track?
@ 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].
@ numberOfPixelSharedHits
number of Pixel all-layer hits shared by several tracks [unit8_t].
@ numberOfSCTSharedHits
number of SCT hits shared by several tracks [unit8_t].
@ numberOfTRTHighThresholdHits
number of TRT hits which pass the high threshold (only xenon counted) [unit8_t].
@ numberOfTRTOutliers
number of TRT outliers [unit8_t].
@ numberOfPixelDeadSensors
number of dead pixel sensors crossed [unit8_t].

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, and AthCheckedComponent<::AthAlgTool >.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

◆ TrackCut

friend class TrackCut
friend

Definition at line 55 of file InDetTrackSelectionTool.h.

Member Data Documentation

◆ ATLAS_THREAD_SAFE

std::vector<uint64_t> m_numTracksPassedCuts InDet::InDetTrackSelectionTool::ATLAS_THREAD_SAFE
mutableprivate

tracks the number of tracks that passed each cut family.

Guarded by m_mutex

Definition at line 134 of file InDetTrackSelectionTool.h.

◆ LOCAL_MAX_DOUBLE

double InDet::InDetTrackSelectionTool::LOCAL_MAX_DOUBLE = 1.0e16
staticconstexprprivate

Definition at line 139 of file InDetTrackSelectionTool.h.

◆ LOCAL_MAX_INT

int InDet::InDetTrackSelectionTool::LOCAL_MAX_INT = std::numeric_limits<int>::max()
staticconstexprprivate

Definition at line 140 of file InDetTrackSelectionTool.h.

◆ m_acceptInfo

asg::AcceptInfo InDet::InDetTrackSelectionTool::m_acceptInfo
private

Object used to store the last decision.

Object that stores detailed selection information

Definition at line 356 of file InDetTrackSelectionTool.h.

◆ m_cutLevel

Gaudi::Property<std::string> InDet::InDetTrackSelectionTool::m_cutLevel {this, "CutLevel", ""}
private

The string version of the cut level so that it can be set via jobOptions.

Definition at line 360 of file InDetTrackSelectionTool.h.

360{this, "CutLevel", ""};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_eProbHTonlyForXe

Gaudi::Property<bool> InDet::InDetTrackSelectionTool::m_eProbHTonlyForXe
private
Initial value:
{this, "eProbHTonlyForXe", false,
"Flag whether to apply the eProbabilityHT cut only when all TRT hits are Xenon"}

Definition at line 275 of file InDetTrackSelectionTool.h.

276 {this, "eProbHTonlyForXe", false,
277 "Flag whether to apply the eProbabilityHT cut only when all TRT hits are Xenon"};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extrapolator

ToolHandle<Trk::IExtrapolator> InDet::InDetTrackSelectionTool::m_extrapolator {this, "Extrapolator", "Trk::Extrapolator/Extrapolator"}
private

Definition at line 370 of file InDetTrackSelectionTool.h.

371{this, "Extrapolator", "Trk::Extrapolator/Extrapolator"};

◆ m_initTrkTools

Gaudi::Property<bool> InDet::InDetTrackSelectionTool::m_initTrkTools {this, "UseTrkTrackTools", false, "Whether to initialize the Trk::Track tools"}
private

Definition at line 366 of file InDetTrackSelectionTool.h.

366{this, "UseTrkTrackTools", false, "Whether to initialize the Trk::Track tools"};

◆ m_isInitialized

bool InDet::InDetTrackSelectionTool::m_isInitialized = false
private

Definition at line 109 of file InDetTrackSelectionTool.h.

◆ m_maxAbsEta

Gaudi::Property<double> InDet::InDetTrackSelectionTool::m_maxAbsEta {this, "maxAbsEta", LOCAL_MAX_DOUBLE, "Maximum magnitude of pseudorapidity"}
private

Definition at line 145 of file InDetTrackSelectionTool.h.

146{this, "maxAbsEta", LOCAL_MAX_DOUBLE, "Maximum magnitude of pseudorapidity"};

◆ m_maxChiSq

Gaudi::Property<double> InDet::InDetTrackSelectionTool::m_maxChiSq {this, "maxChiSq", LOCAL_MAX_DOUBLE, "Maximum chi squared"}
private

Definition at line 258 of file InDetTrackSelectionTool.h.

259{this, "maxChiSq", LOCAL_MAX_DOUBLE, "Maximum chi squared"};

◆ m_maxChiSqperNdf

Gaudi::Property<double> InDet::InDetTrackSelectionTool::m_maxChiSqperNdf
private
Initial value:
{this, "maxChiSqperNdf", LOCAL_MAX_DOUBLE,
"Maximum chi squared per degree of freedom"}

Definition at line 260 of file InDetTrackSelectionTool.h.

261 {this, "maxChiSqperNdf", LOCAL_MAX_DOUBLE,
262 "Maximum chi squared per degree of freedom"};

◆ m_maxD0

Gaudi::Property<double> InDet::InDetTrackSelectionTool::m_maxD0 {this, "maxD0", LOCAL_MAX_DOUBLE, "Maximum transvers separation"}
private

Definition at line 151 of file InDetTrackSelectionTool.h.

152{this, "maxD0", LOCAL_MAX_DOUBLE, "Maximum transvers separation"};

◆ m_maxD0overSigmaD0

Gaudi::Property<double> InDet::InDetTrackSelectionTool::m_maxD0overSigmaD0 {this, "maxD0overSigmaD0", LOCAL_MAX_DOUBLE, "Significance cut on |d0|"}
private

Definition at line 159 of file InDetTrackSelectionTool.h.

160{this, "maxD0overSigmaD0", LOCAL_MAX_DOUBLE, "Significance cut on |d0|"};

◆ m_maxEtaForTrtHitCuts

Gaudi::Property<double> InDet::InDetTrackSelectionTool::m_maxEtaForTrtHitCuts
private
Initial value:
{this, "maxEtaForTrtHitCuts", -1.,
"Eta above which TRT hit cuts are not applied."}

Definition at line 237 of file InDetTrackSelectionTool.h.

238 {this, "maxEtaForTrtHitCuts", -1.,
239 "Eta above which TRT hit cuts are not applied."};

◆ m_maxNInnermostLayerSharedHits

Gaudi::Property<int> InDet::InDetTrackSelectionTool::m_maxNInnermostLayerSharedHits
private
Initial value:
{this, "maxNInnermostLayerSharedHits", LOCAL_MAX_INT,
"Maximum shared hits in innermost pixel layer"}

Definition at line 176 of file InDetTrackSelectionTool.h.

177 {this, "maxNInnermostLayerSharedHits", LOCAL_MAX_INT,
178 "Maximum shared hits in innermost pixel layer"};

◆ m_maxNPixelHoles

Gaudi::Property<int> InDet::InDetTrackSelectionTool::m_maxNPixelHoles
private
Initial value:
{this, "maxNPixelHoles", LOCAL_MAX_INT,
"Maximum number of missed layers in pixel"}

Definition at line 200 of file InDetTrackSelectionTool.h.

201 {this, "maxNPixelHoles", LOCAL_MAX_INT,
202 "Maximum number of missed layers in pixel"};

◆ m_maxNPixelSharedHits

Gaudi::Property<int> InDet::InDetTrackSelectionTool::m_maxNPixelSharedHits
private
Initial value:
{this, "maxNPixelSharedHits", LOCAL_MAX_INT,
"Maximum pixels shared with other tracks"}

Definition at line 197 of file InDetTrackSelectionTool.h.

198 {this, "maxNPixelSharedHits", LOCAL_MAX_INT,
199 "Maximum pixels shared with other tracks"};

◆ m_maxNSctDoubleHoles

Gaudi::Property<int> InDet::InDetTrackSelectionTool::m_maxNSctDoubleHoles {this, "maxNSctDoubleHoles", LOCAL_MAX_INT, "Maximum SCT double holes"}
private

Definition at line 231 of file InDetTrackSelectionTool.h.

232{this, "maxNSctDoubleHoles", LOCAL_MAX_INT, "Maximum SCT double holes"};

◆ m_maxNSctHoles

Gaudi::Property<int> InDet::InDetTrackSelectionTool::m_maxNSctHoles {this, "maxNSctHoles", LOCAL_MAX_INT, "Maximum SCT holes"}
private

Definition at line 229 of file InDetTrackSelectionTool.h.

230{this, "maxNSctHoles", LOCAL_MAX_INT, "Maximum SCT holes"};

◆ m_maxNSctSharedHits

Gaudi::Property<int> InDet::InDetTrackSelectionTool::m_maxNSctSharedHits
private
Initial value:
{this, "maxNSctSharedHits", LOCAL_MAX_INT,
"Maximum SCT hits shared with other track"}

Definition at line 226 of file InDetTrackSelectionTool.h.

227 {this, "maxNSctSharedHits", LOCAL_MAX_INT,
228 "Maximum SCT hits shared with other track"};

◆ m_maxNSiHoles

Gaudi::Property<int> InDet::InDetTrackSelectionTool::m_maxNSiHoles {this, "maxNSiHoles", LOCAL_MAX_INT, "Maximum silicon (pixel + SCT) holes"}
private

Definition at line 193 of file InDetTrackSelectionTool.h.

194{this, "maxNSiHoles", LOCAL_MAX_INT, "Maximum silicon (pixel + SCT) holes"};

◆ m_maxNSiSharedHits

Gaudi::Property<int> InDet::InDetTrackSelectionTool::m_maxNSiSharedHits
private
Initial value:
{this, "maxNSiSharedHits", LOCAL_MAX_INT,
"Maximum silicon (pixel + SCT) sensors shared with other track"}

Definition at line 187 of file InDetTrackSelectionTool.h.

188 {this, "maxNSiSharedHits", LOCAL_MAX_INT,
189 "Maximum silicon (pixel + SCT) sensors shared with other track"};

◆ m_maxOneSharedModule

Gaudi::Property<bool> InDet::InDetTrackSelectionTool::m_maxOneSharedModule
private
Initial value:
{this, "maxOneSharedModule", false,
"Allow only 1 shared pixel hit or 2 shared SCT hits, not both"}

Definition at line 210 of file InDetTrackSelectionTool.h.

211 {this, "maxOneSharedModule", false,
212 "Allow only 1 shared pixel hit or 2 shared SCT hits, not both"};

◆ m_maxSigmaD0

Gaudi::Property<double> InDet::InDetTrackSelectionTool::m_maxSigmaD0 {this, "maxSigmaD0", LOCAL_MAX_DOUBLE, "Maximum error on d0"}
private

Definition at line 153 of file InDetTrackSelectionTool.h.

154{this, "maxSigmaD0", LOCAL_MAX_DOUBLE, "Maximum error on d0"};

◆ m_maxSigmaZ0

Gaudi::Property<double> InDet::InDetTrackSelectionTool::m_maxSigmaZ0 {this, "maxSigmaZ0", LOCAL_MAX_DOUBLE, "Maximum error on z0"}
private

Definition at line 155 of file InDetTrackSelectionTool.h.

156{this, "maxSigmaZ0", LOCAL_MAX_DOUBLE, "Maximum error on z0"};

◆ m_maxSigmaZ0SinTheta

Gaudi::Property<double> InDet::InDetTrackSelectionTool::m_maxSigmaZ0SinTheta {this, "maxSigmaZ0SinTheta", LOCAL_MAX_DOUBLE, "Maximum error on z0*sin(theta)"}
private

Definition at line 157 of file InDetTrackSelectionTool.h.

158{this, "maxSigmaZ0SinTheta", LOCAL_MAX_DOUBLE, "Maximum error on z0*sin(theta)"};

◆ m_maxTrtEtaAcceptance

Gaudi::Property<double> InDet::InDetTrackSelectionTool::m_maxTrtEtaAcceptance
private
Initial value:
{this, "maxTrtEtaAcceptance", LOCAL_MAX_DOUBLE,
"Maximum eta that ignores TRT hit cuts"}

Definition at line 234 of file InDetTrackSelectionTool.h.

235 {this, "maxTrtEtaAcceptance", LOCAL_MAX_DOUBLE,
236 "Maximum eta that ignores TRT hit cuts"};

◆ m_maxTrtHighEFraction

Gaudi::Property<double> InDet::InDetTrackSelectionTool::m_maxTrtHighEFraction
private
Initial value:
{this, "maxTrtHighEFraction", LOCAL_MAX_DOUBLE,
"Maximum TRT hits that are above high energy threshold"}

Definition at line 248 of file InDetTrackSelectionTool.h.

249 {this, "maxTrtHighEFraction", LOCAL_MAX_DOUBLE,
250 "Maximum TRT hits that are above high energy threshold"};

◆ m_maxTrtHighEFractionWithOutliers

Gaudi::Property<double> InDet::InDetTrackSelectionTool::m_maxTrtHighEFractionWithOutliers
private
Initial value:
{this, "maxTrtHighEFractionWithOutliers", LOCAL_MAX_DOUBLE,
"Maximum TRT hits that are above high energy threshold including outliers"}

Definition at line 251 of file InDetTrackSelectionTool.h.

252 {this, "maxTrtHighEFractionWithOutliers", LOCAL_MAX_DOUBLE,
253 "Maximum TRT hits that are above high energy threshold including outliers"};

◆ m_maxTrtOutlierFraction

Gaudi::Property<double> InDet::InDetTrackSelectionTool::m_maxTrtOutlierFraction
private
Initial value:
{this, "maxTrtOutlierFraction", LOCAL_MAX_DOUBLE,
"Maximum fraction of TRT outliers over TRT hits plus outliers"}

Definition at line 254 of file InDetTrackSelectionTool.h.

255 {this, "maxTrtOutlierFraction", LOCAL_MAX_DOUBLE,
256 "Maximum fraction of TRT outliers over TRT hits plus outliers"};

◆ m_maxZ0

Gaudi::Property<double> InDet::InDetTrackSelectionTool::m_maxZ0 {this, "maxZ0", LOCAL_MAX_DOUBLE, "Maximum longitudinal separation"}
private

Definition at line 149 of file InDetTrackSelectionTool.h.

150{this, "maxZ0", LOCAL_MAX_DOUBLE, "Maximum longitudinal separation"};

◆ m_maxZ0overSigmaZ0

Gaudi::Property<double> InDet::InDetTrackSelectionTool::m_maxZ0overSigmaZ0 {this, "maxZ0overSigmaZ0", LOCAL_MAX_DOUBLE, "Significance cut on |z0|"}
private

Definition at line 161 of file InDetTrackSelectionTool.h.

162{this, "maxZ0overSigmaZ0", LOCAL_MAX_DOUBLE, "Significance cut on |z0|"};

◆ m_maxZ0SinTheta

Gaudi::Property<double> InDet::InDetTrackSelectionTool::m_maxZ0SinTheta {this, "maxZ0SinTheta", LOCAL_MAX_DOUBLE, "Maximum |z0|*sin(theta)"}
private

Definition at line 147 of file InDetTrackSelectionTool.h.

148{this, "maxZ0SinTheta", LOCAL_MAX_DOUBLE, "Maximum |z0|*sin(theta)"};

◆ m_maxZ0SinThetaoverSigmaZ0SinTheta

Gaudi::Property<double> InDet::InDetTrackSelectionTool::m_maxZ0SinThetaoverSigmaZ0SinTheta
private
Initial value:
{this, "maxZ0SinThetaoverSigmaZ0SinTheta", LOCAL_MAX_DOUBLE,
"Significance cut on |z0*sin(theta)|"}

Definition at line 163 of file InDetTrackSelectionTool.h.

164 {this, "maxZ0SinThetaoverSigmaZ0SinTheta", LOCAL_MAX_DOUBLE,
165 "Significance cut on |z0*sin(theta)|"};

◆ m_minEProbabilityHT

Gaudi::Property<double> InDet::InDetTrackSelectionTool::m_minEProbabilityHT
private
Initial value:
{this, "minEProbabilityHT", -1.,
"Minimum High Threshold electron probability"}

Definition at line 278 of file InDetTrackSelectionTool.h.

279 {this, "minEProbabilityHT", -1.,
280 "Minimum High Threshold electron probability"};

◆ m_minEtaForStrictNSiHitsCut

Gaudi::Property<double> InDet::InDetTrackSelectionTool::m_minEtaForStrictNSiHitsCut
private
Initial value:
{this, "minEtaForStrictNSiHitsCut", LOCAL_MAX_DOUBLE,
"Eta cutoff for strict silicon hits cut"}

Definition at line 204 of file InDetTrackSelectionTool.h.

205 {this, "minEtaForStrictNSiHitsCut", LOCAL_MAX_DOUBLE,
206 "Eta cutoff for strict silicon hits cut"};

◆ m_minNBothInnermostLayersHits

Gaudi::Property<int> InDet::InDetTrackSelectionTool::m_minNBothInnermostLayersHits
private
Initial value:
{this, "minNBothInnermostLayersHits", -1,
"Required hits on two innermost pixel layers"}

Definition at line 173 of file InDetTrackSelectionTool.h.

174 {this, "minNBothInnermostLayersHits", -1,
175 "Required hits on two innermost pixel layers"};

◆ m_minNInnermostLayerHits

Gaudi::Property<int> InDet::InDetTrackSelectionTool::m_minNInnermostLayerHits
private
Initial value:
{this, "minNInnermostLayerHits", -1,
"Required hits on the innermost pixel layer"}

Definition at line 167 of file InDetTrackSelectionTool.h.

168 {this, "minNInnermostLayerHits", -1,
169 "Required hits on the innermost pixel layer"};

◆ m_minNNextToInnermostLayerHits

Gaudi::Property<int> InDet::InDetTrackSelectionTool::m_minNNextToInnermostLayerHits
private
Initial value:
{this, "minNNextToInnermostLayerHits", -1,
"Required hits on the next to innermost pixel layer"}

Definition at line 170 of file InDetTrackSelectionTool.h.

171 {this, "minNNextToInnermostLayerHits", -1,
172 "Required hits on the next to innermost pixel layer"};

◆ m_minNOverflowHitsdEdx

Gaudi::Property<int> InDet::InDetTrackSelectionTool::m_minNOverflowHitsdEdx {this, "minNOverflowHitsdEdx", -1, "Minimum overflow hits in IBL for dEdx"}
private

Definition at line 273 of file InDetTrackSelectionTool.h.

274{this, "minNOverflowHitsdEdx", -1, "Minimum overflow hits in IBL for dEdx"};

◆ m_minNPixelHits

Gaudi::Property<int> InDet::InDetTrackSelectionTool::m_minNPixelHits {this, "minNPixelHits", -1, "Required pixel hits"}
private

Definition at line 195 of file InDetTrackSelectionTool.h.

196{this, "minNPixelHits", -1, "Required pixel hits"};

◆ m_minNPixelHitsPhysical

Gaudi::Property<int> InDet::InDetTrackSelectionTool::m_minNPixelHitsPhysical {this, "minNPixelHitsPhysical", -1, "Minimum physical pixel hits"}
private

Definition at line 220 of file InDetTrackSelectionTool.h.

221{this, "minNPixelHitsPhysical", -1, "Minimum physical pixel hits"};

◆ m_minNSctHits

Gaudi::Property<int> InDet::InDetTrackSelectionTool::m_minNSctHits {this, "minNSctHits", -1, "Minimum SCT hits"}
private

Definition at line 224 of file InDetTrackSelectionTool.h.

225{this, "minNSctHits", -1, "Minimum SCT hits"};

◆ m_minNSctHitsPhysical

Gaudi::Property<int> InDet::InDetTrackSelectionTool::m_minNSctHitsPhysical {this, "minNSctHitsPhysical", -1, "Minimum physical SCT hits"}
private

Definition at line 222 of file InDetTrackSelectionTool.h.

223{this, "minNSctHitsPhysical", -1, "Minimum physical SCT hits"};

◆ m_minNSiHits

Gaudi::Property<int> InDet::InDetTrackSelectionTool::m_minNSiHits {this, "minNSiHits", -1, "Minimum silicon (pixel + SCT) hits"}
private

Definition at line 185 of file InDetTrackSelectionTool.h.

186{this, "minNSiHits", -1, "Minimum silicon (pixel + SCT) hits"};

◆ m_minNSiHitsAboveEtaCutoff

Gaudi::Property<int> InDet::InDetTrackSelectionTool::m_minNSiHitsAboveEtaCutoff
private
Initial value:
{this, "minNSiHitsAboveEtaCutoff", -1,
"Minimum silicon hits at large pseudorapidity"}

Definition at line 207 of file InDetTrackSelectionTool.h.

208 {this, "minNSiHitsAboveEtaCutoff", -1,
209 "Minimum silicon hits at large pseudorapidity"};

◆ m_minNSiHitsIfSiSharedHits

Gaudi::Property<int> InDet::InDetTrackSelectionTool::m_minNSiHitsIfSiSharedHits
private
Initial value:
{this, "minNSiHitsIfSiSharedHits", -1,
"Minimum number of silicon hits if there are any shared silicon hits"}

Definition at line 190 of file InDetTrackSelectionTool.h.

191 {this, "minNSiHitsIfSiSharedHits", -1,
192 "Minimum number of silicon hits if there are any shared silicon hits"};

◆ m_minNSiHitsMod

Gaudi::Property<int> InDet::InDetTrackSelectionTool::m_minNSiHitsMod
private
Initial value:
{this, "minNSiHitsMod", -1,
"Minimum number of Si hits, with pixel hits counting twice"}

Definition at line 287 of file InDetTrackSelectionTool.h.

288 {this, "minNSiHitsMod", -1,
289 "Minimum number of Si hits, with pixel hits counting twice"};

◆ m_minNSiHitsModBottom

Gaudi::Property<int> InDet::InDetTrackSelectionTool::m_minNSiHitsModBottom
private
Initial value:
{this, "minNSiHitsModBottom", -1,
"Min number of Si hits on bottom half (pixel counting twice)"}

Definition at line 293 of file InDetTrackSelectionTool.h.

294 {this, "minNSiHitsModBottom", -1,
295 "Min number of Si hits on bottom half (pixel counting twice)"};

◆ m_minNSiHitsModTop

Gaudi::Property<int> InDet::InDetTrackSelectionTool::m_minNSiHitsModTop
private
Initial value:
{this, "minNSiHitsModTop", -1,
"Min number of Si hits on top half (pixel counting twice)"}

Definition at line 290 of file InDetTrackSelectionTool.h.

291 {this, "minNSiHitsModTop", -1,
292 "Min number of Si hits on top half (pixel counting twice)"};

◆ m_minNSiHitsPhysical

Gaudi::Property<int> InDet::InDetTrackSelectionTool::m_minNSiHitsPhysical
private
Initial value:
{this, "minNSiHitsPhysical", -1,
"Minimum physical silicon hits (i.e. dead sensors do not count)"}

Definition at line 217 of file InDetTrackSelectionTool.h.

218 {this, "minNSiHitsPhysical", -1,
219 "Minimum physical silicon hits (i.e. dead sensors do not count)"};

◆ m_minNTrtHighThresholdHits

Gaudi::Property<int> InDet::InDetTrackSelectionTool::m_minNTrtHighThresholdHits {this, "minNTrtHighThresholdHits", -1, "Minimum high E TRT hits"}
private

Definition at line 243 of file InDetTrackSelectionTool.h.

244{this, "minNTrtHighThresholdHits", -1, "Minimum high E TRT hits"};

◆ m_minNTrtHighThresholdHitsPlusOutliers

Gaudi::Property<int> InDet::InDetTrackSelectionTool::m_minNTrtHighThresholdHitsPlusOutliers
private
Initial value:
{this, "minNTrtHighThresholdHitsPlusOutliers", -1,
"Minimum high E TRT hits including outliers"}

Definition at line 245 of file InDetTrackSelectionTool.h.

246 {this, "minNTrtHighThresholdHitsPlusOutliers", -1,
247 "Minimum high E TRT hits including outliers"};

◆ m_minNTrtHits

Gaudi::Property<int> InDet::InDetTrackSelectionTool::m_minNTrtHits {this, "minNTrtHits", -1, "Minimum TRT hits"}
private

Definition at line 240 of file InDetTrackSelectionTool.h.

240{this, "minNTrtHits", -1, "Minimum TRT hits"};

◆ m_minNTrtHitsPlusOutliers

Gaudi::Property<int> InDet::InDetTrackSelectionTool::m_minNTrtHitsPlusOutliers {this, "minNTrtHitsPlusOutliers", -1, "Minimum TRT hits including outliers"}
private

Definition at line 241 of file InDetTrackSelectionTool.h.

242{this, "minNTrtHitsPlusOutliers", -1, "Minimum TRT hits including outliers"};

◆ m_minNUsedHitsdEdx

Gaudi::Property<int> InDet::InDetTrackSelectionTool::m_minNUsedHitsdEdx {this, "minNUsedHitsdEdx", -1, "Minimum hits used for dEdx"}
private

Definition at line 271 of file InDetTrackSelectionTool.h.

272{this, "minNUsedHitsdEdx", -1, "Minimum hits used for dEdx"};

◆ m_minP

Gaudi::Property<double> InDet::InDetTrackSelectionTool::m_minP {this, "minP", -1., "Minimum momentum"}
private

Definition at line 143 of file InDetTrackSelectionTool.h.

143{this, "minP", -1., "Minimum momentum"};

◆ m_minProb

Gaudi::Property<double> InDet::InDetTrackSelectionTool::m_minProb {this, "minProb", -1., "Minimum p(chi^2, Ndof)"}
private

Definition at line 263 of file InDetTrackSelectionTool.h.

263{this, "minProb", -1., "Minimum p(chi^2, Ndof)"};

◆ m_minProbAbovePtCutoff

Gaudi::Property<double> InDet::InDetTrackSelectionTool::m_minProbAbovePtCutoff
private
Initial value:
{this, "minProbAbovePtCutoff", -1.,
"Minimum chi-sq probability above a pt cutoff"}

Definition at line 267 of file InDetTrackSelectionTool.h.

268 {this, "minProbAbovePtCutoff", -1.,
269 "Minimum chi-sq probability above a pt cutoff"};

◆ m_minPt

Gaudi::Property<double> InDet::InDetTrackSelectionTool::m_minPt {this, "minPt", -1., "Minimum transverse momentum"}
private

Definition at line 142 of file InDetTrackSelectionTool.h.

142{this, "minPt", -1., "Minimum transverse momentum"};

◆ m_minPtForProbCut

Gaudi::Property<double> InDet::InDetTrackSelectionTool::m_minPtForProbCut
private
Initial value:
{this, "minPtForProbCut", LOCAL_MAX_DOUBLE,
"Minimum pt for chi-sq probability cut"}

Definition at line 264 of file InDetTrackSelectionTool.h.

265 {this, "minPtForProbCut", LOCAL_MAX_DOUBLE,
266 "Minimum pt for chi-sq probability cut"};

◆ m_msgHelper

std::unique_ptr<asg::AsgMessaging> InDet::InDetTrackSelectionTool::m_msgHelper
private

Definition at line 124 of file InDetTrackSelectionTool.h.

◆ m_mutex

std::mutex InDet::InDetTrackSelectionTool::m_mutex
mutableprivate

Definition at line 135 of file InDetTrackSelectionTool.h.

◆ m_numTracksPassed

std::atomic<uint64_t> InDet::InDetTrackSelectionTool::m_numTracksPassed = 0
mutableprivate

a counter of the number of tracks that passed all cuts

Definition at line 133 of file InDetTrackSelectionTool.h.

◆ m_numTracksProcessed

std::atomic<uint64_t> InDet::InDetTrackSelectionTool::m_numTracksProcessed = 0
mutableprivate

a counter of the number of tracks proccessed

Definition at line 132 of file InDetTrackSelectionTool.h.

◆ m_trackAccessors

std::unordered_map< std::string, std::shared_ptr<TrackAccessor> > InDet::InDetTrackSelectionTool::m_trackAccessors
private

list of the accessors that need to be run for each track

Definition at line 122 of file InDetTrackSelectionTool.h.

◆ m_trackParticleCuts

std::map< std::string, std::vector< std::function<bool(InDetAccessor::TrackParticleHelper helper, const asg::AsgMessaging &msgHelper)> > > InDet::InDetTrackSelectionTool::m_trackParticleCuts
private

First element is the name of the cut family, second element is the set of cuts.

Definition at line 126 of file InDetTrackSelectionTool.h.

◆ m_trackSumTool

ToolHandle<Trk::ITrackSummaryTool> InDet::InDetTrackSelectionTool::m_trackSumTool {this, "TrackSummaryTool", "Trk::TrackSummaryTool/TrackSummaryTool"}
private

Definition at line 368 of file InDetTrackSelectionTool.h.

369{this, "TrackSummaryTool", "Trk::TrackSummaryTool/TrackSummaryTool"};

◆ m_trackSumToolAvailable

bool InDet::InDetTrackSelectionTool::m_trackSumToolAvailable = false
private

Whether the summary tool is available.

Definition at line 367 of file InDetTrackSelectionTool.h.

◆ m_trkTrackCuts

std::map< std::string, std::vector< std::function<bool(InDetAccessor::TrkTrackHelper helper, const asg::AsgMessaging &msgHelper)> > > InDet::InDetTrackSelectionTool::m_trkTrackCuts
private

First element is the name of the cut family, second element is the set of cuts.

Definition at line 129 of file InDetTrackSelectionTool.h.

◆ m_useEtaDependentMaxChiSq

Gaudi::Property<bool> InDet::InDetTrackSelectionTool::m_useEtaDependentMaxChiSq
private
Initial value:
{this, "useEtaDependentMaxChiSq", false,
"Whether or not to use the eta-dependent chi squared per degree of freedom cut"}

Definition at line 213 of file InDetTrackSelectionTool.h.

214 {this, "useEtaDependentMaxChiSq", false,
215 "Whether or not to use the eta-dependent chi squared per degree of freedom cut"};

◆ m_useExperimentalInnermostLayersCut

Gaudi::Property<bool> InDet::InDetTrackSelectionTool::m_useExperimentalInnermostLayersCut
private
Initial value:
{this, "useExperimentalInnermostLayersCut", false,
"Use the experimental cut on pixel holes"}

Definition at line 282 of file InDetTrackSelectionTool.h.

283 {this, "useExperimentalInnermostLayersCut", false,
284 "Use the experimental cut on pixel holes"};

◆ m_useHILoosePixModInnermostLayersCut

Gaudi::Property<bool> InDet::InDetTrackSelectionTool::m_useHILoosePixModInnermostLayersCut
private
Initial value:
{this, "useHILoosePixModInnermostLayersCut", false,
"IBL or next layer hit, otherwise zero expected next layer hits"}

Definition at line 182 of file InDetTrackSelectionTool.h.

183 {this, "useHILoosePixModInnermostLayersCut", false,
184 "IBL or next layer hit, otherwise zero expected next layer hits"};

◆ m_useMinBiasInnermostLayersCut

Gaudi::Property<int> InDet::InDetTrackSelectionTool::m_useMinBiasInnermostLayersCut
private
Initial value:
{this, "useMinBiasInnermostLayersCut", 0,
"IBL hit if expected, otherwise next layer hit if expected"}

Definition at line 179 of file InDetTrackSelectionTool.h.

180 {this, "useMinBiasInnermostLayersCut", 0,
181 "IBL hit if expected, otherwise next layer hit if expected"};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vecEtaCutoffsForD0Cut

Gaudi::Property<std::vector<double> > InDet::InDetTrackSelectionTool::m_vecEtaCutoffsForD0Cut {this, "vecEtaCutoffsForD0Cut", {}, "Minimum eta cutoffs for each D0 value"}
private

Definition at line 327 of file InDetTrackSelectionTool.h.

328{this, "vecEtaCutoffsForD0Cut", {}, "Minimum eta cutoffs for each D0 value"};

◆ m_vecEtaCutoffsForPtCut

Gaudi::Property<std::vector<double> > InDet::InDetTrackSelectionTool::m_vecEtaCutoffsForPtCut {this, "vecEtaCutoffsForPtCut", {}, "Minimum eta cutoffs for each pT cut"}
private

Definition at line 304 of file InDetTrackSelectionTool.h.

305{this, "vecEtaCutoffsForPtCut", {}, "Minimum eta cutoffs for each pT cut"};

◆ m_vecEtaCutoffsForSctHitsPlusDeadCut

Gaudi::Property<std::vector<double> > InDet::InDetTrackSelectionTool::m_vecEtaCutoffsForSctHitsPlusDeadCut
private
Initial value:
{this, "vecEtaCutoffsForSctHitsPlusDeadCut", {},
"Minimum eta cutoffs for each SctHitsPlusDead value"}

Definition at line 345 of file InDetTrackSelectionTool.h.

346 {this, "vecEtaCutoffsForSctHitsPlusDeadCut", {},
347 "Minimum eta cutoffs for each SctHitsPlusDead value"};

◆ m_vecEtaCutoffsForSctHolesCut

Gaudi::Property<std::vector<double> > InDet::InDetTrackSelectionTool::m_vecEtaCutoffsForSctHolesCut
private
Initial value:
{this, "vecEtaCutoffsForSctHolesCut", {},
"Minimum eta cutoffs for each SctHoles value"}

Definition at line 335 of file InDetTrackSelectionTool.h.

336 {this, "vecEtaCutoffsForSctHolesCut", {},
337 "Minimum eta cutoffs for each SctHoles value"};

◆ m_vecEtaCutoffsForSiHitsCut

Gaudi::Property<std::vector<double> > InDet::InDetTrackSelectionTool::m_vecEtaCutoffsForSiHitsCut
private
Initial value:
{this, "vecEtaCutoffsForSiHitsCut", {},
"Minimum eta cutoffs for each Silicon hit cut"}

Definition at line 298 of file InDetTrackSelectionTool.h.

299 {this, "vecEtaCutoffsForSiHitsCut", {},
300 "Minimum eta cutoffs for each Silicon hit cut"};

◆ m_vecEtaCutoffsForZ0SinThetaCut

Gaudi::Property<std::vector<double> > InDet::InDetTrackSelectionTool::m_vecEtaCutoffsForZ0SinThetaCut
private
Initial value:
{this, "vecEtaCutoffsForZ0SinThetaCut", {},
"Minimum eta cutoffs for each Z0SinTheta value"}

Definition at line 317 of file InDetTrackSelectionTool.h.

318 {this, "vecEtaCutoffsForZ0SinThetaCut", {},
319 "Minimum eta cutoffs for each Z0SinTheta value"};

◆ m_vecMinNSctHitsAbovePt

Gaudi::Property<std::vector<int> > InDet::InDetTrackSelectionTool::m_vecMinNSctHitsAbovePt
private
Initial value:
{this, "vecMinNSctHitsAbovePt", {},
"Minimum SCT hits above each pt cutoff"}

Definition at line 313 of file InDetTrackSelectionTool.h.

314 {this, "vecMinNSctHitsAbovePt", {},
315 "Minimum SCT hits above each pt cutoff"};

◆ m_vecMinNSiHitsAboveEta

Gaudi::Property<std::vector<int> > InDet::InDetTrackSelectionTool::m_vecMinNSiHitsAboveEta
private
Initial value:
{this, "vecMinNSiHitsAboveEta", {},
"Minimum Silicon hits above each eta cutoff"}

Definition at line 301 of file InDetTrackSelectionTool.h.

302 {this, "vecMinNSiHitsAboveEta", {},
303 "Minimum Silicon hits above each eta cutoff"};

◆ m_vecMinPtAboveEta

Gaudi::Property<std::vector<double> > InDet::InDetTrackSelectionTool::m_vecMinPtAboveEta
private
Initial value:
{this, "vecMinPtAboveEta", {},
"Minimum transverse momentum above each eta cutoff"}

Definition at line 306 of file InDetTrackSelectionTool.h.

307 {this, "vecMinPtAboveEta", {},
308 "Minimum transverse momentum above each eta cutoff"};

◆ m_vecPtCutoffsForD0Cut

Gaudi::Property<std::vector<double> > InDet::InDetTrackSelectionTool::m_vecPtCutoffsForD0Cut {this, "vecPtCutoffsForD0Cut", {}, "Minimum pt cutoffs for each D0 value"}
private

Definition at line 329 of file InDetTrackSelectionTool.h.

330{this, "vecPtCutoffsForD0Cut", {}, "Minimum pt cutoffs for each D0 value"};

◆ m_vecPtCutoffsForSctHitsCut

Gaudi::Property<std::vector<double> > InDet::InDetTrackSelectionTool::m_vecPtCutoffsForSctHitsCut
private
Initial value:
{this, "vecPtCutoffsForSctHitsCut", {},
"Minimum pt cutoffs for each SCT hits"}

Definition at line 310 of file InDetTrackSelectionTool.h.

311 {this, "vecPtCutoffsForSctHitsCut", {},
312 "Minimum pt cutoffs for each SCT hits"};

◆ m_vecPtCutoffsForSctHitsPlusDeadCut

Gaudi::Property<std::vector<double> > InDet::InDetTrackSelectionTool::m_vecPtCutoffsForSctHitsPlusDeadCut
private
Initial value:
{this, "vecPtCutoffsForSctHitsPlusDeadCut", {},
"Minimum pt cutoffs for each SctHitsPlusDead value"}

Definition at line 348 of file InDetTrackSelectionTool.h.

349 {this, "vecPtCutoffsForSctHitsPlusDeadCut", {},
350 "Minimum pt cutoffs for each SctHitsPlusDead value"};

◆ m_vecPtCutoffsForSctHolesCut

Gaudi::Property<std::vector<double> > InDet::InDetTrackSelectionTool::m_vecPtCutoffsForSctHolesCut
private
Initial value:
{this, "vecPtCutoffsForSctHolesCut", {},
"Minimum pt cutoffs for each SctHoles value"}

Definition at line 338 of file InDetTrackSelectionTool.h.

339 {this, "vecPtCutoffsForSctHolesCut", {},
340 "Minimum pt cutoffs for each SctHoles value"};

◆ m_vecPtCutoffsForZ0SinThetaCut

Gaudi::Property<std::vector<double> > InDet::InDetTrackSelectionTool::m_vecPtCutoffsForZ0SinThetaCut
private
Initial value:
{this, "vecPtCutoffsForZ0SinThetaCut", {},
"Minimum pt cutoffs for each Z0SinTheta value"}

Definition at line 320 of file InDetTrackSelectionTool.h.

321 {this, "vecPtCutoffsForZ0SinThetaCut", {},
322 "Minimum pt cutoffs for each Z0SinTheta value"};

◆ m_vecvecMaxD0AboveEtaPt

Gaudi::Property<std::vector<std::vector<double> > > InDet::InDetTrackSelectionTool::m_vecvecMaxD0AboveEtaPt
private
Initial value:
{this, "vecvecMaxD0AboveEtaPt", {},
"Maximum D0 value above each eta and pT cutoff"}

Definition at line 331 of file InDetTrackSelectionTool.h.

332 {this, "vecvecMaxD0AboveEtaPt", {},
333 "Maximum D0 value above each eta and pT cutoff"};

◆ m_vecvecMaxSctHolesAboveEtaPt

Gaudi::Property<std::vector<std::vector<double> > > InDet::InDetTrackSelectionTool::m_vecvecMaxSctHolesAboveEtaPt
private
Initial value:
{this, "vecvecMaxSctHolesAboveEtaPt", {},
"Maximum SctHoles value above each eta and pT cutoff"}

Definition at line 341 of file InDetTrackSelectionTool.h.

342 {this, "vecvecMaxSctHolesAboveEtaPt", {},
343 "Maximum SctHoles value above each eta and pT cutoff"};

◆ m_vecvecMaxZ0SinThetaAboveEtaPt

Gaudi::Property<std::vector<std::vector<double> > > InDet::InDetTrackSelectionTool::m_vecvecMaxZ0SinThetaAboveEtaPt
private
Initial value:
{this, "vecvecMaxZ0SinThetaAboveEtaPt", {},
"Maximum Z0SinTheta value above each eta and pT cutoff"}

Definition at line 323 of file InDetTrackSelectionTool.h.

324 {this, "vecvecMaxZ0SinThetaAboveEtaPt", {},
325 "Maximum Z0SinTheta value above each eta and pT cutoff"};

◆ m_vecvecMinSctHitsPlusDeadAboveEtaPt

Gaudi::Property<std::vector<std::vector<double> > > InDet::InDetTrackSelectionTool::m_vecvecMinSctHitsPlusDeadAboveEtaPt
private
Initial value:
{this, "vecvecMinSctHitsPlusDeadAboveEtaPt", {},
"Minimum SctHitsPlusDead value above each eta and pT cutoff"}

Definition at line 351 of file InDetTrackSelectionTool.h.

352 {this, "vecvecMinSctHitsPlusDeadAboveEtaPt", {},
353 "Minimum SctHitsPlusDead value above each eta and pT cutoff"};

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_warnInit

std::atomic_bool InDet::InDetTrackSelectionTool::m_warnInit = false
mutableprivate

Definition at line 110 of file InDetTrackSelectionTool.h.

◆ property

virtual void the cut level is best set through the CutLevel InDet::InDetTrackSelectionTool::property
private

Definition at line 106 of file InDetTrackSelectionTool.h.

◆ s_mapCutLevel

const std::unordered_map< std::string, InDet::CutLevel > InDet::InDetTrackSelectionTool::s_mapCutLevel
staticprivate
Initial value:
=
{
{"NoCut", InDet::CutLevel::NoCut},
{"Loose", InDet::CutLevel::Loose},
{"LoosePrimary", InDet::CutLevel::LoosePrimary},
{"TightPrimary", InDet::CutLevel::TightPrimary},
{"LooseMuon", InDet::CutLevel::LooseMuon},
{"LooseElectron", InDet::CutLevel::LooseElectron},
{"LooseTau", InDet::CutLevel::LooseTau},
{"MinBias", InDet::CutLevel::MinBias},
{"HILoose", InDet::CutLevel::HILoose},
{"HITight", InDet::CutLevel::HITight},
{"HILooseOptimized", InDet::CutLevel::HILooseOptimized},
{"HITightOptimized", InDet::CutLevel::HITightOptimized},
{"HILoosePixMod", InDet::CutLevel::HILoosePixMod}
}

Definition at line 1471 of file InDetTrackSelectionTool.h.

1504 {
1505
1506 class TrackParticleHelper;
1507
1508#ifndef XAOD_ANALYSIS
1509 class TrkTrackHelper;
1510#endif
1511}
1512
1513namespace InDet {
1514
1515 // forward declaration of helper classes
1516 class TrackAccessor;
1517 class TrackCut;
1518
1522 public virtual IInDetTrackSelectionTool,
1523 public asg::AsgTool {
1524
1525 friend class TrackCut;
1526
1528 ASG_TOOL_CLASS2( InDetTrackSelectionTool,
1529 IAsgSelectionTool,
1530 InDet::IInDetTrackSelectionTool )
1531
1532 public:
1534 InDetTrackSelectionTool( const std::string& name );
1535
1536 // The default destructor is OK but it must be defined in the
1537 // implementation file in order to forward declare with unique_ptr
1539
1542
1544 virtual StatusCode initialize() override;
1546 virtual StatusCode finalize() override;
1547
1549
1552
1554 virtual const asg::AcceptInfo& getAcceptInfo() const override;
1555
1557 virtual asg::AcceptData accept( const xAOD::IParticle* ) const override;
1558
1560
1563
1565 virtual asg::AcceptData accept( const xAOD::TrackParticle& track,
1566 const xAOD::Vertex* vertex = nullptr ) const override;
1567
1568#ifndef XAOD_ANALYSIS
1569 virtual asg::AcceptData accept( const Trk::Track& track,
1570 const Trk::Vertex* vertex = nullptr ) const override;
1571#endif
1572
1574
1575 virtual void setCutLevel( InDet::CutLevel level, bool overwrite = true ) override
1576 __attribute__ ((deprecated("For consistency with the athena interface, the cut level is best set through the \"CutLevel\" property.")));
1577
1578 private:
1579 bool m_isInitialized = false; // flag whether or not the tool has been initialized, to check erroneous use cases.
1580 mutable std::atomic_bool m_warnInit = false; // flag to keep track of whether we have warned about a lack of initialization
1581
1582 // this is the setCutLevel function that actually does the work, so that it doesn't warn if called in athena.
1583 void setCutLevelPrivate( InDet::CutLevel level, bool overwrite = true );
1584
1585 // helper method to setup the cut functions for TrackParticles and Trk::Tracks
1586 template <int VERBOSE, class Trk_Helper>
1587 StatusCode setupCuts(std::map< std::string, std::vector< std::function<bool(Trk_Helper helper, const asg::AsgMessaging &msgHelper)> > > &trackCuts);
1588
1589 template <class Trk_Helper>
1590 asg::AcceptData accept(Trk_Helper helper, const std::map< std::string, std::vector< std::function<bool(Trk_Helper helper, const asg::AsgMessaging &msgHelper)> > > &trackCuts) const;
1591
1592 std::unordered_map< std::string, std::shared_ptr<TrackAccessor> > m_trackAccessors;
1593
1594 std::unique_ptr<asg::AsgMessaging> m_msgHelper;
1595 std::map< std::string, std::vector< std::function<bool(InDetAccessor::TrackParticleHelper helper, const asg::AsgMessaging &msgHelper)> > >
1597#ifndef XAOD_ANALYSIS
1598 std::map< std::string, std::vector< std::function<bool(InDetAccessor::TrkTrackHelper helper, const asg::AsgMessaging &msgHelper)> > >
1600#endif
1601
1602 mutable std::atomic<uint64_t> m_numTracksProcessed = 0;
1603 mutable std::atomic<uint64_t> m_numTracksPassed = 0;
1604 mutable std::vector<uint64_t> m_numTracksPassedCuts ATLAS_THREAD_SAFE;
1605 mutable std::mutex m_mutex;
1606
1607 static inline bool maxDoubleIsSet(double cutValue) {return cutValue < InDet::InDetTrackSelectionTool::LOCAL_MAX_DOUBLE && cutValue >= 0.;}
1608 static inline bool maxIntIsSet(int cutValue){return cutValue < InDet::InDetTrackSelectionTool::LOCAL_MAX_INT && cutValue >= 0;}
1609 constexpr static double LOCAL_MAX_DOUBLE = 1.0e16;
1610 constexpr static int LOCAL_MAX_INT = std::numeric_limits<int>::max();
1611
1612 Gaudi::Property<double> m_minPt{this, "minPt", -1., "Minimum transverse momentum"};
1613 Gaudi::Property<double> m_minP{this, "minP", -1., "Minimum momentum"};
1614
1615 Gaudi::Property<double> m_maxAbsEta
1616 {this, "maxAbsEta", LOCAL_MAX_DOUBLE, "Maximum magnitude of pseudorapidity"};
1617 Gaudi::Property<double> m_maxZ0SinTheta
1618 {this, "maxZ0SinTheta", LOCAL_MAX_DOUBLE, "Maximum |z0|*sin(theta)"};
1619 Gaudi::Property<double> m_maxZ0
1620 {this, "maxZ0", LOCAL_MAX_DOUBLE, "Maximum longitudinal separation"};
1621 Gaudi::Property<double> m_maxD0
1622 {this, "maxD0", LOCAL_MAX_DOUBLE, "Maximum transvers separation"};
1623 Gaudi::Property<double> m_maxSigmaD0
1624 {this, "maxSigmaD0", LOCAL_MAX_DOUBLE, "Maximum error on d0"};
1625 Gaudi::Property<double> m_maxSigmaZ0
1626 {this, "maxSigmaZ0", LOCAL_MAX_DOUBLE, "Maximum error on z0"};
1627 Gaudi::Property<double> m_maxSigmaZ0SinTheta
1628 {this, "maxSigmaZ0SinTheta", LOCAL_MAX_DOUBLE, "Maximum error on z0*sin(theta)"};
1629 Gaudi::Property<double> m_maxD0overSigmaD0
1630 {this, "maxD0overSigmaD0", LOCAL_MAX_DOUBLE, "Significance cut on |d0|"};
1631 Gaudi::Property<double> m_maxZ0overSigmaZ0
1632 {this, "maxZ0overSigmaZ0", LOCAL_MAX_DOUBLE, "Significance cut on |z0|"};
1633 Gaudi::Property<double> m_maxZ0SinThetaoverSigmaZ0SinTheta
1634 {this, "maxZ0SinThetaoverSigmaZ0SinTheta", LOCAL_MAX_DOUBLE,
1635 "Significance cut on |z0*sin(theta)|"};
1636
1637 Gaudi::Property<int> m_minNInnermostLayerHits
1638 {this, "minNInnermostLayerHits", -1,
1639 "Required hits on the innermost pixel layer"};
1640 Gaudi::Property<int> m_minNNextToInnermostLayerHits
1641 {this, "minNNextToInnermostLayerHits", -1,
1642 "Required hits on the next to innermost pixel layer"};
1643 Gaudi::Property<int> m_minNBothInnermostLayersHits
1644 {this, "minNBothInnermostLayersHits", -1,
1645 "Required hits on two innermost pixel layers"};
1646 Gaudi::Property<int> m_maxNInnermostLayerSharedHits
1647 {this, "maxNInnermostLayerSharedHits", LOCAL_MAX_INT,
1648 "Maximum shared hits in innermost pixel layer"};
1649 Gaudi::Property<int> m_useMinBiasInnermostLayersCut
1650 {this, "useMinBiasInnermostLayersCut", 0,
1651 "IBL hit if expected, otherwise next layer hit if expected"};
1652 Gaudi::Property<bool> m_useHILoosePixModInnermostLayersCut
1653 {this, "useHILoosePixModInnermostLayersCut", false,
1654 "IBL or next layer hit, otherwise zero expected next layer hits"};
1655 Gaudi::Property<int> m_minNSiHits
1656 {this, "minNSiHits", -1, "Minimum silicon (pixel + SCT) hits"};
1657 Gaudi::Property<int> m_maxNSiSharedHits
1658 {this, "maxNSiSharedHits", LOCAL_MAX_INT,
1659 "Maximum silicon (pixel + SCT) sensors shared with other track"};
1660 Gaudi::Property<int> m_minNSiHitsIfSiSharedHits
1661 {this, "minNSiHitsIfSiSharedHits", -1,
1662 "Minimum number of silicon hits if there are any shared silicon hits"};
1663 Gaudi::Property<int> m_maxNSiHoles
1664 {this, "maxNSiHoles", LOCAL_MAX_INT, "Maximum silicon (pixel + SCT) holes"};
1665 Gaudi::Property<int> m_minNPixelHits
1666 {this, "minNPixelHits", -1, "Required pixel hits"};
1667 Gaudi::Property<int> m_maxNPixelSharedHits
1668 {this, "maxNPixelSharedHits", LOCAL_MAX_INT,
1669 "Maximum pixels shared with other tracks"};
1670 Gaudi::Property<int> m_maxNPixelHoles
1671 {this, "maxNPixelHoles", LOCAL_MAX_INT,
1672 "Maximum number of missed layers in pixel"};
1673
1674 Gaudi::Property<double> m_minEtaForStrictNSiHitsCut
1675 {this, "minEtaForStrictNSiHitsCut", LOCAL_MAX_DOUBLE,
1676 "Eta cutoff for strict silicon hits cut"};
1677 Gaudi::Property<int> m_minNSiHitsAboveEtaCutoff
1678 {this, "minNSiHitsAboveEtaCutoff", -1,
1679 "Minimum silicon hits at large pseudorapidity"};
1680 Gaudi::Property<bool> m_maxOneSharedModule
1681 {this, "maxOneSharedModule", false,
1682 "Allow only 1 shared pixel hit or 2 shared SCT hits, not both"};
1683 Gaudi::Property<bool> m_useEtaDependentMaxChiSq
1684 {this, "useEtaDependentMaxChiSq", false,
1685 "Whether or not to use the eta-dependent chi squared per degree of freedom cut"};
1686
1687 Gaudi::Property<int> m_minNSiHitsPhysical
1688 {this, "minNSiHitsPhysical", -1,
1689 "Minimum physical silicon hits (i.e. dead sensors do not count)"};
1690 Gaudi::Property<int> m_minNPixelHitsPhysical
1691 {this, "minNPixelHitsPhysical", -1, "Minimum physical pixel hits"};
1692 Gaudi::Property<int> m_minNSctHitsPhysical
1693 {this, "minNSctHitsPhysical", -1, "Minimum physical SCT hits"};
1694 Gaudi::Property<int> m_minNSctHits
1695 {this, "minNSctHits", -1, "Minimum SCT hits"};
1696 Gaudi::Property<int> m_maxNSctSharedHits
1697 {this, "maxNSctSharedHits", LOCAL_MAX_INT,
1698 "Maximum SCT hits shared with other track"};
1699 Gaudi::Property<int> m_maxNSctHoles
1700 {this, "maxNSctHoles", LOCAL_MAX_INT, "Maximum SCT holes"};
1701 Gaudi::Property<int> m_maxNSctDoubleHoles
1702 {this, "maxNSctDoubleHoles", LOCAL_MAX_INT, "Maximum SCT double holes"};
1703
1704 Gaudi::Property<double> m_maxTrtEtaAcceptance
1705 {this, "maxTrtEtaAcceptance", LOCAL_MAX_DOUBLE,
1706 "Maximum eta that ignores TRT hit cuts"};
1707 Gaudi::Property<double> m_maxEtaForTrtHitCuts
1708 {this, "maxEtaForTrtHitCuts", -1.,
1709 "Eta above which TRT hit cuts are not applied."};
1710 Gaudi::Property<int> m_minNTrtHits{this, "minNTrtHits", -1, "Minimum TRT hits"};
1711 Gaudi::Property<int> m_minNTrtHitsPlusOutliers
1712 {this, "minNTrtHitsPlusOutliers", -1, "Minimum TRT hits including outliers"};
1713 Gaudi::Property<int> m_minNTrtHighThresholdHits
1714 {this, "minNTrtHighThresholdHits", -1, "Minimum high E TRT hits"};
1715 Gaudi::Property<int> m_minNTrtHighThresholdHitsPlusOutliers
1716 {this, "minNTrtHighThresholdHitsPlusOutliers", -1,
1717 "Minimum high E TRT hits including outliers"};
1718 Gaudi::Property<double> m_maxTrtHighEFraction
1719 {this, "maxTrtHighEFraction", LOCAL_MAX_DOUBLE,
1720 "Maximum TRT hits that are above high energy threshold"};
1721 Gaudi::Property<double> m_maxTrtHighEFractionWithOutliers
1722 {this, "maxTrtHighEFractionWithOutliers", LOCAL_MAX_DOUBLE,
1723 "Maximum TRT hits that are above high energy threshold including outliers"};
1724 Gaudi::Property<double> m_maxTrtOutlierFraction
1725 {this, "maxTrtOutlierFraction", LOCAL_MAX_DOUBLE,
1726 "Maximum fraction of TRT outliers over TRT hits plus outliers"};
1727
1728 Gaudi::Property<double> m_maxChiSq
1729 {this, "maxChiSq", LOCAL_MAX_DOUBLE, "Maximum chi squared"};
1730 Gaudi::Property<double> m_maxChiSqperNdf
1731 {this, "maxChiSqperNdf", LOCAL_MAX_DOUBLE,
1732 "Maximum chi squared per degree of freedom"};
1733 Gaudi::Property<double> m_minProb{this, "minProb", -1., "Minimum p(chi^2, Ndof)"};
1734 Gaudi::Property<double> m_minPtForProbCut
1735 {this, "minPtForProbCut", LOCAL_MAX_DOUBLE,
1736 "Minimum pt for chi-sq probability cut"};
1737 Gaudi::Property<double> m_minProbAbovePtCutoff
1738 {this, "minProbAbovePtCutoff", -1.,
1739 "Minimum chi-sq probability above a pt cutoff"};
1740
1741 Gaudi::Property<int> m_minNUsedHitsdEdx
1742 {this, "minNUsedHitsdEdx", -1, "Minimum hits used for dEdx"};
1743 Gaudi::Property<int> m_minNOverflowHitsdEdx
1744 {this, "minNOverflowHitsdEdx", -1, "Minimum overflow hits in IBL for dEdx"};
1745 Gaudi::Property<bool> m_eProbHTonlyForXe
1746 {this, "eProbHTonlyForXe", false,
1747 "Flag whether to apply the eProbabilityHT cut only when all TRT hits are Xenon"};
1748 Gaudi::Property<double> m_minEProbabilityHT
1749 {this, "minEProbabilityHT", -1.,
1750 "Minimum High Threshold electron probability"};
1751
1752 Gaudi::Property<bool> m_useExperimentalInnermostLayersCut
1753 {this, "useExperimentalInnermostLayersCut", false,
1754 "Use the experimental cut on pixel holes"};
1755
1756#ifndef XAOD_ANALYSIS
1757 Gaudi::Property<int> m_minNSiHitsMod
1758 {this, "minNSiHitsMod", -1,
1759 "Minimum number of Si hits, with pixel hits counting twice"};
1760 Gaudi::Property<int> m_minNSiHitsModTop
1761 {this, "minNSiHitsModTop", -1,
1762 "Min number of Si hits on top half (pixel counting twice)"};
1763 Gaudi::Property<int> m_minNSiHitsModBottom
1764 {this, "minNSiHitsModBottom", -1,
1765 "Min number of Si hits on bottom half (pixel counting twice)"};
1766#endif
1767
1768 Gaudi::Property<std::vector<double>> m_vecEtaCutoffsForSiHitsCut
1769 {this, "vecEtaCutoffsForSiHitsCut", {},
1770 "Minimum eta cutoffs for each Silicon hit cut"};
1771 Gaudi::Property<std::vector<int>> m_vecMinNSiHitsAboveEta
1772 {this, "vecMinNSiHitsAboveEta", {},
1773 "Minimum Silicon hits above each eta cutoff"};
1774 Gaudi::Property<std::vector<double>> m_vecEtaCutoffsForPtCut
1775 {this, "vecEtaCutoffsForPtCut", {}, "Minimum eta cutoffs for each pT cut"};
1776 Gaudi::Property<std::vector<double>> m_vecMinPtAboveEta
1777 {this, "vecMinPtAboveEta", {},
1778 "Minimum transverse momentum above each eta cutoff"};
1779
1780 Gaudi::Property<std::vector<double>> m_vecPtCutoffsForSctHitsCut
1781 {this, "vecPtCutoffsForSctHitsCut", {},
1782 "Minimum pt cutoffs for each SCT hits"};
1783 Gaudi::Property<std::vector<int>> m_vecMinNSctHitsAbovePt
1784 {this, "vecMinNSctHitsAbovePt", {},
1785 "Minimum SCT hits above each pt cutoff"};
1786
1787 Gaudi::Property<std::vector<double>> m_vecEtaCutoffsForZ0SinThetaCut
1788 {this, "vecEtaCutoffsForZ0SinThetaCut", {},
1789 "Minimum eta cutoffs for each Z0SinTheta value"};
1790 Gaudi::Property<std::vector<double>> m_vecPtCutoffsForZ0SinThetaCut
1791 {this, "vecPtCutoffsForZ0SinThetaCut", {},
1792 "Minimum pt cutoffs for each Z0SinTheta value"};
1793 Gaudi::Property<std::vector<std::vector<double>>> m_vecvecMaxZ0SinThetaAboveEtaPt
1794 {this, "vecvecMaxZ0SinThetaAboveEtaPt", {},
1795 "Maximum Z0SinTheta value above each eta and pT cutoff"};
1796
1797 Gaudi::Property<std::vector<double>> m_vecEtaCutoffsForD0Cut
1798 {this, "vecEtaCutoffsForD0Cut", {}, "Minimum eta cutoffs for each D0 value"};
1799 Gaudi::Property<std::vector<double>> m_vecPtCutoffsForD0Cut
1800 {this, "vecPtCutoffsForD0Cut", {}, "Minimum pt cutoffs for each D0 value"};
1801 Gaudi::Property<std::vector<std::vector<double>>> m_vecvecMaxD0AboveEtaPt
1802 {this, "vecvecMaxD0AboveEtaPt", {},
1803 "Maximum D0 value above each eta and pT cutoff"};
1804
1805 Gaudi::Property<std::vector<double>> m_vecEtaCutoffsForSctHolesCut
1806 {this, "vecEtaCutoffsForSctHolesCut", {},
1807 "Minimum eta cutoffs for each SctHoles value"};
1808 Gaudi::Property<std::vector<double>> m_vecPtCutoffsForSctHolesCut
1809 {this, "vecPtCutoffsForSctHolesCut", {},
1810 "Minimum pt cutoffs for each SctHoles value"};
1811 Gaudi::Property<std::vector<std::vector<double>>> m_vecvecMaxSctHolesAboveEtaPt
1812 {this, "vecvecMaxSctHolesAboveEtaPt", {},
1813 "Maximum SctHoles value above each eta and pT cutoff"};
1814
1815 Gaudi::Property<std::vector<double>> m_vecEtaCutoffsForSctHitsPlusDeadCut
1816 {this, "vecEtaCutoffsForSctHitsPlusDeadCut", {},
1817 "Minimum eta cutoffs for each SctHitsPlusDead value"};
1818 Gaudi::Property<std::vector<double>> m_vecPtCutoffsForSctHitsPlusDeadCut
1819 {this, "vecPtCutoffsForSctHitsPlusDeadCut", {},
1820 "Minimum pt cutoffs for each SctHitsPlusDead value"};
1821 Gaudi::Property<std::vector<std::vector<double>>> m_vecvecMinSctHitsPlusDeadAboveEtaPt
1822 {this, "vecvecMinSctHitsPlusDeadAboveEtaPt", {},
1823 "Minimum SctHitsPlusDead value above each eta and pT cutoff"};
1824
1826 asg::AcceptInfo m_acceptInfo;
1827
1828 // to set to a pre-defined cut level in Athena, we need to save the cut level
1829 // as a string so we can do a soft set in initialize()
1830 Gaudi::Property<std::string> m_cutLevel{this, "CutLevel", ""};
1831
1832 // we need a map from strings (for use in Athena) to the CutLevel enum
1833 static const std::unordered_map<std::string, CutLevel> s_mapCutLevel;
1834
1835#ifndef XAOD_ANALYSIS
1836 Gaudi::Property<bool> m_initTrkTools{this, "UseTrkTrackTools", false, "Whether to initialize the Trk::Track tools"};
1837 bool m_trackSumToolAvailable = false;
1838 ToolHandle<Trk::ITrackSummaryTool> m_trackSumTool
1839 {this, "TrackSummaryTool", "Trk::TrackSummaryTool/TrackSummaryTool"};
1840 ToolHandle<Trk::IExtrapolator> m_extrapolator
1841 {this, "Extrapolator", "Trk::Extrapolator/Extrapolator"};
1842
1843#endif // XAOD_ANALYSIS
1844
1845 }; // class InDetTrackSelectionTool
1846
1847} // namespace InDet
1848
1849#endif // INDETTRACKSELECTIONTOOL_INDETTRACKSELECTIONTOOL_H
#define ASG_TOOL_CLASS2(CLASSNAME, INT1, INT2)
__attribute__((always_inline)) inline uint16_t TileCalibDrawerBase
Interface for track selection tool.
Implementation of the track selector tool.
std::unordered_map< std::string, std::shared_ptr< TrackAccessor > > m_trackAccessors
list of the accessors that need to be run for each track
virtual const asg::AcceptInfo & getAcceptInfo() const override
Get an object describing the "selection steps" of the tool.
std::vector< uint64_t > m_numTracksPassedCuts ATLAS_THREAD_SAFE
tracks the number of tracks that passed each cut family.
virtual StatusCode finalize() override
Function finalizing the tool.
virtual StatusCode initialize() override
Function initialising the tool.
ASG_TOOL_CLASS2(InDetTrackSelectionTool, IAsgSelectionTool, InDet::IInDetTrackSelectionTool) public ~InDetTrackSelectionTool()
Create a proper constructor for Athena.
virtual void setCutLevel(InDet::CutLevel level, bool overwrite=true) override __attribute__((deprecated("For consistency with the athena interface
Function to set the cut level within standalone ROOT.
::StatusCode StatusCode
StatusCode definition for legacy code.
AccessorTemplate< TrackDef, CT, ColumnAccessMode::input, CM > TrackAccessor
Definition TrackDef.h:45
Vertex_v1 Vertex
Define the latest version of the vertex class.
setBGCode setTAP setLVL2ErrorBits bool
#define private
Definition testRead.cxx:27

The documentation for this class was generated from the following files: