|
ATLAS Offline Software
|
Go to the documentation of this file.
18 inline double calcChi2 (
const Trk::Track& trk) {
20 if (!fq || !fq->
numberDoF()) {
return FLT_MAX;}
28 declareInterface<IMuonSegmentFittingTool>(
this);
37 return StatusCode::SUCCESS;
45 const std::vector<const Trk::MeasurementBase*>& rioVec)
const {
47 const EventContext& ctx = Gaudi::Hive::currentContext();
50 double gdirNorm = gdir.mag();
51 bool isCurvedSegment = (gdirNorm > 1.5);
52 if (isCurvedSegment) {
54 gdir =
Amg::Vector3D(gdir.x() / gdirNorm, gdir.y() / gdirNorm, gdir.z() / gdirNorm);
62 std::unique_ptr<Trk::TrackParameters> exPars =
74 double phi = gdir.phi();
75 double theta = gdir.theta();
78 Trk::Perigee startpar(0, 0, phi, theta, qoverp, persurf);
81 std::vector<const Trk::MeasurementBase*>
vec2;
82 vec2.reserve(rioVec.size());
83 std::copy(rioVec.begin(), rioVec.end(), std::back_inserter(
vec2));
86 std::unique_ptr<Trk::Track> newtrack;
88 if (isCurvedSegment) {
100 constexpr
double chi2Cut = 10.;
101 std::unique_ptr<Trk::Track> cleanTrack =
m_trackCleaner->clean(*newtrack, ctx);
102 if (!cleanTrack && !isCurvedSegment && calcChi2(*newtrack) > chi2Cut) {
109 newtrack.swap(cleanTrack);
113 if (calcChi2(*newtrack) > chi2Cut) {
114 ATH_MSG_VERBOSE(
" reduced chi2 to large " << calcChi2(*newtrack) <<
" cut " << chi2Cut);
121 ATH_MSG_DEBUG(
" pos " << std::setprecision(5) << pp->position() <<
" phi " << pp->momentum().phi() <<
" theta "
122 << pp->momentum().theta() <<
" q*mom " << pp->momentum().mag() * pp->charge() <<
" pt "
123 << pp->momentum().perp());
128 return newtrack.release();
136 const EventContext& ctx = Gaudi::Hive::currentContext();
143 std::unique_ptr<Trk::TrackParameters> exPars =
161 if (exPars->covariance()) locerr = *exPars->covariance();
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const override final
Specified for PlaneSurface: GlobalToLocal method without dynamic memory allocation - boolean checks i...
std::vector< D3PDTest::MyVec2 > vec2
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
const FitQuality * fitQuality() const
return a pointer to the fit quality const-overload
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
const Amg::Vector3D & position() const
Access method for the position.
Eigen::Matrix< double, 2, 1 > Vector2D
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
bool msgLvl(const MSG::Level lvl) const
#define ATH_MSG_VERBOSE(x)
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
double angleYZ() const
access method for angle of local YZ projection
::StatusCode StatusCode
StatusCode definition for legacy code.
void globalToLocalDirection(const Amg::Vector3D &glodir, Trk::LocalDirection &locdir) const
This method transforms the global direction to a local direction wrt the plane.
Class to represent and store fit qualities from track reconstruction in terms of and number of degre...
represents the three-dimensional global direction with respect to a planar surface frame.
@ NoField
Field is set to 0., 0., 0.,.
const Perigee * perigeeParameters() const
return Perigee.
Ensure that the ATLAS eigen extensions are properly loaded.
virtual const Surface & associatedSurface() const =0
Interface method to get the associated Surface.
double charge(const T &p)
Eigen::Matrix< double, 3, 1 > Vector3D
const Amg::Vector3D & momentum() const
Access method for the momentum.
#define ATH_MSG_WARNING(x)
double chiSquared() const
returns the of the overall track fit
int numberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as integer
double angleXZ() const
access method for angle of local XZ projection
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)