ATLAS Offline Software
Loading...
Searching...
No Matches
ActsEMBremCollectionBuilder Class Reference

Algorithm which refits Acts tracks using the ACTS GSF. More...

#include <ActsEMBremCollectionBuilder.h>

Inheritance diagram for ActsEMBremCollectionBuilder:
Collaboration diagram for ActsEMBremCollectionBuilder:

Public Member Functions

 ActsEMBremCollectionBuilder (const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize () override final
virtual StatusCode finalize () override final
virtual StatusCode execute (const EventContext &ctx) const override final
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

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

StatusCode refitActsTracks (const EventContext &ctx, const xAOD::TrackParticleContainer &input, ActsTrk::MutableTrackContainer &trackContainer, std::vector< const xAOD::TrackParticle * > &originals, const InDet::BeamSpotData *beamSpotData) const
StatusCode convertTracks (const EventContext &ctx, const ActsTrk::TrackContainer &actsContainer, const std::vector< const xAOD::TrackParticle * > &originals, const xAOD::TrackParticleContainer &originalTPs, xAOD::TrackParticleContainer &outputTPs, const InDet::BeamSpotData *beamSpotData) const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

Gaudi::Property< int > m_MinNoSiHits
 @Cut on minimum silicon hits
ToolHandle< ActsTrk::IFitterToolm_actsFitter
ToolHandle< ActsTrk::ITrackToTrackParticleCnvToolm_cnvTool
SG::ReadDecorHandleKey< xAOD::TrackParticleContainerm_actsTrackLinkKey
SG::ReadHandleKey< xAOD::TrackParticleContainerm_selectedTrackParticleContainerKey
 Names of input output collections.
PublicToolHandle< ActsTrk::ITrackingGeometryToolm_trackingGeometryTool
ActsTrk::MutableTrackContainerHandlesHelper m_refittedTracksBackendHandles {this}
SG::WriteHandleKey< ActsTrk::TrackContainerm_refittedTracksKey
SG::ReadHandleKey< xAOD::TrackParticleContainerm_trackParticleContainerKey
SG::WriteHandleKey< xAOD::TrackParticleContainerm_outputTrackParticlesKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainerm_actsTrackOutLinkKey
SG::ReadCondHandleKey< InDet::BeamSpotDatam_beamSpotKey {this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"}
Gaudi::Property< bool > m_doTruth {this, "doTruth", false}
Gaudi::Property< bool > m_doPix {this, "usePixel", true}
Gaudi::Property< bool > m_doStrip {this, "useStrip", true}
Gaudi::Property< bool > m_doHGTD {this, "useHGTD", false}
std::atomic_uint m_nInputTracks {0}
std::atomic_uint m_nRefittedTracks {0}
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

Algorithm which refits Acts tracks using the ACTS GSF.

Input: xAOD::TrackParticleContainer Output: ActsTrk::TrackContainer and xAOD::TrackParticleContainer Each output TrackParticle has an originalTrackParticle link back to the input track particle and an actsTrack link to the refitted Acts track.

Workflow:

  1. Reads TrackParticles from the selected input container
  2. Filters tracks that meet the minimum silicon hits criteria (minNoSiHits)
  3. For each eligible track particle: a. Retrieves the associated Acts track via the ElementLink b. Passes the track to the ActsFitter tool for GSF refitting c. Stores the refitted track in the output Acts track container

Definition at line 42 of file ActsEMBremCollectionBuilder.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ ActsEMBremCollectionBuilder()

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

Definition at line 21 of file ActsEMBremCollectionBuilder.cxx.

23 : AthReentrantAlgorithm(name, pSvcLocator) {}

Member Function Documentation

◆ convertTracks()

StatusCode ActsEMBremCollectionBuilder::convertTracks ( const EventContext & ctx,
const ActsTrk::TrackContainer & actsContainer,
const std::vector< const xAOD::TrackParticle * > & originals,
const xAOD::TrackParticleContainer & originalTPs,
xAOD::TrackParticleContainer & outputTPs,
const InDet::BeamSpotData * beamSpotData ) const
private

Definition at line 168 of file ActsEMBremCollectionBuilder.cxx.

174 {
175 SG::WriteDecorHandle<xAOD::TrackParticleContainer, ElementLink<ActsTrk::TrackContainer>>
176 actsTrackLink(m_actsTrackOutLinkKey, ctx);
177
178 static const SG::AuxElement::Accessor<ElementLink<xAOD::TrackParticleContainer>>
179 originalTPLink("originalTrackParticle");
180
181 for (const auto [track, originalTP] : Acts::zip(actsContainer, originals)) {
182 xAOD::TrackParticle* tp = outputTPs.push_back(std::make_unique<xAOD::TrackParticle>());
183
184 ATH_CHECK(m_cnvTool->convert(*tp, ctx, track, track.referenceSurface(), beamSpotData));
185
186 actsTrackLink(*tp) = ElementLink<ActsTrk::TrackContainer>(&actsContainer, track.index());
187
188 originalTPLink(*tp) = ElementLink<xAOD::TrackParticleContainer>(
189 originalTPs, originalTP->index(), ctx);
190
191 // Add qoverP from the last measurement
192 float QoverPLast(0);
193 for (const auto ts : track.trackStatesReversed()) {
194 if (ts.typeFlags().isMeasurement()) {
195 QoverPLast = ts.parameters()[Acts::eBoundQOverP];
196 break;
197 }
198 }
199 static const SG::AuxElement::Accessor<float> QoverPLM("QoverPLM");
200 QoverPLM(*tp) = QoverPLast;
201
202 // isRefitted option should check the actual refit status
203 egammaCopyTrackParticleInfo::ToCopy toCopy{.isRefitted = true,
204 .doTruth = m_doTruth,
205 .doPix = m_doPix,
206 .doSCT = m_doStrip,
207 .doHGTD = m_doHGTD};
208 egammaCopyTrackParticleInfo::copy(*tp, *originalTP, toCopy);
209
210 }
211 return StatusCode::SUCCESS;
212}
#define ATH_CHECK
Evaluate an expression and check for errors.
ToolHandle< ActsTrk::ITrackToTrackParticleCnvTool > m_cnvTool
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_actsTrackOutLinkKey
value_type push_back(value_type pElem)
Add an element to the end of the collection.
int ts
Definition globals.cxx:24
void copy(xAOD::TrackParticle &created, const xAOD::TrackParticle &original, const egammaCopyTrackParticleInfo::ToCopy &toCopy)
TrackParticle_v1 TrackParticle
Reference the current persistent version:

◆ 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 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ 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 ActsEMBremCollectionBuilder::execute ( const EventContext & ctx) const
finaloverridevirtual

Definition at line 64 of file ActsEMBremCollectionBuilder.cxx.

64 {
65 SG::ReadHandle<xAOD::TrackParticleContainer> selectedTrackParticles(
67 ATH_CHECK(selectedTrackParticles.isValid());
68 m_nInputTracks.fetch_add(selectedTrackParticles->size(), std::memory_order_relaxed);
69
70 SG::ReadHandle<xAOD::TrackParticleContainer> originalTPs(
72 ATH_CHECK(originalTPs.isValid());
73
74 SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle = SG::makeHandle(m_beamSpotKey, ctx);
75 ATH_CHECK(beamSpotHandle.isValid());
76 const InDet::BeamSpotData* beamSpotData = beamSpotHandle.cptr();
77
78 Acts::VectorTrackContainer trackBackend;
79 Acts::VectorMultiTrajectory trackStateBackend;
80 ActsTrk::MutableTrackContainer trackContainer( std::move(trackBackend),
81 std::move(trackStateBackend) );
82
83 std::vector<const xAOD::TrackParticle *> originals;
84 originals.reserve(selectedTrackParticles->size());
85 ATH_CHECK(refitActsTracks(ctx, *selectedTrackParticles, trackContainer, originals, beamSpotData));
86
87 // make const
88 Acts::ConstVectorTrackContainer ctrackBackend( std::move(trackContainer.container()) );
89 Acts::ConstVectorMultiTrajectory ctrackStateBackend( std::move(trackContainer.trackStateContainer()) );
90 std::unique_ptr<ActsTrk::TrackContainer> outputActsTracks = std::make_unique<ActsTrk::TrackContainer>( std::move(ctrackBackend),
91 std::move(ctrackStateBackend) );
92
93 m_nRefittedTracks.fetch_add(outputActsTracks->size(), std::memory_order_relaxed);
94
95 // Record Acts container first so ElementLinks into it resolve correctly
96 SG::WriteHandle<ActsTrk::TrackContainer> refittedTrackHandle = SG::makeHandle(m_refittedTracksKey, ctx);
97 if (refittedTrackHandle.record(std::move(outputActsTracks)).isFailure()) {
98 ATH_MSG_ERROR("Failed to record refitted ACTS tracks with key "
99 << m_refittedTracksKey.key());
100 return StatusCode::FAILURE;
101 }
102 const ActsTrk::TrackContainer* actsContainer = refittedTrackHandle.ptr();
103
104 // Create output xAOD::TrackParticleContainer
105 SG::WriteHandle<xAOD::TrackParticleContainer> outTrackParticleHandle = SG::makeHandle(m_outputTrackParticlesKey, ctx);
106 if (outTrackParticleHandle.record(std::make_unique<xAOD::TrackParticleContainer>(),
107 std::make_unique<xAOD::TrackParticleAuxContainer>()).isFailure()) {
108 ATH_MSG_ERROR("Failed to record GSF TrackParticles with key "
110 return StatusCode::FAILURE;
111 }
112 xAOD::TrackParticleContainer* trackParticles = outTrackParticleHandle.ptr();
113
114 ATH_CHECK(convertTracks(ctx, *actsContainer, originals, *originalTPs, *trackParticles, beamSpotData));
115
116 return StatusCode::SUCCESS;
117}
#define ATH_MSG_ERROR(x)
SG::WriteHandleKey< ActsTrk::TrackContainer > m_refittedTracksKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackParticleContainerKey
SG::WriteHandleKey< xAOD::TrackParticleContainer > m_outputTrackParticlesKey
StatusCode refitActsTracks(const EventContext &ctx, const xAOD::TrackParticleContainer &input, ActsTrk::MutableTrackContainer &trackContainer, std::vector< const xAOD::TrackParticle * > &originals, const InDet::BeamSpotData *beamSpotData) const
StatusCode convertTracks(const EventContext &ctx, const ActsTrk::TrackContainer &actsContainer, const std::vector< const xAOD::TrackParticle * > &originals, const xAOD::TrackParticleContainer &originalTPs, xAOD::TrackParticleContainer &outputTPs, const InDet::BeamSpotData *beamSpotData) const
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_selectedTrackParticleContainerKey
Names of input output collections.
const_pointer_type cptr()
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
pointer_type ptr()
Dereference the pointer.
Acts::TrackContainer< MutableTrackBackend, MutableTrackStateBackend, Acts::detail::ValueHolder > MutableTrackContainer
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".

◆ 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 ActsEMBremCollectionBuilder::finalize ( )
finaloverridevirtual

Definition at line 56 of file ActsEMBremCollectionBuilder.cxx.

56 {
57 ATH_MSG_INFO("====> GSF fitting Statistics ============");
58 ATH_MSG_INFO("Input Tracks: " << m_nInputTracks);
59 ATH_MSG_INFO("Output Tracks " << m_nRefittedTracks);
60 ATH_MSG_INFO("<========================================");
61 return StatusCode::SUCCESS;
62}
#define ATH_MSG_INFO(x)

◆ initialize()

StatusCode ActsEMBremCollectionBuilder::initialize ( )
finaloverridevirtual

Definition at line 25 of file ActsEMBremCollectionBuilder.cxx.

25 {
27
30 ATH_CHECK(m_actsTrackLinkKey.initialize());
31 ATH_CHECK(m_beamSpotKey.initialize());
32
33 ATH_CHECK(m_refittedTracksKey.initialize());
36
38 ATH_CHECK(m_actsTrackOutLinkKey.initialize());
39
40 ATH_CHECK(m_actsFitter.retrieve());
41 ATH_CHECK(m_cnvTool.retrieve());
43
44 std::string backendname{};
45 try {
47 }
48 catch (const std::runtime_error &ee){
49 backendname = m_refittedTracksKey.key() + "_int";
50 }
51 ATH_CHECK(m_refittedTracksBackendHandles.initialize(backendname));
52
53 return StatusCode::SUCCESS;
54}
ActsTrk::MutableTrackContainerHandlesHelper m_refittedTracksBackendHandles
PublicToolHandle< ActsTrk::ITrackingGeometryTool > m_trackingGeometryTool
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_actsTrackLinkKey
ToolHandle< ActsTrk::IFitterTool > m_actsFitter
std::string prefixFromTrackContainerName(const std::string &tracks)
Parse TrackContainer name to get the prefix for backends The name has to contain XYZTracks,...

◆ 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 }

◆ 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.

◆ refitActsTracks()

StatusCode ActsEMBremCollectionBuilder::refitActsTracks ( const EventContext & ctx,
const xAOD::TrackParticleContainer & input,
ActsTrk::MutableTrackContainer & trackContainer,
std::vector< const xAOD::TrackParticle * > & originals,
const InDet::BeamSpotData * beamSpotData ) const
private

Definition at line 119 of file ActsEMBremCollectionBuilder.cxx.

124 {
125 // Beam Spot Position
126 Acts::Vector3 beamPos( beamSpotData->beamPos().x() * Acts::UnitConstants::mm,
127 beamSpotData->beamPos().y() * Acts::UnitConstants::mm,
128 0 );
129
130 // Construct a perigee surface as the target surface
131 std::shared_ptr<Acts::PerigeeSurface> pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(beamPos);
132
133 SG::ReadDecorHandle<xAOD::TrackParticleContainer,
135 decoHandleActsTrackLink(m_actsTrackLinkKey, ctx);
136
137 for (const xAOD::TrackParticle *in : input) {
138 int nSiliconHits = summaryValueInt(*in, xAOD::numberOfSCTHits, 0);
139 nSiliconHits += summaryValueInt(*in, xAOD::numberOfPixelHits, 0);
140 if (nSiliconHits < m_MinNoSiHits) {
141 continue;
142 }
143
144 const ElementLink<ActsTrk::TrackContainer> &actsTrackLink =
145 decoHandleActsTrackLink(*in);
146
147 if (!actsTrackLink.isValid()) {
148 ATH_MSG_WARNING("Invalid ElementLink to ACTS track for track particle ");
149 continue;
150 }
151
152 std::optional<ActsTrk::TrackContainer::ConstTrackProxy> optional_track =
153 *actsTrackLink;
154 if (!optional_track.has_value()) {
156 "Could not retrieve track from valid ElementLink for track particle");
157 continue;
158 }
159
160 ActsTrk::TrackContainer::ConstTrackProxy actstrack = optional_track.value();
161
162 ATH_CHECK(m_actsFitter->fit(ctx, actstrack, trackContainer, *pSurface));
163 originals.push_back(in);
164 }
165 return StatusCode::SUCCESS;
166}
int summaryValueInt(const xAOD::TrackParticle &tp, const xAOD::SummaryType &info, int deflt=-999)
return the summary value for a TrackParticle or default value (-999) (to be used mostly in python whe...
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
Gaudi::Property< int > m_MinNoSiHits
@Cut on minimum silicon hits
const Amg::Vector3D & beamPos() const noexcept
@ numberOfSCTHits
number of hits in SCT [unit8_t].
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].

◆ 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}
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_actsFitter

ToolHandle<ActsTrk::IFitterTool> ActsEMBremCollectionBuilder::m_actsFitter
private
Initial value:
{this, "ActsFitter", "",
"Acts Fitter"}

Definition at line 72 of file ActsEMBremCollectionBuilder.h.

72 {this, "ActsFitter", "",
73 "Acts Fitter"};

◆ m_actsTrackLinkKey

SG::ReadDecorHandleKey<xAOD::TrackParticleContainer> ActsEMBremCollectionBuilder::m_actsTrackLinkKey
private
Initial value:
{
this, "ActsTrackLink", "actsTrack", "Link to Acts track"}

Definition at line 79 of file ActsEMBremCollectionBuilder.h.

79 {
80 this, "ActsTrackLink", "actsTrack", "Link to Acts track"};

◆ m_actsTrackOutLinkKey

SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> ActsEMBremCollectionBuilder::m_actsTrackOutLinkKey
private
Initial value:
{
this, "ActsTrackOutLink", "actsTrack",
"Decoration: link from xAOD particle back to Acts track"}

Definition at line 105 of file ActsEMBremCollectionBuilder.h.

105 {
106 this, "ActsTrackOutLink", "actsTrack",
107 "Decoration: link from xAOD particle back to Acts track"};

◆ m_beamSpotKey

SG::ReadCondHandleKey< InDet::BeamSpotData > ActsEMBremCollectionBuilder::m_beamSpotKey {this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"}
private

Definition at line 109 of file ActsEMBremCollectionBuilder.h.

109{this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"};

◆ m_cnvTool

ToolHandle<ActsTrk::ITrackToTrackParticleCnvTool> ActsEMBremCollectionBuilder::m_cnvTool
private
Initial value:
{
this, "TrackToTrackParticleCnvTool", "",
"Tool to convert Acts tracks to xAOD::TrackParticles"}

Definition at line 75 of file ActsEMBremCollectionBuilder.h.

75 {
76 this, "TrackToTrackParticleCnvTool", "",
77 "Tool to convert Acts tracks to xAOD::TrackParticles"};

◆ 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_doHGTD

Gaudi::Property<bool> ActsEMBremCollectionBuilder::m_doHGTD {this, "useHGTD", false}
private

Definition at line 114 of file ActsEMBremCollectionBuilder.h.

114{this, "useHGTD", false};

◆ m_doPix

Gaudi::Property<bool> ActsEMBremCollectionBuilder::m_doPix {this, "usePixel", true}
private

Definition at line 112 of file ActsEMBremCollectionBuilder.h.

112{this, "usePixel", true};

◆ m_doStrip

Gaudi::Property<bool> ActsEMBremCollectionBuilder::m_doStrip {this, "useStrip", true}
private

Definition at line 113 of file ActsEMBremCollectionBuilder.h.

113{this, "useStrip", true};

◆ m_doTruth

Gaudi::Property<bool> ActsEMBremCollectionBuilder::m_doTruth {this, "doTruth", false}
private

Definition at line 111 of file ActsEMBremCollectionBuilder.h.

111{this, "doTruth", false};

◆ 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_MinNoSiHits

Gaudi::Property<int> ActsEMBremCollectionBuilder::m_MinNoSiHits
private
Initial value:
{this, "minNoSiHits", 4,
"Minimum number of silicon hits on track "
"before it is allowed to be refitted"}

@Cut on minimum silicon hits

Definition at line 68 of file ActsEMBremCollectionBuilder.h.

68 {this, "minNoSiHits", 4,
69 "Minimum number of silicon hits on track "
70 "before it is allowed to be refitted"};

◆ m_nInputTracks

std::atomic_uint ActsEMBremCollectionBuilder::m_nInputTracks {0}
mutableprivate

Definition at line 116 of file ActsEMBremCollectionBuilder.h.

116{0};

◆ m_nRefittedTracks

std::atomic_uint ActsEMBremCollectionBuilder::m_nRefittedTracks {0}
mutableprivate

Definition at line 117 of file ActsEMBremCollectionBuilder.h.

117{0};

◆ m_outputTrackParticlesKey

SG::WriteHandleKey<xAOD::TrackParticleContainer> ActsEMBremCollectionBuilder::m_outputTrackParticlesKey
private
Initial value:
{
this, "TrackParticlesOutKey", "GSFTrackParticles",
"Output xAOD::TrackParticle container"}

Definition at line 101 of file ActsEMBremCollectionBuilder.h.

101 {
102 this, "TrackParticlesOutKey", "GSFTrackParticles",
103 "Output xAOD::TrackParticle container"};

◆ m_refittedTracksBackendHandles

ActsTrk::MutableTrackContainerHandlesHelper ActsEMBremCollectionBuilder::m_refittedTracksBackendHandles {this}
private

Definition at line 91 of file ActsEMBremCollectionBuilder.h.

91{this};

◆ m_refittedTracksKey

SG::WriteHandleKey<ActsTrk::TrackContainer> ActsEMBremCollectionBuilder::m_refittedTracksKey
private
Initial value:
{
this, "RefittedTracksLocation", "",
"Ambiguity resolved output track collection"}

Definition at line 93 of file ActsEMBremCollectionBuilder.h.

93 {
94 this, "RefittedTracksLocation", "",
95 "Ambiguity resolved output track collection"};

◆ m_selectedTrackParticleContainerKey

SG::ReadHandleKey<xAOD::TrackParticleContainer> ActsEMBremCollectionBuilder::m_selectedTrackParticleContainerKey
private
Initial value:
{
this, "SelectedTrackParticleContainerName",
"egammaSelectedTrackParticles", "Input of Selected TrackParticles"}

Names of input output collections.

Definition at line 84 of file ActsEMBremCollectionBuilder.h.

84 {
85 this, "SelectedTrackParticleContainerName",
86 "egammaSelectedTrackParticles", "Input of Selected TrackParticles"};

◆ m_trackingGeometryTool

PublicToolHandle<ActsTrk::ITrackingGeometryTool> ActsEMBremCollectionBuilder::m_trackingGeometryTool
private
Initial value:
{
this, "TrackingGeometryTool", ""}

Definition at line 88 of file ActsEMBremCollectionBuilder.h.

88 {
89 this, "TrackingGeometryTool", ""};

◆ m_trackParticleContainerKey

SG::ReadHandleKey<xAOD::TrackParticleContainer> ActsEMBremCollectionBuilder::m_trackParticleContainerKey
private
Initial value:
{
this, "TrackParticleContainerName", "InDetTrackParticles",
"Input TrackParticles for originalTrackParticle link"}

Definition at line 97 of file ActsEMBremCollectionBuilder.h.

97 {
98 this, "TrackParticleContainerName", "InDetTrackParticles",
99 "Input TrackParticles for originalTrackParticle link"};

◆ 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: