ATLAS Offline Software
CalibSegmentChi2Minimizer.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef MUONR4__MUONPATTERNHELPERS_CALIBSEGMENTCHI2MINIMZER_H
5 #define MUONR4__MUONPATTERNHELPERS_CALIBSEGMENTCHI2MINIMZER_H
8 #include "Acts/Seeding/HoughTransformUtils.hpp"
14 
15 
17 #include <Math/Minimizer.h>
18 
19 namespace MuonR4{
20  class ISpacePointCalibrator;
21  class CalibSegmentChi2Minimizer: public ROOT::Math::IMultiGenFunction, AthMessaging {
22  public:
23 
24  using HitType = std::unique_ptr<CalibratedSpacePoint>;
25  using HitVec = std::vector<HitType>;
26 
28  CalibSegmentChi2Minimizer(const std::string& name,
29  const EventContext& ctx,
30  const Amg::Transform3D& locToGlobTrf,
31  HitVec&& hits,
32  const ISpacePointCalibrator* calibrator,
33  bool doT0Fit);
34 
36  double DoEval(const double* pars) const override final;
38  CalibSegmentChi2Minimizer* Clone() const override final;
40  unsigned int NDim() const override final;
42  bool hasPhiMeas() const;
44  bool doTimeFit() const;
46  int nDoF() const;
49 
51  std::vector<double> chi2Terms(const double* pars) const;
53  HitVec release(const double* pars);
56 
57  private:
58  std::string m_name{};
59  const EventContext& m_ctx;
60  Amg::Transform3D m_locToGlob{Amg::Transform3D::Identity()};
61  mutable HitVec m_hits ATLAS_THREAD_SAFE{};
63  bool m_doT0Fit{false};
64 
66  const Amg::Vector3D& chamberIsect,
67  const Amg::Vector3D& segmentDir) const;
68 
70  const Amg::Vector3D& chamberIsect,
71  const Amg::Vector3D& segmentDir) const;
72 
73 
74 
75  bool m_hasPhi{false};
76  unsigned int m_nMeas{0};
77  };
78 }
79 
80 #endif // MUONR4__MuonSegmentFitHelperFunctions__H
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
UncalibratedMeasurement.h
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
MuonR4::CalibSegmentChi2Minimizer::localToGlobTrans
const Amg::Transform3D & localToGlobTrans() const
Returns the local to global transformation.
Definition: CalibSegmentChi2Minimizer.cxx:67
MuonR4::CalibSegmentChi2Minimizer::CalibSegmentChi2Minimizer
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.
Definition: CalibSegmentChi2Minimizer.cxx:19
MuonR4::CalibSegmentChi2Minimizer::HitVec
std::vector< HitType > HitVec
Definition: CalibSegmentChi2Minimizer.h:25
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
MuonR4::CalibSegmentChi2Minimizer::Clone
CalibSegmentChi2Minimizer * Clone() const override final
Clone of the object.
Definition: CalibSegmentChi2Minimizer.cxx:60
MuonR4::CalibSegmentChi2Minimizer::HitType
std::unique_ptr< CalibratedSpacePoint > HitType
Definition: CalibSegmentChi2Minimizer.h:24
RpcStripContainer.h
MuonR4::CalibSegmentChi2Minimizer::segmentChi2TermMdt
double segmentChi2TermMdt(const CalibratedSpacePoint &hit, const Amg::Vector3D &chamberIsect, const Amg::Vector3D &segmentDir) const
CalibratedSpacePoint.h
MuonR4::CalibSegmentChi2Minimizer::m_hasPhi
bool m_hasPhi
Definition: CalibSegmentChi2Minimizer.h:75
GeoPrimitives.h
vector
Definition: MultiHisto.h:13
MuonR4::CalibSegmentChi2Minimizer::DoEval
double DoEval(const double *pars) const override final
Evaluate the chi2 for the given set of parameters.
Definition: CalibSegmentChi2Minimizer.cxx:97
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
MuonR4::CalibSegmentChi2Minimizer::doTimeFit
bool doTimeFit() const
Does the fit include the time.
Definition: CalibSegmentChi2Minimizer.cxx:73
MuonR4::CalibSegmentChi2Minimizer::hasPhiMeas
bool hasPhiMeas() const
Are phi measurements in the collection.
Definition: CalibSegmentChi2Minimizer.cxx:79
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
MuonR4::CalibSegmentChi2Minimizer::ATLAS_THREAD_SAFE
HitVec m_hits ATLAS_THREAD_SAFE
Definition: CalibSegmentChi2Minimizer.h:61
MuonR4::CalibSegmentChi2Minimizer::m_nMeas
unsigned int m_nMeas
Definition: CalibSegmentChi2Minimizer.h:76
MuonR4::CalibSegmentChi2Minimizer::release
HitVec release(const double *pars)
Releases all measurements.
Definition: CalibSegmentChi2Minimizer.cxx:85
MuonR4::CalibSegmentChi2Minimizer::NDim
unsigned int NDim() const override final
Degrees of freedom.
Definition: CalibSegmentChi2Minimizer.cxx:70
MdtDriftCircleContainer.h
MuonHoughDefs.h
MuonR4::CalibSegmentChi2Minimizer::segmentChi2TermStrip
double segmentChi2TermStrip(const CalibratedSpacePoint &hit, const Amg::Vector3D &chamberIsect, const Amg::Vector3D &segmentDir) const
Amg
Definition of ATLAS Math & Geometry primitives (Amg)
Definition: AmgStringHelpers.h:19
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
MuonR4::CalibSegmentChi2Minimizer::measurements
const HitVec & measurements() const
Returns the used measurements.
Definition: CalibSegmentChi2Minimizer.cxx:82
MuonR4::CalibSegmentChi2Minimizer::m_name
std::string m_name
Definition: CalibSegmentChi2Minimizer.h:58
MuonR4::ISpacePointCalibrator
Interface class to refine the space point calibration with an external seed.
Definition: ISpacePointCalibrator.h:19
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonR4::CalibSegmentChi2Minimizer::m_doT0Fit
bool m_doT0Fit
Definition: CalibSegmentChi2Minimizer.h:63
MuonR4
This header ties the generic definitions in this package.
Definition: HoughEventData.h:16
MuonR4::CalibSegmentChi2Minimizer::nDoF
int nDoF() const
Returns the degrees of freedom from the measurements & beamspot constraint.
Definition: CalibSegmentChi2Minimizer.cxx:76
MuonR4::CalibratedSpacePoint
The calibrated Space point is created during the calibration process.
Definition: CalibratedSpacePoint.h:15
AthMessaging.h
MuonR4::CalibSegmentChi2Minimizer::m_locToGlob
Amg::Transform3D m_locToGlob
Definition: CalibSegmentChi2Minimizer.h:60
MuonR4::CalibSegmentChi2Minimizer
Definition: CalibSegmentChi2Minimizer.h:21
MuonR4::CalibSegmentChi2Minimizer::m_ctx
const EventContext & m_ctx
Definition: CalibSegmentChi2Minimizer.h:59
MuonR4::CalibSegmentChi2Minimizer::m_calibrator
const ISpacePointCalibrator * m_calibrator
Definition: CalibSegmentChi2Minimizer.h:62
MuonR4::CalibSegmentChi2Minimizer::chi2Terms
std::vector< double > chi2Terms(const double *pars) const
Returns the contribution of each measurement to the chi2.