Commit a4adda85 authored by Jens Kroeger's avatar Jens Kroeger
Browse files

AnalysisTimingATLASpix: introduced parameters for names of row/timewalk...

AnalysisTimingATLASpix: introduced parameters for names of row/timewalk correction TGraphErrors which were previously hard-coded (and contained the exact name of one particular prototype)
parent 383f9351
...@@ -33,12 +33,14 @@ AnalysisTimingATLASpix::AnalysisTimingATLASpix(Configuration config, std::shared ...@@ -33,12 +33,14 @@ AnalysisTimingATLASpix::AnalysisTimingATLASpix(Configuration config, std::shared
if(m_config.has("correction_file_row")) { if(m_config.has("correction_file_row")) {
m_correctionFile_row = m_config.get<std::string>("correction_file_row"); m_correctionFile_row = m_config.get<std::string>("correction_file_row");
m_correctionGraph_row = m_config.get<std::string>("correction_graph_row");
m_pointwise_correction_row = true; m_pointwise_correction_row = true;
} else { } else {
m_pointwise_correction_row = false; m_pointwise_correction_row = false;
} }
if(m_config.has("correction_file_timewalk")) { if(m_config.has("correction_file_timewalk")) {
m_correctionFile_timewalk = m_config.get<std::string>("correction_file_timewalk"); m_correctionFile_timewalk = m_config.get<std::string>("correction_file_timewalk");
m_correctionGraph_timewalk = m_config.get<std::string>("correction_graph_timewalk");
m_pointwise_correction_timewalk = true; m_pointwise_correction_timewalk = true;
} else { } else {
m_pointwise_correction_timewalk = false; m_pointwise_correction_timewalk = false;
...@@ -308,9 +310,7 @@ void AnalysisTimingATLASpix::initialise() { ...@@ -308,9 +310,7 @@ void AnalysisTimingATLASpix::initialise() {
if(!file->IsOpen()) { if(!file->IsOpen()) {
LOG(ERROR) << "Cannot open " << fileName << "!\n"; LOG(ERROR) << "Cannot open " << fileName << "!\n";
} }
std::string gName = "AnalysisTiming/ap1b02w23s15/gTimeCorrelationVsRow"; gRowCorr = static_cast<TGraphErrors*>(file->Get(m_correctionGraph_row.c_str()));
// std::string gName = "row_correction_full_matrix";
gRowCorr = static_cast<TGraphErrors*>(file->Get(gName.c_str()));
file->Close(); file->Close();
delete file; delete file;
} else { } else {
...@@ -323,9 +323,7 @@ void AnalysisTimingATLASpix::initialise() { ...@@ -323,9 +323,7 @@ void AnalysisTimingATLASpix::initialise() {
if(!file->IsOpen()) { if(!file->IsOpen()) {
LOG(ERROR) << "Cannot open " << fileName << "!\n"; LOG(ERROR) << "Cannot open " << fileName << "!\n";
} }
std::string gName = "AnalysisTiming/ap1b02w23s15/gTimeCorrelationVsTot"; gTimeWalkCorr = static_cast<TGraphErrors*>(file->Get(m_correctionGraph_timewalk.c_str()));
// std::string gName = "timewalk_correction";
gTimeWalkCorr = static_cast<TGraphErrors*>(file->Get(gName.c_str()));
file->Close(); file->Close();
delete file; delete file;
} else { } else {
......
...@@ -109,7 +109,9 @@ namespace corryvreckan { ...@@ -109,7 +109,9 @@ namespace corryvreckan {
double m_leftTailCut; double m_leftTailCut;
std::string m_correctionFile_row; std::string m_correctionFile_row;
std::string m_correctionGraph_row;
std::string m_correctionFile_timewalk; std::string m_correctionFile_timewalk;
std::string m_correctionGraph_timewalk;
bool m_calcCorrections; bool m_calcCorrections;
bool m_pointwise_correction_row; bool m_pointwise_correction_row;
bool m_pointwise_correction_timewalk; bool m_pointwise_correction_timewalk;
......
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