Skip to content

Commit

Permalink
fix: accumulating residual plots in boundParamResolution if only `pre…
Browse files Browse the repository at this point in the history
…dicted==true` (#1355)

In the rare case of `(smoothed or filtered) == false` the residual plots accumulated with each layer, instead of only using the current layer.
After changing the hardcoded `"same"` to `drawOptions.c_str()`, as in all other places, this bug is fixed.
  • Loading branch information
AJPfleger authored Aug 1, 2022
1 parent e4474fb commit 6fe9ca2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Examples/Scripts/TrackingPerformance/boundParamResolution.C
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is part of the Acts project.
//
// Copyright (C) 2019-2021 CERN for the benefit of the Acts project
// Copyright (C) 2019-2022 CERN for the benefit of the Acts project
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
Expand Down Expand Up @@ -39,7 +39,7 @@ using namespace ROOT;
/// @param inFile the input root file
/// @param treeNAme the input tree name (default: 'trackstates)
/// @param outFile the output root file
/// @param pTypes the track parameter types (prd, flt, smt)
/// @param pTypes the track parameter types (prt, flt, smt)
/// @param saveAs the plot saving type
int boundParamResolution(const std::string& inFile, const std::string& treeName,
const std::string& outFile, bool predicted = true,
Expand Down Expand Up @@ -659,7 +659,8 @@ int boundParamResolution(const std::string& inFile, const std::string& treeName,
}
if (predicted) {
std::string drawOptions = (smoothed or filtered) ? "same" : "";
res_prt[vlID + paramNames.at(ipar)]->DrawNormalized("same");
res_prt[vlID + paramNames.at(ipar)]->DrawNormalized(
drawOptions.c_str());
res_prt[vlID + paramNames.at(ipar)]->Write();
legend->AddEntry(res_prt[vlID + paramNames.at(ipar)], "predicted",
"l");
Expand Down

0 comments on commit 6fe9ca2

Please sign in to comment.