19 return "empty container";
22 std::stringstream sstr{};
24 sstr<<
" --- "<<idHelperSvc->
toString(
m->identify())<<
", hash: "<<
m->identifierHash()<<
", dim:"<<
m->numDimensions()<<std::endl;
47 return StatusCode::SUCCESS;
77 std::array<std::vector<Identifier>,
toInt(TechIdx_t::TechnologyIndexMax)> idsPerTech{};
84 appendId(rot->identify());
86 for (
unsigned int r = 0 ;
r < cRot->numberOfContainedROTs(); ++
r){
87 appendId(cRot->rioOnTrack(
r).identify());
91 for (std::vector<Identifier>& ids : idsPerTech) {
100 ATH_MSG_ERROR(__func__<<
"() "<<__LINE__<<
" - The key for technology "
101 <<
m_idHelperSvc->technologyIndex(ids.front())<<
" is empty.");
102 return StatusCode::FAILURE;
109 ATH_MSG_ERROR(__func__<<
"() "<<__LINE__<<
" - Cannot find a xAOD view for "
111 return StatusCode::FAILURE;
117 while(viewer.
at(0)->identifierHash() != dHash) {
118 if (!viewer.
next()) {
120 ATH_MSG_WARNING(__func__<<
"() "<<__LINE__<<
" - Container is not sorted "
124 ATH_MSG_ERROR(__func__<<
"() "<<__LINE__<<
" - Cannot find a xAOD view for "
126 return StatusCode::FAILURE;
132 if (itr == viewer.
end()) {
134 <<
"\n\n"<<
print(*container));
135 return StatusCode::FAILURE;
138 prdLinks.emplace_back(container, m->index());
148 const Amg::Vector3D locDir = globToLoc.linear() * seg->direction();
151 const double travDist =
Amg::intersect<3>(locPos, locDir, Amg::Vector3D::UnitZ(), 0).value_or(0);
154 locPars[Acts::toUnderlying(ParamDefs::x0)] = atCentre.x();
155 locPars[Acts::toUnderlying(ParamDefs::y0)] = atCentre.y();
156 locPars[Acts::toUnderlying(ParamDefs::theta)] = locDir.theta();
157 locPars[Acts::toUnderlying(ParamDefs::phi)] = locDir.phi();
161 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
Handle class for reading from StoreGate.
Handle class for adding a decoration to an object.
void print(char *figname, TCanvas *c1)
const ServiceHandle< StoreGateSvc > & detStore() const
This is a "hash" representation of an Identifier.
A spectrometer sector forms the envelope of all chambers that are placed in the same MS sector & laye...
virtual StatusCode execute(const EventContext &ctx) const override final
SG::ReadHandleKey< xAOD::MuonSegmentContainer > m_segmentKey
ActsTrk::GeoContextReadKey_t m_geoCtxKey
SG::WriteDecorHandleKey< xAOD::MuonSegmentContainer > m_prdLinkKey
Decoration key of the associated prep data objects.
const MeasKey_t & fetchKey(const TechIdx_t idx) const
Fetch the read handle key to the Muon measurement container.
SG::ReadHandleKey< PrdCont_t > MeasKey_t
const MuonGMR4::MuonDetectorManager * m_detMgr
virtual StatusCode initialize() override final
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
SG::WriteDecorHandleKey< xAOD::MuonSegmentContainer > m_locParKey
Decoration key of the local parameters.
std::vector< PrdLink_t > PrdLinkVec
Muon::MuonStationIndex::TechnologyIndex TechIdx_t
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
virtual std::string toString(const Identifier &id) const =0
print all fields to string
Base class for all CompetingRIOsOnTack implementations, extends the common MeasurementBase.
This class is the pure abstract base class for all fittable tracking measurements.
Class to handle RIO On Tracks ROT) for InDet and Muons, it inherits from the common MeasurementBase.
Base class for all TrackSegment implementations, extends the common MeasurementBase.
const std::vector< const Trk::MeasurementBase * > & containedMeasurements() const
returns the vector of Trk::MeasurementBase objects
const_iterator end() const noexcept
End iterator of the current chamber view.
const_ref at(const std::size_t idx) const
Returns the i-the measurement from the current chamber.
bool loadView(const Identifier &chamberId)
Loads the view matching the parsed identifier.
bool next()
Loads the hits from the next chamber.
Auxiliary class to instantiate WriteDecorHandles.The handles can be created in an empty state.
const Identifier & identify() const
Returns the Athena identifier of the measurement.
std::optional< double > intersect(const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB)
Calculates the point B' along the line B that's closest to a second line A.
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
This header ties the generic definitions in this package.
std::string print(const cont_t &container)
Print a space point container to string.
xAOD::PosAccessor< Acts::toUnderlying(ParamDefs::nPars)>::element_type SegPars_t
constexpr int toInt(const EnumType enumVal)
const SG::AuxVectorData * container() const
Return the container holding this element.
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
SG::AuxElement::Accessor< std::array< float, N > > PosAccessor
xAOD Accessor to the position
MuonSegmentContainer_v1 MuonSegmentContainer
Definition of the current "MuonSegment container version".
MuonMeasurement_v1 MuonMeasurement
MuonSegment_v1 MuonSegment
Reference the current persistent version:
MuonMeasurementContainer_v1 MuonMeasurementContainer
#define THROW_EXCEPTION(MESSAGE)