ATLAS Offline Software
SegmentSeed.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 namespace MuonR4{
7  using namespace SegmentFit;
8  SegmentSeed::SegmentSeed(double tanTheta, double interceptY, double tanPhi,
9  double interceptX, double counts,
10  std::vector<HitType>&& hits,
11  const SpacePointBucket* bucket):
12  m_parent{bucket},
13  m_hits{std::move(hits)},
14  m_hasPhiExt{true},
15  m_counts{counts}{
16  const Amg::Vector3D dir = dirFromTangents(tanPhi, tanTheta);
17  m_pars[toInt(ParamDefs::x0)] = interceptX;
18  m_pars[toInt(ParamDefs::y0)] = interceptY;
19  m_pars[toInt(ParamDefs::theta)] = dir.theta();
20  m_pars[toInt(ParamDefs::phi)] = dir.phi();
21  }
23  m_parent{toCopy.parentBucket()},
24  m_hits{toCopy.getHitsInMax()},
25  m_counts{toCopy.getCounts()}{
26  const Amg::Vector3D dir = dirFromTangents(0., toCopy.tanTheta());
27  m_pars[toInt(ParamDefs::y0)] = toCopy.interceptY();
28  m_pars[toInt(ParamDefs::theta)] = dir.theta();
29  m_pars[toInt(ParamDefs::phi)] = dir.phi();
30  }
31  double SegmentSeed::tanPhi() const { return houghTanPhi(directionInChamber()); }
33  double SegmentSeed::interceptX() const { return m_pars[toInt(ParamDefs::x0)]; }
34  double SegmentSeed::interceptY() const {return m_pars[toInt(ParamDefs::y0)]; }
35  const Parameters& SegmentSeed::parameters() const { return m_pars; }
36  double SegmentSeed::getCounts() const{ return m_counts;}
37  const std::vector<SegmentSeed::HitType>& SegmentSeed::getHitsInMax() const { return m_hits; }
40  bool SegmentSeed::hasPhiExtension() const{ return m_hasPhiExt; }
44  }
45 }
MuonR4::SegmentSeed::parentBucket
const SpacePointBucket * parentBucket() const
Returns the bucket out of which the seed was formed.
Definition: SegmentSeed.cxx:38
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
MuonGMR4::SpectrometerSector
A spectrometer sector forms the envelope of all chambers that are placed in the same MS sector & laye...
Definition: SpectrometerSector.h:40
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:36
SegmentSeed.h
MuonR4::SegmentSeed::tanPhi
double tanPhi() const
Returns the angle from the phi extension.
Definition: SegmentSeed.cxx:31
MuonR4::SegmentSeed::Parameters
SegmentFit::Parameters Parameters
Definition: SegmentSeed.h:17
MuonR4::SegmentSeed::positionInChamber
Amg::Vector3D positionInChamber() const
Returns the position of the seed in the sector frame.
Definition: SegmentSeed.cxx:41
MuonR4::SegmentSeed::m_counts
double m_counts
Effective countsfrom the hough seed.
Definition: SegmentSeed.h:80
MuonR4::SegmentFit::ParamDefs::phi
@ phi
MuonR4::houghTanPhi
double houghTanPhi(const Amg::Vector3D &v)
: Returns the hough tanPhi [x] / [z]
Definition: SegmentFitterEventData.cxx:18
MuonR4::SegmentFit::dirFromTangents
Amg::Vector3D dirFromTangents(const double tanPhi, const double tanTheta)
Constructs a direction vector from tanPhi & tanTheta.
Definition: SegmentFitterEventData.cxx:23
MuonR4::SegmentSeed::SegmentSeed
SegmentSeed(double tanTheta, double interceptY, double tanPhi, 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:8
MuonR4::SegmentSeed::tanTheta
double tanTheta() const
Returns the angular coordinate of the eta transform.
Definition: SegmentSeed.cxx:32
MuonR4::SegmentSeed::hasPhiExtension
bool hasPhiExtension() const
check whether the segment seed includes a valid phi extension
Definition: SegmentSeed.cxx:40
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:34
MuonR4::SegmentSeed::getHitsInMax
const std::vector< HitType > & getHitsInMax() const
Returns the list of assigned hits.
Definition: SegmentSeed.cxx:37
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::SegmentFit::ParamDefs::x0
@ x0
MuonR4::SegmentSeed::m_pars
Parameters m_pars
Set of defining parameters.
Definition: SegmentSeed.h:72
beamspotman.dir
string dir
Definition: beamspotman.py:623
MuonR4::SegmentFit::ParamDefs::y0
@ y0
MuonR4::SegmentFit::toInt
constexpr int toInt(const ParamDefs p)
Definition: MuonHoughDefs.h:42
MuonR4::SegmentSeed::interceptX
double interceptX() const
Returns the intercept from the phi extension.
Definition: SegmentSeed.cxx:33
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
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
MuonR4::SegmentSeed::getCounts
double getCounts() const
Definition: SegmentSeed.cxx:36
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:35
MuonR4::SegmentSeed::directionInChamber
Amg::Vector3D directionInChamber() const
Returns the direction of the seed in the sector frame.
Definition: SegmentSeed.cxx:42
MuonR4::houghTanTheta
double houghTanTheta(const Amg::Vector3D &v)
Returns the hough tanTheta [y] / [z].
Definition: SegmentFitterEventData.cxx:14
MuonR4::SegmentFit::ParamDefs::theta
@ theta
MuonR4::SegmentSeed::msSector
const MuonGMR4::SpectrometerSector * msSector() const
Returns the associated chamber.
Definition: SegmentSeed.cxx:39