ATLAS Offline Software
Loading...
Searching...
No Matches
MuonR4::SegmentFit::SeederStateBase Struct Reference

Helper struct to delegate the EDM interactions with the space point container during the seeding from Acts to the Athena EDM. More...

#include <MdtSegmentSeedGenerator.h>

Inheritance diagram for MuonR4::SegmentFit::SeederStateBase:
Collaboration diagram for MuonR4::SegmentFit::SeederStateBase:

Public Types

using CalibCont_t = Segment::MeasVec
 Abrivation of the collection of calibrated space points.
using HitVec = std::vector<const SpacePoint*>
using HitLayVec = std::vector<HitVec>

Public Member Functions

const SegmentSeedparent () const
 Returns the parent seed from which the state is constructed.
bool goodCandidate (const SpacePoint &testMdt) const
 Returns whether the hit is a good candidate for seeding.
double candidateChi2 (const Acts::CalibrationContext &cctx, const Amg::Vector3D &seedPos, const Amg::Vector3D &seedDir, const double t0, const SpacePoint &candidate) const
 Returns the pull of the candidate w.r.t.
double strawRadius (const SpacePoint &testMdt) const
 Returns the outer tube radius of the space point.
CalibCont_t newContainer (const Acts::CalibrationContext &cctx) const
 Creates a new candidate seed container.
void append (const Acts::CalibrationContext &cctx, const Amg::Vector3D &pos, const Amg::Vector3D &dir, const double t0, const SpacePoint &appendMe, CalibCont_t &appendTo) const
 Appends the space point measurement to the candidate seed container Optionally, the hit may be calibrated.
bool stopSeeding (const std::size_t lowerLayer, const std::size_t upperLayer) const
 Requests whether the seed line generation shall be stopped based on the pair of.
bool goodForSeeding (const Amg::Vector3D &tangentPos, const Amg::Vector3D &tangentDir) const
 Selector function to remove the two line tangent seed using external constaints (e.g.
const HitLayVecmdtHits () const
 Returns the sorted Mdt hits.
const HitLayVecstrawHits () const
 Returns the sorted Mdt hits.
std::size_t nMdtHits () const
 Returns the number of all Mdt hits in the seed.
const HitLayVecstripHits () const
 Returns the sorted strip hits.
std::size_t nStripHits () const
 Returns the number of all strip hits in the seed.
std::size_t firstLayerFrom2ndMl () const
 Returns the layer index with hits from the second multilayer.

Protected Types

using SeedSelector_t
 Selector function to sort out seed lines that are incompatible with external geometrical constaints e.g.

Protected Member Functions

 SeederStateBase (const SegmentSeed *parentSeed, const ISpacePointCalibrator *calibrator, const bool calibratedPull, SeedSelector_t &&seedSelector=nullptr)
 Protected constructor to prevent instantiation from anything else than the seeder state.

Private Attributes

const SegmentSeedm_parent {}
const ISpacePointCalibratorm_calibrator {nullptr}
bool m_calibratePull {false}
const SeedSelector_t m_selector {nullptr}
HitLayVec m_mdtLayers {}
 Sorted Mdt hits per tube layer.
HitLayVec m_stripLayers {}
 Sorted Strip hits per gasGap strip.
std::size_t m_nMdtHits {0}
 Number of all Mdt tube hits.
std::size_t m_nStripHits {0}
 Number of all strip hits.
std::size_t m_tubeLaySwitch {std::numeric_limits<std::size_t>::max()}
 Index of the first tube-layer from the second multilayer.

Detailed Description

Helper struct to delegate the EDM interactions with the space point container during the seeding from Acts to the Athena EDM.

Definition at line 22 of file MdtSegmentSeedGenerator.h.

Member Typedef Documentation

◆ CalibCont_t

Abrivation of the collection of calibrated space points.

Definition at line 45 of file MdtSegmentSeedGenerator.h.

◆ HitLayVec

using MuonR4::SpacePointPerLayerSplitter::HitLayVec = std::vector<HitVec>
inherited

Definition at line 21 of file SpacePointPerLayerSplitter.h.

◆ HitVec

Definition at line 20 of file SpacePointPerLayerSplitter.h.

◆ SeedSelector_t

Initial value:
std::function<bool(const Amg::Vector3D& pos,
const Amg::Vector3D& dir)>
Eigen::Matrix< double, 3, 1 > Vector3D

Selector function to sort out seed lines that are incompatible with external geometrical constaints e.g.

beampot

Definition at line 26 of file MdtSegmentSeedGenerator.h.

Constructor & Destructor Documentation

◆ SeederStateBase()

MuonR4::SegmentFit::SeederStateBase::SeederStateBase ( const SegmentSeed * parentSeed,
const ISpacePointCalibrator * calibrator,
const bool calibratedPull,
SeedSelector_t && seedSelector = nullptr )
explicitprotected

Protected constructor to prevent instantiation from anything else than the seeder state.

Parameters
parentSeedPointer to the HoughSeed from which all the Mdt segment seeds are constructed
calibratorPointer to the calibrator to be used to construct the calibrated space points and (optionally) to refine the pull calculation
calibratedPullFirst calibrate the space point before calculating the pull w.r.t. seed line
seedSelectorUtility function to reject bad drift circle seeds based on geometrical constaints

Definition at line 23 of file MdtSegmentSeedGenerator.cxx.

26 :
27 SpacePointPerLayerSplitter{parentSeed->getHitsInMax()},
28 m_parent{parentSeed},
29 m_calibrator{calibrator},
30 m_calibratePull{calibratePull},
31 m_selector{std::move(seedSelector)} {}
SpacePointPerLayerSplitter(const SpacePointBucket &bucket)
Constructor taking a complete bucket.
const ISpacePointCalibrator * m_calibrator

Member Function Documentation

◆ append()

void MuonR4::SegmentFit::SeederStateBase::append ( const Acts::CalibrationContext & cctx,
const Amg::Vector3D & pos,
const Amg::Vector3D & dir,
const double t0,
const SpacePoint & appendMe,
CalibCont_t & appendTo ) const

Appends the space point measurement to the candidate seed container Optionally, the hit may be calibrated.

Parameters
cctxCalibration context to access the conditions data
posReference position of the seed line
dirReference direction of the seed line
t0Offset in the time of arrival (Acts units)
appendMeSpace point candidate to append to the container
appendToOutput container to which the space point is appended

Definition at line 71 of file MdtSegmentSeedGenerator.cxx.

76 {
77 const EventContext& ctx{*cctx.get<const EventContext*>()};
78 appendTo.push_back(m_calibrator->calibrate(ctx, &appendMe, pos, dir, t0));
79 }
static Double_t t0

◆ candidateChi2()

double MuonR4::SegmentFit::SeederStateBase::candidateChi2 ( const Acts::CalibrationContext & cctx,
const Amg::Vector3D & seedPos,
const Amg::Vector3D & seedDir,
const double t0,
const SpacePoint & candidate ) const

Returns the pull of the candidate w.r.t.

the line & the time offset

Parameters
cctxCalibration context to access the conditions data
seedPosReference position of the seed line
seedDirReference direction of the seed line
t0Offset in the time of arrival (Acts units)
candidateSpace point which chi2 is to be evaluated

Definition at line 54 of file MdtSegmentSeedGenerator.cxx.

58 {
59 if (m_calibratePull) {
60 const EventContext& ctx{*cctx.get<const EventContext*>()};
61 auto calibSp = m_calibrator->calibrate(ctx, &candidate, seedPos, seedDir, t0);
62 assert(calibSp != nullptr);
63 return SeedingAux::chi2Term(seedPos, seedDir, *calibSp);
64 }
65 return SeedingAux::chi2Term(seedPos, seedDir, candidate);
66 }

◆ firstLayerFrom2ndMl()

std::size_t MuonR4::SpacePointPerLayerSplitter::firstLayerFrom2ndMl ( ) const
inlineinherited

Returns the layer index with hits from the second multilayer.

Definition at line 47 of file SpacePointPerLayerSplitter.h.

47 {
48 return m_tubeLaySwitch;
49 }
std::size_t m_tubeLaySwitch
Index of the first tube-layer from the second multilayer.

◆ goodCandidate()

bool MuonR4::SegmentFit::SeederStateBase::goodCandidate ( const SpacePoint & testMdt) const

Returns whether the hit is a good candidate for seeding.

Parameters
testMdtReference to the space point considered for seeding

Definition at line 40 of file MdtSegmentSeedGenerator.cxx.

40 {
41 switch (testMdt.type()) {
42 using enum xAOD::UncalibMeasType;
44 return static_cast<const xAOD::MdtDriftCircle*>(testMdt.primaryMeasurement())->status() ==
45 Muon::MdtDriftCircleStatus::MdtStatusDriftTime;
46 case RpcStripType:
47 case TgcStripType:
48 return true;
49 default:
50 return false;
51 }
52 return false;
53 }
MdtDriftCircleStatus status() const
Returns the status of the measurement.
MdtDriftCircle_v1 MdtDriftCircle
UncalibMeasType
Define the type of the uncalibrated measurement.

◆ goodForSeeding()

bool MuonR4::SegmentFit::SeederStateBase::goodForSeeding ( const Amg::Vector3D & tangentPos,
const Amg::Vector3D & tangentDir ) const

Selector function to remove the two line tangent seed using external constaints (e.g.

beamspot)

Parameters
tangentPosPosition of the seed line
tangentDirDirection of the seed line

Definition at line 85 of file MdtSegmentSeedGenerator.cxx.

86 {
87 return !m_selector || m_selector(tangentPos, tangentDir);
88 }

◆ mdtHits()

const HitLayVec & MuonR4::SpacePointPerLayerSplitter::mdtHits ( ) const
inlineinherited

Returns the sorted Mdt hits.

Definition at line 27 of file SpacePointPerLayerSplitter.h.

27 {
28 return m_mdtLayers;
29 }
HitLayVec m_mdtLayers
Sorted Mdt hits per tube layer.

◆ newContainer()

SeederStateBase::CalibCont_t MuonR4::SegmentFit::SeederStateBase::newContainer ( const Acts::CalibrationContext & cctx) const

Creates a new candidate seed container.

Parameters
cctxCalibration context (defined by the interface)

Definition at line 68 of file MdtSegmentSeedGenerator.cxx.

68 {
69 return CalibCont_t{};
70 }
Segment::MeasVec CalibCont_t
Abrivation of the collection of calibrated space points.

◆ nMdtHits()

std::size_t MuonR4::SpacePointPerLayerSplitter::nMdtHits ( ) const
inlineinherited

Returns the number of all Mdt hits in the seed.

Definition at line 35 of file SpacePointPerLayerSplitter.h.

35 {
36 return m_nMdtHits;
37 }
std::size_t m_nMdtHits
Number of all Mdt tube hits.

◆ nStripHits()

std::size_t MuonR4::SpacePointPerLayerSplitter::nStripHits ( ) const
inlineinherited

Returns the number of all strip hits in the seed.

Definition at line 43 of file SpacePointPerLayerSplitter.h.

43 {
44 return m_nStripHits;
45 }
std::size_t m_nStripHits
Number of all strip hits.

◆ parent()

const SegmentSeed * MuonR4::SegmentFit::SeederStateBase::parent ( ) const

Returns the parent seed from which the state is constructed.

Definition at line 33 of file MdtSegmentSeedGenerator.cxx.

33{ return m_parent; }

◆ stopSeeding()

bool MuonR4::SegmentFit::SeederStateBase::stopSeeding ( const std::size_t lowerLayer,
const std::size_t upperLayer ) const

Requests whether the seed line generation shall be stopped based on the pair of.

Parameters
lowerLayerIndex of the lower hit layer from which the seed circles are picked
upperLayerIndex of the upper hit layer from which the seed circles are picked

Definition at line 80 of file MdtSegmentSeedGenerator.cxx.

81 {
82 return lowerLayer >= firstLayerFrom2ndMl() || lowerLayer >= upperLayer;
83 }
std::size_t firstLayerFrom2ndMl() const
Returns the layer index with hits from the second multilayer.

◆ strawHits()

const HitLayVec & MuonR4::SpacePointPerLayerSplitter::strawHits ( ) const
inlineinherited

Returns the sorted Mdt hits.

Definition at line 31 of file SpacePointPerLayerSplitter.h.

31 {
32 return m_mdtLayers;
33 }

◆ strawRadius()

double MuonR4::SegmentFit::SeederStateBase::strawRadius ( const SpacePoint & testMdt) const

Returns the outer tube radius of the space point.

Parameters
testMdtReference to the Mdt space point of interest

Definition at line 35 of file MdtSegmentSeedGenerator.cxx.

35 {
36 assert(testMdt.type() == xAOD::UncalibMeasType::MdtDriftCircleType);
37 return static_cast<const xAOD::MdtDriftCircle*>(testMdt.primaryMeasurement())
39 }
double tubeRadius() const
Adds the thickness of the tube wall onto the radius.
virtual const MuonGMR4::MdtReadoutElement * readoutElement() const override final
Retrieve the associated MdtReadoutElement.

◆ stripHits()

const HitLayVec & MuonR4::SpacePointPerLayerSplitter::stripHits ( ) const
inlineinherited

Returns the sorted strip hits.

Definition at line 39 of file SpacePointPerLayerSplitter.h.

39 {
40 return m_stripLayers;
41 }
HitLayVec m_stripLayers
Sorted Strip hits per gasGap strip.

Member Data Documentation

◆ m_calibratePull

bool MuonR4::SegmentFit::SeederStateBase::m_calibratePull {false}
private

Definition at line 98 of file MdtSegmentSeedGenerator.h.

98{false};

◆ m_calibrator

const ISpacePointCalibrator* MuonR4::SegmentFit::SeederStateBase::m_calibrator {nullptr}
private

Definition at line 97 of file MdtSegmentSeedGenerator.h.

97{nullptr};

◆ m_mdtLayers

HitLayVec MuonR4::SpacePointPerLayerSplitter::m_mdtLayers {}
privateinherited

Sorted Mdt hits per tube layer.

Definition at line 52 of file SpacePointPerLayerSplitter.h.

52{};

◆ m_nMdtHits

std::size_t MuonR4::SpacePointPerLayerSplitter::m_nMdtHits {0}
privateinherited

Number of all Mdt tube hits.

Definition at line 56 of file SpacePointPerLayerSplitter.h.

56{0};

◆ m_nStripHits

std::size_t MuonR4::SpacePointPerLayerSplitter::m_nStripHits {0}
privateinherited

Number of all strip hits.

Definition at line 58 of file SpacePointPerLayerSplitter.h.

58{0};

◆ m_parent

const SegmentSeed* MuonR4::SegmentFit::SeederStateBase::m_parent {}
private

Definition at line 96 of file MdtSegmentSeedGenerator.h.

96{};

◆ m_selector

const SeedSelector_t MuonR4::SegmentFit::SeederStateBase::m_selector {nullptr}
private

Definition at line 99 of file MdtSegmentSeedGenerator.h.

99{nullptr};

◆ m_stripLayers

HitLayVec MuonR4::SpacePointPerLayerSplitter::m_stripLayers {}
privateinherited

Sorted Strip hits per gasGap strip.

Definition at line 54 of file SpacePointPerLayerSplitter.h.

54{};

◆ m_tubeLaySwitch

std::size_t MuonR4::SpacePointPerLayerSplitter::m_tubeLaySwitch {std::numeric_limits<std::size_t>::max()}
privateinherited

Index of the first tube-layer from the second multilayer.

Definition at line 60 of file SpacePointPerLayerSplitter.h.

60{std::numeric_limits<std::size_t>::max()};

The documentation for this struct was generated from the following files: