Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed PPS Global Alignment paths #38930

Merged
merged 1 commit into from
Aug 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CalibPPS/AlignmentGlobal/plugins/PPSAlignmentHarvester.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <iomanip>
#include <cmath>
#include <utility>
#include <algorithm>

#include "TH1D.h"
#include "TH2D.h"
Expand Down Expand Up @@ -386,6 +387,7 @@ std::unique_ptr<TGraphErrors> PPSAlignmentHarvester::buildGraphFromMonitorElemen
std::string parentPath = me->getPathname();
size_t parentPos = parentPath.substr(0, parentPath.size() - 1).find_last_of('/') + 1;
std::string parentName = parentPath.substr(parentPos);
std::replace(parentName.begin(), parentName.end(), '_', '.'); // replace _ with .
size_t d = parentName.find('-');
const double x_min = std::stod(parentName.substr(0, d));
const double x_max = std::stod(parentName.substr(d + 1));
Expand Down Expand Up @@ -581,7 +583,7 @@ void PPSAlignmentHarvester::xAlignment(DQMStore::IBooker& iBooker,
std::make_pair(cfg.sectorConfig56(), cfg_ref.sectorConfig56())}) {
for (const auto& [rpc, rpc_ref] :
{std::make_pair(sc.rp_F_, sc_ref.rp_F_), std::make_pair(sc.rp_N_, sc_ref.rp_N_)}) {
auto mes_test = iGetter.getAllContents(dqmDir_ + "/worker/" + sc.name_ + "/near_far/x slices, " + rpc.position_);
auto mes_test = iGetter.getAllContents(dqmDir_ + "/worker/" + sc.name_ + "/near_far/x slices " + rpc.position_);
if (mes_test.empty()) {
edm::LogWarning("PPSAlignmentHarvester") << "[x_alignment] " << rpc.name_ << ": could not load mes_test";
continue;
Expand Down
8 changes: 4 additions & 4 deletions CalibPPS/AlignmentGlobal/plugins/PPSAlignmentWorker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,8 @@ void PPSAlignmentWorker::SectorData::init(DQMStore::IBooker& iBooker,

char buf[100];
sprintf(buf, "%.1f-%.1f", x_min, x_max);

iBooker.setCurrentFolder(rootDir + "/" + scfg_.name_ + "/near_far/x slices, N/" + buf);
std::replace(buf, buf + strlen(buf), '.', '_'); // replace . with _
iBooker.setCurrentFolder(rootDir + "/" + scfg_.name_ + "/near_far/x slices N/" + buf);
x_slice_plots_N.insert({i, SlicePlots(iBooker, cfg, debug)});
}

Expand All @@ -284,8 +284,8 @@ void PPSAlignmentWorker::SectorData::init(DQMStore::IBooker& iBooker,

char buf[100];
sprintf(buf, "%.1f-%.1f", x_min, x_max);

iBooker.setCurrentFolder(rootDir + "/" + scfg_.name_ + "/near_far/x slices, F/" + buf);
std::replace(buf, buf + strlen(buf), '.', '_'); // replace . with _
iBooker.setCurrentFolder(rootDir + "/" + scfg_.name_ + "/near_far/x slices F/" + buf);
x_slice_plots_F.insert({i, SlicePlots(iBooker, cfg, debug)});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <map>
#include <memory>
#include <queue>
#include <algorithm>

#include "TF1.h"
#include "TProfile.h"
Expand Down Expand Up @@ -213,7 +214,7 @@ PPSAlignmentConfigurationESSource::PPSAlignmentConfigurationESSource(const edm::
gDirectory = debugFile->mkdir(rpConfigs[p.first]->name_.c_str())->mkdir("fits_ref");

auto* d_ref = (TDirectory*)ad_ref->Get(
(sectorNames[p.first] + "/near_far/x slices, " + rpConfigs[p.first]->position_).c_str());
(sectorNames[p.first] + "/near_far/x slices " + rpConfigs[p.first]->position_).c_str());
if (d_ref == nullptr) {
edm::LogWarning("PPS") << "[ESSource] could not load d_ref";
} else {
Expand Down Expand Up @@ -627,6 +628,7 @@ std::vector<PPSAlignmentConfiguration::PointErrors> PPSAlignmentConfigurationESS

std::string name = k->GetName();
size_t d = name.find('-');
std::replace(name.begin(), name.end(), '_', '.'); // replace _ with .
const double x_min = std::stod(name.substr(0, d));
const double x_max = std::stod(name.substr(d + 1));

Expand Down