ATLAS Offline Software
Loading...
Searching...
No Matches
MuonR4::xAODSegmentCnvAlg Class Reference

The xAODSegmentCnvAlg takes MuonR4::Segments and converts them into a xAOD::MuonSegmentContainer. More...

#include <xAODSegmentCnvAlg.h>

Inheritance diagram for MuonR4::xAODSegmentCnvAlg:
Collaboration diagram for MuonR4::xAODSegmentCnvAlg:

Public Member Functions

virtual StatusCode initialize () 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 unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
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
virtual void setFilterPassed (bool state, const EventContext &ctx) const
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

using DecorKey_t = SG::WriteDecorHandleKey<xAOD::MuonSegmentContainer>
 Abrivation of the extra declared auxVariables.
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc
 IdHelperSvc for Identifier printing & manipulation.
SG::ReadHandleKeyArray< SegmentContainerm_readKeys {this, "InSegmentKeys", {"R4MuonSegments"}}
 Input segment container key.
SG::WriteHandleKey< xAOD::MuonSegmentContainerm_writeKey {this, "OutSegmentKey", "MuonSegmentsFromR4"}
 Output segment container key.
SG::ReadHandleKey< ActsTrk::GeometryContextm_geoCtxKey {this, "AlignmentKey", "ActsAlignment", "cond handle key"}
 Alignment container key.
DecorKey_t m_prdLinkKey {this, "PrdLinkKey", m_writeKey, "prdLinks" }
 Decoration to the links to the associated Uncalibrated measurements.
DecorKey_t m_prdStateKey {this, "PrdStateKey", m_writeKey, "prdState"}
 Decoration to the PrdLink state (I.e.
DecorKey_t m_localSegParKey {this, "LocalSegParKey", m_writeKey, "localSegPars"}
 Decoration to the local segment parameters.
DecorKey_t m_parentSegKey {this, "ParentSegmentKey", m_writeKey, "parentSegment"}
 Decoration of the original segment.
SG::WriteHandleKey< xAOD::CombinedMuonStripContainerm_combMeasKey {this, "combinedPrdKey", "CombinedMuonPrds"}
 Auxiliary container to model two measurements in the same gas gap as a single track state.
ActsTrk::AuxiliaryMeasurementHandler m_auxMeasProv {this}
 Handler to parse the auxiliary beam spot constaint.
Gaudi::Property< bool > m_convertBeamSpot {this, "convertBeamSpot", false}
 Flag to convert the beamspot constaint as well.
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

The xAODSegmentCnvAlg takes MuonR4::Segments and converts them into a xAOD::MuonSegmentContainer.

Definition at line 23 of file xAODSegmentCnvAlg.h.

Member Typedef Documentation

◆ DecorKey_t

Abrivation of the extra declared auxVariables.

Definition at line 41 of file xAODSegmentCnvAlg.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Function Documentation

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64{
65 return 0;
66}

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

Decorate the prd links onto the output muon segment. Eta & phi measurements are absorbed converted into a CombinedMuonStrip which is a source link linke object carrying a link to both prds. In this way, only one track state is generated later in the track fit from the two measurements. Two assumptions are made for the linking

  • There's exclusivley one eta & one phi measurement @maximum on the segment
  • The measurements are sorted along the segment trajectory.

Combine the two prds from the space point to a combined muonstrip and link the latter to the segment.

Size of the bounds purely for visualization purposes

It might be that the segment has anoher 1D-measurement in the same gas gap

The first measurement should always be the eta measurement

Counter for the reco segment link

Definition at line 47 of file xAODSegmentCnvAlg.cxx.

47 {
48 const ActsTrk::GeometryContext* gctx{nullptr};
49 ATH_CHECK(SG::get(gctx, m_geoCtxKey, ctx));
50
51 SG::WriteHandle outContainer{m_writeKey, ctx};
52 ATH_CHECK(outContainer.record(std::make_unique<xAOD::MuonSegmentContainer>(),
53 std::make_unique<xAOD::MuonSegmentAuxContainer>()));
54
55 SG::WriteHandle prdCombContainer{m_combMeasKey, ctx};
56 ATH_CHECK(prdCombContainer.record(std::make_unique<xAOD::CombinedMuonStripContainer>(),
57 std::make_unique<xAOD::CombinedMuonStripAuxContainer>()));
58
59 SG::WriteDecorHandle<xAOD::MuonSegmentContainer, SegLink_t> dec_parentLink{m_parentSegKey, ctx};
60 SG::WriteDecorHandle<xAOD::MuonSegmentContainer, SegPars_t> dec_locPars{m_localSegParKey, ctx};
61 SG::WriteDecorHandle<xAOD::MuonSegmentContainer, PrdLinkVec_t> dec_prdLinks{m_prdLinkKey, ctx};
62 SG::WriteDecorHandle<xAOD::MuonSegmentContainer, std::vector<char>> dec_prdStates{m_prdStateKey, ctx};
63
65 // Cache all measurements that can be combined to two measurements in a single gas gap
66 using PrdTuple_t = std::tuple<const xAOD::UncalibratedMeasurement*, State, std::size_t>;
67 std::vector<PrdTuple_t> combineMap{};
68 std::vector<PrdTuple_t> linkMap{};
69
70 const xAOD::UncalibratedMeasurement* beamSpotMeas{};
71
72 auto beamSpotMeasCreator = m_auxMeasProv.makeHandle(ctx, gctx->context());
73
80 auto decorateLinks = [&](const Segment& inSegment, xAOD::MuonSegment& outSegment) {
81 PrdLinkVec_t& links = dec_prdLinks(outSegment);
82 std::vector<char>& linkStates = dec_prdStates(outSegment);
83 links.reserve(2*inSegment.measurements().size());
84 linkStates.reserve(2*inSegment.measurements().size());
85
88 auto combine = [this,&prdCombContainer](const xAOD::UncalibratedMeasurement* m1,
90 auto cmbMeas = prdCombContainer->push_back(std::make_unique<xAOD::CombinedMuonStrip>());
91
92 cmbMeas->setPrimaryStrip(m1);
93 cmbMeas->setSecondaryStrip(m2);
94 ATH_MSG_VERBOSE("Combine "<<m_idHelperSvc->toString(xAOD::identify(m1))
95 <<" & "<<m_idHelperSvc->toString(xAOD::identify(m2)));
96 if (m_idHelperSvc->measuresPhi(xAOD::identify(m1)) ==
97 m_idHelperSvc->measuresPhi(xAOD::identify(m2))) {
98 THROW_EXCEPTION("Cannot combine "<<m_idHelperSvc->toString(xAOD::identify(m1))
99 <<" & "<<m_idHelperSvc->toString(xAOD::identify(m2)));
100 }
101 return cmbMeas;
102 };
103 // Loop over the measurements
104 for (const auto& [segIdx, meas] : Acts::enumerate(inSegment.measurements())) {
105 const SpacePoint* sp = meas->spacePoint();
106 if (!sp) {
107 if (!m_convertBeamSpot) {
108 continue;
109 }
110 // Up to now, there's no variety on the beamspot across the segments
111 if (!beamSpotMeas) {
112 if (!beamSpotMeasCreator.ok()) {
113 ATH_MSG_ERROR("Cannot create a beamspot measurement");
114 return StatusCode::FAILURE;
115 }
116
117 const Amg::Vector3D beamSpot = inSegment.msSector()->localToGlobalTransform(*gctx) *
118 meas->localPosition();
119 AmgSymMatrix(2) covariance{AmgSymMatrix(2)::Identity()};
120 using CovIdx = SpacePoint::CovIdx;
121 using ProjectorType = xAOD::AuxiliaryMeasurement::ProjectorType;
122 covariance(0,0) = meas->covariance()[Acts::toUnderlying(CovIdx::etaCov)];
123 covariance(1,1) = meas->covariance()[Acts::toUnderlying(CovIdx::phiCov)];
125 auto surf = Acts::Surface::makeShared<Acts::StrawSurface>(Amg::getTranslate3D(beamSpot),
126 std::make_shared<Acts::LineBounds>(std::sqrt(covariance(0,0)), 20._m));
127
128 beamSpotMeas = beamSpotMeasCreator->newMeasurement<2>(surf,
129 ProjectorType::e2DimNoTime, covariance);
130 ATH_MSG_DEBUG("Created beamspot measurement "<<(*meas)<<", "
131 <<surf->toString(gctx->context()));
132 }
133 linkMap.emplace_back(beamSpotMeas, meas->fitState(), segIdx);
134 continue;
135 }
136 switch (sp->type()) {
137 using enum xAOD::UncalibMeasType;
138 // Mdt & micromegas are never combined
140 case MMClusterType: {
141 linkMap.emplace_back(sp->primaryMeasurement(), meas->fitState(), segIdx);
142 break;
143 } case RpcStripType:
144 case TgcStripType:
145 case sTgcStripType: {
146 if (sp->primaryMeasurement() && sp->secondaryMeasurement()) {
147 if (sp->primaryMeasurement() != sp->secondaryMeasurement()) {
148 linkMap.emplace_back(combine(sp->primaryMeasurement(),
149 sp->secondaryMeasurement()),
150 meas->fitState(), segIdx);
151 } else { // BI - RPC measurements
152 linkMap.emplace_back(sp->primaryMeasurement(), meas->fitState(), segIdx);
153 }
154 } else {
157 ATH_MSG_VERBOSE("Append for later combination "<<(*meas));
158 combineMap.emplace_back(sp->primaryMeasurement(), meas->fitState(), segIdx);
159 }
160 break;
161 } default:
162 break;
163 }
164 }
165 // Finally we need to check whether there're measurements left to combine
166 for (std::size_t cmbIdx = 0; cmbIdx < combineMap.size(); ++cmbIdx){
167 const xAOD::UncalibratedMeasurement* m1{std::get<0>(combineMap[cmbIdx])};
168 const State s1{std::get<1>(combineMap[cmbIdx])};
169 const std::size_t segIdx1{std::get<2>(combineMap[cmbIdx])};
170 ATH_MSG_VERBOSE("Find another measurement to combine with "
171 <<m_idHelperSvc->toString(xAOD::identify(m1)));
172 if (cmbIdx +1 < combineMap.size()){
173 const xAOD::UncalibratedMeasurement* m2{std::get<0>(combineMap[cmbIdx +1])};
174 const State s2{std::get<1>(combineMap[cmbIdx+1])};
175 ATH_MSG_VERBOSE("Check whether "<<m_idHelperSvc->toString(xAOD::identify(m2))
176 <<" is a good candidate");
177 if (m1->type() == m2->type() &&
178 m1->identifierHash() == m2->identifierHash() &&
179 xAOD::layerHash(m1) == xAOD::layerHash(m2) &&
180 s1 == s2) {
182 ATH_MSG_VERBOSE("They match");
183 if (m_idHelperSvc->measuresPhi(xAOD::identify(m1))) {
184 linkMap.emplace_back(combine(m2, m1), s2, segIdx1);
185 } else {
186 linkMap.emplace_back(combine(m1, m2), s1, segIdx1);
187 }
188 ++cmbIdx; // skip the next measurement as it's absorbed here
189 continue;
190 }
191 }
192 ATH_MSG_VERBOSE("No match found");
193 linkMap.emplace_back(m1, s1, segIdx1);
194 }
195
196 std::ranges::sort(linkMap, [](const auto& a, const auto& b){
197 return std::get<2>(a) < std::get<2>(b);
198 });
199
200 for (const auto& [prd, state, segIdx]: linkMap) {
201 ATH_MSG_VERBOSE("Add link associate to measurement: "
202 <<m_idHelperSvc->toString(xAOD::identify(prd))<<", "
204 <<", position in segment "<<segIdx);
205
206 links.emplace_back(
207 *static_cast<const xAOD::UncalibratedMeasurementContainer*>(prd->container()),
208 prd->index());
209 linkStates.emplace_back(Acts::toUnderlying(state));
210 }
211 linkMap.clear();
212 combineMap.clear();
213 return StatusCode::SUCCESS;
214 };
215
216 for (const SG::ReadHandleKey<SegmentContainer>& key : m_readKeys) {
217 const SegmentContainer* segmentContainer{nullptr};
218 ATH_CHECK(SG::get(segmentContainer, key, ctx));
219
221 unsigned recoSegIdx{0};
222 outContainer->reserve(outContainer->size() + segmentContainer->size());
223 for (const Segment* inSegment : *segmentContainer) {
224 const MuonGMR4::SpectrometerSector* sector = inSegment->msSector();
225
226 xAOD::MuonSegment* convertedSeg = outContainer->push_back(std::make_unique<xAOD::MuonSegment>());
227 dec_parentLink(*convertedSeg) = SegLink_t{segmentContainer, recoSegIdx};
228 ++recoSegIdx;
229
230 const Amg::Vector3D& pos{inSegment->position()};
231 const Amg::Vector3D& dir{inSegment->direction()};
232 convertedSeg->setPosition(pos.x(), pos.y(), pos.z());
233 convertedSeg->setDirection(dir.x(), dir.y(), dir.z());
234
235
236 convertedSeg->setIdentifier(sector->sector(), sector->chamberIndex(), sector->side(),
237 xAOD::toTechnologyIndex(inSegment->summary().tech));
238 convertedSeg->setFitQuality(inSegment->chi2(), inSegment->nDoF());
239 convertedSeg->setNHits(inSegment->summary().nPrecHits, inSegment->summary().nPhiHits,
240 inSegment->summary().nEtaTrigHits);
241
242 using enum ParamDefs;
243 convertedSeg->setT0Error(inSegment->segementT0(),
244 Amg::error(inSegment->covariance(), Acts::toUnderlying(t0)));
245
246 SegPars_t& localPars{dec_locPars(*convertedSeg)};
247 const Amg::Transform3D globToLoc{sector->globalToLocalTransform(*gctx)};
248 const Amg::Vector3D locPos{globToLoc * pos};
249 const Amg::Vector3D locDir{globToLoc.linear() * dir};
250
251 localPars[Acts::toUnderlying(x0)] = locPos.x();
252 localPars[Acts::toUnderlying(y0)] = locPos.y();
253 localPars[Acts::toUnderlying(theta)] = locDir.theta();
254 localPars[Acts::toUnderlying(phi)] = locDir.phi();
255 localPars[Acts::toUnderlying(t0)] = inSegment->segementT0();
256 ATH_CHECK(decorateLinks(*inSegment, *convertedSeg));
257 }
258 }
259 return StatusCode::SUCCESS;
260 }
Scalar phi() const
phi method
Scalar theta() const
theta method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_DEBUG(x)
#define AmgSymMatrix(dim)
static Double_t sp
static Double_t a
static Double_t t0
Acts::GeometryContext context() const
int8_t side() const
Returns the side of the MS-sector 1 -> A side ; -1 -> C side.
Amg::Transform3D globalToLocalTransform(const ActsTrk::GeometryContext &gctx) const
Returns the global -> local transformation from the ATLAS global.
int sector() const
Returns the sector of the MS-sector.
Muon::MuonStationIndex::ChIndex chamberIndex() const
Returns the chamber index scheme.
static std::string toString(const State s)
Converts the state enum into a string.
State
State flag to distinguish different space point states.
DecorKey_t m_prdStateKey
Decoration to the PrdLink state (I.e.
DecorKey_t m_localSegParKey
Decoration to the local segment parameters.
DecorKey_t m_parentSegKey
Decoration of the original segment.
SG::WriteHandleKey< xAOD::MuonSegmentContainer > m_writeKey
Output segment container key.
SG::WriteHandleKey< xAOD::CombinedMuonStripContainer > m_combMeasKey
Auxiliary container to model two measurements in the same gas gap as a single track state.
SG::ReadHandleKey< ActsTrk::GeometryContext > m_geoCtxKey
Alignment container key.
DecorKey_t m_prdLinkKey
Decoration to the links to the associated Uncalibrated measurements.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
IdHelperSvc for Identifier printing & manipulation.
Gaudi::Property< bool > m_convertBeamSpot
Flag to convert the beamspot constaint as well.
ActsTrk::AuxiliaryMeasurementHandler m_auxMeasProv
Handler to parse the auxiliary beam spot constaint.
SG::ReadHandleKeyArray< SegmentContainer > m_readKeys
Input segment container key.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
ActsTrk::detail::MeasurementCalibratorBase::ProjectorType ProjectorType
Use the calibration projector.
void setDirection(float px, float py, float pz)
Sets the direction.
void setFitQuality(float chiSquared, float numberDoF)
Set the 'Fit Quality' information.
void setNHits(int nPrecisionHits, int nPhiLayers, int nTrigEtaLayers)
Set the number of hits/layers.
void setT0Error(float t0, float t0Error)
Sets the time error.
void setIdentifier(int sector, ::Muon::MuonStationIndex::ChIndex chamberIndex, int etaIndex, ::Muon::MuonStationIndex::TechnologyIndex technology)
Set the identifier.
void setPosition(float x, float y, float z)
Sets the global position.
Amg::Transform3D getTranslate3D(const double X, const double Y, const double Z)
: Returns a shift transformation along an arbitrary axis
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
size_t combine(size_t lhs, size_t rhs)
Definition hash.h:22
SeedingAux::FitParIndex ParamDefs
Use the same parameter indices as used by the CompSpacePointAuxiliaries.
std::vector< PrdLink_t > PrdLinkVec_t
Abrivation of a collection of Prd links.
CalibratedSpacePoint::State State
ElementLink< MuonR4::SegmentContainer > SegLink_t
Abrivation of the link to the reco segment container.
DataVector< Segment > SegmentContainer
xAOD::MeasVector< Acts::toUnderlying(ParamDefs::nPars)> SegPars_t
Abrivation of the decorated local segment parameters.
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
AthConfigFlags beamSpot(AthConfigFlags flags, str instanceName, str recoMode)
::Muon::MuonStationIndex::TechnologyIndex toTechnologyIndex(const UncalibMeasType aodType)
Transforms the uncalibrated measurement type to a technology index.
UncalibMeasType
Define the type of the uncalibrated measurement.
const Identifier & identify(const UncalibratedMeasurement *meas)
Returns the associated identifier from the muon measurement.
IdentifierHash layerHash(const UncalibratedMeasurement *meas)
Returns the layer hash from an uncalibrated meaurement.
UncalibratedMeasurementContainer_v1 UncalibratedMeasurementContainer
Define the version of the uncalibrated measurement container.
MuonSegment_v1 MuonSegment
Reference the current persistent version:
UncalibratedMeasurement_v1 UncalibratedMeasurement
Define the version of the uncalibrated measurement class.
#define THROW_EXCEPTION(MESSAGE)
Definition throwExcept.h:10

◆ 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 & AthCommonReentrantAlgorithm< 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 94 of file AthCommonReentrantAlgorithm.cxx.

90{
91 // If we didn't find any symlinks to add, just return the collection
92 // from the base class. Otherwise, return the extended collection.
93 if (!m_extendedExtraObjects.empty()) {
95 }
97}
An algorithm that can be simultaneously executed in multiple threads.

◆ filterPassed()

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

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96 {
97 return execState( ctx ).filterPassed();
98 }
virtual bool filterPassed(const EventContext &ctx) const

◆ initialize()

StatusCode MuonR4::xAODSegmentCnvAlg::initialize ( )
finaloverridevirtual

Definition at line 34 of file xAODSegmentCnvAlg.cxx.

34 {
35 ATH_CHECK(m_idHelperSvc.retrieve());
36 ATH_CHECK(m_readKeys.initialize());
37 ATH_CHECK(m_geoCtxKey.initialize());
38 ATH_CHECK(m_writeKey.initialize());
39 ATH_CHECK(m_prdLinkKey.initialize());
40 ATH_CHECK(m_localSegParKey.initialize());
41 ATH_CHECK(m_parentSegKey.initialize());
42 ATH_CHECK(m_combMeasKey.initialize());
43 ATH_CHECK(m_prdStateKey.initialize());
45 return StatusCode::SUCCESS;
46 }

◆ 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()

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

◆ 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 AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< 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.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

77{
78 return BaseAlg::sysExecute (ctx);
79}

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< 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 HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107 {
109
110 if (sc.isFailure()) {
111 return sc;
112 }
113
114 ServiceHandle<ICondSvc> cs("CondSvc",name());
115 for (auto h : outputHandles()) {
116 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117 // do this inside the loop so we don't create the CondSvc until needed
118 if ( cs.retrieve().isFailure() ) {
119 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120 return StatusCode::SUCCESS;
121 }
122 if (cs->regHandle(this,*h).isFailure()) {
124 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125 << " with CondSvc");
126 }
127 }
128 }
129 return sc;
130}
#define ATH_MSG_WARNING(x)
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_auxMeasProv

ActsTrk::AuxiliaryMeasurementHandler MuonR4::xAODSegmentCnvAlg::m_auxMeasProv {this}
private

Handler to parse the auxiliary beam spot constaint.

Definition at line 53 of file xAODSegmentCnvAlg.h.

53{this};

◆ m_combMeasKey

SG::WriteHandleKey<xAOD::CombinedMuonStripContainer> MuonR4::xAODSegmentCnvAlg::m_combMeasKey {this, "combinedPrdKey", "CombinedMuonPrds"}
private

Auxiliary container to model two measurements in the same gas gap as a single track state.

Definition at line 51 of file xAODSegmentCnvAlg.h.

51{this, "combinedPrdKey", "CombinedMuonPrds"};

◆ m_convertBeamSpot

Gaudi::Property<bool> MuonR4::xAODSegmentCnvAlg::m_convertBeamSpot {this, "convertBeamSpot", false}
private

Flag to convert the beamspot constaint as well.

Definition at line 55 of file xAODSegmentCnvAlg.h.

55{this, "convertBeamSpot", false};

◆ 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 AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

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

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_geoCtxKey

SG::ReadHandleKey<ActsTrk::GeometryContext> MuonR4::xAODSegmentCnvAlg::m_geoCtxKey {this, "AlignmentKey", "ActsAlignment", "cond handle key"}
private

Alignment container key.

Definition at line 39 of file xAODSegmentCnvAlg.h.

39{this, "AlignmentKey", "ActsAlignment", "cond handle key"};

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> MuonR4::xAODSegmentCnvAlg::m_idHelperSvc
private
Initial value:
{this, "MuonIdHelperSvc",
"Muon::MuonIdHelperSvc/MuonIdHelperSvc"}

IdHelperSvc for Identifier printing & manipulation.

Definition at line 32 of file xAODSegmentCnvAlg.h.

32 {this, "MuonIdHelperSvc",
33 "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};

◆ m_localSegParKey

DecorKey_t MuonR4::xAODSegmentCnvAlg::m_localSegParKey {this, "LocalSegParKey", m_writeKey, "localSegPars"}
private

Decoration to the local segment parameters.

Definition at line 47 of file xAODSegmentCnvAlg.h.

47{this, "LocalSegParKey", m_writeKey, "localSegPars"};

◆ m_parentSegKey

DecorKey_t MuonR4::xAODSegmentCnvAlg::m_parentSegKey {this, "ParentSegmentKey", m_writeKey, "parentSegment"}
private

Decoration of the original segment.

Definition at line 49 of file xAODSegmentCnvAlg.h.

49{this, "ParentSegmentKey", m_writeKey, "parentSegment"};

◆ m_prdLinkKey

DecorKey_t MuonR4::xAODSegmentCnvAlg::m_prdLinkKey {this, "PrdLinkKey", m_writeKey, "prdLinks" }
private

Decoration to the links to the associated Uncalibrated measurements.

Definition at line 43 of file xAODSegmentCnvAlg.h.

43{this, "PrdLinkKey", m_writeKey, "prdLinks" };

◆ m_prdStateKey

DecorKey_t MuonR4::xAODSegmentCnvAlg::m_prdStateKey {this, "PrdStateKey", m_writeKey, "prdState"}
private

Decoration to the PrdLink state (I.e.

outlier or valid)

Definition at line 45 of file xAODSegmentCnvAlg.h.

45{this, "PrdStateKey", m_writeKey, "prdState"};

◆ m_readKeys

SG::ReadHandleKeyArray<SegmentContainer> MuonR4::xAODSegmentCnvAlg::m_readKeys {this, "InSegmentKeys", {"R4MuonSegments"}}
private

Input segment container key.

Definition at line 35 of file xAODSegmentCnvAlg.h.

35{this, "InSegmentKeys", {"R4MuonSegments"}};

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

◆ m_writeKey

SG::WriteHandleKey<xAOD::MuonSegmentContainer> MuonR4::xAODSegmentCnvAlg::m_writeKey {this, "OutSegmentKey", "MuonSegmentsFromR4"}
private

Output segment container key.

Definition at line 37 of file xAODSegmentCnvAlg.h.

37{this, "OutSegmentKey", "MuonSegmentsFromR4"};

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