Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
CombinatorialNSWSeedFinderAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
10 
17 
19 
20 #include <ranges>
21 #include <vector>
22 #include <unordered_set>
23 #include <nlohmann/json.hpp>
24 #include <fstream>
25 
26 
27 
28 namespace MuonR4 {
29 
30 constexpr unsigned int minLayers{4};
31 
34  ATH_CHECK(m_etaKey.initialize());
35  ATH_CHECK(m_writeKey.initialize());
36  ATH_CHECK(m_idHelperSvc.retrieve());
37  ATH_CHECK(m_visionTool.retrieve(DisableTool{m_visionTool.empty()}));
39 
40  if (!(m_idHelperSvc->hasMM() || m_idHelperSvc->hasSTGC())) {
41  ATH_MSG_ERROR("MM or STGC not part of initialized detector layout");
42  return StatusCode::FAILURE;
43  }
44 
45  return StatusCode::SUCCESS;
46 }
47 
48 template <class ContainerType>
51  const ContainerType* &contToPush) const {
52  contToPush = nullptr;
53  if (key.empty()) {
54  ATH_MSG_VERBOSE("No key has been parsed for object "<< typeid(ContainerType).name());
55  return StatusCode::SUCCESS;
56  }
57  SG::ReadHandle readHandle{key, ctx};
58  ATH_CHECK(readHandle.isPresent());
59  contToPush = readHandle.cptr();
60  return StatusCode::SUCCESS;
61 }
62 
64  const SpacePoint* testHit,
65  const Amg::Vector3D& dirEstUp,
66  const Amg::Vector3D& dirEstDn) const{
67 
68  const double planeOffSet = testHit->positionInChamber().dot(testHit->planeNormal());
69 
70  const Amg::Vector3D estPlaneArrivalUp = startPos+
71  Amg::intersect<3>(startPos, dirEstUp, testHit->planeNormal(), planeOffSet).value_or(0) * dirEstUp;
72  const Amg::Vector3D estPlaneArrivalDn = startPos +
73  Amg::intersect<3>(startPos, dirEstDn, testHit->planeNormal(), planeOffSet).value_or(0) * dirEstDn;
74 
75  switch (testHit->type()) {
77  const auto* prd = static_cast<const xAOD::MMCluster*>(testHit->primaryMeasurement());
78 
79  const double halfLength = prd->readoutElement()->stripLayer(prd->measurementHash()).design().stripLength(prd->channelNumber()) * 0.5;
81  const Amg::Vector3D leftEdge = testHit->positionInChamber() - halfLength * testHit->directionInChamber();
82  const Amg::Vector3D rightEdge = testHit->positionInChamber() + halfLength * testHit->directionInChamber();
83 
84  const bool below = estPlaneArrivalDn.y() > std::max(leftEdge.y(), rightEdge.y());
85  const bool above = estPlaneArrivalUp.y() < std::min(leftEdge.y(), rightEdge.y());
86  ATH_MSG_DEBUG("Hit " << m_idHelperSvc->toString(testHit->identify())
87  << (below || above ? " is outside the window" : " is inside the window"));
88 
89 
90  if(below) return HitWindow::tooLow;
91  if(above) return HitWindow::tooHigh;
92 
93  return HitWindow::inside;
94  }
95  default:
96  ATH_MSG_DEBUG("STGCs not implemented yet - I will do ");
97  break;
98  }
99  //return randmoly an outside hit for now
100  return HitWindow::tooHigh;
101 };
102 
104  const HitLayVec &combinatoricLayers) const {
105 
106 
107  HitLayVec seedHitsFromLayers{};
108  //try all the hits combinations from the layers for now (--rethink about optimized way)
109  unsigned int iterLay0{0}, iterLay1{0}, iterLay2{0}, iterLay3{0};
110  unsigned int startLay1{0}, startLay2{0}, startLay3{0};
111 
112  for( ; iterLay0 < combinatoricLayers[0].size() ; ++iterLay0){
113 
114  const SpacePoint* hit0 = combinatoricLayers[0][iterLay0];
116  const Amg::Vector3D initSeedDir{(beamSpot - hit0->positionInChamber()).unit()};
117  const Amg::Vector3D dirEstUp = Amg::dirFromAngles(initSeedDir.phi(), initSeedDir.theta() - m_windowTheta);
118  const Amg::Vector3D dirEstDn = Amg::dirFromAngles(initSeedDir.phi(), initSeedDir.theta() + m_windowTheta);
119 
120  ATH_MSG_VERBOSE("Reference hit: "<<m_idHelperSvc->toString(hit0->identify())
121  <<", position: "<<Amg::toString(hit0->positionInChamber())<<" seed dir: "<<Amg::toString(initSeedDir)
122  <<" seed plane"<<Amg::toString(beamSpot + Amg::intersect<3>(beamSpot, initSeedDir, hit0->planeNormal(),
123  hit0->planeNormal().dot(hit0->positionInChamber())).value_or(0.) * initSeedDir ));
125  for( iterLay1 = startLay1; iterLay1 < combinatoricLayers[1].size() ; ++iterLay1){
126  const SpacePoint* hit1 = combinatoricLayers[1][iterLay1];
127  const auto hit1InWindow = findHitInWindow(beamSpot, hit1, dirEstUp, dirEstDn);
128  // hit is above- hits are sorted in y so break the loops (we need 4 hits for the seed = no reason to check the others)
129  if(hit1InWindow == HitWindow::tooHigh) {
130  break;
131  }else if(hit1InWindow == HitWindow::tooLow){
132  startLay1=iterLay1;
133  continue;
134  }
135  for( iterLay2 = startLay2; iterLay2 < combinatoricLayers[2].size() ; ++iterLay2){
136  const SpacePoint* hit2 = combinatoricLayers[2][iterLay2];
137  const auto hit2InWindow = findHitInWindow(beamSpot, hit2, dirEstUp, dirEstDn);
138  if (hit2InWindow == HitWindow::tooHigh){
139  iterLay1 = combinatoricLayers[1].size();
140  break;
141  }else if(hit2InWindow == HitWindow::tooLow){
142  startLay2=iterLay2;
143  continue;
144  }
145  for( iterLay3 = startLay3; iterLay3 < combinatoricLayers[3].size(); ++iterLay3){
146  const SpacePoint* hit3 = combinatoricLayers[3][iterLay3];
147  const auto hit3InWindow = findHitInWindow(beamSpot, hit3, dirEstUp, dirEstDn);
148  if (hit3InWindow == HitWindow::tooHigh){
149  iterLay1 = combinatoricLayers[1].size();
150  iterLay2 = combinatoricLayers[2].size();
151  break;
152  }else if(hit3InWindow == HitWindow::tooLow){
153  startLay3=iterLay3;
154  continue;
155  }
156  seedHitsFromLayers.emplace_back(HitVec{hit0, hit1, hit2, hit3});
157  }
158  }
159  }
160  }
161  return seedHitsFromLayers;
162 }
163 
164 
166  const Amg::Vector3D &direction,
167  const HitLayVec& stripHitsLayers) const {
168 
169  //the hits we need to return to extend the segment seed
170  HitVec combinatoricHits;
171 
172  //the stripHitsLayers are already the unused ones - only use for the extension
173  for (unsigned int i = 0; i < stripHitsLayers.size(); i++) {
174 
175  double offset = stripHitsLayers[i].front()->positionInChamber().dot(stripHitsLayers[i].front()->planeNormal());
176  const Amg::Vector3D extrapPos = startPos + Amg::intersect<3>(startPos, direction, stripHitsLayers[i].front()->planeNormal(), offset).value_or(0) * direction;
177 
178  unsigned int indexOfHit = stripHitsLayers[i].size()+1;
179  unsigned int triedHit{0};
180  double minPull{std::numeric_limits<double>::max()};
181 
182  // loop over the hits on the same layer
183  for (unsigned int j = 0; j < stripHitsLayers[i].size(); j++) {
184  auto hit = stripHitsLayers[i].at(j);
185  double pull = std::sqrt(SegmentFitHelpers::chiSqTermStrip(extrapPos, direction, *hit, msg()));
186  ATH_MSG_VERBOSE("Trying extension with hit " << m_idHelperSvc->toString(hit->identify()));
187 
188  //find the hit with the minimum pull (check at least one hit after we have increasing pulls)
189  if (pull > minPull) {
190 
191  triedHit+=1;
192  continue;
193  }
194 
195  if(triedHit>1){
196  break;
197  }
198 
199  indexOfHit = j;
200  minPull = pull;
201  }
202 
203  // complete the seed with the extended hits
204  if (minPull < m_minPullThreshold) {
205  ATH_MSG_VERBOSE("Extension successfull - hit" << m_idHelperSvc->toString(stripHitsLayers[i].at(indexOfHit)->identify())<<", pos: "
206  <<Amg::toString(stripHitsLayers[i].at(indexOfHit)->positionInChamber())<<", dir: "<<Amg::toString(stripHitsLayers[i].at(indexOfHit)->directionInChamber())<<" found with pull "<<minPull);
207  combinatoricHits.push_back(stripHitsLayers[i].at(indexOfHit));
208  }
209  }
210  return combinatoricHits;
211 }
212 
213 std::unique_ptr<SegmentSeed>
215  const AmgSymMatrix(2)& bMatrix,
216  const HoughMaximum& max,
217  const HitLayVec& extensionLayers) const {
218  // we require at least four hits for the seeding
219  if (hits.size() != minLayers) {
220  ATH_MSG_VERBOSE("Seed Rejection: Wrong number of initial layers for seeding --they should be four");
221  return nullptr;
222  }
223 
224  std::array<double, 4> params = CombinatorialSeedSolver::defineParameters(bMatrix, hits);
225 
226  const auto [segPos, direction] = CombinatorialSeedSolver::seedSolution(hits, params);
227 
228  double tanPhi = houghTanPhi(direction);
229  double tanTheta = houghTanTheta(direction);
230 
231  double interceptX = segPos.x();
232  double interceptY = segPos.y();
233  // check the consistency of the parameters - expected to lay in the strip's
234  // length
235  for (std::size_t i = 0; i < 4; i++) {
236  const xAOD::UncalibratedMeasurement *primaryMeas = hits[i]->primaryMeasurement();
237 
238  if (primaryMeas->type() == xAOD::UncalibMeasType::MMClusterType) {
239  const auto *clust = static_cast<const xAOD::MMCluster *>(primaryMeas);
240 
241  double halfLength = 0.5 * clust->readoutElement()->stripLayer(clust->measurementHash()).design().stripLength(clust->channelNumber());
242 
243  if (std::abs(params[i]) > halfLength) {
244  ATH_MSG_VERBOSE("Seed Rejection: Invalid seed - outside of the strip's length");
245  return nullptr;
246  }
247  }
248  }
249 
250  // extend the seed to the segment -- include hits from the other layers too
251  auto extendedHits = extendHits(segPos, direction, extensionLayers);
252  hits.insert(hits.end(), extendedHits.begin(), extendedHits.end());
253  return std::make_unique<SegmentSeed>(tanTheta, interceptY, tanPhi,
254  interceptX, hits.size(),
255  std::move(hits), max.parentBucket());
256 }
257 
258 std::vector<std::unique_ptr<SegmentSeed>>
260  // first sort the hits per layer from the maximum
261  SpacePointPerLayerSorter hitLayers{max.getHitsInMax()};
262 
263  HitLayVec stripHitsLayers{hitLayers.stripHits()};
264 
265  std::vector<std::unique_ptr<SegmentSeed>> seeds;
266 
267  unsigned int layerSize = stripHitsLayers.size();
268 
269  if (layerSize < minLayers) {
270  ATH_MSG_VERBOSE("Not enough layers to build a seed");
271  return seeds;
272  }
273 
274  if (m_visionTool.isEnabled()) {
276  const auto truthHits = getMatchingSimHits(max.getHitsInMax());
277  constexpr double legX{0.2};
278  double legY{0.8};
279  for (const SpacePoint* sp : max.getHitsInMax()) {
280  const auto* mmClust = static_cast<const xAOD::MMCluster*>(sp->primaryMeasurement());
281  const xAOD::MuonSimHit* simHit = getTruthMatchedHit(*mmClust);
282  if (!simHit || !MC::isMuon(simHit)) continue;
283  const MuonGMR4::MmReadoutElement* reEle = mmClust->readoutElement();
284  const MuonGMR4::StripDesign& design = reEle->stripLayer(mmClust->measurementHash()).design();
285  const Amg::Transform3D toChamb = reEle->msSector()->globalToLocalTrans(gctx) *
286  reEle->localToGlobalTrans(gctx, simHit->identify());
287  const Amg::Vector3D hitPos = toChamb * xAOD::toEigen(simHit->localPosition());
288  const Amg::Vector3D hitDir = toChamb.linear() * xAOD::toEigen(simHit->localDirection());
289 
290  const double pull = std::sqrt(SegmentFitHelpers::chiSqTermStrip(hitPos,hitDir, *sp, msgStream()));
291  const double pull2 = (mmClust->localPosition<1>().x() - simHit->localPosition().x()) / std::sqrt(mmClust->localCovariance<1>().x());
292  primitives.push_back(MuonValR4::drawLabel(std::format("ml: {:1d}, gap: {:1d}, {:}, pull: {:.2f} / {:.2f}", reEle->multilayer(), mmClust->gasGap(),
293  !design.hasStereoAngle() ? "X" : design.stereoAngle() >0 ? "U": "V",pull, pull2),legX,legY,14));
294  legY-=0.05;
295  }
296  m_visionTool->visualizeBucket(Gaudi::Hive::currentContext(), *max.parentBucket(),
297  "truth", std::move(primitives));
298  }
299 
300  const Amg::Transform3D globToLocal = max.msSector()->globalToLocalTrans(gctx);
301  std::array<const SpacePoint*, 4> seedHits{};
302  for (std::size_t i = 0; i < layerSize - 3; ++i) {
303  seedHits[0] = stripHitsLayers[i].front();
304  for (std::size_t j = i + 1; j < layerSize - 2; ++j) {
305  seedHits[1] = stripHitsLayers[j].front();
306  for (std::size_t k = j + 1; k < layerSize - 1; ++k) {
307  seedHits[2] = stripHitsLayers[k].front();
308  for (std::size_t l = k + 1; l < layerSize; ++l) {
309  seedHits[3] = stripHitsLayers[l].front();
310  AmgSymMatrix(2) bMatrix = CombinatorialSeedSolver::betaMatrix(seedHits);
311  if (std::abs(bMatrix.determinant()) < 1.e-6) {
312 
313  continue;
314  }
315 
316  const HitLayVec layers{stripHitsLayers[i], stripHitsLayers[j], stripHitsLayers[k], stripHitsLayers[l]};
317 
318 
319  // each layer may have more than one hit - take the hit combinations
320  HitLayVec result = findCombinatoricHits(globToLocal.translation(), layers);
321 
322  //the layers not participated in the seed build - gonna be used for the extension
323  HitLayVec extensionLayers;
324  std::copy_if(stripHitsLayers.begin(), stripHitsLayers.end(), std::back_inserter(extensionLayers),
325  [&layers,this](const HitVec& stripLayer){
326  const Identifier gasGapId = m_idHelperSvc->gasGapId(stripLayer.front()->identify());
327  return std::ranges::find_if(layers,[&gasGapId, this](const HitVec& spacePoints){
328  return gasGapId == m_idHelperSvc->gasGapId(spacePoints.front()->identify());
329  }) == layers.end();
330  });
331 
332  // we have made sure to have hits from all the four layers -
333  // start by 4 hits for the seed and try to build the seed for the combinatorics found
334  for (auto &combinatoricHits : result) {
335  auto seed = buildSegmentSeed(combinatoricHits, bMatrix, max, extensionLayers);
336  if (seed) {
337  seeds.push_back(std::move(seed));
338 
339  }
340  }
341 
342  }
343  }
344  }
345  }
346 
347  return seeds;
348 }
349 
350 StatusCode CombinatorialNSWSeedFinderAlg::execute(const EventContext &ctx) const {
351  // read the inputs
352  const EtaHoughMaxContainer *maxima{nullptr};
353  ATH_CHECK(retrieveContainer(ctx, m_etaKey, maxima));
354 
355  const ActsGeometryContext *gctx{nullptr};
356  ATH_CHECK(retrieveContainer(ctx, m_geoCtxKey, gctx));
357 
358  // prepare our output collection
359  SG::WriteHandle writeMaxima{m_writeKey, ctx};
360  ATH_CHECK(writeMaxima.record(std::make_unique<SegmentSeedContainer>()));
361 
362  // we use the information from the previous eta-hough transform
363  // to get the combined hits that belong in the same maxima
364  for (const HoughMaximum *max : *maxima) {
365  std::vector<std::unique_ptr<SegmentSeed>> seeds = findSeedsFromMaximum(*max, *gctx);
366 
367  for(const auto& hitMax : max->getHitsInMax()){
368  ATH_MSG_VERBOSE("Hit "<<m_idHelperSvc->toString(hitMax->identify())<<", "
369  <<Amg::toString(hitMax->positionInChamber())<<", dir: "<<Amg::toString(hitMax->directionInChamber()));
370  }
371 
372  for (auto &seed : seeds) {
373  ATH_MSG_VERBOSE("Seed tanTheta = "<<seed->tanTheta()<<", y0 = "<<seed->interceptY()
374  <<", tanPhi = "<<seed->tanPhi()<<", x0 = "<<seed->interceptX()<<", hits in the seed "<<seed->getHitsInMax().size());
375 
376  for(const auto& hit : seed->getHitsInMax()){
377  ATH_MSG_VERBOSE("Hit "<<m_idHelperSvc->toString(hit->identify())<<", "
378  <<Amg::toString(hit->positionInChamber())<<", dir: "<<Amg::toString(hit->directionInChamber()));
379  }
380  if (m_visionTool.isEnabled()) {
381  m_visionTool->visualizeSeed(ctx, *seed, "#phi-combinatorialSeed");
382  }
383  writeMaxima->push_back(std::move(seed));
384  }
385  }
386 
387 
388  return StatusCode::SUCCESS;
389 }
390 
391 } // namespace MuonR4
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
MuonR4::minLayers
constexpr unsigned int minLayers
Definition: CombinatorialNSWSeedFinderAlg.cxx:30
UncalibratedMeasurement.h
MuonSimHitHelpers.h
xAOD::MuonSimHit_v1
Definition: MuonSimHit_v1.h:18
MuonR4::CombinatorialNSWSeedFinderAlg::findHitInWindow
HitWindow findHitInWindow(const Amg::Vector3D &startPos, const SpacePoint *testHit, const Amg::Vector3D &dirEstUp, const Amg::Vector3D &dirEstDn) const
Definition: CombinatorialNSWSeedFinderAlg.cxx:63
MuonGMR4::StripDesign::stereoAngle
double stereoAngle() const
Returns the value of the stereo angle.
MuonGMR4::MmReadoutElement
Definition: MmReadoutElement.h:19
MuonGMR4::StripDesign
Definition: StripDesign.h:30
MuonR4::SpacePoint::type
xAOD::UncalibMeasType type() const
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:131
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
get_generator_info.result
result
Definition: get_generator_info.py:21
MuonGMR4::MuonReadoutElement::msSector
const SpectrometerSector * msSector() const
Returns the pointer to the envelope volume enclosing all chambers in the sector.
xAOD::MuonSimHit_v1::identify
Identifier identify() const
Returns the global ATLAS identifier of the SimHit.
Definition: xAODMuonSimHit_V1.cxx:42
vtune_athena.format
format
Definition: vtune_athena.py:14
xAOD::MMCluster_v1
Definition: MMCluster_v1.h:20
MuonR4::CombinatorialNSWSeedFinderAlg::initialize
virtual StatusCode initialize() override
Definition: CombinatorialNSWSeedFinderAlg.cxx:32
MuonR4::SpacePointPerLayerSorter
The SpacePointPerLayerSorter groups the space points by their layer Identifier.
Definition: SpacePointPerLayerSorter.h:14
MuonR4::CombinatorialNSWSeedFinderAlg::findCombinatoricHits
HitLayVec findCombinatoricHits(const Amg::Vector3D &beamSpot, const HitLayVec &combinatoricLayers) const
Definition: CombinatorialNSWSeedFinderAlg.cxx:103
VisualizationHelpers.h
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
MuonR4::SpacePoint::planeNormal
Amg::Vector3D planeNormal() const
Returns the vector pointing out of the measurement plane.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:128
xAOD::UncalibMeasType::MMClusterType
@ MMClusterType
module_driven_slicing.layers
layers
Definition: module_driven_slicing.py:114
xAOD::MMCluster_v1::readoutElement
const MuonGMR4::MmReadoutElement * readoutElement() const
Retrieve the associated MmReadoutElement.
MuonR4::HitVec
SpacePointPerLayerSorter::HitVec HitVec
Definition: SpacePointPerLayerSorter.cxx:9
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
MuonR4::HitWindow::tooLow
@ tooLow
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
MuonR4::CombinatorialNSWSeedFinderAlg::m_visionTool
ToolHandle< MuonValR4::IPatternVisualizationTool > m_visionTool
Pattern visualization tool.
Definition: CombinatorialNSWSeedFinderAlg.h:98
SG::ReadHandleKey< ContainerType >
x
#define x
MuonValR4::drawLabel
std::unique_ptr< TLatex > drawLabel(const std::string &text, const double xPos, const double yPos, const unsigned int fontSize=18)
Create a TLatex label,.
Definition: VisualizationHelpers.cxx:32
MuonR4::CombinatorialNSWSeedFinderAlg::extendHits
HitVec extendHits(const Amg::Vector3D &startPos, const Amg::Vector3D &direction, const HitLayVec &stripHitsLayers) const
Definition: CombinatorialNSWSeedFinderAlg.cxx:165
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
LArG4FSStartPointFilterLegacy.execute
execute
Definition: LArG4FSStartPointFilterLegacy.py:20
MuonR4::SpacePoint::primaryMeasurement
const xAOD::UncalibratedMeasurement * primaryMeasurement() const
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:107
MuonR4::houghTanPhi
double houghTanPhi(const Amg::Vector3D &v)
: Returns the hough tanPhi [x] / [z]
Definition: SegmentFitterEventData.cxx:18
MuonR4::SegmentFitHelpers::chiSqTermStrip
double chiSqTermStrip(const Amg::Vector3D &posInChamber, const Amg::Vector3D &dirInChamber, const SpacePoint &measurement, MsgStream &msg)
Calculates the chi2 contribuation to a linear segment line from an uncalibrated strip measurement.
Definition: SegmentFitHelperFunctions.cxx:76
MuonR4::CombinatorialNSWSeedFinderAlg::m_geoCtxKey
SG::ReadHandleKey< ActsGeometryContext > m_geoCtxKey
Definition: CombinatorialNSWSeedFinderAlg.h:64
xAOD::UncalibratedMeasurement_v1
Definition: UncalibratedMeasurement_v1.h:13
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
MuonGMR4::MmReadoutElement::multilayer
int multilayer() const
Returns the multi layer of the element [1-2].
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
xAOD::UncalibratedMeasurement_v1::type
virtual xAOD::UncalibMeasType type() const =0
Returns the type of the measurement type as a simple enumeration.
lumiFormat.i
int i
Definition: lumiFormat.py:85
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
SegmentFitHelperFunctions.h
MuonGMR4::SpectrometerSector::globalToLocalTrans
Amg::Transform3D globalToLocalTrans(const ActsGeometryContext &gctx) const
Returns the global -> local transformation from the ATLAS global.
Definition: SpectrometerSector.cxx:54
MuonR4::HitWindow
HitWindow
Definition: CombinatorialNSWSeedFinderAlg.h:32
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
MuonR4::CombinatorialNSWSeedFinderAlg::m_writeKey
SG::WriteHandleKey< SegmentSeedContainer > m_writeKey
Definition: CombinatorialNSWSeedFinderAlg.h:61
MuonR4::CombinatorialSeedSolver::seedSolution
requires acceptedContainer< spacePointContainer > &&hasPointerValues< spacePointContainer > std::pair< Amg::Vector3D, Amg::Vector3D > seedSolution(const spacePointContainer &spacePoints, const std::array< double, 4 > &parameters)
solves the equation system to calculate the seed
Definition: CombinatorialSeedSolver.h:127
MmIdHelper.h
AnalysisUtils::copy_if
Out copy_if(In first, const In &last, Out res, const Pred &p)
Definition: IFilterUtils.h:30
python.StandardJetMods.pull
pull
Definition: StandardJetMods.py:282
xAOD::MuonSimHit_v1::localDirection
ConstVectorMap< 3 > localDirection() const
Returns the local direction of the traversing particle.
Definition: xAODMuonSimHit_V1.cxx:66
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
MuonR4::HitLayVec
SpacePointPerLayerSorter::HitLayVec HitLayVec
Definition: CombinatorialNSWSeedFinderAlg.h:29
ActsGeometryContext
Include the GeoPrimitives which need to be put first.
Definition: ActsGeometryContext.h:27
MuonR4::SpacePoint
The muon space point is the combination of two uncalibrated measurements one of them measures the eta...
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/MuonSpacePoint/SpacePoint.h:18
MuonGMR4::MmReadoutElement::stripLayer
const StripLayer & stripLayer(const Identifier &measId) const
MuonR4::SpacePoint::directionInChamber
const Amg::Vector3D & directionInChamber() const
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:122
MuonR4::CombinatorialNSWSeedFinderAlg::m_windowTheta
DoubleProperty m_windowTheta
Definition: CombinatorialNSWSeedFinderAlg.h:92
MuonValR4::IPatternVisualizationTool::PrimitiveVec
std::vector< PrimitivePtr > PrimitiveVec
Definition: IPatternVisualizationTool.h:31
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
CombinatorialNSWSeedFinderAlg.h
MuonR4::HitWindow::inside
@ inside
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonR4::CombinatorialNSWSeedFinderAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: CombinatorialNSWSeedFinderAlg.h:67
MuonR4::CombinatorialNSWSeedFinderAlg::m_etaKey
SG::ReadHandleKey< EtaHoughMaxContainer > m_etaKey
Definition: CombinatorialNSWSeedFinderAlg.h:58
MuonGMR4::StripLayer::design
const StripDesign & design() const
Returns the underlying strip design.
Amg::dirFromAngles
Amg::Vector3D dirFromAngles(const double phi, const double theta)
Constructs a direction vector from the azimuthal & polar angles.
Definition: GeoPrimitivesHelpers.h:299
MuonR4
This header ties the generic definitions in this package.
Definition: HoughEventData.h:16
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:73
MuonR4::SpacePoint::positionInChamber
const Amg::Vector3D & positionInChamber() const
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:119
MuonR4::HoughMaximum
Data class to represent an eta maximum in hough space.
Definition: HoughMaximum.h:14
SegmentFitterEventData.h
MuonR4::CombinatorialSeedSolver::defineParameters
requires acceptedContainer< spacePointContainer > &&hasPointerValues< spacePointContainer > std::array< double, 4 > defineParameters(AmgSymMatrix(2) betaMatrix, const spacePointContainer &spacePoints)
calculates the parameters lamda,alpha,gamma,kappa of the system
Definition: CombinatorialSeedSolver.h:97
unit
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
Definition: AmgMatrixBasePlugin.h:21
AthCommonMsg< Gaudi::Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
MuonR4::CombinatorialNSWSeedFinderAlg::buildSegmentSeed
std::unique_ptr< SegmentSeed > buildSegmentSeed(HitVec &hits, const AmgSymMatrix(2)&bMatrix, const HoughMaximum &max, const HitLayVec &extensionLayers) const
Definition: CombinatorialNSWSeedFinderAlg.cxx:214
xAOD::MuonSimHit_v1::localPosition
ConstVectorMap< 3 > localPosition() const
Returns the local postion of the traversing particle.
Definition: xAODMuonSimHit_V1.cxx:60
MuonR4::CombinatorialNSWSeedFinderAlg::m_detMgr
const MuonGMR4::MuonDetectorManager * m_detMgr
Definition: CombinatorialNSWSeedFinderAlg.h:70
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
MuonGMR4::MuonReadoutElement::localToGlobalTrans
const Amg::Transform3D & localToGlobalTrans(const ActsGeometryContext &ctx) const
Returns the local to global transformation into the ATLAS coordinate system.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx:81
MuonR4::getTruthMatchedHit
const xAOD::MuonSimHit * getTruthMatchedHit(const xAOD::UncalibratedMeasurement &prdHit)
Returns the MuonSimHit, if there's any, matched to the uncalibrated muon measurement.
Definition: MuonSimHitHelpers.cxx:13
MMCluster.h
python.BuildSignatureFlags.beamSpot
AthConfigFlags beamSpot(AthConfigFlags flags, str instanceName, str recoMode)
Definition: BuildSignatureFlags.py:455
MuonGMR4::StripDesign::hasStereoAngle
bool hasStereoAngle() const
Returns whether a stereo angle is defined.
CombinatorialSeedSolver.h
PowhegControl_ttFCNC_NLO.params
params
Definition: PowhegControl_ttFCNC_NLO.py:226
MuonR4::HitWindow::tooHigh
@ tooHigh
MuonR4::AmgSymMatrix
const AmgSymMatrix(2) &SpacePoint
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:150
MuonR4::CombinatorialNSWSeedFinderAlg::retrieveContainer
StatusCode retrieveContainer(const EventContext &ctx, const SG::ReadHandleKey< ContainerType > &key, const ContainerType *&contToPush) const
Helper method to fetch data from StoreGate.
Definition: CombinatorialNSWSeedFinderAlg.cxx:49
SpacePointPerLayerSorter.h
MuonR4::houghTanTheta
double houghTanTheta(const Amg::Vector3D &v)
Returns the hough tanTheta [y] / [z].
Definition: SegmentFitterEventData.cxx:14
MuonR4::CombinatorialNSWSeedFinderAlg::findSeedsFromMaximum
std::vector< std::unique_ptr< SegmentSeed > > findSeedsFromMaximum(const HoughMaximum &max, const ActsGeometryContext &gctx) const
Definition: CombinatorialNSWSeedFinderAlg.cxx:259
MuonR4::getMatchingSimHits
std::unordered_set< const xAOD::MuonSimHit * > getMatchingSimHits(const xAOD::MuonSegment &segment)
: Returns all sim hits matched to a xAOD::MuonSegment
Definition: MuonSimHitHelpers.cxx:24
HepMCHelpers.h
MuonR4::SpacePoint::identify
const Identifier & identify() const
: Identifier of the primary measurement
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:140
fitman.k
k
Definition: fitman.py:528
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
isMuon
bool isMuon(const T &p)
Definition: AtlasPID.h:176
MuonR4::CombinatorialNSWSeedFinderAlg::m_minPullThreshold
DoubleProperty m_minPullThreshold
Definition: CombinatorialNSWSeedFinderAlg.h:95