Commit b2f30ea7 authored by Lennart Huth's avatar Lennart Huth
Browse files

moved .at(0) to front()

parent 8a7f3224
......@@ -146,7 +146,7 @@ void AlignmentDUTResidual::MinimiseResiduals(Int_t&, Double_t*, Double_t& result
// Loop over all tracks
for(auto& track : globalTracks) {
LOG(TRACE) << "track has chi2 " << track->chi2();
auto detector = track->clusters().at(0)->detectorID();
auto detector = track->clusters().front()->detectorID();
LOG(TRACE) << "- track has gradient " << track->direction(detector) << " at detector " << detector;
// Find the cluster that needs to have its position recalculated
......
......@@ -269,8 +269,8 @@ bool AlignmentMillepede::putTrack(Track* track, const size_t nPlanes) {
/// Refit the track for the reference states.
track->fit();
const double tx = track->state(track->clusters().at(0)->detectorID()).X();
const double ty = track->state(track->clusters().at(0)->detectorID()).Y();
const double tx = track->state(track->clusters().front()->detectorID()).X();
const double ty = track->state(track->clusters().front()->detectorID()).Y();
// Iterate over each cluster on the track.
for(auto& cluster : track->clusters()) {
......
......@@ -225,8 +225,8 @@ StatusCode Tracking4D::run(std::shared_ptr<Clipboard> clipboard) {
trackChi2->Fill(track->chi2());
clustersPerTrack->Fill(static_cast<double>(track->nClusters()));
trackChi2ndof->Fill(track->chi2ndof());
trackAngleX->Fill(atan(track->direction(track->clusters().at(0)->detectorID()).X()));
trackAngleY->Fill(atan(track->direction(track->clusters().at(0)->detectorID()).Y()));
trackAngleX->Fill(atan(track->direction(track->clusters().front()->detectorID()).X()));
trackAngleY->Fill(atan(track->direction(track->clusters().front()->detectorID()).Y()));
// Make residuals
auto trackClusters = track->clusters();
......
......@@ -179,8 +179,8 @@ StatusCode TrackingSpatial::run(std::shared_ptr<Clipboard> clipboard) {
trackChi2->Fill(track->chi2());
clustersPerTrack->Fill(static_cast<double>(track->nClusters()));
trackChi2ndof->Fill(track->chi2ndof());
trackAngleX->Fill(atan(track->direction(track->clusters().at(0)->detectorID()).X()));
trackAngleY->Fill(atan(track->direction(track->clusters().at(0)->detectorID()).Y()));
trackAngleX->Fill(atan(track->direction(track->clusters().front()->detectorID()).X()));
trackAngleY->Fill(atan(track->direction(track->clusters().front()->detectorID()).Y()));
// Make residuals
for(auto& trackCluster : track->clusters()) {
......
Markdown is supported
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