15 return track_particle.
summaryValue(tmp, summary_type) ?
static_cast<int>(
tmp) : -1;
41 ATH_MSG_DEBUG(
"Filling Histograms for " << name() <<
" ... " );
74 auto monitor_expectNextToInnermost =
Monitored::Collection(
"expectNextToInnermostHit", *track_particles,
78 fill(
m_monGroupName.value(),monitor_pt,monitor_eta, monitor_pixelHits, monitor_innermostHits, monitor_nextToInnermostHits,
79 monitor_expectInnermost, monitor_expectNextToInnermost);
80 return StatusCode::SUCCESS;
90 static_assert( std::is_same<ElementLink<ActsTrk::TrackContainer>::ElementConstReference,
91 std::optional<ActsTrk::TrackContainer::ConstTrackProxy> >::value);
92 std::optional<ActsTrk::TrackContainer::ConstTrackProxy> optional_track = *link_to_track;
94 if ( not optional_track.has_value() ) {
96 return StatusCode::SUCCESS;
99 ActsTrk::TrackContainer::ConstTrackProxy track = optional_track.value();
100 std::array<uint8_t, Acts::NumTrackStateFlags+1> counts{};
102 const ActsTrk::TrackContainer::ConstTrackProxy::IndexType
103 lastMeasurementIndex = track.tipIndex();
105 track.container().trackStateContainer().visitBackwards(lastMeasurementIndex,
106 [&counts] (
const typename ActsTrk::TrackStateBackend::ConstTrackStateProxy &state) ->
void
108 Acts::ConstTrackStateType flag = state.typeFlags();
109 ++counts[Acts::NumTrackStateFlags];
111 for (
unsigned int flag_i=0; flag_i<Acts::NumTrackStateFlags; ++flag_i) {
112 if (flag.test(flag_i)) {
113 if (flag_i == Acts::TrackStateFlag::HoleFlag) {
114 if (!state.hasReferenceSurface() || !state.referenceSurface().associatedDetectorElement())
continue;
122 auto monitor_measurement =
Monitored::Scalar<int>(
"Measurements",counts[Acts::TrackStateFlag::MeasurementFlag]);
123 auto monitor_parameter =
Monitored::Scalar<int>(
"Parameters",counts[Acts::TrackStateFlag::ParameterFlag]);
126 auto monitor_material =
Monitored::Scalar<int>(
"MaterialStates",counts[Acts::TrackStateFlag::MaterialFlag]);
127 auto monitor_sharedHit =
Monitored::Scalar<int>(
"SharedHits",counts[Acts::TrackStateFlag::SharedHitFlag]);
130 monitor_states, monitor_measurement, monitor_parameter, monitor_outlier, monitor_hole,
131 monitor_material, monitor_sharedHit);
132 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
virtual StatusCode initialize() override
initialize
TrackParticleAnalysisAlg(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
Gaudi::Property< bool > m_monitorTrackStateCounts
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_tracksKey
Gaudi::Property< std::string > m_monGroupName
StatusCode monitorTrackStateCounts(const xAOD::TrackParticle &track_particle) const
virtual StatusCode initialize() override
initialize
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
ElementLink implementation for ROOT usage.
bool isValid() const
Test to see if the link can be dereferenced.
Declare a monitored scalar variable.
SG::ConstAccessor< T, ALLOC > ConstAccessor
size_t index() const
Return the index of this element within its container.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
bool summaryValue(uint8_t &value, const SummaryType &information) const
Accessor for TrackSummary values.
void fill(const ToolHandle< GenericMonitoringTool > &groupHandle, std::vector< std::reference_wrapper< Monitored::IMonitoredVariable > > &&variables) const
Fills a vector of variables to a group by reference.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
SummaryType
Enumerates the different types of information stored in Summary.
@ expectInnermostPixelLayerHit
Do we expect a 0th-layer barrel hit for this track?
@ numberOfNextToInnermostPixelLayerHits
these are the hits in the 1st pixel barrel layer
@ expectNextToInnermostPixelLayerHit
Do we expect a 1st-layer barrel hit for this track?
@ numberOfInnermostPixelLayerHits
these are the hits in the 0th pixel barrel layer
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].