-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_TSelector_SusyNtuple_excess_n0150_Egamma_L.C
126 lines (95 loc) · 4.44 KB
/
run_TSelector_SusyNtuple_excess_n0150_Egamma_L.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
// Ask me if you have questions/problems. Thomas M.
// Version 0.1.5
// Start with root runSelector.C
// please read all comments with // !!! up to line 115
// You have to make some changes at various places
#include <string>
#include <vector>
#include <iostream>
#include <stdlib.h>
#include "TROOT.h"
#include "TFile.h"
#include "TTree.h"
#include "TChain.h"
#include "TBranch.h"
#include "TFileCollection.h"
#include <TH2.h>
#include <map>
#include <TColor.h>
#include <TH1.h>
#include <TTree.h>
#include <TNtuple.h>
#include <TCanvas.h>
#include <TStyle.h>
#include <sstream>
#include <iostream>
#include <string>
#include <stdlib.h>
#include <sys/stat.h>
#include <iostream>
#include <math.h>
#include "string.h"
#include "TSystem.h"
#include "TProof.h"
#include "TDSet.h"
#include "TError.h" // for debugging with ddd
void throwException(string str){
// necessary because cint does not handle thrown errors correctly
cout <<"Exception raised "<< str<<endl;
throw(str);
abort();
};
void run_TSelector_SusyNtuple_excess_n0150_Egamma_L() {
// TString options = TString(""); //TString(tag.c_str()) ;
// // TString outputfile = "test.root";
// string richtigerString = InputPath;
// // int Position = richtigerString.find("mc12_8TeV.");
// // outputfile = "histos_ZTauTau_" + richtigerString.substr(Position+10,6) + "_proof.root";
//
// int Position = -1;
// Position = richtigerString.find("45_bg");
// if (Position>0){
// outputfile = "histos_test_" + richtigerString.substr(Position+6,2) + ".root";
// }
// else{
// Position = richtigerString.find("45_signal");
// if (Position>0){
// outputfile = "histos_test_" + richtigerString.substr(Position+3,2) + ".root";
// }
// }
// if(outputfile == ""){
// cout << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl;
// cout << "EMPTY OUPTPUTFILE STRING" << endl;
// cout << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl;
// abort();
// }
// cout << "outputfile= " << outputfile << endl;
cout<<"Have you set up RootCore via \"source RootCore/scripts/setup.sh\" ?"<<endl;
gSystem->Setenv("ROOTCOREDIR", "/data/etp3/jwittkow/analysis_SUSYTools_03_04_SusyNt_01_16/RootCore");
gSystem->SetIncludePath("-I$ROOTCOREDIR/include/");
gROOT->ProcessLine(".x $ROOTCOREDIR/scripts/load_packages.C+");
TString selectorName = "TSelector_SusyNtuple_excess"; // !!! enter the name of your Selector (without _C.so)
TChain *ch;
ch = new TChain("susyNt");
TString processLine = ".L " + selectorName + ".cpp++g";
TString execLine;
gROOT->ProcessLine(processLine); // need to add this, or PoD at LRZ will not be able to load the .so
gROOT->ProcessLine(".x $ROOTCOREDIR/scripts/load_packages.C+");
// ch->Add(InputPath);
// ch->Add("/nobackup/etp2/Josephine.Wittkowski/SusyNtuples_n0150/WH/user.gerbaudo.mc12_8TeV.177501.Herwigpp_sM_wA_noslep_notauhad_WH_2Lep_1.SusyNt.e2149_s1581_s1586_r3658_r3549_p1512_n0150.140109072637/*");
ch->Add("/nobackup/etp2/Josephine.Wittkowski/SusyNtuples_n0150/Egamma/user.gerbaudo.group.phys-susy.data12_8TeV.periodL.physics_Egamma.PhysCont.SusyNt.t0pro14_v01_p1542_n0150.131226172851/*");
ch->Add("/nobackup/etp2/Josephine.Wittkowski/SusyNtuples_n0150/Egamma/user.gerbaudo.group.phys-susy.data12_8TeV.periodL.physics_Egamma.PhysCont.SusyNt.t0pro14_v01_p1542_n0150.131226172939/*");
ch->Add("/nobackup/etp2/Josephine.Wittkowski/SusyNtuples_n0150/Egamma/user.gerbaudo.group.phys-susy.data12_8TeV.periodL.physics_Egamma.PhysCont.SusyNt.t0pro14_v01_p1542_n0150.131226173027/*");
ch->Add("/nobackup/etp2/Josephine.Wittkowski/SusyNtuples_n0150/Egamma/user.gerbaudo.group.phys-susy.data12_8TeV.periodL.physics_Egamma.PhysCont.SusyNt.t0pro14_v01_p1542_n0150.131226173125/*");
ch->Add("/nobackup/etp2/Josephine.Wittkowski/SusyNtuples_n0150/Egamma/user.gerbaudo.group.phys-susy.data12_8TeV.periodL.physics_Egamma.PhysCont.SusyNt.t0pro14_v01_p1542_n0150.131226212707/*");
Long64_t nEntries = ch->GetEntries();
ch->ls();
cout << "all entries: " << nEntries << endl;
TSelector_SusyNtuple_excess* SusyNtupleObject = new TSelector_SusyNtuple_excess();
SusyNtupleObject->buildSumwMap(ch);
// TString options="NtSys_NOM";
ch->Process(SusyNtupleObject);
delete SusyNtupleObject;
if (ch) {delete ch; ch=0;}
abort();
}