|
ATLAS Offline Software
|
Go to the documentation of this file.
30 return StatusCode::SUCCESS;
32 template <
class ContainerType>
35 const ContainerType*& contToPush)
const {
39 return StatusCode::SUCCESS;
43 contToPush = readHandle.cptr();
44 return StatusCode::SUCCESS;
51 auto translatedPatterns = std::make_unique<MuonPatternCombinationCollection>();
52 auto translatedHough = std::make_unique<Muon::HoughDataPerSectorVec>();
62 ATH_CHECK(patternHandle.record(std::move(translatedPatterns)));
65 ATH_CHECK(houghDataHandle.record(std::move(translatedHough)));
68 return StatusCode::SUCCESS;
93 const Amg::Transform3D& localToGlobal = seed->msSector()->localToGlobalTrans(*gctx);
95 std::unordered_set<Identifier> channelsInMax{};
97 channelsInMax.insert(hit->identify());
98 if (hit->secondaryMeasurement()) {
102 std::vector<const Trk::PrepRawData*> trkHits{};
103 trkHits.reserve(channelsInMax.size());
108 trkHits.push_back(
fetchPrd(chId, mdtPrds));
111 trkHits.push_back(
fetchPrd(chId, rpcPrds));
114 trkHits.push_back(
fetchPrd(chId, tgcPrds));
117 trkHits.push_back(
fetchPrd(chId, mmPrds));
120 trkHits.push_back(
fetchPrd(chId, stgcPrds));
123 ATH_MSG_WARNING(
"Cscs are not part of the new paradigms. Where are they now coming from? "
127 if (
std::find(trkHits.begin(), trkHits.end(),
nullptr) != trkHits.end()){
129 return StatusCode::FAILURE;
140 std::vector<Muon::MuonPatternChamberIntersect> chamberData{std::move(chamberIsect)};
142 auto patternCombi = std::make_unique<Muon::MuonPatternCombination>(
nullptr, std::move(chamberData));
143 patternContainer.
push_back(std::move(patternCombi));
146 return StatusCode::SUCCESS;
151 if (houghDataSec.
vec.empty()) {
152 constexpr
unsigned int nSectors = 16;
153 houghDataSec.
vec.resize(nSectors);
154 for (
unsigned int i = 0;
i < nSectors; ++
i) {
155 houghDataSec.
vec[
i].sector =
i + 1;
160 const DetIdx_t regionIndex =
m_idHelperSvc->regionIndex(chId);
166 auto convertedMax = std::make_unique<LegacyMax>();
168 convertedMax->theta =
intersect.intersectDirection().theta();
170 std::unique_ptr<MuonHough::Hit> hit{};
179 hit = std::make_unique<MuonHough::Hit>(0, barrel ? gp.perp() : gp.z(),
180 barrel ? gp.z() : gp.perp(),
181 barrel ? gp.z() : gp.perp(),
183 convertedMax->hits.emplace_back(std::move(hit));
185 houghDataSec.
vec[sector-1].maxVec[sectorLayerHash].push_back(std::move(convertedMax));
189 template <
class PrdType>
193 ATH_MSG_ERROR(
"Cannot fetch a prep data object as the container given for "<<
202 for (
const PrdType* prd : *coll) {
203 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 ...
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.
LayerIndex
enum to classify the different layers in the muon spectrometer
static unsigned int sectorLayerHash(DetectorRegionIndex detectorRegionIndex, LayerIndex layerIndex)
create a hash out of region and layer
SG::WriteHandleKey< Muon::HoughDataPerSectorVec > m_dataPerSecKey
SG::ReadHandleKeyArray< SegmentSeedContainer > m_readKeys
#define ATH_MSG_VERBOSE(x)
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
This class holds information needed for the Moore and MoMu pattern recognition for a muon chamber.
::StatusCode StatusCode
StatusCode definition for legacy code.
StatusCode retrieveContainer(const EventContext &ctx, const SG::ReadHandleKey< ContType > &key, const ContType *&contPtr) const
Loads a container from the StoreGate and returns whether the retrieval is successful.
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
DetectorRegionIndex
enum to classify the different layers in the muon spectrometer
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
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
TechnologyIndex
enum to classify the different layers in the muon spectrometer
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc