4#ifndef MUONR4_MUONPATTERNHELPERS_MDTSEGMENTSEEDGENERATOR_H
5#define MUONR4_MUONPATTERNHELPERS_MDTSEGMENTSEEDGENERATOR_H
15#include "Acts/Seeding/CompositeSpacePointLineSeeder.hpp"
29 using LineSeeder_t = Acts::Experimental::CompositeSpacePointLineSeeder;
34 std::array<double, 2>
thetaRange{0, 180.*Gaudi::Units::deg};
36 std::array<double, 2>
interceptRange{-20.*Gaudi::Units::m, 20.*Gaudi::Units::m};
86 const Config& configuration);
90 std::optional<DriftCircleSeed>
nextSeed(
const EventContext& ctx);
98 static constexpr std::array<TangentAmbi, 4>
s_signCombos{TangentAmbi::LL, TangentAmbi::RR,
99 TangentAmbi::LR, TangentAmbi::RL};
110 return sol.
print(ostr);
112 std::ostream&
print(std::ostream& ostr)
const;
116 bool isValidLine(
const TangentLine& solution)
const;
126 std::optional<DriftCircleSeed>
buildSeed(
const EventContext& ctx,
Scalar theta() const
theta method
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
The calibrated Space point is created during the calibration process.
Interface class to refine the space point calibration with an external seed.
LineSeeder_t::TangentAmbi TangentAmbi
SpacePointPerLayerSplitter::HitVec HitVec
std::size_t m_signComboIndex
Index of the left-right ambiguity between the circles.
Line_t m_line
Line to instantiate the seed parameters.
bool isValidLine(const TangentLine &solution) const
Checks whether the intercept and the angle are witihn the allowed ranges.
LineSeeder_t::TwoCircleTangentPars TangentLine
static SeedingAux::Config translate(const Config &cfg)
Translate the SeedGenerator config to a Seed auxillary config.
unsigned int numGenerated() const
Returns how many seeds have been generated.
const SegmentSeed * m_segmentSeed
~MdtSegmentSeedGenerator()
std::size_t m_upperLayer
Considered layer to pick the top drift circle from.
std::size_t m_lowerHitIndex
Explicit hit to pick in the selected bottom layer.
std::size_t m_lowerLayer
Considered layer to pick the bottom drift circle from.
std::vector< SeedSolution > m_seenSolutions
Vector caching equivalent solutions to avoid double seeding.
Acts::Experimental::CompositeSpacePointLineSeeder LineSeeder_t
static constexpr std::array< TangentAmbi, 4 > s_signCombos
std::optional< DriftCircleSeed > buildSeed(const EventContext &ctx, const HoughHitType &topHit, const HoughHitType &bottomHit, const TangentAmbi ambi)
Tries to build the seed from the two hits.
const Config & config() const
Returns the current seed configuration.
MdtSegmentSeedGenerator(const std::string &name, const SegmentSeed *segmentSeed, const Config &configuration)
Standard constructor taking the segmentSeed to start with and then few configuration tunes.
Line_t::ParamVector constructLinePars(const double theta, const double y0) const
Construct the 3D-Line parameters from the estimates theta & y0 from the tangent line.
void moveToNextCandidate()
Prepares the generator to generate the seed from the next pair of drift circles.
unsigned int m_nGenSeeds
Counter on how many seeds have been generated.
std::size_t m_upperHitIndex
Explicit hit to pick in the selected top layer.
SpacePointPerLayerSplitter m_hitLayers
std::optional< DriftCircleSeed > nextSeed(const EventContext &ctx)
returns the next seed in the row
Representation of a segment seed (a fully processed hough maximum) produced by the hough transform.
: The muon space point bucket represents a collection of points that will bre processed together in t...
The SpacePointPerLayerSplitter takes a set of spacepoints already sorted by layer Identifier (see Muo...
std::vector< const SpacePoint * > HitVec
SeedingAux::Line_t Line_t
Abrivation of the line with partial derivatives.
Acts::Experimental::CompositeSpacePointLineFitter::ParamVec_t Parameters
This header ties the generic definitions in this package.
const SpacePoint * HoughHitType
Configuration switches of the module.
double precCutOff
Precision cut off in the fast segment fit.
double nMdtLayHitCut
Hit cut based on the fraction of collected tube layers.
bool tightenHitCut
Once a seed with even more than initially required hits is found, reject all following seeds with les...
double hitPullCut
Upper cut on the hit chi2 w.r.t.
bool startWithPattern
Try at the first time the pattern seed as candidate.
bool recalibSeedCircles
Recalibrate the seed drift circles from the initial estimate.
unsigned int nMaxIter
Maximum number of iterations in the fast segment fit.
const MuonR4::ISpacePointCalibrator * calibrator
Pointer to the space point calibrator.
unsigned int busyLayerLimit
How many drift circles may be on a layer to be used for seeding.
unsigned int nMdtHitCut
How many drift circle hits needs the seed to contain in order to be valid.
std::array< double, 2 > thetaRange
Cut on the theta angle.
std::array< double, 2 > interceptRange
Cut on the intercept range.
bool overlapCorridor
Check whether a new seed candidate shares the same left-right solution with already accepted ones Rej...
Helper struct from a generated Mdt seed.
std::vector< std::unique_ptr< CalibratedSpacePoint > > measurements
List of calibrated measurements.
Parameters parameters
Seed parameters.
unsigned int nIter
Iterations to obtain the seed.
unsigned int nMdt
number of Mdt hits on the seed
const SpacePointBucket * parentBucket
Pointer to the parent bucket.
Cache of all solutions seen thus far.
std::ostream & print(std::ostream &ostr) const
std::vector< int > solutionSigns
Vector of radial signs of the valid hits.
friend std::ostream & operator<<(std::ostream &ostr, const SeedSolution &sol)
Outstream operator.
HitVec seedHits
Used hits in the seed.