|
ATLAS Offline Software
|
Helper class to generate valid seeds for the segment fit.
More...
#include <MdtSegmentSeedGenerator.h>
|
using | SignComboType = std::array< int, 2 > |
| Sign combinations to draw the 4 lines tangent to 2 drift circles The first two are indicating whether the tangent is left/right to the first/second circle. More...
|
|
Helper class to generate valid seeds for the segment fit.
The generator first returns a seed directly made from the patten recogntion. Afterwards it builds seeds by lying tangent lines to a pair of drift circles. The pairing starts from the innermost & outermost layers with tubes. A valid seed must have at least 4 associated hits which are within a chi2 of 5. If two seeds within the parameter resolution are generated, then the latter one is skipped.
Definition at line 24 of file MdtSegmentSeedGenerator.h.
◆ HitVec
◆ SignComboType
Sign combinations to draw the 4 lines tangent to 2 drift circles The first two are indicating whether the tangent is left/right to the first/second circle.
The last sign is picking the sign of the solution arising from the final quadratic equation.
Definition at line 99 of file MdtSegmentSeedGenerator.h.
◆ MdtSegmentSeedGenerator()
Standard constructor taking the segmentSeed to start with and then few configuration tunes.
- Parameters
-
name | Name of the Seed generator's logger |
segmentSeed | Seed from which the seeds for the fit are built |
configuration | Passed configuration settings of the generator |
Check whether the first layer is too busy
Check whether the lower layer is too busy
Definition at line 41 of file MdtSegmentSeedGenerator.cxx.
51 return vec.size() > m_cfg.busyLayerLimit;
68 std::stringstream sstr{};
70 sstr<<
"Mdt-hits in layer "<<layCount<<
": "<<
layer.size()<<std::endl;
72 sstr<<
" **** "<<hit->msSector()->idHelperSvc()->toString(hit->identify())<<
" "
73 <<
Amg::toString(hit->positionInChamber())<<
", driftRadius: "<<hit->driftRadius()<<std::endl;
77 sstr<<
"Hits in layer "<<layCount<<
": "<<
layer.size()<<std::endl;
79 sstr<<
" **** "<<hit->msSector()->idHelperSvc()->toString(hit->identify())<<
" "
80 <<
Amg::toString(hit->positionInChamber())<<
", driftRadius: "<<hit->driftRadius()<<std::endl;
◆ ~MdtSegmentSeedGenerator()
MuonR4::MdtSegmentSeedGenerator::~MdtSegmentSeedGenerator |
( |
| ) |
|
|
default |
◆ buildSeed()
Tries to build the seed from the two hits.
Fails if the solution is invalid or if the seed has already been built before
- Parameters
-
topHit | Hit candidate from the upper layer |
bottomHit | Hit candidate from the lower layer |
sign | Object encoding whether the tangent is left / right
|
All other sign combinations will also get stuck -> force the measurement selector to get another combo
Create a new line position & direction which also takes the potential phi estimates into account
Recalculate the seed with the calibrated parameters
Check that the is within the predefined window
d/dx asin(x) = 1 / sqrt(1- x*x)
Collect all hits close to the seed line
what ever comes after is not matching onto the segment
Reject seeds with too litle Mdt hit association
Last check wheather another seed with the same left-right combination hasn't already been found
All seed hits are of the same size
Including the places where no seed hit was assigned. Both solutions match in terms of left-right solutions. It's very likely that they're converging to the same segment.
Seed candidate is
Add the solution to the list. That we don't iterate twice over it
If we found a long Mdt seed, then ensure that all subsequent seeds have at least the same amount of Mdt hits.
Associate strip hits
Add all hits with a pull better than the threshold
Definition at line 169 of file MdtSegmentSeedGenerator.cxx.
174 const auto* bottomPrd =
static_cast<const xAOD::MdtDriftCircle*
>(bottomHit->primaryMeasurement());
182 const auto&[signTop, signBot] = signs;
183 double R = signBot *bottomHit->driftRadius() - signTop * topHit->driftRadius();
184 const Amg::Vector3D& bottomPos{bottomHit->positionInChamber()};
188 const double thetaTubes = std::atan2(D.y(), D.z());
189 const double distTubes = std::hypot(D.y(), D.z());
190 ATH_MSG_VERBOSE(__func__<<
"() "<<__LINE__<<
": Bottom tube "<<idHelperSvc->toString(bottomHit->identify())<<
" "<<
Amg::toString(bottomPos)
191 <<
", driftRadius: "<<bottomHit->driftRadius()<<
" - top tube "<<idHelperSvc->toString(topHit->identify())
192 <<
" "<<
Amg::toString(topPos)<<
", driftRadius: "<<topHit->driftRadius()
195 DriftCircleSeed candidateSeed{};
198 double theta{thetaTubes - std::asin(std::clamp(R / distTubes, -1., 1.))};
200 double Y0 = bottomPos.y()*seedDir.z() - bottomPos.z()*seedDir.y() + signBot*bottomHit->driftRadius();
201 double combDriftUncert{std::sqrt(bottomPrd->driftRadiusCov() + topPrd->driftRadiusCov())};
202 std::unique_ptr<CalibratedSpacePoint> calibBottom{}, calibTop{};
208 const auto [linePos, lineDir] =
makeLine(candidateSeed.parameters);
213 R = signBot * calibBottom->driftRadius() - signTop * calibTop->driftRadius();
215 theta = thetaTubes - std::asin(std::clamp(R / distTubes, -1., 1.));
217 Y0 = bottomPos.y()*seedDir.z() - bottomPos.z()*seedDir.y() + signBot*bottomHit->driftRadius();
229 const Amg::Vector3D seedPos = Y0 / seedDir.z() * Amg::Vector3D::UnitY();
231 assert(std::abs(topPos.y()*seedDir.z() - topPos.z() * seedDir.y() + signTop*topHit->driftRadius() - Y0) < std::numeric_limits<float>::epsilon() );
232 ATH_MSG_VERBOSE(__func__<<
"() "<<__LINE__<<
": Candidate seed theta: "<<theta<<
", tanTheta: "<<(seedDir.y() / seedDir.z())<<
", y0: "<<Y0/seedDir.z());
234 SeedSolution solCandidate{};
236 solCandidate.theta =
theta;
238 const double denomSquare = 1. -
std::pow(R / distTubes, 2);
239 if (denomSquare < std::numeric_limits<double>::epsilon()){
243 solCandidate.dTheta = combDriftUncert / std::sqrt(denomSquare) / distTubes;
244 solCandidate.dY0 = std::hypot(-bottomPos.y()*seedDir.y() + bottomPos.z()*seedDir.z(), 1.) * solCandidate.dTheta;
249 [&solCandidate,
this] (
const SeedSolution& seen) {
250 const double deltaY = std::abs(seen.Y0 - solCandidate.Y0);
251 const double limitY = std::hypot(seen.dY0, solCandidate.dY0);
252 const double dTheta = std::abs(seen.theta - solCandidate.theta);
253 const double limitTh = std::hypot(seen.dTheta, solCandidate.dTheta);
256 <<
std::format(
" delta theta: {:.2f} {:} {:.2f}", dTheta, dTheta < limitTh ?
'<' :
'>', limitTh) );
259 ATH_MSG_VERBOSE(__func__<<
"() "<<__LINE__<<
": Reject due to similarity");
263 unsigned int nMdt{0};
267 bool hadGoodHit{
false};
274 solCandidate.seedHits.emplace_back(testMe);
277 else if (hadGoodHit) {
288 solCandidate.solutionSigns =
driftSigns(seedPos, seedDir, solCandidate.seedHits,
msg());
289 ATH_MSG_VERBOSE(
"Circle solutions for seed "<<idHelperSvc->toStringChamber(bottomHit->identify())<<
" - "
294 unsigned int nOverlap{0};
295 std::vector<int> corridor =
driftSigns(seedPos, seedDir, accepted.seedHits,
msg());
296 ATH_MSG_VERBOSE(__func__<<
"() "<<__LINE__<<
": Test seed against accepted "<<accepted<<
", updated signs: "<<corridor);
298 for (
unsigned int l = 0;
l < accepted.seedHits.size(); ++
l){
299 nOverlap += corridor[
l] == accepted.solutionSigns[
l];
303 if (nOverlap == corridor.size() && accepted.seedHits.size() >= solCandidate.seedHits.size()) {
304 ATH_MSG_VERBOSE(__func__<<
"() "<<__LINE__<<
": Same set of hits collected within the same corridor");
313 if (hit == bottomHit && calibBottom) {
314 candidateSeed.measurements.emplace_back(std::move(calibBottom));
318 else if (hit == topHit && calibTop) {
319 candidateSeed.measurements.emplace_back(std::move(calibTop));
332 ATH_MSG_VERBOSE(
"In event "<<ctx.eventID().event_number()<<
" found new seed solution "<<
toString(candidateSeed.parameters));
350 const auto [seedPos, seedDir] =
makeLine(candidateSeed.parameters);
356 / testMe->dimension();
360 if (
pull <= bestPull) {
371 return candidateSeed;
◆ config()
◆ estimateAuxillaries() [1/2]
Helper function to estimate the auxillary variables that remain constant during the fit.
- Parameters
-
seed | Reference to the seed to calculate the variables from |
Seed direction vector
y0Prime = y0 * cos(theta)
Calculate the centre of gravity
Calculate the fit constants
Definition at line 374 of file MdtSegmentSeedGenerator.cxx.
376 SeedFitAuxilliaries aux{};
383 aux.invCovs.reserve(
seed.measurements.size());
384 aux.driftSigns.reserve(
seed.measurements.size());
387 for (
const std::unique_ptr<CalibratedSpacePoint>& hit :
seed.measurements) {
388 const double invCov = 1./
driftCov(*hit);
390 const int sign =
y0 -
pos.y() * seedDir.z() +
pos.z()* seedDir.y() > 0 ? 1 : -1;
392 aux.centerOfGrav+= invCov *
pos;
393 aux.invCovs.push_back(invCov);
394 aux.driftSigns.push_back(
sign);
399 aux.covNorm = 1./
norm;
400 aux.centerOfGrav *= aux.covNorm;
402 for (
const auto&[covIdx, hit] : Acts::enumerate(
seed.measurements)) {
403 const double& invCov = aux.invCovs[covIdx];
404 const int&
sign = aux.driftSigns[covIdx];
406 const double signedCov = invCov *
sign;
408 aux.T_yz += invCov *
pos.y()*
pos.z();
409 aux.T_rz += signedCov *
pos.z() * hit->driftRadius();
410 aux.T_ry += signedCov *
pos.y() * hit->driftRadius();
411 aux.fitY0 += signedCov * aux.covNorm * hit->driftRadius();
413 ATH_MSG_VERBOSE(
"Estimated T_zzyy: "<<aux.T_zzyy<<
", T_yz: "<<aux.T_yz<<
", T_rz: "<<aux.T_rz
414 <<
", T_ry: "<<aux.T_ry<<
", centre "<<
Amg::toString(aux.centerOfGrav)<<
", y0: "<<aux.fitY0
415 <<
", norm: "<<aux.covNorm<<
"/"<<
norm);
◆ estimateAuxillaries() [2/2]
Helper function to estimate the auxillary variables that remain constants during the fit with t0.
- Parameters
-
ctx | EventContext to recalibrate the hits |
seed | Reference to the seed to calculate the variables from |
Definition at line 470 of file MdtSegmentSeedGenerator.cxx.
473 for (
const auto& [
idx, hit] : Acts::enumerate(
seed.measurements)){
475 const double weight = aux.covNorm * signedCov;
479 aux.fitY0Prime+=
weight * velocity;
480 aux.fitY0TwoPrime+=
weight * acceleration;
482 aux.T_vz += signedCov *
pos.z()*velocity;
483 aux.T_vy += signedCov *
pos.y()*velocity;
484 aux.T_az += signedCov *
pos.z()*acceleration;
485 aux.T_ay += signedCov *
pos.y()*acceleration;
487 aux.R_vr += signedCov * hit->driftRadius() * velocity;
488 aux.R_va += signedCov * hit->driftRadius() * acceleration;
489 aux.R_vv += signedCov * velocity * velocity;
492 <<
", T_az: "<<aux.T_az<<
", T_ay: "<<aux.T_ay<<
" --- R_vr: "<<aux.R_vr
493 <<
", R_va: "<<aux.R_va<<
", R_vv: "<<aux.R_vv<<
" -- Y0^{'}: "<<aux.fitY0Prime
494 <<
", Y0^{''}: "<<aux.fitY0TwoPrime);
◆ fitDriftCircles()
void MuonR4::MdtSegmentSeedGenerator::fitDriftCircles |
( |
DriftCircleSeed & |
seed | ) |
const |
|
private |
Refine the seed by performing a fast Mdt segment fit.
- Parameters
-
seed | Seed built from the tangent adjacent to the two seed circles |
Now it's time to use the guestimate
Definition at line 418 of file MdtSegmentSeedGenerator.cxx.
424 const double thetaMin = - (auxVars.T_zzyy - auxVars.T_ry) / (4* auxVars.T_yz + auxVars.T_rz);
425 const double thetaDet =
std::pow(auxVars.T_zzyy -auxVars.T_ry,2) + 4*(auxVars.T_yz + auxVars.T_rz)*(2*auxVars.T_yz + 0.5*auxVars.T_rz);
426 const double thetaGuess = thetaMin + (
theta > thetaMin ? 1. : -1.)*std::sqrt(thetaDet) / (4*auxVars.T_yz + auxVars.T_rz);
429 ATH_MSG_VERBOSE(
"Start fast fit seed: "<<theta<<
", guess: "<<thetaGuess
431 <<
", fitY0: "<<auxVars.fitY0<<
", centre: "<<
Amg::toString(auxVars.centerOfGrav));
435 bool converged{
false};
438 const double thetaPrime = 0.5*auxVars.T_zzyy *twoTheta.sn - auxVars.T_yz * twoTheta.cs
439 - auxVars.T_rz * thetaCS.cs - auxVars.T_ry * thetaCS.sn;
445 const double thetaTwoPrime = auxVars.T_zzyy * twoTheta.cs + 2.* auxVars.T_yz * twoTheta.sn
446 + auxVars.T_rz * thetaCS.sn - auxVars.T_ry * thetaCS.cs;
447 const double update = thetaPrime / thetaTwoPrime;
448 ATH_MSG_VERBOSE(
"Fit iteration #"<<inSeed.nIter<<
" -- theta: "<<theta<<
", thetaPrime: "<<thetaPrime
450 <<
" --> next theta "<<(theta - thetaPrime / thetaTwoPrime));
462 double fitY0 = (auxVars.centerOfGrav.y() *thetaCS.cs - auxVars.centerOfGrav.z() * thetaCS.sn + auxVars.fitY0) / thetaCS.cs;
463 ATH_MSG_VERBOSE(
"Drift circle fit converged within "<<inSeed.nIter<<
" iterations giving "<<
toString(inSeed.parameters)<<
", chi2: "<<inSeed.chi2
◆ fitDriftCirclesWithT0()
void MuonR4::MdtSegmentSeedGenerator::fitDriftCirclesWithT0 |
( |
const EventContext & |
ctx, |
|
|
DriftCircleSeed & |
seed |
|
) |
| const |
|
private |
Refine the seed by performing a fast Mdt segment fit with t0 constraint.
- Parameters
-
ctx | EventContext to recalibrate the hits |
seed | Seed built from the tangent adjacent to the two seed circles |
d^{2}chi^{2} / d^{2}theta
Definition at line 498 of file MdtSegmentSeedGenerator.cxx.
503 bool converged{
false};
515 cov(0,0) = auxVars.T_zzyy * twoTheta.cs + 2.* auxVars.T_yz * twoTheta.sn
516 + auxVars.T_rz * thetaCS.sn - auxVars.T_ry * thetaCS.cs;
519 cov(1,1) = - auxVars.fitY0Prime *auxVars.fitY0Prime - auxVars.fitY0Prime * auxVars.fitY0TwoPrime
520 - auxVars.T_az * thetaCS.sn - auxVars.T_ay * thetaCS.cs + auxVars.R_vv + auxVars.R_va;
522 grad[0] =0.5*auxVars.T_zzyy *twoTheta.sn - auxVars.T_yz * twoTheta.cs
523 - auxVars.T_rz * thetaCS.cs - auxVars.T_ry * thetaCS.sn;
524 grad[1] = auxVars.fitY0 * auxVars.fitY0Prime - auxVars.R_vr + auxVars.T_vz * thetaCS.sn - auxVars.T_vy * thetaCS.cs;
529 pars[1]<<" gradient: ("<<(grad[0])<<", "<<grad[1]<<"), covariance:"
◆ initMessaging()
void AthMessaging::initMessaging |
( |
| ) |
const |
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
◆ moveToNextCandidate()
void MuonR4::MdtSegmentSeedGenerator::moveToNextCandidate |
( |
| ) |
|
|
inlineprivate |
Prepares the generator to generate the seed from the next pair of drift circles.
Vary the left-right solutions
Move to the next hit in the lower layer
Move to the next hit in the upper layer
All combinations of hits & lines in both layers are processed Switch to the next lowerLayer. But skip the busy ones according to the configuration
Abort the loop if we parsed the multi-layer boundary
Definition at line 91 of file MdtSegmentSeedGenerator.cxx.
◆ msg() [1/2]
MsgStream & AthMessaging::msg |
( |
| ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 164 of file AthMessaging.h.
◆ msg() [2/2]
MsgStream & AthMessaging::msg |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 179 of file AthMessaging.h.
180 {
return msg() << lvl; }
◆ msgLvl()
bool AthMessaging::msgLvl |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
Test the output level.
- Parameters
-
lvl | The message level to test against |
- Returns
- boolean Indicating if messages at given level will be printed
- Return values
-
true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
◆ nextSeed()
returns the next seed in the row
Increment for the next candidate
If a candidate is built return it. Otherwise continue the process
Definition at line 129 of file MdtSegmentSeedGenerator.cxx.
130 std::optional<DriftCircleSeed>
found = std::nullopt;
133 found = std::make_optional<DriftCircleSeed>();
141 SeedSolution patternSeed{};
◆ numGenerated()
unsigned int MuonR4::MdtSegmentSeedGenerator::numGenerated |
( |
| ) |
const |
◆ setLevel()
void AthMessaging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
inherited |
◆ ATLAS_THREAD_SAFE
std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
◆ m_cfg
Config MuonR4::MdtSegmentSeedGenerator::m_cfg {} |
|
private |
◆ m_hitLayers
◆ m_imsg
std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_lowerHitIndex
std::size_t MuonR4::MdtSegmentSeedGenerator::m_lowerHitIndex {0} |
|
private |
◆ m_lowerLayer
std::size_t MuonR4::MdtSegmentSeedGenerator::m_lowerLayer {0} |
|
private |
◆ m_lvl
std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivateinherited |
◆ m_msg_tls
boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
◆ m_nGenSeeds
unsigned int MuonR4::MdtSegmentSeedGenerator::m_nGenSeeds {0} |
|
private |
◆ m_nm
std::string AthMessaging::m_nm |
|
privateinherited |
◆ m_seenSolutions
std::vector<SeedSolution> MuonR4::MdtSegmentSeedGenerator::m_seenSolutions {} |
|
private |
◆ m_segmentSeed
◆ m_signComboIndex
std::size_t MuonR4::MdtSegmentSeedGenerator::m_signComboIndex {0} |
|
private |
◆ m_upperHitIndex
std::size_t MuonR4::MdtSegmentSeedGenerator::m_upperHitIndex {0} |
|
private |
◆ m_upperLayer
std::size_t MuonR4::MdtSegmentSeedGenerator::m_upperLayer {0} |
|
private |
◆ s_signCombos
constexpr static std::array<SignComboType,4> MuonR4::MdtSegmentSeedGenerator::s_signCombos |
|
staticconstexprprivate |
The documentation for this class was generated from the following files:
std::size_t m_upperHitIndex
Explicit hit to pick in the selected top layer.
std::vector< int > driftSigns(const Amg::Vector3D &posInChamber, const Amg::Vector3D &dirInChamber, const std::vector< const SpacePoint * > &uncalibHits, MsgStream &msg)
Calculates whether a segment line travereses the tube measurements on the left (-1) or right (1) side...
std::atomic< MSG::Level > m_lvl
Current logging level.
const SpacePointBucket * parentBucket() const
Returns the bucket out of which the seed was formed.
bool overlapCorridor
Check whether a new seed candidate shares the same left-right solution with already accepted ones Rej...
unsigned int numGenerated() const
Returns how many seeds have been generated.
unsigned int nMdtHitCut
How many drift circle hits needs the seed to contain in order to be valid.
unsigned int busyLayerLimit
How many drift circles may be on a layer to be used for seeding.
double tanPhi() const
Returns the angle from the phi extension.
double driftCov(const CalibratedSpacePoint &dcHit)
Amg::Vector3D positionInChamber() const
Returns the position of the seed in the sector frame.
SeedFitAuxilliaries estimateAuxillaries(const DriftCircleSeed &seed) const
Helper function to estimate the auxillary variables that remain constant during the fit.
bool fastSeedFit
Toggle whether the seed is rapidly refitted.
unsigned int m_nGenSeeds
Counter on how many seeds have been generated.
double nMdtLayHitCut
Hit cut based on the fraction of collected tube layers.
std::vector< size_t > vec
virtual CalibSpacePointPtr calibrate(const EventContext &ctx, const SpacePoint *spacePoint, const Amg::Vector3D &seedPosInChamb, const Amg::Vector3D &seedDirInChamb, const double timeDelay) const =0
Calibrates a single space point.
#define ATH_MSG_VERBOSE(x)
virtual double driftVelocity(const EventContext &ctx, const CalibratedSpacePoint &spacePoint) const =0
Returns the drift velocity for a given drift-circle space point.
bool recalibSeedCircles
Recalibrate the seed drift circles from the initial estimate
std::pair< Amg::Vector3D, Amg::Vector3D > makeLine(const Parameters &pars)
Returns the parsed parameters into an Eigen line parametrization.
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
HoughMaximum::HitType HoughHitType
std::string toString(const CalibratedSpacePoint::Covariance_t &mat)
Returns the matrix in string.
@ MdtStatusDriftTime
The tube produced a vaild measurement.
IMessageSvc * getMessageSvc(bool quiet=false)
bool startWithPattern
Try at the first time the pattern seed as candidate.
std::size_t m_lowerHitIndex
Explicit hit to pick in the selected bottom layer.
Amg::Vector3D dirFromTangents(const double tanPhi, const double tanTheta)
Constructs a direction vector from tanPhi & tanTheta.
constexpr static std::array< SignComboType, 4 > s_signCombos
bool fastSegFitWithT0
Toggle whether an initial t0 fit shall be executed.
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.
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
virtual double driftAcceleration(const EventContext &ctx, const CalibratedSpacePoint &spacePoint) const =0
Returns the drift acceleration for a given drift-circle space point.
bool msgLvl(const MSG::Level lvl) const
Test the output level.
double tanTheta() const
Returns the angular coordinate of the eta transform.
double chiSqTermMdt(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 Mdt measurement.
std::array< double, 2 > thetaRange
Cut on the theta angle.
CalibratedSpacePoint::Covariance_t inverse(const CalibratedSpacePoint::Covariance_t &mat)
Inverts the parsed matrix.
std::optional< DriftCircleSeed > buildSeed(const EventContext &ctx, const HoughHitType &topHit, const HoughHitType &bottomHit, const SignComboType &signs)
Tries to build the seed from the two hits.
std::size_t m_upperLayer
Considered layer to pick the top drift circle from.
double interceptY() const
Returns the intercept coordinate of the eta transform.
const std::vector< HitType > & getHitsInMax() const
Returns the list of assigned hits.
Class to provide easy MsgStream access and capabilities.
std::vector< int > driftSigns
Vector of drfit signs.
double R(const INavigable4Momentum *p1, const double v_eta, const double v_phi)
double hitPullCut
Upper cut on the hit chi2 w.r.t.
MsgStream & msg() const
The standard message stream.
void fitDriftCirclesWithT0(const EventContext &ctx, DriftCircleSeed &seed) const
Refine the seed by performing a fast Mdt segment fit with t0 constraint.
std::unique_ptr< CalibratedSpacePoint > CalibSpacePointPtr
const HitLayVec & stripHits() const
Returns the sorted strip hits.
constexpr double sign(const double x)
Returns the sign of a number.
Definition of ATLAS Math & Geometry primitives (Amg)
constexpr bool passRangeCut(const std::array< double, 2 > &cutRange, const double value)
constexpr int toInt(const ParamDefs p)
void moveToNextCandidate()
Prepares the generator to generate the seed from the next pair of drift circles.
Eigen::Matrix< double, 3, 1 > Vector3D
Amg::Vector3D dirFromAngles(const double phi, const double theta)
Constructs a direction vector from the azimuthal & polar angles.
unsigned int nMaxIter
Maximum number of iterations in the fast segment fit.
const SegmentSeed * m_segmentSeed
ISpacePointCalibrator::CalibSpacePointPtr CalibSpacePointPtr
const HitLayVec & mdtHits() const
Returns the sorted Mdt hits.
bool tightenHitCut
Once a seed with even more than initially required hits is found, reject all following seeds with les...
std::string m_nm
Message source name.
std::vector< SeedSolution > m_seenSolutions
Vector caching equivalent solutions to avoid double seeding.
std::array< double, 2 > interceptRange
Cut on the intercept range.
const Parameters & parameters() const
Returns the parameter array.
Helper to simultaneously calculate sin and cos of the same angle.
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
void fitDriftCircles(DriftCircleSeed &seed) const
Refine the seed by performing a fast Mdt segment fit.
=============================================================================
std::size_t m_signComboIndex
Index of the left-right ambiguity between the circles.
double precCutOff
Precision cut off in the fast segment fit.
void initMessaging() const
Initialize our message level and MessageSvc.
Amg::Vector3D directionInChamber() const
Returns the direction of the seed in the sector frame.
https://gitlab.cern.ch/atlas/athena/-/blob/master/MuonSpectrometer/MuonReconstruction/MuonRecEvent/Mu...
unsigned int firstLayerFrom2ndMl() const
Returns the layer index with hits from the second multilayer
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
const ISpacePointCalibrator * calibrator
Pointer to the space point calibrator.
const AmgSymMatrix(2) &SpacePoint
constexpr int pow(int base, int exp) noexcept
SpacePointPerLayerSorter m_hitLayers
SpacePointPerLayerSorter::HitVec HitVec
std::size_t m_lowerLayer
Considered layer to pick the bottom drift circle from.