ATLAS Offline Software
SegmentSeed.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 
7 #include "Acts/Utilities/UnitVectors.hpp"
8 
9 using namespace Acts;
10 namespace MuonR4{
11  SegmentSeed::SegmentSeed(double tanBeta, double interceptY, double tanAlpha,
12  double interceptX, double counts,
13  std::vector<HitType>&& hits,
14  const SpacePointBucket* bucket):
15  m_parent{bucket},
16  m_hits{std::move(hits)},
17  m_hasPhiExt{true},
18  m_counts{counts}{
19  const Amg::Vector3D dir = makeDirectionFromAxisTangents(tanAlpha, tanBeta);
20  using enum SegmentFit::ParamDefs;
21  m_pars[toUnderlying(x0)] = interceptX;
22  m_pars[toUnderlying(y0)] = interceptY;
23  m_pars[toUnderlying(theta)] = dir.theta();
24  m_pars[toUnderlying(phi)] = dir.phi();
25  }
27  m_parent{toCopy.parentBucket()},
28  m_hits{toCopy.getHitsInMax()},
29  m_counts{toCopy.getCounts()}{
30  const Amg::Vector3D dir = makeDirectionFromAxisTangents(0., toCopy.tanBeta());
31  using enum SegmentFit::ParamDefs;
32  m_pars[toUnderlying(y0)] = toCopy.interceptY();
33  m_pars[toUnderlying(theta)] = dir.theta();
34  m_pars[toUnderlying(phi)] = dir.phi();
35  }
36  double SegmentSeed::tanAlpha() const { return houghTanAlpha(localDirection()); }
37  double SegmentSeed::tanBeta() const { return houghTanBeta(localDirection()); }
38  double SegmentSeed::interceptX() const {
39  using enum SegmentFit::ParamDefs;
40  return m_pars[toUnderlying(x0)];
41  }
42  double SegmentSeed::interceptY() const {
43  using enum SegmentFit::ParamDefs;
44  return m_pars[toUnderlying(y0)];
45  }
47  double SegmentSeed::getCounts() const{ return m_counts;}
48  const std::vector<SegmentSeed::HitType>& SegmentSeed::getHitsInMax() const { return m_hits; }
51  bool SegmentSeed::hasPhiExtension() const{ return m_hasPhiExt; }
54  using enum SegmentFit::ParamDefs;;
55  return makeDirectionFromPhiTheta(m_pars[toUnderlying(phi)], m_pars[toUnderlying(theta)]);
56  }
57 }
MuonR4::SegmentSeed::parentBucket
const SpacePointBucket * parentBucket() const
Returns the bucket out of which the seed was formed.
Definition: SegmentSeed.cxx:49
MuonR4::SegmentSeed::m_hits
std::vector< HitType > m_hits
List of associated hits.
Definition: SegmentSeed.h:76
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
MuonR4::SegmentSeed::localPosition
Amg::Vector3D localPosition() const
Returns the position of the seed in the sector frame.
Definition: SegmentSeed.cxx:52
MuonGMR4::SpectrometerSector
A spectrometer sector forms the envelope of all chambers that are placed in the same MS sector & laye...
Definition: SpectrometerSector.h:40
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
MuonR4::SpacePointBucket
: The muon space point bucket represents a collection of points that will bre processed together in t...
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/MuonSpacePoint/SpacePointContainer.h:21
MuonR4::SpacePointBucket::msSector
const MuonGMR4::SpectrometerSector * msSector() const
returns th associated muonChamber
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/MuonSpacePoint/SpacePointContainer.h:33
SegmentSeed.h
theta
Scalar theta() const
theta method
Definition: AmgMatrixBasePlugin.h:75
MuonR4::SegmentFit::ParamDefs
SeedingAux::FitParIndex ParamDefs
Use the same parameter indices as used by the CompSpacePointAuxiliaries.
Definition: MuonHoughDefs.h:38
MuonR4::SegmentSeed::m_counts
double m_counts
Effective countsfrom the hough seed.
Definition: SegmentSeed.h:80
MuonR4::houghTanBeta
double houghTanBeta(const Amg::Vector3D &v)
Returns the hough tanBeta [y] / [z].
Definition: SegmentFitterEventData.cxx:26
MuonR4::SegmentSeed::tanAlpha
double tanAlpha() const
Returns the angle from the phi extension.
Definition: SegmentSeed.cxx:36
MuonR4::SegmentSeed::hasPhiExtension
bool hasPhiExtension() const
check whether the segment seed includes a valid phi extension
Definition: SegmentSeed.cxx:51
Acts
Definition: MuonSpectrometer/MuonPhaseII/Event/xAOD/xAODMuonPrepData/xAODMuonPrepData/UtilFunctions.h:20
L1TopoRatesCalculator_submatrix_plotter.counts
counts
Definition: L1TopoRatesCalculator_submatrix_plotter.py:74
MuonR4::HoughMaximum::parentBucket
const SpacePointBucket * parentBucket() const
getter
Definition: HoughMaximum.h:51
MuonR4::SegmentSeed::interceptY
double interceptY() const
Returns the intercept coordinate of the eta transform.
Definition: SegmentSeed.cxx:42
MuonR4::SegmentSeed::getHitsInMax
const std::vector< HitType > & getHitsInMax() const
Returns the list of assigned hits.
Definition: SegmentSeed.cxx:48
MuonR4::SegmentFit::Parameters
Acts::Experimental::CompositeSpacePointLineFitter::ParamVec_t Parameters
Definition: MuonHoughDefs.h:46
MuonR4::SegmentSeed::m_hasPhiExt
bool m_hasPhiExt
Does the sed have a phi extension.
Definition: SegmentSeed.h:78
MuonR4::SegmentSeed::m_parent
const SpacePointBucket * m_parent
Pointer to the parent.
Definition: SegmentSeed.h:74
MuonR4::SegmentSeed::m_pars
Parameters m_pars
Set of defining parameters.
Definition: SegmentSeed.h:72
beamspotman.dir
string dir
Definition: beamspotman.py:619
MuonR4::SegmentSeed::SegmentSeed
SegmentSeed(double tanBeta, double interceptY, double tanAlpha, double interceptX, double counts, std::vector< HitType > &&hits, const SpacePointBucket *bucket)
Constructor to write a segment seed from an eta maximum and a valid phi extension.
Definition: SegmentSeed.cxx:11
MuonR4::SegmentSeed::tanBeta
double tanBeta() const
Returns the angular coordinate of the eta transform.
Definition: SegmentSeed.cxx:37
MuonR4::SegmentSeed::interceptX
double interceptX() const
Returns the intercept from the phi extension.
Definition: SegmentSeed.cxx:38
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonR4
This header ties the generic definitions in this package.
Definition: HoughEventData.h:16
MuonR4::SegmentSeed::localDirection
Amg::Vector3D localDirection() const
Returns the direction of the seed in the sector frame.
Definition: SegmentSeed.cxx:53
MuonR4::SegmentSeed::getCounts
double getCounts() const
Definition: SegmentSeed.cxx:47
MuonR4::HoughMaximum
Data class to represent an eta maximum in hough space.
Definition: HoughMaximum.h:14
MuonR4::SegmentSeed::parameters
const Parameters & parameters() const
Returns the parameter array.
Definition: SegmentSeed.cxx:46
MuonR4::houghTanAlpha
double houghTanAlpha(const Amg::Vector3D &v)
: Returns the hough tanAlpha [x] / [z]
Definition: SegmentFitterEventData.cxx:30
MuonR4::SegmentSeed::msSector
const MuonGMR4::SpectrometerSector * msSector() const
Returns the associated chamber.
Definition: SegmentSeed.cxx:50