|
ATLAS Offline Software
|
Go to the documentation of this file.
8 #include "GaudiKernel/PhysicalConstants.h"
17 using namespace SegmentFit;
20 const EventContext& ctx,
28 m_locToGlob{locToGlobTrf},
29 m_hits{std::move(
hits)},
30 m_calibrator{calibrator},
34 for (
const HitType& hit : m_hits) {
44 m_nMeas += hit->spacePoint()->measuresEta();
45 m_nMeas += hit->spacePoint()->measuresPhi();
46 m_hasPhi |= hit->spacePoint()->measuresPhi();
51 if (m_nMeas - 2 - (m_hasPhi ? 2 : 0) <= 1) {
54 std::ranges::sort(m_hits,
56 return a->positionInChamber().
z() <
b->positionInChamber().z();
62 for (
const HitType& copyMe : m_hits) {
63 copyHits.emplace_back(std::make_unique<CalibratedSpacePoint>(*copyMe));
71 return toInt(ParamDefs::nPars);
88 for (
int p = 0 ;
p <
toInt(ParamDefs::nPars); ++
p) {
91 const auto[segPos, segDir] =
makeLine(parVec);
100 for (
int p = 0 ;
p <
toInt(ParamDefs::nPars); ++
p) {
103 const auto[segPos, segDir] =
makeLine(parVec);
107 <<
", timeDelay: "<<timeDelay<<
". Do time fit "<<
m_doT0Fit);
112 std::optional<double> arrivalTime = std::nullopt;
114 arrivalTime = std::make_optional<double>( (
m_locToGlob *segPos).
mag() * c_inv + timeDelay);
116 for (
const HitType& hit : m_hits) {
const Amg::Transform3D & localToGlobTrans() const
Returns the local to global transformation.
CalibSegmentChi2Minimizer::HitType HitType
AmgVector(toInt(ParamDefs::nPars)) Parameters
CalibSegmentChi2Minimizer(const std::string &name, const EventContext &ctx, const Amg::Transform3D &locToGlobTrf, HitVec &&hits, const ISpacePointCalibrator *calibrator, bool doT0Fit)
Constructor taking the input hits to fit.
SpacePointPerLayerSorter::HitVec HitVec
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.
std::vector< HitType > HitVec
#define ATH_MSG_VERBOSE(x)
double chiSqTerm(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 measurement.
std::pair< Amg::Vector3D, Amg::Vector3D > makeLine(const Parameters &pars)
Returns the parsed parameters into an Eigen line parametrization.
CalibSegmentChi2Minimizer * Clone() const override final
Clone of the object.
std::unique_ptr< CalibratedSpacePoint > HitType
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
double DoEval(const double *pars) const override final
Evaluate the chi2 for the given set of parameters.
Eigen::Affine3d Transform3D
bool doTimeFit() const
Does the fit include the time.
bool hasPhiMeas() const
Are phi measurements in the collection.
double chi2(TH1 *h0, TH1 *h1)
Class to provide easy MsgStream access and capabilities.
HitVec release(const double *pars)
Releases all measurements.
MsgStream & msg() const
The standard message stream.
unsigned int NDim() const override final
Degrees of freedom.
constexpr int toInt(const ParamDefs p)
const HitVec & measurements() const
Returns the used measurements.
Interface class to refine the space point calibration with an external seed.
This header ties the generic definitions in this package.
int nDoF() const
Returns the degrees of freedom from the measurements & beamspot constraint.
Amg::Transform3D m_locToGlob
const EventContext & m_ctx
const ISpacePointCalibrator * m_calibrator
Scalar mag() const
mag method