@@ -2699,6 +2699,7 @@ void PlotHistCorrFactors(char* infile1,
26992699 bool isRealData = false,
27002700 const char * year = "2024" ,
27012701 int iformat = 0 ,
2702+ int range = 1 ,
27022703 int save = 0 ) {
27032704 std ::map < int , cfactors > cfacs [5 ];
27042705 std ::vector < std ::string > texts ;
@@ -2746,6 +2747,14 @@ void PlotHistCorrFactors(char* infile1,
27462747 gStyle -> SetPadColor (kWhite );
27472748 gStyle -> SetFillColor (kWhite );
27482749 gStyle -> SetOptTitle (0 );
2750+ double ylow , yhigh ;
2751+ if (range == 0 ) {
2752+ ylow = 0.8 ; yhigh = 1.2 ;
2753+ } else if (range == 1 ) {
2754+ ylow = 0.5 ; yhigh = 1.5 ;
2755+ } else {
2756+ ylow = 0.0 ; yhigh = 2.0 ;
2757+ }
27492758 if ((!ratio ) && drawStatBox ) {
27502759 gStyle -> SetOptStat (10 );
27512760 gStyle -> SetOptFit (10 );
@@ -2808,7 +2817,7 @@ void PlotHistCorrFactors(char* infile1,
28082817 h -> GetYaxis ()-> SetLabelOffset (0.005 );
28092818 h -> GetYaxis ()-> SetTitleSize (0.036 );
28102819 h -> GetYaxis ()-> SetTitleOffset (1.20 );
2811- h -> GetYaxis ()-> SetRangeUser (0.50 , 1.50 );
2820+ h -> GetYaxis ()-> SetRangeUser (ylow , yhigh );
28122821 hists .push_back (h );
28132822 fitr .push_back (fit );
28142823 htype .push_back (ih );
@@ -2859,7 +2868,7 @@ void PlotHistCorrFactors(char* infile1,
28592868 h -> GetYaxis ()-> SetTitle ("Correction Factor" );
28602869 h -> GetYaxis ()-> SetLabelOffset (0.005 );
28612870 h -> GetYaxis ()-> SetTitleOffset (1.20 );
2862- h -> GetYaxis ()-> SetRangeUser (0.5 , 1.5 );
2871+ h -> GetYaxis ()-> SetRangeUser (ylow , yhigh );
28632872 hists .push_back (h );
28642873 entries .push_back (nent );
28652874 if (drawStatBox )
@@ -2954,6 +2963,7 @@ void PlotHistCorr2Factors(char* infile1,
29542963 bool isRealData = true,
29552964 const char * year = "2024" ,
29562965 int iformat = 0 ,
2966+ int range = 1 ,
29572967 int save = 0 ) {
29582968 std ::map < int , cfactors > cfacs [5 ];
29592969 std ::vector < std ::string > texts ;
@@ -2980,6 +2990,14 @@ void PlotHistCorr2Factors(char* infile1,
29802990 gStyle -> SetPadColor (kWhite );
29812991 gStyle -> SetFillColor (kWhite );
29822992 gStyle -> SetOptTitle (0 );
2993+ double ylow , yhigh ;
2994+ if (range == 0 ) {
2995+ ylow = 0.8 ; yhigh = 1.2 ;
2996+ } else if (range == 1 ) {
2997+ ylow = 0.5 ; yhigh = 1.5 ;
2998+ } else {
2999+ ylow = 0.0 ; yhigh = 2.0 ;
3000+ }
29833001 if ((!ratio ) && drawStatBox ) {
29843002 gStyle -> SetOptStat (10 );
29853003 gStyle -> SetOptFit (10 );
@@ -3036,7 +3054,7 @@ void PlotHistCorr2Factors(char* infile1,
30363054 h -> GetYaxis ()-> SetLabelOffset (0.005 );
30373055 h -> GetYaxis ()-> SetTitleSize (0.036 );
30383056 h -> GetYaxis ()-> SetTitleOffset (1.20 );
3039- h -> GetYaxis ()-> SetRangeUser (0.80 , 1.20 );
3057+ h -> GetYaxis ()-> SetRangeUser (ylow , yhigh );
30403058 hists .push_back (h );
30413059 fitr .push_back (fit );
30423060 htype .push_back (ih );
@@ -3081,7 +3099,7 @@ void PlotHistCorr2Factors(char* infile1,
30813099 h -> GetYaxis ()-> SetTitle ("Correction Factor" );
30823100 h -> GetYaxis ()-> SetLabelOffset (0.005 );
30833101 h -> GetYaxis ()-> SetTitleOffset (1.20 );
3084- h -> GetYaxis ()-> SetRangeUser (0.8 , 1.2 );
3102+ h -> GetYaxis ()-> SetRangeUser (ylow , yhigh );
30853103 hists .push_back (h );
30863104 entries .push_back (nent );
30873105 if (drawStatBox )
@@ -3176,6 +3194,7 @@ void PlotHistCorrDFactors(char* infile1,
31763194 bool isRealData = true,
31773195 const char * year = "2024" ,
31783196 int iformat = 0 ,
3197+ int range = 0 ,
31793198 int save = 0 ) {
31803199 std ::map < int , cfactors > cfacs [5 ];
31813200 std ::vector < std ::string > texts ;
@@ -3223,6 +3242,14 @@ void PlotHistCorrDFactors(char* infile1,
32233242 gStyle -> SetPadColor (kWhite );
32243243 gStyle -> SetFillColor (kWhite );
32253244 gStyle -> SetOptTitle (0 );
3245+ double ylow , yhigh ;
3246+ if (range == 0 ) {
3247+ ylow = 0.8 ; yhigh = 1.2 ;
3248+ } else if (range == 1 ) {
3249+ ylow = 0.5 ; yhigh = 1.5 ;
3250+ } else {
3251+ ylow = 0.0 ; yhigh = 2.0 ;
3252+ }
32263253 if ((!ratio ) && drawStatBox ) {
32273254 gStyle -> SetOptStat (10 );
32283255 gStyle -> SetOptFit (10 );
@@ -3283,7 +3310,7 @@ void PlotHistCorrDFactors(char* infile1,
32833310 h -> GetYaxis ()-> SetLabelOffset (0.005 );
32843311 h -> GetYaxis ()-> SetTitleSize (0.036 );
32853312 h -> GetYaxis ()-> SetTitleOffset (1.20 );
3286- h -> GetYaxis ()-> SetRangeUser (0.80 , 1.20 );
3313+ h -> GetYaxis ()-> SetRangeUser (ylow , yhigh );
32873314 hists .push_back (h );
32883315 fitr .push_back (fit );
32893316 htype .push_back (ih );
@@ -3328,7 +3355,7 @@ void PlotHistCorrDFactors(char* infile1,
33283355 h -> GetYaxis ()-> SetTitle ("Correction Factor" );
33293356 h -> GetYaxis ()-> SetLabelOffset (0.005 );
33303357 h -> GetYaxis ()-> SetTitleOffset (1.20 );
3331- h -> GetYaxis ()-> SetRangeUser (0.8 , 1.2 );
3358+ h -> GetYaxis ()-> SetRangeUser (ylow , yhigh );
33323359 hists .push_back (h );
33333360 entries .push_back (nent );
33343361 if (drawStatBox )
0 commit comments