Skip to content

Commit 0387915

Browse files
committed
Merge pull request #50 from amagitte/74_14fwk_Alessio_cern
New Golden Json
2 parents 9380bfb + ea011be commit 0387915

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

bin/common/runPlotter.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ bool StoreInFile = true;
5353
bool doPlot = true;
5454
bool splitCanvas = false;
5555
bool onlyCutIndex = false;
56+
bool showRatioBox=true;
5657
string inDir = "OUTNew/";
5758
string jsonFile = "../../data/beauty-samples.json";
5859
string outDir = "Img/";
@@ -847,7 +848,7 @@ void Draw1DHistogram(JSONWrapper::Object& Root, TFile* File, NameAndType& HistoP
847848
std::vector<TH1 *> compDists;
848849
if(data) compDists.push_back(data);
849850
else if(spimpose.size()>0) compDists=spimpose;
850-
if(mc && compDists.size()){
851+
if( mc && compDists.size() && showRatioBox ){
851852
c1->cd();
852853
TPad *t2 = new TPad("t2", "t2",0.0,0.0, 1.0,0.2);
853854
t2->SetFillColor(0);
@@ -1103,6 +1104,7 @@ int main(int argc, char* argv[]){
11031104
printf("--plotExt --> extension to save, you can specify multiple extensions by repeating this option\n");
11041105
printf("--cutflow --> name of the histogram with the original number of events (cutflow by default)\n");
11051106
printf("--splitCanvas --> (only for 2D plots) save all the samples in separated pltos\n");
1107+
printf("--removeRatioPlot --> if you want to remove ratio plots between Data ad Mc\n");
11061108

11071109
printf("command line example: runPlotter --json ../data/beauty-samples.json --iLumi 2007 --inDir OUT/ --outDir OUT/plots/ --outFile plotter.root --noRoot --noPlot\n");
11081110
return 0;
@@ -1140,6 +1142,7 @@ int main(int argc, char* argv[]){
11401142
if(arg.find("--noPowers" )!=string::npos){ doPowers= false; }
11411143
if(arg.find("--noRoot")!=string::npos){ StoreInFile = false; }
11421144
if(arg.find("--noPlot")!=string::npos){ doPlot = false; }
1145+
if(arg.find("--removeRatioPlot")!=string::npos){ showRatioBox = false; printf("No ratio plot between Data and Mc \n"); }
11431146
if(arg.find("--plotExt" )!=string::npos && i+1<argc){ plotExt.push_back(argv[i+1]); i++; printf("saving plots as = %s\n", argv[i]); }
11441147
if(arg.find("--cutflow" )!=string::npos && i+1<argc){ cutflowhisto = argv[i+1]; i++; printf("Normalizing from 1st bin in = %s\n", cutflowhisto.c_str()); }
11451148
if(arg.find("--splitCanvas")!=string::npos){ splitCanvas = true; }
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"254231": [[1, 24]], "254232": [[1, 81]], "254790": [[90, 90], [93, 630], [633, 697], [701, 715], [719, 784]], "254852": [[47, 94]], "254879": [[52, 52], [54, 140]], "254906": [[1, 75]], "254907": [[1, 52]], "254914": [[32, 32], [34, 78]], "256630": [[5, 26]], "256673": [[55, 56]], "256674": [[1, 2]], "256675": [[1, 106], [111, 164]], "256676": [[1, 160], [162, 208]], "256677": [[1, 291], [293, 390], [392, 397], [400, 455], [457, 482]], "256801": [[73, 263]], "256842": [[131, 132]], "256843": [[1, 204], [207, 284], [286, 378], [380, 461], [463, 587], [598, 627], [630, 661], [1001, 1034], [1036, 1081], [1083, 1191], [1193, 1193], [1195, 1329], [1331, 1332]], "256866": [[34, 47]], "256867": [[1, 16], [19, 94]], "256868": [[5, 33], [35, 200], [202, 492]], "256869": [[1, 34]], "256926": [[35, 50], [53, 62], [64, 65]], "256941": [[1, 17], [19, 29], [103, 105], [107, 126], [129, 129], [131, 168], [170, 170], [175, 290], [293, 294]], "257461": [[44, 95]], "257531": [[5, 45], [50, 143]], "257599": [[42, 118]], "257613": [[14, 1307]], "257614": [[1, 16]], "257645": [[37, 73], [75, 1096]], "257682": [[66, 366]], "257722": [[1, 19]], "257723": [[1, 1], [3, 108], [114, 148]], "257735": [[1, 15]], "257751": [[1, 463]], "257804": [[1, 17]], "257805": [[1, 249]], "257816": [[1, 385]], "257819": [[1, 248]], "257968": [[69, 326]], "257969": [[1, 634]], "258129": [[30, 124]], "258136": [[1, 60]], "258157": [[1, 56]], "258158": [[1, 1088], [1091, 1786]], "258159": [[1, 501]], "258177": [[1, 342], [347, 724], [755, 1939]], "258211": [[43, 129]], "258213": [[1, 165]], "258214": [[1, 217]], "258215": [[1, 6]], "258287": [[45, 144], [148, 227]], "258403": [[1, 251]], "258425": [[3, 136]], "258426": [[1, 10]], "258427": [[1, 107]], "258428": [[1, 159]], "258432": [[1, 4]], "258434": [[1, 453]], "258440": [[1, 442], [444, 732]], "258444": [[1, 37]], "258445": [[1, 302]], "258446": [[1, 142]], "258448": [[2, 100], [102, 731]], "258655": [[60, 68]], "258656": [[1, 334]], "258694": [[23, 199]], "258702": [[52, 402]], "258703": [[1, 389]], "258705": [[1, 100]], "258706": [[1, 733]], "258712": [[1, 524]], "258713": [[1, 161]], "258714": [[1, 67]], "258741": [[22, 72]], "258742": [[2, 693]], "258745": [[1, 260]], "258749": [[1, 204], [220, 604]], "258750": [[1, 197]], "259626": [[83, 106], [108, 111], [115, 166], [169, 215], [218, 437]], "259637": [[1, 72], [75, 221]], "259681": [[64, 98]], "259683": [[5, 19], [22, 23], [25, 94]], "259685": [[1, 209], [213, 240], [242, 290], [292, 445], [447, 538], [540, 544], [546, 630]], "259686": [[1, 43], [45, 47], [49, 100], [102, 108], [110, 163], [165, 245], [248, 341]], "259721": [[73, 99], [102, 408]], "259809": [[53, 222]], "259810": [[1, 113], [116, 116]], "259811": [[1, 47], [50, 91]], "259813": [[1, 10]], "259817": [[1, 5]], "259818": [[1, 160]], "259820": [[1, 32], [36, 161]], "259821": [[1, 75], [78, 212]], "259822": [[1, 14], [17, 464]], "259861": [[1, 34], [36, 38], [40, 66], [69, 77]], "259862": [[1, 13], [16, 532]], "259884": [[73, 143], [147, 155]], "259890": [[1, 34], [37, 109]], "259891": [[1, 108]], "260373": [[47, 370], [373, 408]], "260425": [[1, 18], [21, 55], [58, 256]], "260426": [[1, 52], [55, 296], [298, 307], [310, 504]]}

test/hzz2l2v/samples.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,12 @@
105105
"fill":0,
106106
"marker":20,
107107
"data":[
108-
{ "dtag":"Data13TeV_DoubleElectron2015D_05Oct2015" , "xsec":1.0 , "br":[ 1.0 ] , "dset":"/DoubleEG/Run2015D-05Oct2015-v1/MINIAOD" , "lumiMask":"/afs/cern.ch/work/a/amagitte/public/HZZ_Analysis_Run2/CMSSW_7_4_14/src/UserCode/llvv_fwk/test/hzz2l2v/Cert_246908-259891_13TeV_PromptReco_Collisions15_25ns_JSON.txt" },
109-
{ "dtag":"Data13TeV_DoubleMu2015D_05Oct2015" , "xsec":1.0 , "br":[ 1.0 ] , "dset":"/DoubleMuon/Run2015D-05Oct2015-v1/MINIAOD" , "lumiMask":"/afs/cern.ch/work/a/amagitte/public/HZZ_Analysis_Run2/CMSSW_7_4_14/src/UserCode/llvv_fwk/test/hzz2l2v/Cert_246908-259891_13TeV_PromptReco_Collisions15_25ns_JSON.txt" },
110-
{ "dtag":"Data13TeV_MuEG2015D_05Oct2015" , "xsec":1.0 , "br":[ 1.0 ] , "dset":"/MuonEG/Run2015D-05Oct2015-v2/MINIAOD" , "lumiMask":"/afs/cern.ch/work/a/amagitte/public/HZZ_Analysis_Run2/CMSSW_7_4_14/src/UserCode/llvv_fwk/test/hzz2l2v/Cert_246908-259891_13TeV_PromptReco_Collisions15_25ns_JSON.txt" },
111-
{ "dtag":"Data13TeV_DoubleElectron2015D" , "xsec":1.0 , "br":[ 1.0 ] , "dset":"/DoubleEG/Run2015D-PromptReco-v4/MINIAOD" , "lumiMask":"/afs/cern.ch/work/a/amagitte/public/HZZ_Analysis_Run2/CMSSW_7_4_14/src/UserCode/llvv_fwk/test/hzz2l2v/Cert_246908-259891_13TeV_PromptReco_Collisions15_25ns_JSON.txt" },
112-
{ "dtag":"Data13TeV_DoubleMu2015D" , "xsec":1.0 , "br":[ 1.0 ] , "dset":"/DoubleMuon/Run2015D-PromptReco-v4/MINIAOD" , "lumiMask":"/afs/cern.ch/work/a/amagitte/public/HZZ_Analysis_Run2/CMSSW_7_4_14/src/UserCode/llvv_fwk/test/hzz2l2v/Cert_246908-259891_13TeV_PromptReco_Collisions15_25ns_JSON.txt" },
113-
{ "dtag":"Data13TeV_MuEG2015D" , "xsec":1.0 , "br":[ 1.0 ] , "dset":"/MuonEG/Run2015D-PromptReco-v4/MINIAOD" , "lumiMask":"/afs/cern.ch/work/a/amagitte/public/HZZ_Analysis_Run2/CMSSW_7_4_14/src/UserCode/llvv_fwk/test/hzz2l2v/Cert_246908-259891_13TeV_PromptReco_Collisions15_25ns_JSON.txt" }
108+
{ "dtag":"Data13TeV_DoubleElectron2015D_05Oct2015" , "xsec":1.0 , "br":[ 1.0 ] , "dset":"/DoubleEG/Run2015D-05Oct2015-v1/MINIAOD" , "lumiMask":"/afs/cern.ch/work/a/amagitte/public/HZZ_Analysis_Run2/CMSSW_7_4_14/src/UserCode/llvv_fwk/test/hzz2l2v/Cert_246908-260426_13TeV_PromptReco_Collisions15_25ns_JSON.txt" },
109+
{ "dtag":"Data13TeV_DoubleMu2015D_05Oct2015" , "xsec":1.0 , "br":[ 1.0 ] , "dset":"/DoubleMuon/Run2015D-05Oct2015-v1/MINIAOD" , "lumiMask":"/afs/cern.ch/work/a/amagitte/public/HZZ_Analysis_Run2/CMSSW_7_4_14/src/UserCode/llvv_fwk/test/hzz2l2v/Cert_246908-260426_13TeV_PromptReco_Collisions15_25ns_JSON.txt" },
110+
{ "dtag":"Data13TeV_MuEG2015D_05Oct2015" , "xsec":1.0 , "br":[ 1.0 ] , "dset":"/MuonEG/Run2015D-05Oct2015-v2/MINIAOD" , "lumiMask":"/afs/cern.ch/work/a/amagitte/public/HZZ_Analysis_Run2/CMSSW_7_4_14/src/UserCode/llvv_fwk/test/hzz2l2v/Cert_246908-260426_13TeV_PromptReco_Collisions15_25ns_JSON.txt" },
111+
{ "dtag":"Data13TeV_DoubleElectron2015D" , "xsec":1.0 , "br":[ 1.0 ] , "dset":"/DoubleEG/Run2015D-PromptReco-v4/MINIAOD" , "lumiMask":"/afs/cern.ch/work/a/amagitte/public/HZZ_Analysis_Run2/CMSSW_7_4_14/src/UserCode/llvv_fwk/test/hzz2l2v/Cert_246908-260426_13TeV_PromptReco_Collisions15_25ns_JSON.txt" },
112+
{ "dtag":"Data13TeV_DoubleMu2015D" , "xsec":1.0 , "br":[ 1.0 ] , "dset":"/DoubleMuon/Run2015D-PromptReco-v4/MINIAOD" , "lumiMask":"/afs/cern.ch/work/a/amagitte/public/HZZ_Analysis_Run2/CMSSW_7_4_14/src/UserCode/llvv_fwk/test/hzz2l2v/Cert_246908-260426_13TeV_PromptReco_Collisions15_25ns_JSON.txt" },
113+
{ "dtag":"Data13TeV_MuEG2015D" , "xsec":1.0 , "br":[ 1.0 ] , "dset":"/MuonEG/Run2015D-PromptReco-v4/MINIAOD" , "lumiMask":"/afs/cern.ch/work/a/amagitte/public/HZZ_Analysis_Run2/CMSSW_7_4_14/src/UserCode/llvv_fwk/test/hzz2l2v/Cert_246908-260426_13TeV_PromptReco_Collisions15_25ns_JSON.txt" }
114114
]
115115
},
116116
{

0 commit comments

Comments
 (0)