-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakeCNNOutput.C
76 lines (61 loc) · 2.12 KB
/
makeCNNOutput.C
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
#include "helperDisplacedDijets.C"
#include "helperDisplacedDijetTriggers.C"
#include "helperCNN.C"
void makeCNNOutput(const char* ifname="./sig_wtracks.root"
, const char* ofname="exampleAnalyzed.root"
, bool isSignal = false
, int mode = 0
, bool isMC = true
, int maxEvents = 1000000
, const char* json = "/home/mwalker/golden_246908-260627_20151120.txt"
)
{
TChain* tree = new TChain("tree");
TString input=ifname;
//input += "/*.root";
tree->Add(input);
FlatTreeReader* reader = new FlatTreeReader(tree);
AdvancedHandler* handler = new AdvancedHandler(ofname,reader);
AnalysisTreeWriter* writer = new AnalysisTreeWriter(handler,"treeR");
handler->setWriter(writer);
////////////////////////////////////////////////////
//Setup some products jets, electrons, muons, etc//
///////////////////////////////////////////////////
setupProducts(handler,isSignal);
setupTracks(handler);
setupTrackMatching(handler);
//isSignal->addProductCut("goodSignalJets","fromSecondary");
//////////////////////
//Add some variables//
//////////////////////
vector<TString> products = {"BASICCALOJETS","BASICCALOJETS1"};
setupVariables(handler);
setupListVariablesAndHistograms(handler,products);
setupTriggers(handler);
//setupListMaxVariablesAndHistograms(handler);
setupMC(handler);
setupCNNVariables(handler);
//else handler->readGoodRunLumiFromJSON(TString(json));
////////////////////////
//Add some signatures//
//////////////////////
//handler->addSignature("SigMET150","")
// ->addCut("MET150")
// ;
//////////////////////////
//Create some histograms//
//////////////////////////
//addHistograms(handler);
//////////////////////////////////
//Final bookkeeping and execution//
///////////////////////////////////
handler->setMode("nEntryHigh",maxEvents);
//handler->setMode("nEntryHigh",1);
//handler->setDebugMode(true);
//handler->addPrintModule(new PrintModuleEverything("everything"));
handler->initSignatures();
handler->eventLoop();
//handler->eventLoop(1,24248);
handler->finishSignatures();
cout<<"Done, exiting ...."<<endl;
}