Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
30 return StatusCode::SUCCESS;
36 auto translatedPatterns = std::make_unique<MuonPatternCombinationCollection>();
37 auto translatedHough = std::make_unique<Muon::HoughDataPerSectorVec>();
47 ATH_CHECK(patternHandle.record(std::move(translatedPatterns)));
50 ATH_CHECK(houghDataHandle.record(std::move(translatedHough)));
53 return StatusCode::SUCCESS;
77 const Amg::Transform3D& localToGlobal = seed->msSector()->localToGlobalTrans(*gctx);
79 std::unordered_set<Identifier> channelsInMax{};
81 channelsInMax.insert(hit->identify());
82 if (hit->secondaryMeasurement()) {
86 std::vector<const Trk::PrepRawData*> trkHits{};
87 trkHits.reserve(channelsInMax.size());
92 trkHits.push_back(
fetchPrd(chId, mdtPrds));
95 trkHits.push_back(
fetchPrd(chId, rpcPrds));
98 trkHits.push_back(
fetchPrd(chId, tgcPrds));
101 trkHits.push_back(
fetchPrd(chId, mmPrds));
104 trkHits.push_back(
fetchPrd(chId, stgcPrds));
107 ATH_MSG_WARNING(
"Cscs are not part of the new paradigms. Where are they now coming from? "
111 if (
std::find(trkHits.begin(), trkHits.end(),
nullptr) != trkHits.end()){
113 return StatusCode::FAILURE;
124 std::vector<Muon::MuonPatternChamberIntersect> chamberData{std::move(chamberIsect)};
126 auto patternCombi = std::make_unique<Muon::MuonPatternCombination>(
nullptr, std::move(chamberData));
127 patternContainer.
push_back(std::move(patternCombi));
130 return StatusCode::SUCCESS;
135 if (houghDataSec.
vec.empty()) {
136 constexpr
unsigned int nSectors = 16;
137 houghDataSec.
vec.resize(nSectors);
138 for (
unsigned int i = 0;
i < nSectors; ++
i) {
139 houghDataSec.
vec[
i].sector =
i + 1;
144 const DetIdx_t regionIndex =
m_idHelperSvc->regionIndex(chId);
150 auto convertedMax = std::make_unique<LegacyMax>();
152 convertedMax->theta =
intersect.intersectDirection().theta();
154 std::unique_ptr<MuonHough::Hit> hit{};
163 hit = std::make_unique<MuonHough::Hit>(0, barrel ? gp.perp() : gp.z(),
164 barrel ? gp.z() : gp.perp(),
165 barrel ? gp.z() : gp.perp(),
167 convertedMax->hits.emplace_back(std::move(hit));
169 houghDataSec.
vec[sector-1].maxVec[
sectorLayerHash].push_back(std::move(convertedMax));
173 template <
class PrdType>
177 ATH_MSG_ERROR(
"Cannot fetch a prep data object as the container given for "<<
186 for (
const PrdType* prd : *coll) {
187 if (prd->identify() == prdId){
StatusCode convertSeed(const EventContext &ctx, const SegmentSeedContainer &seedContainer, ::MuonPatternCombinationCollection &patternContainer, Muon::HoughDataPerSectorVec &houghDataSec) const
Converts each segment seed first into a PatternCombination - serving as input for the legacy segment ...
LayerIndex
enum to classify the different layers in the muon spectrometer
MuonLayerHough & hough(int sector, DetRegIdx region, LayIdx layer)
access precision transform
Template for Muon PRD containers (which are basically collections of MuonPrepDataCollections).
const Identifier & identify(const UncalibratedMeasurement *meas)
Returns the associated identifier from the muon measurement.
SG::ReadHandleKey< ActsGeometryContext > m_geoCtxKey
std::string find(const std::string &s)
return a remapped string
double angle(const Amg::Vector3D &v1, const Amg::Vector3D &v2)
calculates the opening angle between two vectors
SG::ReadHandleKey< Muon::TgcPrepDataContainer > m_keyTgc
Prep data container keys.
unsigned int sectorLayerHash(DetectorRegionIndex detectorRegionIndex, LayerIndex layerIndex)
create a hash out of region and layer
TechnologyIndex
enum to classify the different layers in the muon spectrometer
SG::WriteHandleKey< Muon::HoughDataPerSectorVec > m_dataPerSecKey
SG::ReadHandleKeyArray< SegmentSeedContainer > m_readKeys
#define ATH_MSG_VERBOSE(x)
Property holding a SG store/key/clid from which a ReadHandle is made.
struct representing the maximum in the hough space
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
const PrdType * fetchPrd(const Identifier &prdId, const Muon::MuonPrepDataContainerT< PrdType > *prdContainer) const
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
This class holds information needed for the Moore and MoMu pattern recognition for a muon chamber.
::StatusCode StatusCode
StatusCode definition for legacy code.
Eigen::Affine3d Transform3D
std::vector< HoughDataPerSec > vec
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Template to hold collections of MuonPrepRawData objects.
SG::WriteHandleKey<::MuonPatternCombinationCollection > m_combiKey
Include the GeoPrimitives which need to be put first.
The muon space point is the combination of two uncalibrated measurements one of them measures the eta...
MuonHough::MuonDetectorHough detectorHoughTransforms
SG::ReadHandleKey< Muon::RpcPrepDataContainer > m_keyRpc
value_type push_back(value_type pElem)
Add an element to the end of the collection.
Class to represent measurements from the Monitored Drift Tubes.
Eigen::Matrix< double, 3, 1 > Vector3D
This header ties the generic definitions in this package.
virtual const T * indexFindPtr(IdentifierHash hashId) const override final
return pointer on the found entry or null if out of range using hashed index - fast version,...
void convertMaximum(const Muon::MuonPatternChamberIntersect &intersect, Muon::HoughDataPerSectorVec &houghDataSec) const
: Converts the maximum back into the HoughDataPersector
SG::ReadHandleKey< Muon::MMPrepDataContainer > m_keyMM
DetectorRegionIndex
enum to classify the different layers in the muon spectrometer
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.
#define ATH_MSG_WARNING(x)
StatusCode initialize() override final
Representation of a segment seed (a fully processed hough maximum) produced by the hough transform.
SG::ReadHandleKey< Muon::MdtPrepDataContainer > m_keyMdt
Class representing clusters in the muon system.
StatusCode execute(const EventContext &ctx) const override final
SG::ReadHandleKey< Muon::sTgcPrepDataContainer > m_keysTgc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc