1 |
{
|
2 |
|
3 |
TChain ch_ttbar("ttljets");
|
4 |
TChain ch_w("ttljets");
|
5 |
TChain ch_z("ttljets");
|
6 |
TChain ch_z_1("ttljets"); //For Lepton to neutrino switch
|
7 |
TChain ch_z_2("ttljets"); //For Lepton to neutrino switch
|
8 |
TChain ch_tW("ttljets"); // single top
|
9 |
TChain ch_t("ttljets"); // single top
|
10 |
TChain ch_s("ttljets"); // single top
|
11 |
TChain ch_qcd("ttljets");
|
12 |
|
13 |
|
14 |
/****************************************************
|
15 |
//
|
16 |
// For Minimum number of Jets = 4
|
17 |
//
|
18 |
****************************************************/
|
19 |
/*
|
20 |
|
21 |
//
|
22 |
ch_ttbar . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/TTbar-madgraph_Summer09_7TeV/all.root");
|
23 |
|
24 |
//Nominal, jet pt > 30
|
25 |
//ch_w . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MuonSwitchScaledMassJes10FullVariableList/NoMuonSwitch/WJets/all.root");
|
26 |
|
27 |
//jet pt > 20
|
28 |
//ch_w . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MuonSwitchScaledMassJes10FullVariableList/NoMuonSwitch/WJets_Jetpt20/all.root");
|
29 |
|
30 |
|
31 |
//jet pt > 20 Muon pt > 10 |eta|<2.5
|
32 |
ch_w . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MuonSwitchScaledMassJes10FullVariableList/NoMuonSwitch/WJets_ZMassMorphing/all.root");
|
33 |
|
34 |
//Nominal, 1 muon required, jet pt > 30
|
35 |
//ch_z . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/ZJets-madgraph_Summer09_7TeV/all.root");
|
36 |
|
37 |
//2 muons required, jet pt>20
|
38 |
ch_z . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/ZJets-madgraph_Summer09_7TeV_JetPt20/all.root");
|
39 |
|
40 |
|
41 |
|
42 |
ch_t . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/SingleTop_tChannel-madgraph_Summer09_7TeV/all.root");
|
43 |
ch_tW. Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/SingleTop_tWChannel-madgraph_Summer09_7TeV/all.root");
|
44 |
ch_s . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/SingleTop_sChannel-madgraph_Summer09_7TeV/all.root");
|
45 |
|
46 |
*/
|
47 |
//
|
48 |
|
49 |
//ch_qcd . Add("InclusiveMuPt15_Summer08_IDEAL_jes_down_5_12Jun2009.root");
|
50 |
|
51 |
|
52 |
/**********************************************
|
53 |
//
|
54 |
// For Lepton to Neutrino Switch
|
55 |
//
|
56 |
//
|
57 |
************************************************/
|
58 |
|
59 |
//ch_z_1 . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MuonSwitchScaledMassJes10FullVariableList/FirstMuonSwitches/ZJets_Jetpt20/all.root");
|
60 |
//ch_z_2 . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MuonSwitchScaledMassJes10FullVariableList/SecondMuonSwitches/ZJets_Jetpt20/all.root");
|
61 |
|
62 |
|
63 |
|
64 |
///////////
|
65 |
//// For MET with new Scaling, here I use Z mass morphered from papers, jet pt > 20 Muon pt > 10 |eta|<2.5
|
66 |
///////////
|
67 |
|
68 |
|
69 |
//ch_z_2 . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MuonSwitchScaledMassJes10FullVariableList/SecondMuonSwitches/ZJets_ZMassMorphing/all.root");
|
70 |
|
71 |
//ch_z_1 . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MuonSwitchScaledMassJes10FullVariableList/FirstMuonSwitches/ZJets_ZMassMorphing/all.root");
|
72 |
|
73 |
|
74 |
|
75 |
|
76 |
|
77 |
|
78 |
|
79 |
/**************************************************************
|
80 |
//
|
81 |
// For Minimum number of Jets = 3 using Z Mass Morphing Method
|
82 |
//
|
83 |
***************************************************************/
|
84 |
|
85 |
ch_ttbar . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MinNumberofJets3/TTbar-madgraph_Summer09_7TeV/all.root");
|
86 |
ch_w . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MuonSwitchScaledMassJes10FullVariableList/MinNumberofJets3/NoMuonSwitch/WJets_Jetpt20/all.root");
|
87 |
ch_z . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MinNumberofJets3/ZJets-madgraph_Summer09_7TeV_JetPt20/all.root");
|
88 |
ch_t . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MinNumberofJets3/SingleTop_tChannel-madgraph_Summer09_7TeV/all.root");
|
89 |
ch_tW. Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MinNumberofJets3/SingleTop_tWChannel-madgraph_Summer09_7TeV/all.root");
|
90 |
ch_s . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MinNumberofJets3/SingleTop_sChannel-madgraph_Summer09_7TeV/all.root");
|
91 |
ch_qcd . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/QCD_InclusiveMu15_Summer09-MC_31X_V3_7TeV-v1_3Jets/all.root");
|
92 |
|
93 |
|
94 |
////+++____For Lepton to Neutrino Switch
|
95 |
|
96 |
//ch_z . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MuonSwitchScaledMassJes10FullVariableList/MinNumberofJets3/FirstMuonSwitches/ZJets_Jetpt20/all.root" );
|
97 |
//ch_z . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MuonSwitchScaledMassJes10FullVariableList/MinNumberofJets3/SecondMuonSwitches/ZJets_Jetpt20/all.root" );
|
98 |
|
99 |
|
100 |
///////////
|
101 |
//// For MET with new Scaling, here I use Z mass morphered from papers
|
102 |
///////////
|
103 |
|
104 |
//ch_z_2 . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MuonSwitchScaledMassJes10FullVariableList/MinNumberofJets3/SecondMuonSwitches/ZJets_Jetpt20_NewMassScaling/all.root");
|
105 |
|
106 |
//ch_z_1 . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MuonSwitchScaledMassJes10FullVariableList/MinNumberofJets3/FirstMuonSwitches/ZJets_Jetpt20_NewMassScaling/all.root");
|
107 |
|
108 |
|
109 |
|
110 |
///////////
|
111 |
//// Same as above with better cuts on muon2. jet pt > 20 Muon pt > 10 |eta|<2.5
|
112 |
///////////
|
113 |
|
114 |
|
115 |
ch_z_2 . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MuonSwitchScaledMassJes10FullVariableList/MinNumberofJets3/SecondMuonSwitches/ZJets_ZMassMorphing/all.root");
|
116 |
|
117 |
ch_z_1 . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MuonSwitchScaledMassJes10FullVariableList/MinNumberofJets3/FirstMuonSwitches/ZJets_ZMassMorphing/all.root");
|
118 |
|
119 |
|
120 |
|
121 |
|
122 |
|
123 |
/**************************************************************
|
124 |
//
|
125 |
// For Minimum number of Jets = 2 using Z Mass Morphing Method
|
126 |
//
|
127 |
***************************************************************/
|
128 |
/*
|
129 |
ch_ttbar . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MinNumberofJets2/TTbar-madgraph_Summer09_7TeV/all.root");
|
130 |
ch_w . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MuonSwitchScaledMassJes10FullVariableList/MinNumberofJets2/NoMuonSwitch/WJets_Jetpt20/all.root");
|
131 |
ch_z . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MinNumberofJets2/ZJets-madgraph_Summer09_7TeV_JetPt20/all.root");
|
132 |
ch_t . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MinNumberofJets2/SingleTop_tChannel-madgraph_Summer09_7TeV/all.root");
|
133 |
ch_tW. Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MinNumberofJets2/SingleTop_tWChannel-madgraph_Summer09_7TeV/all.root");
|
134 |
ch_s . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MinNumberofJets2/SingleTop_sChannel-madgraph_Summer09_7TeV/all.root");
|
135 |
|
136 |
|
137 |
///////////
|
138 |
//// FOR Z MASS MORPHING. jet pt > 20 Muon pt > 10 |eta|<2.5
|
139 |
///////////
|
140 |
|
141 |
|
142 |
ch_z_2 . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MuonSwitchScaledMassJes10FullVariableList/MinNumberofJets2/SecondMuonSwitches/ZJets_ZMassMorphing/all.root");
|
143 |
|
144 |
ch_z_1 . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MuonSwitchScaledMassJes10FullVariableList/MinNumberofJets2/FirstMuonSwitches/ZJets_ZMassMorphing/all.root");
|
145 |
|
146 |
*/
|
147 |
|
148 |
|
149 |
|
150 |
/**************************************************************
|
151 |
//
|
152 |
// For Minimum number of Jets = 1 using Z Mass Morphing Method
|
153 |
//
|
154 |
***************************************************************/
|
155 |
/*
|
156 |
ch_ttbar . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MinNumberofJets1/TTbar-madgraph_Summer09_7TeV/all.root");
|
157 |
ch_w . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MuonSwitchScaledMassJes10FullVariableList/MinNumberofJets1/NoMuonSwitch/WJets_Jetpt20/all.root");
|
158 |
ch_z . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MinNumberofJets3/ZJets-madgraph_Summer09_7TeV_JetPt20/all.root");
|
159 |
ch_t . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MinNumberofJets3/SingleTop_tChannel-madgraph_Summer09_7TeV/all.root");
|
160 |
ch_tW. Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MinNumberofJets3/SingleTop_tWChannel-madgraph_Summer09_7TeV/all.root");
|
161 |
ch_s . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MinNumberofJets3/SingleTop_sChannel-madgraph_Summer09_7TeV/all.root");
|
162 |
|
163 |
//I did not make 1 jet sample for z and single top so just using 2 jets. doesnt matter bc not including in output
|
164 |
|
165 |
///////////
|
166 |
//// FOR Z MASS MORPHING. jet pt > 20 Muon pt > 10 |eta|<2.5
|
167 |
///////////
|
168 |
|
169 |
|
170 |
ch_z_2 . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MuonSwitchScaledMassJes10FullVariableList/MinNumberofJets1/SecondMuonSwitches/ZJets_ZMassMorphing/all.root");
|
171 |
|
172 |
ch_z_1 . Add("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MuonSwitchScaledMassJes10FullVariableList/MinNumberofJets1/FirstMuonSwitches/ZJets_ZMassMorphing/all.root");
|
173 |
|
174 |
*/
|
175 |
|
176 |
|
177 |
|
178 |
|
179 |
|
180 |
|
181 |
// selection
|
182 |
#include "cuts.C"
|
183 |
the_cut = cut4;
|
184 |
the_cut_Z = cut4Z;
|
185 |
the_cut_Z_Morphed = cut4ZMorphed;
|
186 |
TCut the_qcd_cut = cut4_qcd;
|
187 |
|
188 |
// when copying, include all branches
|
189 |
ch_ttbar . SetBranchStatus("*",1);
|
190 |
ch_w . SetBranchStatus("*",1);
|
191 |
ch_z . SetBranchStatus("*",1);
|
192 |
ch_z_1 . SetBranchStatus("*",1);
|
193 |
ch_z_2 . SetBranchStatus("*",1);
|
194 |
ch_qcd . SetBranchStatus("*",1);
|
195 |
|
196 |
// create new TTrees from the input
|
197 |
TTree * t_sig = ch_ttbar . CopyTree(the_cut);
|
198 |
TTree * t_wjets = ch_w . CopyTree(the_cut);
|
199 |
TTree * t_zjets = ch_z . CopyTree(the_cut_Z); //Required 2 muons, jet pt > 20, invarant mass cut
|
200 |
TTree * t_zjets_1 = ch_z_1 . CopyTree(the_cut_Z_Morphed); //Required 2 muons, jet pt > 20, unscaled invarant mass cut
|
201 |
TTree * t_zjets_2 = ch_z_2 . CopyTree(the_cut_Z_Morphed); //Required 2 muons, jet pt > 20, unscaled invarant mass cut
|
202 |
//TTree * t_zjets_1 = ch_z_1 . CopyTree(the_cut_Z); //Required 2 muons, jet pt > 20, unscaled invarant mass cut
|
203 |
//TTree * t_zjets_2 = ch_z_2 . CopyTree(the_cut_Z);
|
204 |
|
205 |
TTree * t_t = ch_t . CopyTree(the_cut);
|
206 |
TTree * t_tW = ch_tW . CopyTree(the_cut);
|
207 |
TTree * t_s = ch_s . CopyTree(the_cut);
|
208 |
|
209 |
|
210 |
|
211 |
cout<<"1,2 entries = "<<t_zjets_1->GetEntries()<<", "<<t_zjets_2->GetEntries()<<endl;
|
212 |
cout<<"W entries = "<<t_wjets->GetEntries()<<endl;
|
213 |
|
214 |
|
215 |
TTree * t_qcd = ch_qcd . CopyTree(the_qcd_cut);
|
216 |
|
217 |
//
|
218 |
|
219 |
//TTree * _sig = t_sig->CopyTree("",""); // systematics - take all events
|
220 |
//
|
221 |
//TTree * _wjets = t_wjets->CopyTree("",""); // systematics - take all events
|
222 |
|
223 |
//
|
224 |
//___For 20 pb-1, 7 TeV
|
225 |
//
|
226 |
/*
|
227 |
TTree * _sig = t_sig->CopyTree("","",53525,23);
|
228 |
TTree * _wjets = t_wjets->CopyTree("","",1487,19);
|
229 |
TTree * _zjets = t_zjets->CopyTree("","",293,5);
|
230 |
TTree * _t = t_t ->CopyTree("","",2936,2);
|
231 |
TTree * _tW = t_tW->CopyTree("","",8703,1);
|
232 |
TTree * _s = t_s ->CopyTree("","",2500,0);
|
233 |
*/
|
234 |
|
235 |
|
236 |
//
|
237 |
//___For 200 pb-1, 7 TeV
|
238 |
//
|
239 |
/*
|
240 |
TTree * _sig = t_sig->CopyTree("","",51664,1884);
|
241 |
//TTree * _wjets = t_wjets->CopyTree("","",871,635);
|
242 |
TTree * _wjets = t_wjets->CopyTree("","",3292,2402); //Jet pt > 20. Must use this if using jet pt > 20 for ZJets !!!!!
|
243 |
TTree * _zjets = t_zjets->CopyTree("","",384,290); //Required 2 muons, jet pt > 20, invarant mass cut
|
244 |
TTree * _t = t_t ->CopyTree("","",2914,24);
|
245 |
TTree * _tW = t_tW->CopyTree("","",8659,44);
|
246 |
TTree * _s = t_s ->CopyTree("","",2499,1);
|
247 |
*/
|
248 |
|
249 |
//
|
250 |
//___For 200 pb-1, Lepton to Neutrino Switch
|
251 |
//
|
252 |
/*
|
253 |
TTree * _sig = t_sig->CopyTree("","",19932,1884);
|
254 |
//TTree * _wjets = t_wjets->CopyTree("","",871,635); //We dont add in a Wjets since the Z lepton switch ones replace it
|
255 |
TTree * _wjets = t_wjets->CopyTree("","",0,0);
|
256 |
|
257 |
TTree * _zjets = t_zjets->CopyTree("","",148,290); //Required 2 muons, jet pt > 20, invarant mass cut
|
258 |
|
259 |
//
|
260 |
//___These two ZJets will replace WJets
|
261 |
//
|
262 |
TTree * _zjets_1 = t_zjets->CopyTree("","",609,0); //First Muon Switches, jet pt > 20, Has total of 609 events
|
263 |
TTree * _zjets_2 = t_zjets_1->CopyTree("","",661,0); //Second Muon Switch, jet pt > 20, Has total of 661 events
|
264 |
|
265 |
TTree * _t = t_t ->CopyTree("","",1124,24);
|
266 |
TTree * _tW = t_tW->CopyTree("","",3340,44);
|
267 |
TTree * _s = t_s ->CopyTree("","",964,1);
|
268 |
|
269 |
|
270 |
//We require that the new Z templates mimic the W templates so the two have the same amount of events that the W + Jets had. Since the two Z have a total of 1270 and the W had 3292 I must scale all samples but ZJets (for lepton switch) down to the ratio 1270/3292= .3858.
|
271 |
|
272 |
*/
|
273 |
|
274 |
|
275 |
|
276 |
|
277 |
//
|
278 |
//___For 200 pb-1, 7 TeV, 4 Jets, Z Mass using Morphing Method
|
279 |
//
|
280 |
/*
|
281 |
TTree * _sig = t_sig->CopyTree("","",53548,0);
|
282 |
TTree * _wjets = t_wjets->CopyTree("","",5872,635); //use when only using w jets as background
|
283 |
//TTree * _wjets = t_wjets->CopyTree("","",5243,0);
|
284 |
TTree * _zjets = t_zjets->CopyTree("","",459,0); //Required 2 muons, jet pt > 20, invarant mass cut
|
285 |
TTree * _t = t_t ->CopyTree("","",33,0);
|
286 |
TTree * _tW = t_tW->CopyTree("","",60,0);
|
287 |
TTree * _s = t_s ->CopyTree("","",3,0);
|
288 |
*/
|
289 |
|
290 |
//For Lepton to Neutrino Switch. Here WJets is replaced by the two Leton Switched Z Jets. All are scaled by the ratio 1300/5243
|
291 |
|
292 |
/*
|
293 |
TTree * _sig = t_sig->CopyTree("","",53548,0);
|
294 |
TTree * _wjets = t_wjets->CopyTree("","",0,0); //Just get a copy of the variables
|
295 |
//TTree * _wjets = t_wjets->CopyTree("","",5336,0);
|
296 |
TTree * _zjets_1 = t_zjets_1->CopyTree("","",529,0); //First Muon Switches, jet pt > 20
|
297 |
TTree * _zjets_2 = t_zjets_2->CopyTree("","",771,0); //Second Muon Switch, jet pt > 20
|
298 |
|
299 |
TTree * _zjets = t_zjets->CopyTree("","",114,0);
|
300 |
//TTree * _zjets = t_zjets->CopyTree("","",2888,0);
|
301 |
TTree * _t = t_t ->CopyTree("","",7,0);
|
302 |
TTree * _tW = t_tW->CopyTree("","",9,0);
|
303 |
TTree * _s = t_s ->CopyTree("","",1,0);
|
304 |
*/
|
305 |
|
306 |
|
307 |
|
308 |
|
309 |
//
|
310 |
//___For 200 pb-1, 7 TeV, 3 Jets, Z Mass using Morphing Method
|
311 |
//
|
312 |
/*
|
313 |
TTree * _sig = t_sig->CopyTree("","",100158,0);
|
314 |
//TTree * _wjets = t_wjets->CopyTree("","",871,635);
|
315 |
TTree * _wjets = t_wjets->CopyTree("","",24800,0);
|
316 |
//TTree * _wjets = t_wjets->CopyTree("","",19464,5336);
|
317 |
//TTree * _wjets = t_wjets->CopyTree("","",22143,0); //Jet pt > 20. Must use this if using jet pt > 20 for ZJets !!!!!
|
318 |
TTree * _zjets = t_zjets->CopyTree("","",2038,0); //Required 2 muons, jet pt > 20, invarant mass cut
|
319 |
TTree * _t = t_t ->CopyTree("","",132,0);
|
320 |
TTree * _tW = t_tW->CopyTree("","",174,0);
|
321 |
TTree * _s = t_s ->CopyTree("","",13,0);
|
322 |
*/
|
323 |
|
324 |
//For Lepton to Neutrino Switch. Here WJets is replaced by the two Leton Switched Z Jets. All are scaled by the ratio 5445/22143
|
325 |
|
326 |
/*
|
327 |
TTree * _sig = t_sig->CopyTree("","",100158,0);
|
328 |
TTree * _wjets = t_wjets->CopyTree("","",0,0); //Just get a copy of the variables
|
329 |
//TTree * _wjets = t_wjets->CopyTree("","",5445,0);
|
330 |
TTree * _zjets_1 = t_zjets_1->CopyTree("","",2279,0); //First Muon Switches, jet pt > 20, Has total of 609 events
|
331 |
TTree * _zjets_2 = t_zjets_2->CopyTree("","",3166,0); //Second Muon Switch, jet pt > 20, Has total of 661 events
|
332 |
|
333 |
TTree * _zjets = t_zjets->CopyTree("","",501,0);
|
334 |
//TTree * _zjets = t_zjets->CopyTree("","",2888,0);
|
335 |
TTree * _t = t_t ->CopyTree("","",32,0);
|
336 |
TTree * _tW = t_tW->CopyTree("","",42,0);
|
337 |
TTree * _s = t_s ->CopyTree("","",3,0);
|
338 |
*/
|
339 |
|
340 |
|
341 |
|
342 |
|
343 |
//
|
344 |
//___For 200 pb-1, 7 TeV, 2 Jets, Z Mass using Morphing Method
|
345 |
//
|
346 |
/*
|
347 |
TTree * _sig = t_sig->CopyTree("","",128573,0);
|
348 |
//TTree * _wjets = t_wjets->CopyTree("","",871,635);
|
349 |
TTree * _wjets = t_wjets->CopyTree("","",108628,0);
|
350 |
//TTree * _wjets = t_wjets->CopyTree("","",96922,0); //Jet pt > 20. Must use this if using jet pt > 20 for ZJets !!!!!
|
351 |
TTree * _zjets = t_zjets->CopyTree("","",8680,0); //Required 2 muons, jet pt > 20, invarant mass cut
|
352 |
TTree * _t = t_t ->CopyTree("","",515,0);
|
353 |
TTree * _tW = t_tW->CopyTree("","",319,0);
|
354 |
TTree * _s = t_s ->CopyTree("","",47,0);
|
355 |
*/
|
356 |
|
357 |
//For Lepton to Neutrino Switch. Here WJets is replaced by the two Leton Switched Z Jets. All are scaled by the ratio 11714/96922
|
358 |
|
359 |
/*
|
360 |
TTree * _sig = t_sig->CopyTree("","",128573,0);
|
361 |
TTree * _wjets = t_wjets->CopyTree("","",0,0); //Just get a copy of the variables
|
362 |
//TTree * _wjets = t_wjets->CopyTree("","",11714,0);
|
363 |
TTree * _zjets_1 = t_zjets_1->CopyTree("","",9497,0); //First Muon Switches, jet pt > 20, Has total of 609 events
|
364 |
TTree * _zjets_2 = t_zjets_2->CopyTree("","",12860,0); //Second Muon Switch, jet pt > 20, Has total of 661 events
|
365 |
TTree * _zjets = t_zjets->CopyTree("","",1048,0);
|
366 |
TTree * _t = t_t ->CopyTree("","",62,0);
|
367 |
TTree * _tW = t_tW->CopyTree("","",38,0);
|
368 |
TTree * _s = t_s ->CopyTree("","",6,0);
|
369 |
*/
|
370 |
|
371 |
|
372 |
|
373 |
|
374 |
//
|
375 |
//___For 200 pb-1, 7 TeV, 1 Jets, Z Mass using Morphing Method
|
376 |
//
|
377 |
/*
|
378 |
TTree * _sig = t_sig->CopyTree("","",136189,0);
|
379 |
TTree * _wjets = t_wjets->CopyTree("","",459777,0);
|
380 |
//TTree * _wjets = t_wjets->CopyTree("","",19000,0);
|
381 |
TTree * _zjets = t_zjets->CopyTree("","",1,0); //Required 2 muons, jet pt > 20, invarant mass cut
|
382 |
TTree * _t = t_t ->CopyTree("","",1,0);
|
383 |
TTree * _tW = t_tW->CopyTree("","",1,0);
|
384 |
TTree * _s = t_s ->CopyTree("","",1,0);
|
385 |
*/
|
386 |
|
387 |
//For Lepton to Neutrino Switch. Here WJets is replaced by the two Leton Switched Z Jets. All are scaled by the ratio 11714/96922
|
388 |
|
389 |
|
390 |
TTree * _sig = t_sig->CopyTree("","",136189,0);
|
391 |
TTree * _wjets = t_wjets->CopyTree("","",0,0); //Just get a copy of the variables
|
392 |
TTree * _zjets_1 = t_zjets_1->CopyTree("","",36878,0); //First Muon Switches, jet pt > 20, Has total of 609 events
|
393 |
TTree * _zjets_2 = t_zjets_2->CopyTree("","",48432,0); //Second Muon Switch, jet pt > 20, Has total of 661 events
|
394 |
TTree * _zjets = t_zjets->CopyTree("","",1048,0);
|
395 |
TTree * _t = t_t ->CopyTree("","",62,0);
|
396 |
TTree * _tW = t_tW->CopyTree("","",38,0);
|
397 |
TTree * _s = t_s ->CopyTree("","",6,0);
|
398 |
|
399 |
|
400 |
|
401 |
|
402 |
|
403 |
|
404 |
|
405 |
|
406 |
//_wjets -> CopyAddresses(_zjets);
|
407 |
//_wjets -> CopyEntries(_zjets);
|
408 |
_wjets -> CopyAddresses(_zjets_1);
|
409 |
_wjets -> CopyEntries(_zjets_1);
|
410 |
_wjets -> CopyAddresses(_zjets_2);
|
411 |
_wjets -> CopyEntries(_zjets_2);
|
412 |
//_wjets -> CopyAddresses(_t);
|
413 |
//_wjets -> CopyEntries(_t);
|
414 |
//_wjets -> CopyAddresses(_tW);
|
415 |
//_wjets -> CopyEntries(_tW);
|
416 |
//_wjets -> CopyAddresses(_s);
|
417 |
//_wjets -> CopyEntries(_s);
|
418 |
//
|
419 |
//TTree * _qcd = t_qcd->CopyTree("","");
|
420 |
|
421 |
|
422 |
// define new TTree names
|
423 |
_sig.SetName("ttbar");
|
424 |
_wjets.SetName("wjets");
|
425 |
//_qcd.SetName("qcd");
|
426 |
|
427 |
//_sig->Print();
|
428 |
//_wjets->Print();
|
429 |
//_qcd->Print();
|
430 |
|
431 |
// output file
|
432 |
|
433 |
//For 20pb-1, 7TeV
|
434 |
// TFile * out_file = new TFile("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/20pbTemplates/Training20pb.root", "RECREATE");
|
435 |
|
436 |
//TFile * out_file = new TFile("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/200pbTemplates/Training200pb.root", "RECREATE");
|
437 |
|
438 |
//For Lepton to Neutrino Switch
|
439 |
//TFile * out_file = new TFile("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/200pbTemplates/Training_LeptonToNeutrinoSwitch_200pb.root", "RECREATE");
|
440 |
|
441 |
//TFile * out_file = new TFile("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/1fbTemplates/Training1fb.root", "RECREATE");
|
442 |
|
443 |
|
444 |
|
445 |
/////////////
|
446 |
//
|
447 |
// Output Files for Z Mass Morphing.
|
448 |
//
|
449 |
////////////
|
450 |
|
451 |
|
452 |
////////////////////////
|
453 |
/////
|
454 |
// FOR 4 JETS
|
455 |
/////
|
456 |
////////////////////////
|
457 |
|
458 |
|
459 |
//TFile * out_file = new TFile("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/200pbTemplates/Training200pbZMassMorphing_ONLYWJETS.root", "RECREATE");
|
460 |
|
461 |
//TFile * out_file = new TFile("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/200pbTemplates/Training200pbZMassMorphingLeotonToNeutrinoSwitch_ONLYWJETS.root", "RECREATE");
|
462 |
|
463 |
|
464 |
|
465 |
|
466 |
|
467 |
////////////////////////
|
468 |
/////
|
469 |
// FOR 3 JETS
|
470 |
/////
|
471 |
////////////////////////
|
472 |
|
473 |
|
474 |
|
475 |
//TFile * out_file = new TFile("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MinNumberofJets3/200pbTemplates/Training200pbZMassMorphing.root", "RECREATE");
|
476 |
|
477 |
//TFile * out_file = new TFile("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MinNumberofJets3/200pbTemplates/Training200pbZMassMorphingLeotonToNeutrinoSwitch.root", "RECREATE");
|
478 |
|
479 |
|
480 |
// FOR ONLY USING WJETS FOR BACKGROUND
|
481 |
//TFile * out_file = new TFile("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MinNumberofJets3/200pbTemplates/Training200pbZMassMorphing_ONLYWJETS.root", "RECREATE");
|
482 |
|
483 |
//TFile * out_file = new TFile("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MinNumberofJets3/200pbTemplates/Training200pbZMassMorphingLeotonToNeutrinoSwitch_ONLYWJETS.root", "RECREATE");
|
484 |
|
485 |
|
486 |
|
487 |
|
488 |
////////////////////////
|
489 |
/////
|
490 |
// FOR 2 JETS
|
491 |
/////
|
492 |
////////////////////////
|
493 |
|
494 |
|
495 |
//TFile * out_file = new TFile("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MinNumberofJets2/200pbTemplates/Training200pbZMassMorphing_ONLYWJETS.root", "RECREATE");
|
496 |
|
497 |
//TFile * out_file = new TFile("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MinNumberofJets2/200pbTemplates/Training200pbZMassMorphingLeotonToNeutrinoSwitch_ONLYWJETS.root", "RECREATE");
|
498 |
|
499 |
|
500 |
|
501 |
|
502 |
////////////////////////
|
503 |
/////
|
504 |
// FOR 1 JETS
|
505 |
/////
|
506 |
////////////////////////
|
507 |
|
508 |
|
509 |
//TFile * out_file = new TFile("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MinNumberofJets1/200pbTemplates/Training200pbZMassMorphing_ONLYWJETS.root", "RECREATE");
|
510 |
|
511 |
TFile * out_file = new TFile("/uscms_data/d2/mike1886/LeptonNeutrinoSwitch/AnalyzedSamplesFor7TeV/MinNumberofJets1/200pbTemplates/Training200pbZMassMorphingLeotonToNeutrinoSwitch_ONLYWJETS.root", "RECREATE");
|
512 |
|
513 |
|
514 |
|
515 |
|
516 |
|
517 |
|
518 |
out_file->cd();
|
519 |
_sig->Write();
|
520 |
_wjets->Write();
|
521 |
//_qcd->Write();
|
522 |
|
523 |
out_file->Write();
|
524 |
delete out_file;
|
525 |
}
|
526 |
|