-
Notifications
You must be signed in to change notification settings - Fork 0
/
ana_Main_MC.C
106 lines (83 loc) · 4.47 KB
/
ana_Main_MC.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#include "params_arg.h"
//#include "TString.h"
#include "MCpoint.h"
using namespace std;
using namespace params;
// 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_Main_MC(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("SusyMainAna_MC.cc+");
// chain of inputs
TChain* chain = new TChain("susyTree");
//////////////// MC files /////////////////
cout<<"I survive this long1 "<< which_MC_to_use<< endl;
MCpoint* thisMCpoint = setupMCpoint(which_MC_to_use);
cout<<"I survive this long2"<<endl;
chain->Add(thisMCpoint->filepath.c_str());
cout<<"I survive this long"<<endl;
//chain->Add("../susyEvents_AB_1M_ho200_v2.root");
//chain->Add("../susyEvents_newNatural.root"); //last used!!
//chain->Add("/eos/uscms/store/user/abarker/MC/newNat350_225/MC_AB_2500k_NEWnaturalHiggsinoNLSPout_mst_350_M3_5025_mu_225.root");//same thing as ../susyEvents_newNatural.root
//chain->Add("/eos/uscms/store/user/abarker/MC/st_250_ho_150/MC_AB_2500k_st_250_ho_150.root");
//chain->Add("/eos/uscms/store/user/abarker/MC/st_250_ho_200/MC_AB_2500k_st_250_ho_200.root");
//chain->Add("/eos/uscms/store/user/abarker/MC/st_350_ho_200/MC_AB_2500k_mst_350_mu_200.root");
//chain->Add("/eos/uscms/store/user/abarker/MC/ho_140/MC_AB_2500k_ho_140.root");
//chain->Add("/eos/uscms/store/user/abarker/MC/ho_200/MC_AB_2500k_ho_200.root");
//chain->Add("../susyEvents_newNatural.root");
//chain->Add("dcache:/pnfs/cms/WAX/resilient/abarker/MC/MC_AB_2500k_NEWnaturalHiggsinoNLSPout_mst_350_M3_5025_mu_225.root");
//chain->Add("dcache:/pnfs/cms/WAX/resilient/abarker/MC/MC_AB_2500k_st_250_ho_150.root");
//chain->Add("dcache:/pnfs/cms/WAX/resilient/abarker/MC/MC_AB_2500k_st_250_ho_200.root");
//chain->Add("dcache:/pnfs/cms/WAX/resilient/abarker/MC/MC_AB_2500k_mst_350_mu_200.root");
//chain->Add("dcache:/pnfs/cms/WAX/resilient/abarker/MC/MC_AB_2500k_ho_140.root");
//chain->Add("dcache:/pnfs/cms/WAX/resilient/abarker/MC/MC_AB_2500k_ho_200.root");
SusyMainAna_MC* sea = new SusyMainAna_MC(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(0); // print level for event contents
sea->SetUseTrigger(false);
/*
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->AddHltName("HLT_Photon26_R9Id85_Photon18_R9Id85_Mass60");
sea->AddHltName("HLT_Photon26_R9Id85_Photon18_CaloId10_Iso50_Mass60");
sea->AddHltName("HLT_Photon26_CaloId10_Iso50_Photon18_R9Id85_Mass60");
sea->AddHltName("HLT_Photon26_CaloId10_Iso50_Photon18_CaloId10_Iso50_Mass60");
sea->AddHltName("HLT_Photon26_R9Id85_OR_CaloId10_Iso50_Photon18_R9Id85_OR_CaloId10_Iso50_Mass60");
sea->AddHltName("HLT_Photon26_R9Id85_OR_CaloId10_Iso50_Photon18_R9Id85_OR_CaloId10_Iso50_Mass70");
sea->AddHltName("HLT_Photon36_R9Id85_Photon22_R9Id85");
sea->AddHltName("HLT_Photon36_R9Id85_Photon22_CaloId10_Iso50");
sea->AddHltName("HLT_Photon36_CaloId10_Iso50_Photon22_R9Id85");
sea->AddHltName("HLT_Photon36_CaloId10_Iso50_Photon22_CaloId10_Iso50");
sea->AddHltName("HLT_Photon36_R9Id85_OR_CaloId10_Iso50_Photon22_R9Id85_OR_CaloId10_Iso50");
*/
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_161079-161352_7TeV_PromptReco_Collisions11_JSON_noESpbl_v2.txt");
//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;
}