** Warning **
Issuing rollback() due to DESTROY without explicit disconnect() of DBD::mysql::db handle dbname=lxr_eic at /usr/local/share/lxr/lxr-2.3.7/lib/LXR/Common.pm line 1161, <GEN335> line 1.
Last-Modified: Thu, 26 Aug 2026 09:32:49 GMT
Content-Type: text/html; charset=utf-8
/master/acts/Examples/Framework/include/ActsExamples/Validation/TrackParameterPerformanceCollector.hpp
File indexing completed on 2026-08-26 08:20:24
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/Geometry /GeometryContext.hpp "
0012 #include "Acts/Geometry /GeometryHierarchyMap.hpp "
0013 #include "Acts/Geometry /GeometryIdentifier.hpp "
0014 #include "Acts/Utilities/Histogram.hpp"
0015 #include "Acts/Utilities/Logger.hpp "
0016 #include "ActsExamples/EventData/SimHit.hpp "
0017 #include "ActsExamples/EventData/SimParticle.hpp "
0018 #include "ActsExamples/EventData/Track.hpp "
0019 #include "ActsExamples/EventData/TruthMatching.hpp"
0020 #include "ActsExamples/Validation/EffPlotTool.hpp "
0021 #include "ActsExamples/Validation/HistogramFit.hpp"
0022 #include "ActsExamples/Validation/ParametersOnSurface.hpp"
0023 #include "ActsExamples/Validation/ResPlotTool.hpp "
0024 #include "ActsExamples/Validation/TrackSummaryPlotTool.hpp "
0025
0026 #include <cstddef>
0027 #include <map>
0028 #include <optional>
0029 #include <string>
0030 #include <vector>
0031
0032 namespace ActsExamples {
0033
0034
0035 enum class TrackParameterSource {
0036
0037
0038 Track ,
0039
0040
0041 TrackState ,
0042 };
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058 class TrackParameterPerformanceCollector {
0059 public :
0060 struct Config {
0061 ResPlotTool ::Config resPlotToolConfig ;
0062 EffPlotTool ::Config effPlotToolConfig ;
0063 TrackSummaryPlotTool ::Config trackSummaryPlotToolConfig ;
0064
0065
0066 TrackParameterSource parameterSource = TrackParameterSource ::Track ;
0067
0068
0069 std ::optional <TrackParameterType > parameterType ;
0070
0071
0072 std ::vector <Acts ::GeometryIdentifier > geometrySelection ;
0073
0074
0075
0076 HistogramFitFunction fitFunction ;
0077
0078
0079
0080 int fitMinEntries = 10;
0081
0082 double fitSigmaRange = 3.0;
0083
0084 int fitIterations = 3;
0085
0086
0087 double warningThresholdFitFailureFraction = 0.55;
0088 };
0089
0090 TrackParameterPerformanceCollector (
0091 Config cfg , std ::unique_ptr <const Acts ::Logger > logger );
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104 void fill (const Acts ::GeometryContext & geoContext ,
0105 const ConstTrackContainer & tracks ,
0106 const SimParticleContainer & particles ,
0107 const TrackParticleMatching & trackParticleMatching ,
0108 const SimHitContainer * simHits = nullptr,
0109 const MeasurementSimHitsMap * measurementSimHitsMap = nullptr);
0110
0111
0112 struct Stats {
0113 std ::size_t nTotalTracks = 0;
0114 std ::size_t nTotalMatchedTracks = 0;
0115 std ::size_t nTotalFakeTracks = 0;
0116 std ::size_t nTotalParticles = 0;
0117 std ::size_t nTotalMatchedParticles = 0;
0118
0119 std ::size_t nMissingStateParameters = 0;
0120
0121 std ::size_t nMissingStateTruth = 0;
0122 };
0123
0124
0125 const Stats & stats () const { return m_stats ; }
0126
0127
0128 void logSummary () const ;
0129
0130
0131
0132 const ResPlotTool & resPlotTool () const { return m_resPlotTool ; }
0133 const EffPlotTool & effPlotTool () const { return m_effPlotTool ; }
0134 const TrackSummaryPlotTool & trackSummaryPlotTool () const {
0135 return m_trackSummaryPlotTool ;
0136 }
0137
0138
0139
0140
0141
0142
0143 struct FittedProfiles {
0144 std ::vector <Acts ::Experimental ::Histogram1 > profiles1 ;
0145 std ::vector <Acts ::Experimental ::Histogram2 > profiles2 ;
0146 };
0147
0148
0149
0150
0151
0152 FittedProfiles fitProfiles () const ;
0153
0154 private :
0155 const Acts ::Logger & logger () const { return *m_logger ; }
0156
0157
0158
0159 void fillTrackStates (const Acts ::GeometryContext & geoContext ,
0160 const ConstTrackProxy & track ,
0161 const SimParticle & particle ,
0162 const SimHitContainer & simHits ,
0163 const MeasurementSimHitsMap & measurementSimHitsMap );
0164
0165
0166
0167 template <std ::size_t Dim >
0168 void addFittedProfiles (
0169 const std ::map <std ::string , Acts ::Experimental ::Histogram <Dim >>& histMap ,
0170 const std ::string & meanPrefix, const std ::string & widthPrefix,
0171 std ::vector <Acts ::Experimental ::Histogram <Dim - 1>>& out ) const ;
0172
0173 Config m_cfg ;
0174 std ::unique_ptr <const Acts ::Logger > m_logger ;
0175
0176 ResPlotTool m_resPlotTool ;
0177 EffPlotTool m_effPlotTool ;
0178 TrackSummaryPlotTool m_trackSummaryPlotTool ;
0179
0180 Acts ::GeometryHierarchyMap <unsigned int > m_geometrySelection ;
0181
0182 Stats m_stats ;
0183 };
0184
0185 }