diff --git a/src/modules/TrackingMultiplet/TrackingMultiplet.cpp b/src/modules/TrackingMultiplet/TrackingMultiplet.cpp index 903a5a54032b55d71fa635f68bf4de19626d39d7..eca1ecf9555aa90993dc41dee33d72f7a4d76ff7 100644 --- a/src/modules/TrackingMultiplet/TrackingMultiplet.cpp +++ b/src/modules/TrackingMultiplet/TrackingMultiplet.cpp @@ -405,8 +405,8 @@ TrackVector TrackingMultiplet::find_multiplet_tracklets(const streams& stream, trackletCandidate->registerPlane( detector->getName(), detector->displacement().z(), detector->materialBudget(), detector->toLocal()); } - - trackletCandidate->addCluster(clusterFirst.get()); + + trackletCandidate->addCluster(clusterFirst.get()); trackletCandidate->addCluster(clusterLast.get()); trackletCandidate->setParticleMomentum(momentum_); @@ -693,17 +693,19 @@ StatusCode TrackingMultiplet::run(const std::shared_ptr<Clipboard>& clipboard) { continue; } - // make all planes known to the tracklets - for(auto& detector : get_regular_detectors(true)) { - if(detector->isAuxiliary()) { - continue; - } - if(detector->displacement().Z() <= scatterer_position_) { - uptracklet->updatePlane(detector->getName(), detector->displacement().z(), detector->materialBudget(), detector->toLocal()); - } else { - (*it)->updatePlane(detector->getName(), detector->displacement().z(), detector->materialBudget(), detector->toLocal()); - } - } + // make all planes known to the tracklets + for(auto& detector : get_regular_detectors(true)) { + if(detector->isAuxiliary()) { + continue; + } + if(detector->displacement().Z() <= scatterer_position_) { + uptracklet->updatePlane( + detector->getName(), detector->displacement().z(), detector->materialBudget(), detector->toLocal()); + } else { + (*it)->updatePlane( + detector->getName(), detector->displacement().z(), detector->materialBudget(), detector->toLocal()); + } + } auto multipletCandidate = std::make_shared<Multiplet>(uptracklet, (*it)); LOG(DEBUG) << "Got new candidate."; @@ -774,14 +776,14 @@ StatusCode TrackingMultiplet::run(const std::shared_ptr<Clipboard>& clipboard) { LOG(DEBUG) << "Deleting downstream tracklet"; downstream_tracklets.erase(used_downtracklet); - // make all planes known to the multiplet + // make all planes known to the multiplet for(auto& detector : get_regular_detectors(true)) { if(!detector->isAuxiliary()) { multiplet->updatePlane( detector->getName(), detector->displacement().z(), detector->materialBudget(), detector->toLocal()); } } - + multiplets.push_back(multiplet); trackChi2->Fill(multiplet->getChi2()); diff --git a/src/objects/Multiplet.cpp b/src/objects/Multiplet.cpp index cfb4e1149fa13b39739e906abd65c7c04c7d47a9..5e0900611d1df5c79c51437e58e70ef7208f1a8d 100644 --- a/src/objects/Multiplet.cpp +++ b/src/objects/Multiplet.cpp @@ -93,8 +93,8 @@ ROOT::Math::XYZPoint Multiplet::getState(const std::string& detectorID) const { throw TrackError(typeid(*this), " does not have any entry for plane " + detectorID); } auto zpos = plane->getPosition(); - LOG(TRACE) << "Plane z position of " << detectorID << " is " << zpos - << ", scatterer position is " << m_scattererPosition; + LOG(TRACE) << "Plane z position of " << detectorID << " is " << zpos << ", scatterer position is " + << m_scattererPosition; LOG(TRACE) << "upstream track type " << m_upstream->getType() << ", downstream track type " << m_downstream->getType(); if(zpos <= m_scattererPosition) { @@ -102,7 +102,6 @@ ROOT::Math::XYZPoint Multiplet::getState(const std::string& detectorID) const { } else { return m_downstream->getState(detectorID); } - } ROOT::Math::XYZVector Multiplet::getDirection(const std::string& detectorID) const { diff --git a/src/objects/Track.cpp b/src/objects/Track.cpp index 07af51eb3b17aa817ad8c23cbdeb65c2d7ecb83e..4be28be7fa3e9db9e0c5388168c629fa2c5ff2b9 100644 --- a/src/objects/Track.cpp +++ b/src/objects/Track.cpp @@ -245,7 +245,7 @@ void Track::registerPlane(const std::string& name, double z, double x0, Transfor std::find_if(planes_.begin(), planes_.end(), [&p](const Plane& plane) { return plane.getName() == p.getName(); }); if(pl == planes_.end()) { planes_.push_back(std::move(p)); - LOG(TRACE) << "Register new plane " << planes_.back().getName(); + LOG(TRACE) << "Register new plane " << planes_.back().getName(); } else { *pl = std::move(p); LOG(TRACE) << "Plane " << p.getName() << " was already registered for this track";