9 fDrawReferenceProfile(
false),
10 fDrawCentralEtaSummaryProfile(
true),
11 fProfileLegendShiftTotalX(0),
12 fProfileLegendShiftTotalY(0),
13 fProfileLegendTextSize(0.05),
14 fProfileLegendTextFont(62),
15 fTrendLegendShiftTotalX(0),
16 fTrendLegendShiftTotalY(0),
17 fTrendLegendTextSize(0.05),
18 fTrendLegendTextFont(62),
21 fTrendTagPositionX(0),
22 fTrendTagPositionY(0),
23 fTrendTagTextSize(0.05),
24 fTrendTagTextFont(42),
25 fTrendCanvasHeight(400),
26 fTrendCanvasWidth(1000),
27 fTrendMarginLeft(0.08),
28 fTrendMarginRight(0.03),
29 fTrendMarginTop(0.06),
30 fTrendMarginBottom(0.15),
31 fTrendTitleOffsetX(1.1),
32 fTrendTitleOffsetY(0.55),
33 fTrendTitleSizeX(0.06),
34 fTrendTitleSizeY(0.06),
35 fTrendLabelOffsetX(0.01),
36 fTrendLabelOffsetY(0.007),
37 fTrendLabelSizeX(0.05),
38 fTrendLabelSizeY(0.05),
45 fLegendTextForAllRuns(
"All"),
46 fDrawPlotsForEachIOV(
false),
48 fUseLuminosityForTrends(
true),
49 fSkipRunsWithNoData(
false),
50 fNormalizeQAplots(
true),
52 fLumiPerIovFile(
"lumiPerRun_Run2.txt"),
54 fDrawYearLines(
false),
55 fYearLineColor(kBlack),
60 fMakeIovListForSlides(
false),
61 fIovListForSlides(
"iovListForSlides.txt") {
63 double defaultProfileZoomLow[
knProfileTypes] = {28, 45, 30, 7, 40, 20, 25, 20};
64 double defaultProfileZoomHigh[
knProfileTypes] = {60, 80, 95, 40, 70, 90, 90, 80};
92 : fDebugLevel(
in.fDebugLevel),
93 fDrawTrackQA(
in.fDrawTrackQA),
94 fDrawReferenceProfile(
in.fDrawReferenceProfile),
95 fDrawCentralEtaSummaryProfile(
in.fDrawCentralEtaSummaryProfile),
96 fProfileLegendShiftTotalX(
in.fProfileLegendShiftTotalX),
97 fProfileLegendShiftTotalY(
in.fProfileLegendShiftTotalY),
98 fProfileLegendTextSize(
in.fProfileLegendTextSize),
99 fProfileLegendTextFont(
in.fProfileLegendTextFont),
100 fTrendLegendShiftTotalX(
in.fTrendLegendShiftTotalX),
101 fTrendLegendShiftTotalY(
in.fTrendLegendShiftTotalY),
102 fTrendLegendTextSize(
in.fTrendLegendTextSize),
103 fTrendLegendTextFont(
in.fTrendLegendTextFont),
104 fDrawTrendTag(
in.fDrawTrendTag),
105 fTrendTagText(
in.fTrendTagText),
106 fTrendTagPositionX(
in.fTrendTagPositionX),
107 fTrendTagPositionY(
in.fTrendTagPositionY),
108 fTrendTagTextSize(
in.fTrendTagTextSize),
109 fTrendTagTextFont(
in.fTrendTagTextFont),
110 fTrendCanvasHeight(
in.fTrendCanvasHeight),
111 fTrendCanvasWidth(
in.fTrendCanvasWidth),
112 fTrendMarginLeft(
in.fTrendMarginLeft),
113 fTrendMarginRight(
in.fTrendMarginRight),
114 fTrendMarginTop(
in.fTrendMarginTop),
115 fTrendMarginBottom(
in.fTrendMarginBottom),
116 fTrendTitleOffsetX(
in.fTrendTitleOffsetX),
117 fTrendTitleOffsetY(
in.fTrendTitleOffsetY),
118 fTrendTitleSizeX(
in.fTrendTitleSizeX),
119 fTrendTitleSizeY(
in.fTrendTitleSizeY),
120 fTrendLabelOffsetX(
in.fTrendLabelOffsetX),
121 fTrendLabelOffsetY(
in.fTrendLabelOffsetY),
122 fTrendLabelSizeX(
in.fTrendLabelSizeX),
123 fTrendLabelSizeY(
in.fTrendLabelSizeY),
124 fInputFileNames(
in.fInputFileNames),
125 fLegendComments(
in.fLegendComments),
126 fMarkerColor(
in.fMarkerColor),
127 fMarkerStyle(
in.fMarkerStyle),
128 fMarkerSize(
in.fMarkerSize),
129 fCopyErrorColor(
in.fCopyErrorColor),
130 fLegendTextForAllRuns(
in.fLegendTextForAllRuns),
131 fDrawPlotsForEachIOV(
in.fDrawPlotsForEachIOV),
132 fNIovInOnePlot(
in.fNIovInOnePlot),
133 fUseLuminosityForTrends(
in.fUseLuminosityForTrends),
134 fSkipRunsWithNoData(
in.fSkipRunsWithNoData),
135 fNormalizeQAplots(
in.fNormalizeQAplots),
136 fSaveComment(
in.fSaveComment),
137 fLumiPerIovFile(
in.fLumiPerIovFile),
138 fIovListMode(
in.fIovListMode),
139 fDrawYearLines(
in.fDrawYearLines),
140 fYearLineColor(
in.fYearLineColor),
141 fYearLineWidth(
in.fYearLineWidth),
142 fYearLineStyle(
in.fYearLineStyle),
143 fRunsForLines(
in.fRunsForLines),
144 fWidePtBinBorders(
in.fWidePtBinBorders),
145 fMakeIovListForSlides(
in.fMakeIovListForSlides),
146 fIovListForSlides(
in.fIovListForSlides) {
262 namespace pt = boost::property_tree;
267 int indexForDefault = 0;
273 alignmentName =
result.first;
277 thisValue =
configuration.get_child(Form(
"jethtplot.alignments.%s.inputFile", alignmentName.c_str()))
284 boost::replace_all(thisValue,
"CMSSW_BASE", getenv(
"CMSSW_BASE"));
289 std::cout <<
"No input file given for alignment " << alignmentName
290 <<
"! All the configuration for this alignment is skipped." << std::endl;
297 thisValue =
configuration.get_child(Form(
"jethtplot.alignments.%s.legendText", alignmentName.c_str()))
302 std::cout <<
"No legend text given for alignment " << alignmentName <<
"! Using default value " 303 << Form(
"Alignment%d", indexForDefault) <<
"." << std::endl;
311 configuration.get_child(Form(
"jethtplot.alignments.%s.color", alignmentName.c_str())).get_value<
int>();
315 std::cout <<
"No marker color given for alignment " << alignmentName <<
"! Using default value " 324 configuration.get_child(Form(
"jethtplot.alignments.%s.style", alignmentName.c_str())).get_value<
int>();
328 std::cout <<
"No marker style given for alignment " << alignmentName <<
"! Using default value " 337 configuration.get_child(Form(
"jethtplot.alignments.%s.markerSize", alignmentName.c_str())).get_value<
int>();
341 std::cout <<
"No marker size given for alignment " << alignmentName <<
"! Using default value " 349 thisBool =
configuration.get_child(Form(
"jethtplot.alignments.%s.copyErrorColor", alignmentName.c_str()))
354 std::cout <<
"Not defined is marker color should be copied for statistical error bars for alignment " 355 << alignmentName <<
"! Using default value false." << std::endl;
369 <<
" in configuration. Using default value " <<
fDrawTrackQA <<
"." << std::endl;
385 <<
" in configuration. Using default value " <<
fDrawHistogram[iHistogram] <<
"." << std::endl;
401 <<
" in configuration. Using default value " <<
fDrawProfile[iProfile] <<
"." << std::endl;
440 .get_value<
double>();
454 .get_value<
double>();
470 .get_value<
double>();
488 .get_value<
double>();
504 .get_value<
double>();
557 <<
" in configuration. Using default value " <<
fNIovInOnePlot <<
"." << std::endl;
568 .get_value<
double>();
572 << Form(
"jethtplot.%s.min%s",
575 <<
" in configuration. Using default value " <<
fProfileZoomLow[iProfile] <<
"." << std::endl;
584 .get_value<
double>();
588 << Form(
"jethtplot.%s.max%s",
591 <<
" in configuration. Using default value " <<
fProfileZoomHigh[iProfile] <<
"." << std::endl;
607 <<
" in configuration. Using default value " <<
fDrawTrend[iTrend] <<
"." << std::endl;
617 .get_value<
double>();
631 .get_value<
double>();
645 .get_value<
double>();
676 <<
" in configuration. Using default value " <<
fDrawYearLines <<
"." << std::endl;
688 <<
" in configuration. Using default value " <<
fYearLineColor <<
"." << std::endl;
700 <<
" in configuration. Using default value " <<
fYearLineWidth <<
"." << std::endl;
712 <<
" in configuration. Using default value " <<
fYearLineStyle <<
"." << std::endl;
725 <<
" in configuration. Using default values 290543 and 314881." << std::endl;
739 <<
" in configuration. Using default value " <<
fDrawTrendTag <<
"." << std::endl;
746 for (
auto& configurationArray :
749 for (
auto&
item : configurationArray.second) {
750 if (itemIndex == 0) {
753 if (itemIndex == 1) {
756 if (itemIndex == 2) {
764 std::cout <<
"There was either no value for " 766 <<
" in configuration, or the input was in wrong format. Using default values 2016 at (0.105,0.855), " 767 "2017 at (0.305,0.855) and 2018 at (0.563,0.855)." 788 .get_value<
double>();
792 <<
" in configuration. Using default value " <<
fTrendTagTextSize <<
"." << std::endl;
804 <<
" in configuration. Using default value " <<
fTrendTagTextFont <<
"." << std::endl;
816 <<
" in configuration. Using default value " <<
fTrendCanvasHeight <<
"." << std::endl;
828 <<
" in configuration. Using default value " <<
fTrendCanvasWidth <<
"." << std::endl;
836 .get_value<
double>();
840 <<
" in configuration. Using default value " <<
fTrendMarginLeft <<
"." << std::endl;
848 .get_value<
double>();
852 <<
" in configuration. Using default value " <<
fTrendMarginRight <<
"." << std::endl;
860 .get_value<
double>();
864 <<
" in configuration. Using default value " <<
fTrendMarginTop <<
"." << std::endl;
872 .get_value<
double>();
876 <<
" in configuration. Using default value " <<
fTrendMarginBottom <<
"." << std::endl;
884 .get_value<
double>();
888 <<
" in configuration. Using default value " <<
fTrendTitleOffsetX <<
"." << std::endl;
896 .get_value<
double>();
900 <<
" in configuration. Using default value " <<
fTrendTitleOffsetY <<
"." << std::endl;
908 .get_value<
double>();
912 <<
" in configuration. Using default value " <<
fTrendTitleSizeX <<
"." << std::endl;
920 .get_value<
double>();
924 <<
" in configuration. Using default value " <<
fTrendTitleSizeY <<
"." << std::endl;
932 .get_value<
double>();
936 <<
" in configuration. Using default value " <<
fTrendLabelOffsetX <<
"." << std::endl;
944 .get_value<
double>();
948 <<
" in configuration. Using default value " <<
fTrendLabelOffsetY <<
"." << std::endl;
956 .get_value<
double>();
960 <<
" in configuration. Using default value " <<
fTrendLabelSizeX <<
"." << std::endl;
968 .get_value<
double>();
972 <<
" in configuration. Using default value " <<
fTrendLabelSizeY <<
"." << std::endl;
1005 for (
int iTrend = 0; iTrend <
knTrendTypes; iTrend++) {
1011 .get_value<
double>();
1016 <<
" in configuration. Using default value " <<
fTrendZoomLow[iTrend] <<
"." << std::endl;
1025 .get_value<
double>();
1030 <<
" in configuration. Using default value " <<
fTrendZoomHigh[iTrend] <<
"." << std::endl;
1041 <<
" in configuration. Using default value " <<
fNormalizeQAplots <<
"." << std::endl;
1051 <<
" in configuration. Using default value (empty string)." << std::endl;
1064 boost::replace_all(
fLumiPerIovFile,
"CMSSW_BASE", getenv(
"CMSSW_BASE"));
1071 <<
" in configuration. Using default value " <<
fLumiPerIovFile <<
"." << std::endl;
1081 <<
" in configuration. Using default value " <<
fIovListMode <<
"." << std::endl;
1093 <<
" in configuration. Using default values 3, 5, 10, 20, 50 and 100." << std::endl;
1128 <<
" in configuration. Using default value " <<
fIovListForSlides <<
"." << std::endl;
1138 std::cout <<
"Input files: " << std::endl;
1144 std::cout <<
"Legend text related to input files: " << std::endl;
1150 std::cout <<
"Marker colors: " << std::endl;
1156 std::cout <<
"Marker styles: " << std::endl;
1162 std::cout <<
"Marker sizes: " << std::endl;
1168 std::cout <<
"Copy error colors: " << std::endl;
1219 for (
int iTrend = 0; iTrend <
knTrendTypes; iTrend++) {
1249 std::cout <<
"Runs for vertical lines: " << std::endl;
1270 for (
int iTrend = 0; iTrend <
knTrendTypes; iTrend++) {
1282 std::cout <<
"Wide pT bin borders: " << std::endl;
1436 if (iFile < 0 || iFile >= inputFileCount)
1447 if (iComment < 0 || iComment >= commentCount)
1459 if (iFile >= markerColorCount)
1467 if (iFile < 0 || iFile >= markerStyleCount)
1475 if (iFile < 0 || iFile >= markerSizeCount)
1483 if (iFile < 0 || iFile >= errorCopyCount)
1538 static std::regex
env(
"\\$\\{?([^}\\/]+)\\}?\\/");
1541 const char*
s = getenv(
match[1].
str().c_str());
double fProfileLegendShiftColumnY[kMaxLegendColumns]
std::string fJsonLumiPerIovFile
double fTrendLegendShiftTotalX
std::vector< std::string > trendTagText() const
std::string fJsonNameHistogram[knHistogramTypes]
bool drawProfile(const int iProfile) const
std::string fJsonNameMarginLeft
double profileLegendShiftColumnY(const int iColumn) const
double trendMarginTop() const
void autoExpandEnvironmentVariables(std::string &text) const
std::vector< double > trendTagPositionX() const
std::string fJsonNameTrend[knHistogramTypes]
std::vector< bool > fCopyErrorColor
std::string fJsonNameLegendTextForAllRuns
std::string fJsonNameTrendZoom[knHistogramTypes]
bool normalizeQAplots() const
std::string fLumiPerIovFile
double trendLabelSizeY() const
int yearLineColor() const
std::string fJsonNameMarginBottom
std::string fJsonNameLabelOffsetX
std::vector< std::string > inputFiles() const
double trendMarginBottom() const
std::string fJsonNameLegendShiftTotalX
std::string fJsonNameProfileZoom[knProfileTypes]
std::vector< int > fMarkerColor
std::string fJsonUseLuminosityForTrends
std::string expandEnvironmentVariables(const std::string &input) const
std::vector< int > runsForLines() const
std::vector< int > fRunsForLines
std::string fJsonNameTagTextSize
std::string fJsonNameTitleSizeX
double trendZoomLow(const int iTrend) const
static const int kMaxLegendColumns
double trendTitleOffsetY() const
std::string fJsonNameTagInfo
double fProfileLegendShiftTotalX
double fTrendTitleOffsetX
bool makeIovListForSlides() const
double fProfileLegendShiftTotalY
std::string fJsonNameMarginRight
double fTrendMarginBottom
bool drawTrendTag() const
double fProfileZoomLow[knProfileTypes]
bool skipRunsWithNoData() const
bool fMakeIovListForSlides
bool copyErrorColor(const int iFile) const
int markerStyle(const int iFile) const
std::string fJsonCategoryNameHistogram
std::string fJsonNameLegendShiftColumnX
int trendCanvasHeight() const
double profileLegendTextSize() const
double fProfileLegendTextSize
const char * iovListForSlides() const
double trendTitleOffsetX() const
std::string fJsonNameDrawTag
bool fDrawReferenceProfile
std::string fJsonNameCanvasWidth
std::vector< double > fWidePtBinBorders
std::string fLegendTextForAllRuns
static std::string const input
double trendZoomHigh(const int iTrend) const
double trendLabelSizeX() const
double fProfileLegendShiftColumnX[kMaxLegendColumns]
std::string fJsonSkipRunsWithNoData
bool useLuminosityForTrends() const
U second(std::pair< T, U > const &p)
std::string fJsonCategoryNameProfile
std::string fJsonNameTagTextFont
std::string fJsonNameLegendTextFont
bool drawYearLines() const
double fTrendLabelOffsetX
Container::value_type value_type
std::string fJsonNameLabelSizeX
std::vector< int > fMarkerSize
std::string fJsonNameTitleSizeY
bool fUseLuminosityForTrends
int trendCanvasWidth() const
virtual ~JetHtPlotConfiguration()
std::string fJsonYearLineWidth
std::string fJsonNameReferenceProfile
double fTrendZoomLow[knTrendTypes]
double fProfileZoomHigh[knProfileTypes]
std::vector< double > fTrendTagPositionX
double trendTagTextSize() const
bool drawCentralEtaSummaryProfile() const
int trendLegendTextFont() const
bool drawTrend(const int iTrend) const
std::string fJsonYearLineStyle
std::string legendComment(const int iComment) const
std::string fJsonNameProfile[knProfileTypes]
int trendTagTextFont() const
bool fDrawProfile[knProfileTypes]
std::string fJsonNameMarginTop
std::vector< std::string > fTrendTagText
int yearLineStyle() const
std::string fJsonNameCanvasHeight
std::vector< int > fMarkerStyle
bool drawHistogram(const int iHistogram) const
int markerColor(const int iFile) const
std::string fJsonDrawYearLines
const char * lumiPerIovFile() const
std::string fIovListForSlides
std::string fJsonRunsForLines
bool fDrawCentralEtaSummaryProfile
void printConfiguration() const
std::string fJsonDrawPlotsForEachIOV
double fTrendTitleOffsetY
double fTrendLegendTextSize
int profileLegendTextFont() const
int markerSize(const int iFile) const
bool fDrawTrend[knTrendTypes]
std::string fJsonNameLegendShiftColumnY
std::string fJsonNameLabelOffsetY
double fTrendLegendShiftTotalY
bool fDrawHistogram[knHistogramTypes]
int nIovInOnePlot() const
double fTrendZoomHigh[knTrendTypes]
std::string fJsonNIovInOnePlot
std::string fJsonYearLineColor
bool fDrawPlotsForEachIOV
double trendLegendShiftTotalY() const
std::string fJsonSaveComment
std::string fJsonIovListMode
std::string fJsonNameCentralEtaSummaryProfile
std::vector< std::string > fLegendComments
double profileLegendShiftColumnX(const int iColumn) const
double trendTitleSizeX() const
std::string fJsonNameLabelSizeY
std::string fJsonCategoryNameProfileZoom
std::string legendTextForAllRuns() const
std::string fJsonNameTitleOffsetY
double trendLabelOffsetY() const
std::string fJsonMakeIovListForSlides
bool drawReferenceProfile() const
const char * iovListMode() const
std::vector< double > fTrendTagPositionY
std::string fJsonNameLegendTextSize
std::string fJsonWidePtBinBorders
std::string fJsonIovListForSlides
double profileLegendShiftTotalY() const
bool drawPlotsForEachIOV() const
std::string fJsonCategoryNameTrendZoom
int yearLineWidth() const
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
double trendMarginRight() const
std::string fJsonNameTitleOffsetX
double trendLegendTextSize() const
double profileZoomHigh(const int iProfile) const
double profileLegendShiftTotalX() const
int fProfileLegendTextFont
double trendMarginLeft() const
std::string fJsonNormalizeQAplots
const char * saveComment() const
JetHtPlotConfiguration & operator=(const JetHtPlotConfiguration &obj)
double trendLabelOffsetX() const
std::string fJsonTrackQAname
double fTrendLabelOffsetY
double trendTitleSizeY() const
std::string fJsonNameLegendShiftTotalY
std::vector< double > widePtBinBorders() const
std::vector< std::string > fInputFileNames
void readJsonFile(const std::string fileName)
std::vector< double > trendTagPositionY() const
double trendLegendShiftTotalX() const
double profileZoomLow(const int iProfile) const
std::string fJsonCategoryNameTrend
std::string inputFile(const int iFile) const