Commit dd2c65a6 authored by Ben Couturier's avatar Ben Couturier
Browse files

Merge branch 'cherry-pick-86b866d1' into 'master'

Merge branch 'track-fit-workshop-jadevrie' into 'master'

See merge request !115
parents a76d88d9 2f20d8e1
Pipeline #3613706 passed with stage
in 26 seconds
...@@ -261,7 +261,12 @@ StatusCode SoTrackCnv::createRep( DataObject* aObject, IOpaqueAddress*& aAddr ) ...@@ -261,7 +261,12 @@ StatusCode SoTrackCnv::createRep( DataObject* aObject, IOpaqueAddress*& aAddr )
// double test1 = nodes_[in]->residual(); // double test1 = nodes_[in]->residual();
// double test2 = nodes_[in]->errMeasure(); // double test2 = nodes_[in]->errMeasure();
double chi = nodes_[in]->residual() / nodes_[in]->errResidual(); double chi = nodes_[in]->visit_r<double>(
[&]( LHCb::FitNode::DimInfos<LHCb::Enum::nDim::Type::one>& ) {
// return d.residual(nodes_[in])[0] / d.errResidual(nodes_[in])[0][0];
return nodes_[in]->residual() / nodes_[in]->errResidual();
},
[]( ... ) -> double { throw std::logic_error( "2D measurements not supported by Panoramix" ); } );
double abs_chi = fabs( chi ); double abs_chi = fabs( chi );
// fix colours for measurement display // fix colours for measurement display
double M_r = 0.0, M_g = 1.0, M_b = 0.0; double M_r = 0.0, M_g = 1.0, M_b = 0.0;
...@@ -312,9 +317,13 @@ StatusCode SoTrackCnv::createRep( DataObject* aObject, IOpaqueAddress*& aAddr ) ...@@ -312,9 +317,13 @@ StatusCode SoTrackCnv::createRep( DataObject* aObject, IOpaqueAddress*& aAddr )
magneticFieldSvc->fieldVector( cstate.position(), bfield ) magneticFieldSvc->fieldVector( cstate.position(), bfield )
.ignore( /* AUTOMATICALLY ADDED FOR gaudi/Gaudi!763 */ ); .ignore( /* AUTOMATICALLY ADDED FOR gaudi/Gaudi!763 */ );
LHCb::StateTraj stateTraj = LHCb::StateTraj( nodes_[in]->refVector(), bfield ); LHCb::StateTraj stateTraj = LHCb::StateTraj( nodes_[in]->refVector(), bfield );
const auto& traj = meas.trajectory(); const auto& traj = meas.visit(
double s1 = 0.0; []( const LHCb::Measurement::VP2D& ) -> LHCb::LineTraj<double> {
double s2 = traj.arclength( stateTraj.position( s1 ) ); throw std::logic_error( "2D measurements not supported by Panoramix" );
},
[]( const auto& m ) -> LHCb::LineTraj<double> { return m.trajectory; } );
double s1 = 0.0;
double s2 = traj.arclength( stateTraj.position( s1 ) );
poca->minimize( stateTraj, s1, traj, s2, distance, 20 * Gaudi::Units::mm ) poca->minimize( stateTraj, s1, traj, s2, distance, 20 * Gaudi::Units::mm )
.ignore( /* AUTOMATICALLY ADDED FOR gaudi/Gaudi!763 */ ); .ignore( /* AUTOMATICALLY ADDED FOR gaudi/Gaudi!763 */ );
Gaudi::XYZPoint mpoint = traj.position( s2 ); Gaudi::XYZPoint mpoint = traj.position( s2 );
...@@ -389,9 +398,13 @@ StatusCode SoTrackCnv::createRep( DataObject* aObject, IOpaqueAddress*& aAddr ) ...@@ -389,9 +398,13 @@ StatusCode SoTrackCnv::createRep( DataObject* aObject, IOpaqueAddress*& aAddr )
magneticFieldSvc->fieldVector( cstate.position(), bfield ) magneticFieldSvc->fieldVector( cstate.position(), bfield )
.ignore( /* AUTOMATICALLY ADDED FOR gaudi/Gaudi!763 */ ); .ignore( /* AUTOMATICALLY ADDED FOR gaudi/Gaudi!763 */ );
LHCb::StateTraj stateTraj = LHCb::StateTraj( nodes_[in]->refVector(), bfield ); LHCb::StateTraj stateTraj = LHCb::StateTraj( nodes_[in]->refVector(), bfield );
const auto& traj = meas.trajectory(); const auto& traj = meas.visit(
double s1 = 0.0; []( const LHCb::Measurement::VP2D& ) -> LHCb::LineTraj<double> {
double s2 = traj.arclength( stateTraj.position( s1 ) ); throw std::logic_error( "2D measurements not supported by Panoramix" );
},
[]( const auto& m ) -> LHCb::LineTraj<double> { return m.trajectory; } );
double s1 = 0.0;
double s2 = traj.arclength( stateTraj.position( s1 ) );
poca->minimize( stateTraj, s1, traj, s2, distance, 20 * Gaudi::Units::mm ) poca->minimize( stateTraj, s1, traj, s2, distance, 20 * Gaudi::Units::mm )
.ignore( /* AUTOMATICALLY ADDED FOR gaudi/Gaudi!763 */ ); .ignore( /* AUTOMATICALLY ADDED FOR gaudi/Gaudi!763 */ );
Gaudi::XYZPoint mpoint = traj.position( s2 ); Gaudi::XYZPoint mpoint = traj.position( s2 );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment