18 return "empty container";
21 std::stringstream sstr{};
23 sstr<<
" --- "<<idHelperSvc->
toString(
m->identify())<<
", hash: "<<
m->identifierHash()<<
", dim:"<<
m->numDimensions()<<std::endl;
46 return StatusCode::SUCCESS;
76 std::array<std::vector<Identifier>,
toInt(TechIdx_t::TechnologyIndexMax)> idsPerTech{};
83 appendId(rot->identify());
85 for (
unsigned int r = 0 ;
r < cRot->numberOfContainedROTs(); ++
r){
86 appendId(cRot->rioOnTrack(
r).identify());
90 for (std::vector<Identifier>& ids : idsPerTech) {
99 ATH_MSG_ERROR(__func__<<
"() "<<__LINE__<<
" - The key for technology "
100 <<
m_idHelperSvc->technologyIndex(ids.front())<<
" is empty.");
101 return StatusCode::FAILURE;
108 ATH_MSG_ERROR(__func__<<
"() "<<__LINE__<<
" - Cannot find a xAOD view for "
110 return StatusCode::FAILURE;
116 while(viewer.
at(0)->identifierHash() != dHash) {
117 if (!viewer.
next()) {
119 ATH_MSG_WARNING(__func__<<
"() "<<__LINE__<<
" - Container is not sorted "
123 ATH_MSG_ERROR(__func__<<
"() "<<__LINE__<<
" - Cannot find a xAOD view for "
125 return StatusCode::FAILURE;
131 if (itr == viewer.
end()) {
133 <<
"\n\n"<<
print(*container));
134 return StatusCode::FAILURE;
137 prdLinks.emplace_back(container, m->index());
145 SegPars& locPars{parDecor(*seg)};
147 const Amg::Vector3D locDir = globToLoc.linear() * seg->direction();
150 const double travDist =
Amg::intersect<3>(locPos, locDir, Amg::Vector3D::UnitZ(), 0).value_or(0);
153 locPars[Acts::toUnderlying(ParamDefs::x0)] = atCentre.x();
154 locPars[Acts::toUnderlying(ParamDefs::y0)] = atCentre.y();
155 locPars[Acts::toUnderlying(ParamDefs::theta)] = locDir.theta();
156 locPars[Acts::toUnderlying(ParamDefs::phi)] = locDir.phi();
160 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
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
SG::ReadHandleKey< ActsTrk::GeometryContext > m_geoCtxKey
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
Handle class for adding a decoration to an object.
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.
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::MeasVector< Acts::toUnderlying(ParamDefs::nPars)> SegPars
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.
MuonSegmentContainer_v1 MuonSegmentContainer
Definition of the current "MuonSegment container version".
Eigen::Matrix< float, N, 1 > MeasVector
Abrivation of the Matrix & Covariance definitions.
MuonMeasurement_v1 MuonMeasurement
MuonSegment_v1 MuonSegment
Reference the current persistent version:
MuonMeasurementContainer_v1 MuonMeasurementContainer
#define THROW_EXCEPTION(MESSAGE)