ATLAS Offline Software
Loading...
Searching...
No Matches
Trk::RecMomentumQualityValidation Class Reference

This is for automatising the 100%, 50%, 20%, 10% tables for (indet) tracks. More...

#include <RecMomentumQualityValidation.h>

Inheritance diagram for Trk::RecMomentumQualityValidation:
Collaboration diagram for Trk::RecMomentumQualityValidation:

Public Member Functions

 RecMomentumQualityValidation (const std::string &name, ISvcLocator *pSvcLocator)
 Standard Athena-Algorithm Constructor.
 ~RecMomentumQualityValidation ()
 Default Destructor.
StatusCode initialize ()
 standard Athena-Algorithm method
StatusCode execute (const EventContext &ctx)
 standard Athena-Algorithm method
StatusCode finalize ()
 standard Athena-Algorithm method
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
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 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

Protected Member Functions

virtual bool isReEntrant () const override final
 Legacy algorithms are not thread-safe.
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

enum  StatIndex { iAll = 0 , iBarrel = 1 , iTransi = 2 , iEndcap = 3 }
 define ranges in eta More...
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

void printTable () const
 method: make the output table
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Static Private Member Functions

static void monitorTrackFits (std::vector< unsigned int > &, const double &)

Private Attributes

std::string m_inputTrackCollection
 properties from JobOptions:
std::string m_trackTruthCollection
 job option: the truth track collection name
ToolHandle< Trk::ITruthToTrackm_truthToTrack
 Tool handle to Trk::ITruthToTrack tool.
ToolHandle< Trk::ITrackSelectorToolm_trackSelector
 Tool handle to Trk::ITrackSelectorTool.
const AtlasDetectorIDm_idHelper
std::vector< unsigned int > m_nHundred
 counters
std::vector< unsigned int > m_nFifty
std::vector< unsigned int > m_nTwenty
std::vector< unsigned int > m_nTen
std::vector< unsigned int > m_nFakeOrLost
std::vector< unsigned int > m_tHundred
std::vector< unsigned int > m_tFifty
std::vector< unsigned int > m_tTwenty
std::vector< unsigned int > m_tTen
std::vector< unsigned int > m_tFakeOrLost
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
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

Detailed Description

This is for automatising the 100%, 50%, 20%, 10% tables for (indet) tracks.

Author
Wolfgang Liebig (Wolfgang.Liebig -at- cern.ch)

Definition at line 32 of file RecMomentumQualityValidation.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ StatIndex

Constructor & Destructor Documentation

◆ RecMomentumQualityValidation()

Trk::RecMomentumQualityValidation::RecMomentumQualityValidation ( const std::string & name,
ISvcLocator * pSvcLocator )

Standard Athena-Algorithm Constructor.

Definition at line 22 of file RecMomentumQualityValidation.cxx.

22 :
23 AthAlgorithm(name,pSvcLocator),
24 m_inputTrackCollection("Tracks"),
25 m_trackTruthCollection("TrackTruthCollection"),
26 m_truthToTrack("Trk::TruthToTrack/TruthToTrack"),
27 m_trackSelector(""), //InDet::InDetTrackSelectorTool/InDetTrackSelectorTool),
28 m_idHelper(nullptr),
31{
32
33 // Get Parameter values from JobOptions file
34 declareProperty("InputTrackCollection", m_inputTrackCollection);
35 declareProperty("TrackTruthCollection", m_trackTruthCollection);
36 declareProperty("TruthToTrackTool", m_truthToTrack);
37 declareProperty("TrackSelectorTool", m_trackSelector);
38
39}
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
std::string m_inputTrackCollection
properties from JobOptions:
std::vector< unsigned int > m_nHundred
counters
ToolHandle< Trk::ITrackSelectorTool > m_trackSelector
Tool handle to Trk::ITrackSelectorTool.
std::string m_trackTruthCollection
job option: the truth track collection name
ToolHandle< Trk::ITruthToTrack > m_truthToTrack
Tool handle to Trk::ITruthToTrack tool.

◆ ~RecMomentumQualityValidation()

Trk::RecMomentumQualityValidation::~RecMomentumQualityValidation ( )
default

Default Destructor.

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

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

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode Trk::RecMomentumQualityValidation::execute ( const EventContext & ctx)
virtual

standard Athena-Algorithm method

Implements AthAlgorithm.

Definition at line 93 of file RecMomentumQualityValidation.cxx.

94{
95
96 // Retrieving the Trackcollection specified via m_inputTrackCollection
97 StatusCode sc = StatusCode::SUCCESS;
98 const TrackCollection* trackCollection = nullptr;
99
100 if (!m_inputTrackCollection.empty()) {
101 sc = evtStore()->retrieve(trackCollection,m_inputTrackCollection);
102 if (sc.isFailure())
103 ATH_MSG_ERROR( "TrackCollection "<<m_inputTrackCollection<<" not found!" );
104 else
105 ATH_MSG_VERBOSE("TrackCollection " << m_inputTrackCollection<<" found." );
106
107 } else {
108 ATH_MSG_ERROR("No Track collection given!" );
109 return StatusCode::FAILURE;
110 }
111
112 const TrackTruthCollection* trackTruthCollection = nullptr;
113 if (!m_trackTruthCollection.empty()) {
114 sc = evtStore()->retrieve(trackTruthCollection, m_trackTruthCollection);
115 if (sc.isFailure())
116 ATH_MSG_ERROR( "TruthCollection "<<m_trackTruthCollection<<" not found!" );
117 else
118 ATH_MSG_VERBOSE("TruthCollection " << m_trackTruthCollection<<" found." );
119 } else {
120 ATH_MSG_ERROR("No Truth collection given!" );
121 return StatusCode::FAILURE;
122 }
123
124 // Looping over the tracks of retrieved trackcollection
125 TrackCollection::const_iterator trackIterator = trackCollection->begin();
126 for (;trackIterator!=trackCollection->end();++trackIterator) {
127
128 if (!m_trackSelector.empty() && (*trackIterator)!=nullptr &&
129 m_trackSelector->decision(**trackIterator) ) {
130 const Trk::TrackParameters* generatedTrackPerigee(nullptr);
131
132 // find matching truth particle
133 const TrackTruth* trackTruth = nullptr;
134 HepMC::ConstGenParticlePtr genParticle{nullptr};
135 TrackTruthCollection::const_iterator truthIterator
136 = trackTruthCollection->find( trackIterator - (*trackCollection).begin() );
137 if ( truthIterator == trackTruthCollection->end() ){
138 if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "No matching truth particle found for track" << endmsg;
139 } else {
140 trackTruth = &((*truthIterator).second);
141 if ( !(trackTruth->particleLink().isValid()) ) {
142 if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Link to generated particle information is not there - assuming a lost G4 particle ('fake fake')." << endmsg;
143 // genParticle = m_visibleParticleWithoutTruth; // with pdg_id 0
144 } else {
145 genParticle = trackTruth->particleLink().scptr();
146 if ( genParticle && genParticle->pdg_id() == 0 ) {
147 if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Associated Particle ID " << genParticle->pdg_id()
148 << " does not conform to PDG requirements... ignore it!" << endmsg;
149 genParticle = nullptr;
150 }
151 }
152 }
153 if (genParticle) {
154 if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) <<
155 "Associated Particle ID: " << genParticle->pdg_id() << endmsg;
156 // Perform extrapolation to generate perigee parameters
157 if ( genParticle->production_vertex() )
158 generatedTrackPerigee = m_truthToTrack->makePerigeeParameters( genParticle );
159 }
160
161 // Getting the information if a track has TRT hits or not
162 bool track_has_trthits(false);
163 const Trk::TrackStates *currentTSOSList
164 = (*trackIterator)->trackStateOnSurfaces();
166 = currentTSOSList->begin();
167 for (;itTSOS!=currentTSOSList->end();++itTSOS) {
168 const Trk::MeasurementBase* mb = (*itTSOS)->measurementOnTrack();
169 Identifier id = Trk::IdentifierExtractor::extract(mb);
170 if (id.is_valid() && m_idHelper->is_trt(id)) {
171 track_has_trthits=true;
172 break;
173 }
174 }
175 const TrackParameters* reconstructedPerigee = (*trackIterator)->perigeeParameters();
176
177 if (generatedTrackPerigee != nullptr) {
178
179 if (!reconstructedPerigee) return StatusCode::FAILURE;
180
181 double this_eta = reconstructedPerigee->eta();
182
183 double truth_over_recP = generatedTrackPerigee->parameters()[Trk::qOverP]
184 / reconstructedPerigee->parameters()[Trk::qOverP];
185 if ( (truth_over_recP > 0.9) && (truth_over_recP < 1.1)) {
186 monitorTrackFits(m_nTen,this_eta);
187 monitorTrackFits(m_nTwenty,this_eta);
188 monitorTrackFits(m_nFifty,this_eta);
190 if (track_has_trthits) {
191 monitorTrackFits(m_tTen, this_eta);
192 monitorTrackFits(m_tTwenty, this_eta);
193 monitorTrackFits(m_tFifty, this_eta);
194 monitorTrackFits(m_tHundred, this_eta);
195 }
196
197 } else if ( (truth_over_recP > 0.8) && (truth_over_recP < 1.2) ) {
198 monitorTrackFits(m_nTwenty,this_eta);
199 monitorTrackFits(m_nFifty,this_eta);
201 if (track_has_trthits) {
202 monitorTrackFits(m_tTwenty, this_eta);
203 monitorTrackFits(m_tFifty, this_eta);
204 monitorTrackFits(m_tHundred, this_eta);
205 }
206 } else if ( (truth_over_recP > 0.5) && (truth_over_recP < 1.5) ) {
207 monitorTrackFits(m_nFifty,this_eta);
209 if (track_has_trthits) {
210 monitorTrackFits(m_tFifty, this_eta);
211 monitorTrackFits(m_tHundred, this_eta);
212 }
213 } else {
215 if (track_has_trthits) monitorTrackFits(m_tHundred, this_eta);
216 }
217
218 delete generatedTrackPerigee;
219 } else {
220 double this_eta = reconstructedPerigee->eta();
222 if (track_has_trthits) monitorTrackFits(m_tFakeOrLost, this_eta);
223 }
224
225 } // if it is from a certain track selector/pattern reco info
226
227 } //loop trackCollection end
228
229
230 return StatusCode::SUCCESS;
231}
#define endmsg
#define ATH_MSG_ERROR(x)
#define ATH_MSG_VERBOSE(x)
static Double_t sc
DataVector< Trk::Track > TrackCollection
This typedef represents a collection of Trk::Track objects.
ServiceHandle< StoreGateSvc > & evtStore()
bool msgLvl(const MSG::Level lvl) const
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
const HepMcParticleLink & particleLink() const
Definition TrackTruth.h:26
static void extract(std::vector< Identifier > &ids, const std::vector< const MeasurementBase * > &measurements)
static void monitorTrackFits(std::vector< unsigned int > &, const double &)
::StatusCode StatusCode
StatusCode definition for legacy code.
HepMC3::ConstGenParticlePtr ConstGenParticlePtr
Definition GenParticle.h:20
DataVector< const Trk::TrackStateOnSurface > TrackStates
@ qOverP
perigee
Definition ParamDefs.h:67
ParametersBase< TrackParametersDim, Charged > TrackParameters

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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

◆ extraOutputDeps()

const DataObjIDColl & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ finalize()

StatusCode Trk::RecMomentumQualityValidation::finalize ( )

standard Athena-Algorithm method

Definition at line 82 of file RecMomentumQualityValidation.cxx.

83{
84 // Code entered here will be executed once at the end of the program run.
85
86 if (msgLvl(MSG::INFO)) printTable();
87
88 return StatusCode::SUCCESS;
89}
void printTable() const
method: make the output table

◆ initialize()

StatusCode Trk::RecMomentumQualityValidation::initialize ( )

standard Athena-Algorithm method

Definition at line 49 of file RecMomentumQualityValidation.cxx.

50{
51
52 StatusCode sc = StatusCode::SUCCESS;
53 if (sc.isFailure()) { /* mute sc*/ }
54
55 // Get the Track Selector Tool
56 if ( !m_trackSelector.empty() ) {
57 sc = m_trackSelector.retrieve();
58 if (sc.isFailure()) {
59 msg(MSG::FATAL) << "Could not retrieve "<< m_trackSelector <<" (to select the tracks which are to be counted) "<< endmsg;
60 msg(MSG::INFO) << "Set the ToolHandle to None if track selection is supposed to be disabled" << endmsg;
61 return sc;
62 }
63 }
64 sc = m_truthToTrack.retrieve();
65 if (sc.isFailure()) {
66 msg(MSG::FATAL) << "Could not retrieve "<< m_truthToTrack << endmsg;
67 return sc;
68 }
69
70 if (detStore()->retrieve(m_idHelper, "AtlasID").isFailure()) {
71 ATH_MSG_ERROR ("Could not get AtlasDetectorID helper" );
72 return StatusCode::FAILURE;
73 }
74
75 ATH_MSG_INFO( "initialize() successful in " << name() );
76 return StatusCode::SUCCESS;
77
78}
#define ATH_MSG_INFO(x)
const ServiceHandle< StoreGateSvc > & detStore() const

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ isClonable()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ isReEntrant()

virtual bool AthAlgorithm::isReEntrant ( ) const
inlinefinaloverrideprotectedvirtualinherited

Legacy algorithms are not thread-safe.

Definition at line 47 of file AthAlgorithm.h.

47{ return false; }

◆ monitorTrackFits()

void Trk::RecMomentumQualityValidation::monitorTrackFits ( std::vector< unsigned int > & Ntracks,
const double & eta )
staticprivate

Definition at line 235 of file RecMomentumQualityValidation.cxx.

236 {
238 if (std::abs(eta) < 0.80 ) ++Ntracks[Trk::RecMomentumQualityValidation::iBarrel];
239 else if (std::abs(eta) < 1.60) ++Ntracks[Trk::RecMomentumQualityValidation::iTransi];
240 else if (std::abs(eta) < 2.40) ++Ntracks[Trk::RecMomentumQualityValidation::iEndcap];
241}
Scalar eta() const
pseudorapidity method

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::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< Gaudi::Algorithm > >::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.

◆ printTable()

void Trk::RecMomentumQualityValidation::printTable ( ) const
private

method: make the output table

Definition at line 244 of file RecMomentumQualityValidation.cxx.

244 {
245
246 unsigned int iw = 2;
247 std::string d = " ";
248 for (unsigned int iref=100; iref<m_nHundred[iAll]; iref*=10, ++iw, d+=" ") {}
249 std::cout << "---------------------------------------------------------------------------------" << std::endl;
250 std::cout << " "<< name() << " results "
251 << (m_trackSelector.empty() ? " " : "(with track selection)") << std::endl;
252 std::cout << "---------------------------------------------------------------------------------" << std::endl;
253 std::cout << " q/p truth vicinity -- Any "<<d<<" 50% "<<d<<" 20% "<<d<<" 10%"<<d<<"noTruth " << std::endl;
254 std::cout << "---------------------------------------------------------------------------------" << std::endl;
255 std::cout << " total (Si+TRT) :" << std::setiosflags(std::ios::dec) << std::setw(iw+1)
256 << m_nHundred[iAll] << " ("<< std::setw(iw)<<m_tHundred[iAll]<<") "
257 << std::setiosflags(std::ios::dec) << std::setw(iw+1)
258 << m_nFifty[iAll] << " ("<< std::setw(iw)<<m_tFifty[iAll]<<") "
259 << std::setiosflags(std::ios::dec) << std::setw(iw+1)
260 << m_nTwenty[iAll] << " ("<< std::setw(iw)<<m_tTwenty[iAll]<<") "
261 << std::setiosflags(std::ios::dec) << std::setw(iw+1)
262 << m_nTen[iAll] << " ("<< std::setw(iw)<<m_tTen[iAll]<<") "
263 << std::setiosflags(std::ios::dec) << std::setw(iw+1)
264 << m_nFakeOrLost[iAll] << " ("<< std::setw(iw)<<m_tFakeOrLost[iAll]<<") "
265 << std::endl;
266 std::cout << " barrel (Si+TRT) :" << std::setiosflags(std::ios::dec) << std::setw(iw+1)
267 << m_nHundred[iBarrel] << " ("<< std::setw(iw)<<m_tHundred[iBarrel]<<") "
268 << std::setiosflags(std::ios::dec) << std::setw(iw+1)
269 << m_nFifty[iBarrel] << " ("<< std::setw(iw)<<m_tFifty[iBarrel]<<") "
270 << std::setiosflags(std::ios::dec) << std::setw(iw+1)
271 << m_nTwenty[iBarrel] <<" ("<< std::setw(iw)<<m_tTwenty[iBarrel]<<") "
272 << std::setiosflags(std::ios::dec) << std::setw(iw+1)
273 << m_nTen[iBarrel] << " ("<< std::setw(iw)<<m_tTen[iBarrel]<<") "
274 << std::setiosflags(std::ios::dec) << std::setw(iw+1)
275 << m_nFakeOrLost[iBarrel] << " ("<< std::setw(iw)<<m_tFakeOrLost[iBarrel]<<") "
276 << std::endl;
277 std::cout << " transition :" << std::setiosflags(std::ios::dec) << std::setw(iw+1)
278 << m_nHundred[iTransi] << " ("<< std::setw(iw)<<m_tHundred[iTransi]<<") "
279 << std::setiosflags(std::ios::dec) << std::setw(iw+1)
280 << m_nFifty[iTransi] << " ("<< std::setw(iw)<<m_tFifty[iTransi]<<") "
281 << std::setiosflags(std::ios::dec) << std::setw(iw+1)
282 << m_nTwenty[iTransi] <<" ("<< std::setw(iw)<<m_tTwenty[iTransi]<<") "
283 << std::setiosflags(std::ios::dec) << std::setw(iw+1)
284 << m_nTen[iTransi] << " ("<< std::setw(iw)<<m_tTen[iTransi]<<") "
285 << std::setiosflags(std::ios::dec) << std::setw(iw+1)
286 << m_nFakeOrLost[iTransi] << " ("<< std::setw(iw)<<m_tFakeOrLost[iTransi]<<") "
287 << std::endl;
288 std::cout << " endcap (Si+TRT) :" << std::setiosflags(std::ios::dec) << std::setw(iw+1)
289 << m_nHundred[iEndcap] << " ("<< std::setw(iw)<<m_tHundred[iEndcap]<<") "
290 << std::setiosflags(std::ios::dec) << std::setw(iw+1)
291 << m_nFifty[iEndcap] << " ("<< std::setw(iw)<<m_tFifty[iEndcap]<<") "
292 << std::setiosflags(std::ios::dec) << std::setw(iw+1)
293 << m_nTwenty[iEndcap] <<" ("<< std::setw(iw)<<m_tTwenty[iEndcap]<<") "
294 << std::setiosflags(std::ios::dec) << std::setw(iw+1)
295 << m_nTen[iEndcap] << " ("<< std::setw(iw)<<m_tTen[iEndcap]<<") "
296 << std::setiosflags(std::ios::dec) << std::setw(iw+1)
297 << m_nFakeOrLost[iEndcap] << " ("<< std::setw(iw)<<m_tFakeOrLost[iEndcap]<<") "
298 << std::endl;
299 std::cout << "---------------------------------------------------------------------------------" << std::endl << std::endl;
300}

◆ 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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Reimplemented in AthFilterAlgorithm.

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ sysExecute()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
#define ATH_MSG_WARNING(x)
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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 }

Member Data Documentation

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_idHelper

const AtlasDetectorID* Trk::RecMomentumQualityValidation::m_idHelper
private

Definition at line 59 of file RecMomentumQualityValidation.h.

◆ m_inputTrackCollection

std::string Trk::RecMomentumQualityValidation::m_inputTrackCollection
private

properties from JobOptions:

job option: the reco track collection name

Definition at line 55 of file RecMomentumQualityValidation.h.

◆ m_nFakeOrLost

std::vector<unsigned int> Trk::RecMomentumQualityValidation::m_nFakeOrLost
private

Definition at line 66 of file RecMomentumQualityValidation.h.

◆ m_nFifty

std::vector<unsigned int> Trk::RecMomentumQualityValidation::m_nFifty
private

Definition at line 66 of file RecMomentumQualityValidation.h.

◆ m_nHundred

std::vector<unsigned int> Trk::RecMomentumQualityValidation::m_nHundred
private

counters

Definition at line 66 of file RecMomentumQualityValidation.h.

◆ m_nTen

std::vector<unsigned int> Trk::RecMomentumQualityValidation::m_nTen
private

Definition at line 66 of file RecMomentumQualityValidation.h.

◆ m_nTwenty

std::vector<unsigned int> Trk::RecMomentumQualityValidation::m_nTwenty
private

Definition at line 66 of file RecMomentumQualityValidation.h.

◆ m_tFakeOrLost

std::vector<unsigned int> Trk::RecMomentumQualityValidation::m_tFakeOrLost
private

Definition at line 67 of file RecMomentumQualityValidation.h.

◆ m_tFifty

std::vector<unsigned int> Trk::RecMomentumQualityValidation::m_tFifty
private

Definition at line 67 of file RecMomentumQualityValidation.h.

◆ m_tHundred

std::vector<unsigned int> Trk::RecMomentumQualityValidation::m_tHundred
private

Definition at line 67 of file RecMomentumQualityValidation.h.

◆ m_trackSelector

ToolHandle<Trk::ITrackSelectorTool> Trk::RecMomentumQualityValidation::m_trackSelector
private

Tool handle to Trk::ITrackSelectorTool.

Definition at line 58 of file RecMomentumQualityValidation.h.

◆ m_trackTruthCollection

std::string Trk::RecMomentumQualityValidation::m_trackTruthCollection
private

job option: the truth track collection name

Definition at line 56 of file RecMomentumQualityValidation.h.

◆ m_truthToTrack

ToolHandle<Trk::ITruthToTrack> Trk::RecMomentumQualityValidation::m_truthToTrack
private

Tool handle to Trk::ITruthToTrack tool.

Definition at line 57 of file RecMomentumQualityValidation.h.

◆ m_tTen

std::vector<unsigned int> Trk::RecMomentumQualityValidation::m_tTen
private

Definition at line 67 of file RecMomentumQualityValidation.h.

◆ m_tTwenty

std::vector<unsigned int> Trk::RecMomentumQualityValidation::m_tTwenty
private

Definition at line 67 of file RecMomentumQualityValidation.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


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