diff --git a/Tracking/TrkFitter/TrkDeterministicAnnealingFilter/src/DAF_SimpleWeightCalculator.cxx b/Tracking/TrkFitter/TrkDeterministicAnnealingFilter/src/DAF_SimpleWeightCalculator.cxx index 99d8efc3d9cf5911555c7f3411a1aec80fafbe77..0e315ec6877d2658eb4f44fd665fa3dbf0f256b6 100755 --- a/Tracking/TrkFitter/TrkDeterministicAnnealingFilter/src/DAF_SimpleWeightCalculator.cxx +++ b/Tracking/TrkFitter/TrkDeterministicAnnealingFilter/src/DAF_SimpleWeightCalculator.cxx @@ -141,7 +141,7 @@ Trk::DAF_SimpleWeightCalculator::normalize ( // copy given assgnProbs to new vector ATH_MSG_DEBUG("copy vector<AssignmentProb> to a new one"); - auto newAssgnProbs = new std::vector< Trk::CompetingRIOsOnTrack::AssignmentProb >(*assgnProbs); + auto *newAssgnProbs = new std::vector< Trk::CompetingRIOsOnTrack::AssignmentProb >(*assgnProbs); //*newAssgnProbs = *assgnProbs; ATH_MSG_DEBUG("call other normalize()"); Trk::DAF_SimpleWeightCalculator::normalize( *newAssgnProbs, ROTs, beta, cutValue ); diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h b/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h index eb0d98f5298dbec23b65b6737f928ff80e99bef4..86c15ba531082ce137e43a41f21bafb96e00c86c 100755 --- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h +++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h @@ -675,7 +675,7 @@ namespace Trk { const TrackParameters &, const GXFTrackState &, PropDirection, - MagneticFieldProperties, + const MagneticFieldProperties&, bool, bool ) const; @@ -725,7 +725,7 @@ namespace Trk { const TrackParameters &, const GXFTrackState &, PropDirection, - MagneticFieldProperties, + const MagneticFieldProperties&, bool, bool ) const; @@ -840,7 +840,7 @@ namespace Trk { const TrackParameters *, const Surface *, PropDirection, - const MagneticFieldProperties + const MagneticFieldProperties& ) const; virtual int iterationsOfLastFit() const; diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx index 14727f1955b4531ed814a595d238d8f063193588..c168976cfe8877b02c387e863eaf94f65417c2a3 100644 --- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx +++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx @@ -294,7 +294,7 @@ namespace Trk { bool muonisstraight = muontrack->info().trackProperties(TrackInfo::StraightTrack); bool measphi = false; - for (auto i : *(muontrack->measurementsOnTrack())) { + for (const auto *i : *(muontrack->measurementsOnTrack())) { const CompetingRIOsOnTrack *crot = dynamic_cast<const CompetingRIOsOnTrack *>(i); const RIO_OnTrack *rot = nullptr; @@ -678,7 +678,7 @@ namespace Trk { std::vector<const TrackStateOnSurface *> tmp_matvec; if ((matvec != nullptr) && !matvec->empty()) { - tmp_matvec = std::move(*matvec); + tmp_matvec = *matvec; delete tmp_matvec.back(); tmp_matvec.pop_back(); @@ -2256,7 +2256,7 @@ namespace Trk { ATH_MSG_DEBUG("--> entering GlobalChi2Fitter::fit(PRDS,TP,)"); MeasurementSet rots; - for (auto prd : prds) { + for (const auto *prd : prds) { const Surface & prdsurf = (*prd).detectorElement()->surface((*prd).identify()); const RIO_OnTrack *rot = nullptr; const PlaneSurface *plsurf = nullptr; @@ -2433,7 +2433,7 @@ namespace Trk { MeasurementSet rots; const TrackParameters *hitparam = intrk.trackParameters()->back(); - for (auto prd : prds) { + for (const auto *prd : prds) { const Surface & prdsurf = (*prd).detectorElement()->surface((*prd).identify()); Amg::VectorX parameterVector = hitparam->parameters(); @@ -2494,7 +2494,7 @@ namespace Trk { bool need_to_correct = false; - for (auto itSet : rots_in) { + for (const auto *itSet : rots_in) { if ( (itSet != nullptr) && itSet->associatedSurface().associatedDetectorElementIdentifier().is_valid() && @@ -2508,7 +2508,7 @@ namespace Trk { if (need_to_correct) { MeasurementSet rots_new; - for (auto itSet : rots_in) { + for (const auto *itSet : rots_in) { if (itSet == nullptr) { ATH_MSG_WARNING( "There is an empty MeasurementBase object in the track! Skip this object.." ); continue; @@ -2544,7 +2544,7 @@ namespace Trk { rots = rots_in; } - for (auto itSet : rots) { + for (const auto *itSet : rots) { if (itSet == nullptr) { ATH_MSG_WARNING("There is an empty MeasurementBase object in the track! Skip this object.."); } else { @@ -4248,7 +4248,7 @@ namespace Trk { matvec_used=false; if (matvec && !matvec->empty()) { - for (auto & i : *matvec) { + for (const auto & i : *matvec) { const Trk::MaterialEffectsBase * meb = i->materialEffectsOnTrack(); if (meb != nullptr) { @@ -7625,7 +7625,7 @@ namespace Trk { * but this is more performant compared to removing them properly. */ if ( - rv.size() > 0 && ( + !rv.empty() && ( &rv.front()->associatedSurface() == dst.surface() || &rv.front()->associatedSurface() == &src.associatedSurface() || trackParametersClose(*rv.front(), src, 0.001) || @@ -7659,7 +7659,7 @@ namespace Trk { const TrackParameters & prev, const GXFTrackState & ts, PropDirection propdir, - MagneticFieldProperties bf, + const MagneticFieldProperties& bf, bool calcderiv, bool holesearch ) const { @@ -7702,7 +7702,7 @@ namespace Trk { const TrackParameters & prev, const GXFTrackState & ts, PropDirection propdir, - MagneticFieldProperties bf, + const MagneticFieldProperties& bf, bool calcderiv, bool holesearch ) const { @@ -8292,7 +8292,7 @@ namespace Trk { const TrackParameters* prevpar, const Surface* surf, PropDirection propdir, - const MagneticFieldProperties fieldprop) const + const MagneticFieldProperties& fieldprop) const { ParamDefsAccessor paraccessor; double J[25] = { diff --git a/Tracking/TrkFitter/TrkKalmanFitter/src/KalmanSmoother.cxx b/Tracking/TrkFitter/TrkKalmanFitter/src/KalmanSmoother.cxx index 8f673684ca0bfed386950fe44fc57c1290f5ac9b..5dda04214df033816f858db57cbb777818f6c98a 100755 --- a/Tracking/TrkFitter/TrkKalmanFitter/src/KalmanSmoother.cxx +++ b/Tracking/TrkFitter/TrkKalmanFitter/src/KalmanSmoother.cxx @@ -35,8 +35,8 @@ #include <iomanip> // InterfaceID -// const InterfaceID& Trk::KalmanSmoother::interfaceID() { -// return InterfaceID_KalmanSmoother; +// const InterfaceID& Trk::KalmanSmoother::interfaceID() { +// return InterfaceID_KalmanSmoother; //} // constructor @@ -64,7 +64,7 @@ Trk::KalmanSmoother::KalmanSmoother(const std::string& t,const std::string& n,co // the extrapolation engine declareProperty("ExtrapolationEngine", m_extrapolationEngine); declareProperty("UseExtrapolationEngine", m_useExEngine); - + declareInterface<IKalmanSmoother>( this ); } @@ -96,7 +96,7 @@ StatusCode Trk::KalmanSmoother::finalize() { delete m_utility; if (msgLvl(MSG::INFO)) { - + int iw=9; std::stringstream ss; ss << "-------------------------------------------------------------------------------" << std::endl; @@ -130,7 +130,7 @@ StatusCode Trk::KalmanSmoother::finalize() ATH_MSG_INFO ("finalize() successful in " << name()); return StatusCode::SUCCESS; } - + // configure the Kalman Smoother // needs: Propagator - define which track model to be used for extrapolating tracks // Updator - defines the statistics for updating the estimator @@ -158,8 +158,8 @@ StatusCode Trk::KalmanSmoother::configureWithTools(IExtrapolator* extrap, if (m_dynamicNoiseAdjustor) { ATH_MSG_INFO ("tool for DNA present, so dyn. noise adjustment inside Si detectors will be active!"); - } - + } + m_initialErrors = m_updator->initialErrors(); ATH_MSG_DEBUG ("queried current Updator for fitter initialisation. Result:"); ATH_MSG_DEBUG ( m_initialErrors[0] << ", " << m_initialErrors[1] @@ -179,7 +179,7 @@ Trk::FitterStatusCode Trk::KalmanSmoother::fit(Trk::Trajectory& tra const Trk::KalmanMatEffectsController& kalMec) const { ATH_MSG_VERBOSE ("--> enter KalmanSmoother::fit"); - + // protection against being unconfigured if (!m_updator) { ATH_MSG_ERROR ("need to first configure with updator"); @@ -205,10 +205,10 @@ Trk::FitterStatusCode Trk::KalmanSmoother::fit(Trk::Trajectory& tra } double chi2Increment = 0.f; int ndofIncrement = -5; // five free parameters - + //////////////////////////////////////////////////////////////////////////////////// - // get last MeasurementBase and perform the missing update - + // get last MeasurementBase and perform the missing update + /*-- careful with STL reverse iterator: the underlying normal iterator points to a different element which is off by one, otherwise couldn't access rbegin() etc. Transformation (rit constructor or rit's base() method) needs offset by +/- 1. @@ -221,7 +221,7 @@ Trk::FitterStatusCode Trk::KalmanSmoother::fit(Trk::Trajectory& tra ATH_MSG_VERBOSE ("create smoothed state at end of track by adding the last meas't"); std::unique_ptr<const TrackParameters> smooPar; double smooPar_eta_for_monitoring=1000.; - if (!fittableMeasurement || !forwardTPar) + if (!fittableMeasurement || !forwardTPar) m_utility->dumpTrajectory(trajectory, "DAF-inconsistency"); // first smoothed TrkParameter is last forward prediction updated with last MBase else smooPar.reset( m_updator->addToState(*forwardTPar, @@ -253,12 +253,12 @@ Trk::FitterStatusCode Trk::KalmanSmoother::fit(Trk::Trajectory& tra //////////////////////////////////////////////////////////////////////////////////// // start backward filtering - + // use result of forward kalman filter as initial prediction, but scale error matrix. AmgSymMatrix(5)* firstErrMtx = initialiseSmoother(*(lastPredictedState->smoothedTrackParameters())->covariance()); const AmgVector(5)& par = lastPredictedState->smoothedTrackParameters()->parameters(); - std::unique_ptr<const TrackParameters> predPar( CREATE_PARAMETERS(*(lastPredictedState->smoothedTrackParameters()),par,firstErrMtx) ); + std::unique_ptr<const TrackParameters> predPar( CREATE_PARAMETERS(*(lastPredictedState->smoothedTrackParameters()),par,firstErrMtx) ); // The first step of backward-filtering is done before any loop because of the // specially formed prediction (from the last forward parameters). std::unique_ptr<const TrackParameters> updatedPar( m_updator->addToState(*predPar, @@ -273,31 +273,29 @@ Trk::FitterStatusCode Trk::KalmanSmoother::fit(Trk::Trajectory& tra lastPredictedState->backwardStateChiSquared(trackQualityIncrement->chiSquared()); addChi2IncrementAndDelete(trackQualityIncrement,chi2Increment,ndofIncrement); // Trk::Surface& testSf = fittableMeasurement->associatedSurface(); - - + + //////////////////////////////////////////////////////////////////////////////////// // now do the rest of the forward trajectory by means of a reverse iterated loop - + Trk::Trajectory::reverse_iterator rit = lastPredictedState + 1; Trk::Trajectory::reverse_iterator lastSmoothableState - = Trk::Trajectory::reverse_iterator(m_utility->firstFittableState(trajectory)) - 1; // this takes outliers into account + = Trk::Trajectory::reverse_iterator(m_utility->firstFittableState(trajectory)) - 1; // this takes outliers into account for( ; rit!=trajectory.rend(); rit++) { if (!rit->isOutlier()) { smooPar_eta_for_monitoring = 1000.; fittableMeasurement = rit->measurement(); - + if (msgLvl(MSG::DEBUG)) { printGlobalParams(previousStatePosOnTraj, " start", updatedPar.get() ); // ATH_MSG_VERBOSE << " Now trying to hit surface " << fittableMeasurement->associatedSurface() << endmsg; BoundaryCheck trackWithinSurface = true; - // if ( ! testSf.isOnSurface( updatedPar->position(), trackWithinSurface) ) + // if ( ! testSf.isOnSurface( updatedPar->position(), trackWithinSurface) ) // ATH_MSG_VERBOSE << " previous updated parameters are outside surface bounds!" << endmsg; if ( ! fittableMeasurement->associatedSurface().isOnSurface( rit->forwardTrackParameters()->position(), trackWithinSurface) ) { ATH_MSG_VERBOSE (" for information: forward-filtered pars are outside surface bounds!"); - if (msgLvl(MSG::INFO)) monitorTrackFits( ForwParOutsideSurfaceBounds, ( updatedPar ? updatedPar->eta() : 1000. ) ); - // ATH_MSG_VERBOSE (fittableMeasurement->associatedSurface()); } } previousStatePosOnTraj = rit->positionOnTrajectory(); @@ -308,7 +306,7 @@ Trk::FitterStatusCode Trk::KalmanSmoother::fit(Trk::Trajectory& tra // now propagate updated TrkParameters to surface of ROT if (!m_useExEngine) - predPar.reset( m_extrapolator->extrapolate(*updatedPar, sf, + predPar.reset( m_extrapolator->extrapolate(*updatedPar, sf, Trk::oppositeMomentum, // reverse filtering false, // no boundary check kalMec.particleType()) ); @@ -317,13 +315,13 @@ Trk::FitterStatusCode Trk::KalmanSmoother::fit(Trk::Trajectory& tra Trk::ExtrapolationCell <Trk::TrackParameters> ecc(*updatedPar, Trk::oppositeMomentum); ecc.setParticleHypothesis(kalMec.particleType()); Trk::ExtrapolationCode eCode = m_extrapolationEngine->extrapolate(ecc, &sf, false); - + if (eCode.isSuccess() && ecc.endParameters) { ATH_MSG_DEBUG ("Smoother Kalman Fitter --> extrapolation engine success"); predPar.reset(ecc.endParameters); } else { ATH_MSG_WARNING ("Smoother Kalman Fitter --> extrapolation engine did not succeed"); - } + } } if(!predPar) { @@ -349,14 +347,14 @@ Trk::FitterStatusCode Trk::KalmanSmoother::fit(Trk::Trajectory& tra //////////////////////////////////////////////////////////////////// // adjust the momentum + error according to target measurement (brem fit) const Trk::DNA_MaterialEffects* detectedMomentumNoise = nullptr; - Trk::Trajectory::reverse_iterator stateWithNoise + Trk::Trajectory::reverse_iterator stateWithNoise = m_utility->previousFittableState(trajectory, rit); if (kalMec.doDNA() && stateWithNoise!=trajectory.rend()) { const TrackParameters *predPar_temp=predPar.release(); const TrackParameters *updatedPar_temp=updatedPar.release(); - detectedMomentumNoise = + detectedMomentumNoise = m_dynamicNoiseAdjustor->DNA_Adjust(predPar_temp, // change according to where meas is updatedPar_temp, // previous state's pars (start) fittableMeasurement, // the meas't @@ -373,7 +371,7 @@ Trk::FitterStatusCode Trk::KalmanSmoother::fit(Trk::Trajectory& tra updatedPar.reset( m_updator->addToState(*predPar, fittableMeasurement->localParameters(), fittableMeasurement->localCovariance(), trackQualityIncrement) ); - + if (!updatedPar || !trackQualityIncrement) { if (msgLvl(MSG::INFO)) monitorTrackFits( UpdateFailure, predPar->eta() ); ATH_MSG_INFO ("could not update Track Parameters, reject track"); @@ -390,7 +388,7 @@ Trk::FitterStatusCode Trk::KalmanSmoother::fit(Trk::Trajectory& tra // smoothed parameters = combination of predicted (!) forward and updated (!) backward state // remember: first TrkParameter on ForwardTrajectory has no error matrix !!! - + if (rit == lastSmoothableState) { // at the last don't do state combination. ATH_MSG_VERBOSE ("Identified state" << (rit->positionOnTrajectory()>9? " " : " 0")<< rit->positionOnTrajectory() << " as last fittable state."); @@ -405,7 +403,6 @@ Trk::FitterStatusCode Trk::KalmanSmoother::fit(Trk::Trajectory& tra } if (!smooPar) { ATH_MSG_INFO ("could not combine Track Parameters, reject track"); - if (msgLvl(MSG::INFO)) monitorTrackFits( CombineStatesFailure, ( updatedPar ? updatedPar->eta() : 1000. ) ); return FitterStatusCode::CombineStatesFailure; } // get FitQualityOnSurface @@ -432,12 +429,12 @@ Trk::FitterStatusCode Trk::KalmanSmoother::fit(Trk::Trajectory& tra stateWithNoise->checkinDNA_MaterialEffects(detectedMomentumNoise); } } // end if not an outlier - + } // end loop over trajectory states - + ATH_MSG_VERBOSE ("-S- smoothed trajectory created "); - - + + // we made it trackFitQuality = new Trk::FitQuality(chi2Increment,ndofIncrement); if (msgLvl(MSG::INFO)) monitorTrackFits( Success, smooPar_eta_for_monitoring) ; @@ -468,10 +465,10 @@ Trk::FitterStatusCode Trk::KalmanSmoother::fitWithReference(Trk::Trajectory& } double chi2Increment = 0.0; int ndofIncrement = -5; // five free parameters - + //////////////////////////////////////////////////////////////////////////////////// - // get last MeasurementBase and perform the missing update - + // get last MeasurementBase and perform the missing update + /*-- careful with STL reverse iterator: the underlying normal iterator points to a different element which is off by one, otherwise couldn't access rbegin() etc. Transformation (rit constructor or rit's base() method) needs offset by +/- 1. @@ -504,7 +501,7 @@ Trk::FitterStatusCode Trk::KalmanSmoother::fitWithReference(Trk::Trajectory& if (msgLvl(MSG::INFO)) monitorTrackFits( Call, ( smooPar ? smooPar->eta() : 1000. ) ); if (!smooPar || !fitQual) { ATH_MSG_WARNING ("first smoother update failed, reject track"); - if (msgLvl(MSG::INFO)) monitorTrackFits( UpdateFailure, + if (msgLvl(MSG::INFO)) monitorTrackFits( UpdateFailure, lastPredictedState->referenceParameters()->eta() ); delete fitQual; return FitterStatusCode::UpdateFailure; @@ -522,7 +519,7 @@ Trk::FitterStatusCode Trk::KalmanSmoother::fitWithReference(Trk::Trajectory& // specially formed prediction: result of FKF with scaled error matrix AmgSymMatrix(5)* firstErrMtx = initialiseSmoother(*(lastPredictedState->smoothedTrackParameters()->covariance())); AmgVector(5) firstDiff = updatedDifference->first; // make copy and delete - updatedDifference.reset( + updatedDifference.reset( m_updator->updateParameterDifference(firstDiff, *firstErrMtx, *(lastPredictedState->measurementDifference()), lastMeasurement->localCovariance(), @@ -536,7 +533,7 @@ Trk::FitterStatusCode Trk::KalmanSmoother::fitWithReference(Trk::Trajectory& } lastPredictedState->backwardStateChiSquared(trackQualityIncrement->chiSquared()); addChi2IncrementAndDelete(trackQualityIncrement,chi2Increment,ndofIncrement); - + double smooPar_eta_for_monitoring=1000.; //////////////////////////////////////////////////////////////////////////////////// // now do the rest of the forward trajectory by means of a reverse iterated loop @@ -544,7 +541,7 @@ Trk::FitterStatusCode Trk::KalmanSmoother::fitWithReference(Trk::Trajectory& Trk::Trajectory::reverse_iterator lastSmoothableState = Trk::Trajectory::reverse_iterator(m_utility->firstFittableState(trajectory)) - 1; // this takes outliers into account for( ; rit!=trajectory.rend(); rit++) { - + smooPar_eta_for_monitoring=1000.; ATH_MSG_VERBOSE ("Now inverting Jacobian... (pointer is "<<(rit->jacobian()?"OK":"NULL")<<")"); @@ -568,10 +565,10 @@ Trk::FitterStatusCode Trk::KalmanSmoother::fitWithReference(Trk::Trajectory& << ", qOverP_diff=" << (predDiffPar)(Trk::qOverP) << ", sigmaDeltaE=" << rit->materialEffects()->sigmaDeltaE() << ", sigmaDeltaQoverP=" << sqrt(sigmaDeltaQoverPsquared) << std::fixed);//std::defaultfloat); - ATH_MSG_VERBOSE ("Added material effects."); + ATH_MSG_VERBOSE ("Added material effects."); } /* possibly check quality of backward "extrapolation", if not good return a - monitorTrackFits( FitterStatusCode::ExtrapolationFailure, eta) or + monitorTrackFits( FitterStatusCode::ExtrapolationFailure, eta) or monitorTrackFits( ExtrapolationFailureDueToSmallMomentum, TP->eta()) */ updatedDifference.reset(); @@ -586,7 +583,7 @@ Trk::FitterStatusCode Trk::KalmanSmoother::fitWithReference(Trk::Trajectory& if (!fittableMeasurement || rit->isOutlier() ) { // pure material state or outlier updatedDifference = std::make_unique<std::pair<AmgVector(5),AmgSymMatrix(5)>>( std::make_pair(predDiffPar,predCov) ); } else { - updatedDifference.reset( + updatedDifference.reset( m_updator->updateParameterDifference(predDiffPar, predCov, *(rit->measurementDifference()), fittableMeasurement->localCovariance(), @@ -626,7 +623,7 @@ Trk::FitterStatusCode Trk::KalmanSmoother::fitWithReference(Trk::Trajectory& // smoothed parameters = combination of predicted (!) forward and updated (!) backward state // remember: first TrkParameter on ForwardTrajectory has no error matrix !!! - + if (rit == lastSmoothableState) { // at the last don't do state combination. ATH_MSG_VERBOSE ("Identified state" << (rit->positionOnTrajectory()>9? " " : " 0")<< rit->positionOnTrajectory() << " as last fittable state."); @@ -676,11 +673,11 @@ Trk::FitterStatusCode Trk::KalmanSmoother::fitWithReference(Trk::Trajectory& if (rit== lastSmoothableState) break; // if first state is outlier, loop will malfunction } // end loop over trajectory states - + ATH_MSG_VERBOSE ("-S- smoothed trajectory created "); - + // cleanup - + // we made it trackFitQuality = new Trk::FitQuality(chi2Increment,ndofIncrement); if (msgLvl(MSG::INFO)) monitorTrackFits( Success, smooPar_eta_for_monitoring ); @@ -759,7 +756,7 @@ void Trk::KalmanSmoother::printGlobalParams(int istate, const std::string& ptype { char tt[80]; sprintf(tt,"T%.2u",istate); if (not (msgLvl(MSG::VERBOSE))) return; - msg(MSG::VERBOSE) << tt << ptype << " GP:" + msg(MSG::VERBOSE) << tt << ptype << " GP:" << std::setiosflags(std::ios::fixed | std::ios::showpoint | std::ios::right ) << std::setw(9) << std::setprecision(2) << param->position()[0] << std::setw(9) << std::setprecision(2) << param->position()[1] diff --git a/Tracking/TrkFitter/TrkiPatFitterUtils/src/FitProcedure.cxx b/Tracking/TrkFitter/TrkiPatFitterUtils/src/FitProcedure.cxx index 917a8a8f4eaa944824b3cd0f2bff53c5b8a8c2c7..2deacb83a8783a2a02f23fdba169b061338d6975 100755 --- a/Tracking/TrkFitter/TrkiPatFitterUtils/src/FitProcedure.cxx +++ b/Tracking/TrkFitter/TrkiPatFitterUtils/src/FitProcedure.cxx @@ -165,7 +165,7 @@ FitProcedure::constructTrack (const std::vector<FitMeasurement*>& measurements, } // then append the fitted TSOS - for (auto m : measurements) + for (auto *m : measurements) { if (m->isMaterialDelimiter()) continue; @@ -796,7 +796,7 @@ FitProcedure::calculateChiSq(std::vector<FitMeasurement*>& measurements) m_chiSq = 0.; double driftResidual= 0.; double DSqMax = 0.; - for (auto m : measurements) + for (auto *m : measurements) { if (! m->numberDoF()) continue; // if (m->isPerigee()) @@ -922,7 +922,7 @@ FitProcedure::calculateChiSq(std::vector<FitMeasurement*>& measurements) (**measurements.begin()).printHeading(*m_log); int n = 0; - for (auto m : measurements) + for (auto *m : measurements) { *m_log << std::setiosflags(std::ios::fixed) << std::setw(3) << ++n; diff --git a/Tracking/TrkFitter/TrkiPatFitterUtils/src/MeasurementProcessor.cxx b/Tracking/TrkFitter/TrkiPatFitterUtils/src/MeasurementProcessor.cxx index b8ab5df68803ea7eae6bd33eb1498152e6ce6068..659c4b7b2eaf0426c624a604facb5882e08e1ccd 100755 --- a/Tracking/TrkFitter/TrkiPatFitterUtils/src/MeasurementProcessor.cxx +++ b/Tracking/TrkFitter/TrkiPatFitterUtils/src/MeasurementProcessor.cxx @@ -75,7 +75,7 @@ MeasurementProcessor::MeasurementProcessor (bool asymmetricCaloEnergy, if(m_useStepPropagator==2) m_stepField = Trk::MagneticFieldProperties(Trk::FastField); - for (auto m : m_measurements) + for (auto *m : m_measurements) { if (! m->numberDoF()) continue; if (m->isAlignment()) m_alignments.push_back(m); @@ -178,7 +178,7 @@ MeasurementProcessor::calculateDerivatives(void) } // loop over measurements to compute derivatives: - for (auto m : m_measurements) + for (auto *m : m_measurements) { // strip detector types if (m->isCluster()) @@ -339,7 +339,7 @@ MeasurementProcessor::calculateResiduals(void) { int nAlign = 0; int nScat = 0; - for (auto m : m_measurements) + for (auto *m : m_measurements) { if (! (*m).numberDoF()) continue; @@ -638,7 +638,7 @@ MeasurementProcessor::propagationDerivatives(void) { // compute additional derivatives when needed for covariance propagation. // loop over measurements: - for (auto m : m_measurements) + for (auto *m : m_measurements) { // compute the D0 and Z0 derivs that don't already exist if (! m->isPositionMeasurement() || m->numberDoF() > 1) continue;