37 const typename ActsTrk::TrackContainer::ConstTrackProxy&
track) {
39 tracksContainer.trackStateContainer().visitBackwards(
43 ](
const typename ActsTrk::TrackStateBackend::ConstTrackStateProxy &state) ->
void
45 if (state.hasUncalibratedSourceLink()) {
47 const xAOD::UncalibratedMeasurement *
48 measurement = &(ActsTrk::getUncalibratedMeasurement(state.getUncalibratedSourceLink().get<ATLASUncalibSourceLink>()));
49 assert( static_cast<unsigned int >(measurement->type() < xAOD::UncalibMeasType::nTypes));
50 ++hit_counts_out[static_cast<unsigned int >(measurement->type())];
52 catch (std::bad_any_cast &) {
56 return hit_counts_out;
60 StatusCode TrackAnalysisAlg::fillHistograms(
const EventContext& ctx)
const {
67 using ConstTrackProxy = ActsTrk::TrackContainer::ConstTrackProxy;
70 std::vector<ConstTrackProxy> proxies;
71 for (
auto proxy: *tracks ) {
72 proxies.push_back(
proxy);
75 auto monitor_theta =
Monitored::Collection(
"theta", proxies, [](
const ConstTrackProxy&
tp){
return static_cast<double>(
tp.theta()); } );
76 auto monitor_qoverp =
Monitored::Collection(
"qoverp", proxies, [](
const ConstTrackProxy&
tp){
return static_cast<double>(
tp.qOverP()); } );
77 auto monitor_phi =
Monitored::Collection(
"phi", proxies, [](
const ConstTrackProxy&
tp){
return static_cast<double>(
tp.phi()); } );
78 auto monitor_chi2 =
Monitored::Collection(
"chi2", proxies, [](
const ConstTrackProxy&
tp){
return static_cast<double>(
tp.chi2()); } );
79 auto monitor_chi2OverNdof =
Monitored::Collection(
"chi2OverNdof", proxies, [](
const ConstTrackProxy&
tp){
return static_cast<double>(
tp.chi2()/
tp.nDoF()); } );
80 auto monitor_ndof =
Monitored::Collection(
"ndof", proxies, [](
const ConstTrackProxy&
tp){
return static_cast<double>(
tp.nDoF()); } );
81 auto monitor_nstates =
Monitored::Collection(
"nStates", proxies, [](
const ConstTrackProxy&
tp){
return static_cast<double>(
tp.nTrackStates()); } );
87 auto monitor_nmeas =
Monitored::Collection(
"nMeasurements", proxies, [](
const ConstTrackProxy&
tp){
return static_cast<double>(
tp.nMeasurements()); } );
88 auto monitor_surftype =
Monitored::Collection(
"surfaceType", proxies, [](
const ConstTrackProxy&
tp){
return static_cast<double>(
tp.referenceSurface().
type()); } );
91 fill(m_monGroupName.value(), monitor_ntracks, monitor_theta, monitor_phi,
92 monitor_qoverp, monitor_nstates, monitor_phi, monitor_chi2, monitor_chi2OverNdof,
93 monitor_ndof, monitor_nstates, monitor_nmeas, monitor_surftype,
94 monitor_nPixelHits, monitor_nStripHits);
96 return StatusCode::SUCCESS;