-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathjet_draw_closure_x.cc
84 lines (68 loc) · 2.38 KB
/
jet_draw_closure_x.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
///////////////////////////////////////////////////////////////////
//
// jet_draw_closure_x
// ------------------
//
// 08/26/2015 Alexx Perloff <[email protected]>
///////////////////////////////////////////////////////////////////
#include "JetMETAnalysis/JetUtilities/interface/ClosureMaker.hh"
#include "JetMETAnalysis/JetUtilities/interface/RatioMaker.hh"
#include "JetMETAnalysis/JetUtilities/interface/DifferenceMaker.hh"
#include "TROOT.h"
#include "TSystem.h"
#include "TStyle.h"
#include <memory>
using namespace std;
////////////////////////////////////////////////////////////////////////////////
// define local functions
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// main
////////////////////////////////////////////////////////////////////////////////
//______________________________________________________________________________
int main(int argc,char**argv)
{
gROOT->SetStyle("Plain");
gStyle->SetOptStat(0);
gSystem->Load("libFWCoreFWLite.so");
//
// evaluate command-line / configuration file options
//
CommandLine cl;
if (!cl.parse(argc,argv)) return 0;
bool doPt = cl.getValue<bool> ("doPt", false);
bool doEta = cl.getValue<bool> ("doEta", false);
bool doRatioPt = cl.getValue<bool> ("doRatioPt", false);
bool doRatioEta = cl.getValue<bool> ("doRatioEta", false);
bool doFlavorDifference = cl.getValue<bool> ("doFlavorDifference", false);
bool ptcl = cl.getValue<bool> ("ptcl", false);
if (!cl.partialCheck()) return 0;
cl.print();
setTDRStyle();
if(doPt || doEta) {
unique_ptr<ClosureMaker> cm(new ClosureMaker(cl));
if(doPt) {
ptcl ? cm->makeClosure(VARIABLES::ptclpt) : cm->makeClosure(VARIABLES::refpt);
}
if(doEta) {
if(doPt)
cm->resetForNextAlgorithm();
cm->makeClosure(VARIABLES::jteta);
}
}
if(doRatioPt || doRatioEta) {
unique_ptr<RatioMaker> rm(new RatioMaker(cl));
if(doRatioPt) {
rm->makeRatio(VARIABLES::refpt);
}
if(doRatioEta) {
rm->makeRatio(VARIABLES::jteta,false);
rm->makeRatio(VARIABLES::jteta,true);
}
}
if(doFlavorDifference) {
unique_ptr<DifferenceMaker> dm(new DifferenceMaker(cl));
dm->makeDifference();
}
return 0;
}