Commit 5b8cb0be authored by Lennart Huth's avatar Lennart Huth
Browse files

removed c++17 functionality

parent 1de1a94d
...@@ -51,12 +51,11 @@ StatusCode AnalysisTracks::run(const std::shared_ptr<Clipboard>& clipboard) { ...@@ -51,12 +51,11 @@ StatusCode AnalysisTracks::run(const std::shared_ptr<Clipboard>& clipboard) {
auto tracks = clipboard->getData<Track>(); auto tracks = clipboard->getData<Track>();
if(!tracks.size()) if(!tracks.size())
return StatusCode::Success; return StatusCode::Success;
std::map<std::string, uint> clusters;
for(auto d : get_detectors()) { for(auto d : get_detectors()) {
if(d->isAuxiliary()) if(d->isAuxiliary())
continue; continue;
clusters[d->getName()] = clipboard->getData<Cluster>(d->getName()).size(); clusters_vs_tracks_.at(d->getName())->Fill(tracks.size(), clipboard->getData<Cluster>(d->getName()).size());
clusters_vs_tracks_.at(d->getName())->Fill(tracks.size(), clusters.at(d->getName()));
} }
// Loop over all tracks and get clusters assigned to tracks as well as the intersections // Loop over all tracks and get clusters assigned to tracks as well as the intersections
std::map<std::string, std::map<std::pair<double, double>, int>> track_clusters; std::map<std::string, std::map<std::pair<double, double>, int>> track_clusters;
...@@ -73,7 +72,9 @@ StatusCode AnalysisTracks::run(const std::shared_ptr<Clipboard>& clipboard) { ...@@ -73,7 +72,9 @@ StatusCode AnalysisTracks::run(const std::shared_ptr<Clipboard>& clipboard) {
} }
} }
// Now fill the histos // Now fill the histos
for(auto const& [key, val] : intersects) { for(auto const& intersect : intersects) {
auto key = intersect.first;
auto val = intersect.second;
for(uint i = 0; i < val.size(); ++i) { for(uint i = 0; i < val.size(); ++i) {
auto j = i + 1; auto j = i + 1;
while(j < val.size()) { while(j < val.size()) {
...@@ -83,9 +84,10 @@ StatusCode AnalysisTracks::run(const std::shared_ptr<Clipboard>& clipboard) { ...@@ -83,9 +84,10 @@ StatusCode AnalysisTracks::run(const std::shared_ptr<Clipboard>& clipboard) {
} }
} }
} }
for(auto const& [key, val] : track_clusters) { for(auto const& track_cluster : track_clusters) {
for(auto const& [k, v] : val) { auto key = track_cluster.first;
_tracks_per_hit_.at(key)->Fill(v); for(auto const& v : track_cluster.second) {
_tracks_per_hit_.at(key)->Fill(v.second);
} }
} }
......
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