-
Notifications
You must be signed in to change notification settings - Fork 0
/
ana.C
64 lines (49 loc) · 2.36 KB
/
ana.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
// Original Author: Dongwook Jang
// $Id: ana.C,v 1.8 2011/11/01 22:14:51 dwjang Exp $
//
// Jet energy correction is possible at ntuple level.
// $ cd ../jec/JetMETObjects
// $ make
// This will create a shared library in jec/lib
// which is included below as libJetMETObjects.so
//
// Come back to this directory and do
// $ make
// $ root -b -q -l ana.C
// will produce hist_"physics"_"ds".root
void ana(TString ds="relval", TString physics="ttbar") {
gSystem->Load("libSusyEvent.so");
// Look ../jec/JetMETObjects/README
gSystem->Load("../jec/lib/libJetMETObjects.so");
// Printing utility for ntuple variables
gROOT->LoadMacro("SusyEventPrinter.cc+");
// Main analysis code
gROOT->LoadMacro("SusyEventAnalyzer_shruti.cc+");
// chain of inputs
TChain* chain = new TChain("susyTree");
chain->Add("../susyEvents_Shruti.root");
//chain->Add("dcap:///pnfs/cms/WAX/resilient/lpcpjm/SusyNtuples/cms423v2_v1/Run2011A-May10ReReco-v1/Photon/susyEvent_1_1_dLs.root");
SusyEventAnalyzer_shruti* sea = new SusyEventAnalyzer_shruti(chain);
// configuration parameters
// any values given here will replace the default values
sea->SetDataset(physics+"_"+ds); // dataset name
sea->SetPrintInterval(1e4); // print frequency
sea->SetPrintLevel(10); // print level for event contents
sea->SetUseTrigger(true);
//sea->AddHltName("HLT_Photon36_CaloIdL_Photon22_CaloIdL"); // add HLT trigger path name
//sea->AddHltName("HLT_Photon32_CaloIdL_Photon26_CaloIdL"); // add HLT trigger path name
sea->SetFilter(false); // filter events passing final cuts
sea->SetProcessNEvents(-1); // number of events to be processed
// as an example -- add your favorite Json here. More than one can be "Include"ed
//sea->IncludeAJson("Cert_190456-199429_8TeV_PromptReco_Collisions12_JSON.txt");
//sea->IncludeAJson("Cert_190456-202016_8TeV_PromptReco_Collisions12_JSON.txt");
//sea->IncludeAJson("Cert_190456-203853_8TeV_PromptReco_Collisions12_JSON.txt");
sea->IncludeAJson("Cert_190456-208686_8TeV_Collisions12_Abarker_Combined_JSON.txt"); //DeC 14 Json
//sea->IncludeAJson("anotherJSON.txt");
TStopwatch ts;
ts.Start();
sea->Loop();
ts.Stop();
std::cout << "RealTime : " << ts.RealTime()/60.0 << " minutes" << std::endl;
std::cout << "CPUTime : " << ts.CpuTime()/60.0 << " minutes" << std::endl;
}