Commit 9603d2c5 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Track: cleanup new method, return value and naming scheme

parent 833058b7
Pipeline #1642764 passed with stages
in 32 minutes
......@@ -42,9 +42,9 @@ void Multiplet::calculateResiduals() {
for(auto c : track_clusters_) {
auto cluster = dynamic_cast<Cluster*>(c.GetObject());
residual_global_[cluster->detectorID()] = cluster->global() - getIntercept(cluster->global().z());
if(getPlane(cluster->detectorID()) != nullptr)
if(get_plane(cluster->detectorID()) != nullptr)
residual_local_[cluster->detectorID()] =
cluster->local() - getPlane(cluster->detectorID())->getToLocal() * getIntercept(cluster->global().z());
cluster->local() - get_plane(cluster->detectorID())->getToLocal() * getIntercept(cluster->global().z());
}
}
......
......@@ -64,9 +64,9 @@ void StraightLineTrack::calculateResiduals() {
auto cluster = dynamic_cast<Cluster*>(c.GetObject());
// fixme: cluster->global.z() is only an approximation for the plane intersect. Can be fixed after !115
residual_global_[cluster->detectorID()] = cluster->global() - getIntercept(cluster->global().z());
if(getPlane(cluster->detectorID()) != nullptr) {
if(get_plane(cluster->detectorID()) != nullptr) {
residual_local_[cluster->detectorID()] =
cluster->local() - getPlane(cluster->detectorID())->getToLocal() * getIntercept(cluster->global().z());
cluster->local() - get_plane(cluster->detectorID())->getToLocal() * getIntercept(cluster->global().z());
}
}
}
......
......@@ -243,7 +243,7 @@ void Track::registerPlane(const std::string& name, double z, double x0, Transfor
}
}
Plane* Track::getPlane(std::string detetorID) {
Track::Plane* Track::get_plane(std::string detetorID) {
auto plane =
std::find_if(planes_.begin(), planes_.end(), [&detetorID](Plane const& p) { return p.getName() == detetorID; });
if(plane == planes_.end())
......
......@@ -262,7 +262,7 @@ namespace corryvreckan {
};
protected:
Plane* getPlane(std::string detetorID);
Plane* get_plane(std::string detetorID);
std::vector<TRef> track_clusters_;
std::vector<TRef> associated_clusters_;
std::map<std::string, ROOT::Math::XYPoint> residual_local_;
......
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