1 |
//John's version of SC's PAT plotter.
|
2 |
#include <stdio.h>
|
3 |
#include "TFile.h"
|
4 |
#include "TLeaf.h"
|
5 |
#include "TBranch.h"
|
6 |
#include "TTree.h"
|
7 |
#include "TH1F.h"
|
8 |
#include "TH2F.h"
|
9 |
#include <iostream>
|
10 |
|
11 |
|
12 |
|
13 |
void PATplotter() {
|
14 |
|
15 |
// open files and set up names
|
16 |
TFile *file = TFile::Open("preselection_test.root");
|
17 |
|
18 |
TTree *oldtree = (TTree*)file->Get("Preselection");
|
19 |
|
20 |
TString hfolder = "Preselection_test";
|
21 |
TString suffix = ".gif";
|
22 |
gSystem->mkdir(hfolder);
|
23 |
gSystem->cd(hfolder);
|
24 |
|
25 |
|
26 |
|
27 |
TString plot01 = "Muon1_pT"+suffix;
|
28 |
TString plot02 = "Muon1_relIso"+suffix;
|
29 |
TString plot03 = "Muon1_eta"+suffix;
|
30 |
TString plot04 = "Muon1_d0"+suffix;
|
31 |
TString plot05 = "Muon1_ptRel"+suffix;
|
32 |
TString plot06 = "Muon1_minDr"+suffix;
|
33 |
TString plot07 = "Muon1_maxDr"+suffix;
|
34 |
TString plot08 = "Muon1_MET_dPhi"+suffix;
|
35 |
TString plot09 = "Muon2_pT"+suffix;
|
36 |
TString plot10 = "Muon2_relIso"+suffix;
|
37 |
TString plot11 = "Muon2_eta"+suffix;
|
38 |
TString plot12 = "Muon2_d0"+suffix;
|
39 |
TString plot13 = "Muon2_ptRel"+suffix;
|
40 |
TString plot14 = "Muon2_minDr"+suffix;
|
41 |
TString plot15 = "Muon2_maxDr"+suffix;
|
42 |
TString plot16 = "Muon2_MET_dPhi"+suffix;
|
43 |
TString plot17 = "Jet1_pT"+suffix;
|
44 |
TString plot18 = "Jet2_pT"+suffix;
|
45 |
TString plot19 = "Jet3_pT"+suffix;
|
46 |
TString plot20 = "Jet4_pT"+suffix;
|
47 |
TString plot21 = "Nelectrons"+suffix;
|
48 |
TString plot22 = "Nmuons"+suffix;
|
49 |
TString plot23 = "Nphotons"+suffix;
|
50 |
TString plot24 = "Njets"+suffix;
|
51 |
TString plot25 = "Electron1_pT"+suffix;
|
52 |
TString plot26 = "Electron1_eta"+suffix;
|
53 |
TString plot27 = "Electron1_d0"+suffix;
|
54 |
TString plot28 = "Electron1_relIso"+suffix;
|
55 |
TString plot29 = "Muon_MtMuMET"+suffix;
|
56 |
TString plot30 = "Muon_MtMuJetMET"+suffix;
|
57 |
TString plot31 = "Muon_MMuJet1"+suffix;
|
58 |
TString plot32 = "HtJets"+suffix;
|
59 |
TString plot33 = "HJets"+suffix;
|
60 |
TString plot34 = "HtJetsLepMET"+suffix;
|
61 |
TString plot35 = "HJetsLepMET"+suffix;
|
62 |
TString plot36 = "sphericity"+suffix;
|
63 |
TString plot37 = "centrality"+suffix;
|
64 |
|
65 |
|
66 |
TH1F *h_muon1_pt = new TH1F("h_muon1_pt", "Muon1 pT", 100, 0., 200.);
|
67 |
TH1F *h_muon1_relIso = new TH1F("h_muon1_relIso", "Muon1 relIso", 100, 0., 2.);
|
68 |
TH1F *h_muon1_d0 = new TH1F("h_muon1_d0", "Muon1 d0", 100, 0., 0.1);
|
69 |
TH1F *h_muon1_eta = new TH1F("h_muon1_eta", "Muon1 eta", 100, -2.5, 2.5);
|
70 |
TH1F *h_muon1_ptRel = new TH1F("h_muon1_ptRel", "Muon1 Rel pT", 100, 0., 200.);
|
71 |
TH1F *h_muon1_minDr = new TH1F("h_muon1_minDr", "Muon1 dR min", 100, 0., 5.);
|
72 |
TH1F *h_muon1_maxDr = new TH1F("h_muon1_maxDr", "Muon1 dR max", 100, 0., 5.);
|
73 |
TH1F *h_muon1_MET_dPhi = new TH1F("h_muon1_MET_dPhi", "dPhi Muon1-MET", 100, 0, 3.14);
|
74 |
|
75 |
TH1F *h_muon2_pt = new TH1F("h_muon2_pt", "Muon2 pT", 100, 0., 200.);
|
76 |
TH1F *h_muon2_relIso = new TH1F("h_muon2_relIso", "Muon2 relIso", 100, 0., 2.);
|
77 |
TH1F *h_muon2_d0 = new TH1F("h_muon2_d0", "Muon2 d0", 100, 0., 0.1);
|
78 |
TH1F *h_muon2_eta = new TH1F("h_muon2_eta", "Muon2 eta", 100, -2.5, 2.5);
|
79 |
TH1F *h_muon2_ptRel = new TH1F("h_muon2_ptRel", "Muon2 Rel pT", 100, 0., 200.);
|
80 |
TH1F *h_muon2_minDr = new TH1F("h_muon2_minDr", "Muon2 dR min", 100, 0., 5.);
|
81 |
TH1F *h_muon2_maxDr = new TH1F("h_muon2_maxDr", "Muon2 dR max", 100, 0., 5.);
|
82 |
TH1F *h_muon2_MET_dPhi = new TH1F("h_muon2_MET_dPhi", "dPhi Muon2-MET", 100, 0, 3.14);
|
83 |
|
84 |
TH1F *h_jet1_pt = new TH1F("h_jet1_pt", "Jet1 pT", 100, 0, 200);
|
85 |
TH1F *h_jet2_pt = new TH1F("h_jet2_pt", "Jet2 pT", 100, 0, 200);
|
86 |
TH1F *h_jet3_pt = new TH1F("h_jet3_pt", "Jet3 pT", 100, 0, 200);
|
87 |
TH1F *h_jet4_pt = new TH1F("h_jet4_pt", "Jet4 pT", 100, 0, 200);
|
88 |
|
89 |
TH1F *h_nElectrons = new TH1F("h_nElectrons", "# of Electrons/Event", 10, 0, 10);
|
90 |
TH1F *h_nMuons = new TH1F("h_nMuons_pt", "# of Muons/Event", 10, 0, 10);
|
91 |
TH1F *h_nPhotons = new TH1F("h_nPhotons", "# of Photons/Event", 10, 0, 10);
|
92 |
TH1F *h_nJets = new TH1F("h_nJets", "# of Jets/Event", 20, 0, 20);
|
93 |
|
94 |
TH1F *h_electron1_pt = new TH1F("h_electron1_pt", "Electron1 pT", 100, 0, 100);
|
95 |
TH1F *h_electron1_eta = new TH1F("h_electron1_eta", "Electron1 eta", 100, -2.5, 2.5);
|
96 |
TH1F *h_electron1_d0 = new TH1F("h_electron1_d0", "Electron1 d0", 100, 0, 0.1);
|
97 |
TH1F *h_electron1_relIso = new TH1F("h_electron1_relIso", "Electron1 relIso", 100, 0, 2);
|
98 |
|
99 |
TH1F *h_MtMuMET = new TH1F("h_MtMuMET", "MtMuMET", 100, 0, 1000);
|
100 |
TH1F *h_MtMuJetMET = new TH1F("h_MtMuJetMET", "MtMuJetMET", 100, 0, 1000);
|
101 |
TH1F *h_MMuJet1 = new TH1F("h_MMuJet1", "MMuJet1", 100, 0, 1000);
|
102 |
TH1F *h_HtJets = new TH1F("h_HtJets", "HtJets", 100, 0, 1000);
|
103 |
TH1F *h_HJets = new TH1F("h_HJets", "HJets", 100, 0, 1000);
|
104 |
TH1F *h_HtJetsLepMET = new TH1F("h_HtJetsLepMET", "HtJetsLepMET", 100, 0, 1000);
|
105 |
TH1F *h_HJetsLepMET = new TH1F("h_HJetsLepMET", "HJetsLepMET", 100, 0, 1000);
|
106 |
TH1F *h_sphericity = new TH1F("h_sphericity", "Sphericity", 100, 0, 1);
|
107 |
TH1F *h_centrality = new TH1F("h_centrality", "Centrality", 100, 0, 1);
|
108 |
|
109 |
|
110 |
|
111 |
//TBranch *br1 = (TBranch*) oldtree->GetBranch("Muons");
|
112 |
|
113 |
TLeafF* muon_m = (TLeafF*) oldtree->GetLeaf("m_muon");
|
114 |
TLeafF* muon_pt = (TLeafF*) oldtree->GetLeaf("pt_muon");
|
115 |
TLeafF* muon_p = (TLeafF*) oldtree->GetLeaf("p_muon");
|
116 |
TLeafF* muon_e = (TLeafF*) oldtree->GetLeaf("e_muon");
|
117 |
TLeafF* muon_et = (TLeafF*) oldtree->GetLeaf("et_muon");
|
118 |
TLeafF* muon_phi = (TLeafF*) oldtree->GetLeaf("phi_muon");
|
119 |
TLeafF* muon_eta = (TLeafF*) oldtree->GetLeaf("eta_muon");
|
120 |
TLeafF* muon_px = (TLeafF*) oldtree->GetLeaf("px_muon");
|
121 |
TLeafF* muon_py = (TLeafF*) oldtree->GetLeaf("py_muon");
|
122 |
TLeafF* muon_pz = (TLeafF*) oldtree->GetLeaf("pz_muon");
|
123 |
TLeafF* muon_relIso = (TLeafF*) oldtree->GetLeaf("relIso_muon");
|
124 |
TLeafF* muon_d0 = (TLeafF*) oldtree->GetLeaf("d0_muon");
|
125 |
TLeafI* muon_parentID = (TLeafI*) oldtree->GetLeaf("parentID_muon");
|
126 |
TLeafF* muon_ptRel = (TLeafF*) oldtree->GetLeaf("ptRel_muon");
|
127 |
TLeafF* muon_drMinMuJ = (TLeafF*) oldtree->GetLeaf("drMinMuJ");
|
128 |
TLeafF* muon_drMaxMuJ = (TLeafF*) oldtree->GetLeaf("drMaxMuJ");
|
129 |
TLeafF* muon_dPhiMuMET = (TLeafF*) oldtree->GetLeaf("dPhiMuMET");
|
130 |
TLeafF* muon_MtMuMET = (TLeafF*) oldtree->GetLeaf("MtMuMET");
|
131 |
TLeafF* muon_MtMuJetMET = (TLeafF*) oldtree->GetLeaf("MtMuJetMET");
|
132 |
TLeafF* muon_MMuJet1 = (TLeafF*) oldtree->GetLeaf("MMuJet1");
|
133 |
|
134 |
|
135 |
//TBranch *br2 = (TBranch*) oldtree->GetBranch("Jets");
|
136 |
|
137 |
TLeafF* jet_m = (TLeafF*) oldtree->GetLeaf("m_jet");
|
138 |
TLeafF* jet_pt = (TLeafF*) oldtree->GetLeaf("pt_jet");
|
139 |
TLeafF* jet_p = (TLeafF*) oldtree->GetLeaf("p_jet");
|
140 |
TLeafF* jet_e = (TLeafF*) oldtree->GetLeaf("e_jet");
|
141 |
TLeafF* jet_et = (TLeafF*) oldtree->GetLeaf("et_jet");
|
142 |
TLeafF* jet_phi = (TLeafF*) oldtree->GetLeaf("phi_jet");
|
143 |
TLeafF* jet_eta = (TLeafF*) oldtree->GetLeaf("eta_jet");
|
144 |
TLeafF* jet_px = (TLeafF*) oldtree->GetLeaf("px_jet");
|
145 |
TLeafF* jet_py = (TLeafF*) oldtree->GetLeaf("py_jet");
|
146 |
TLeafF* jet_pz = (TLeafF*) oldtree->GetLeaf("pz_jet");
|
147 |
TLeafF* jet_bTagDisc = (TLeafF*) oldtree->GetLeaf("bTagDisc_jet");
|
148 |
TLeafF* jet_emFrac = (TLeafF*) oldtree->GetLeaf("emFraction_jet");
|
149 |
|
150 |
|
151 |
//TBranch *br3 = (TBranch*) oldtree->GetBranch("Electrons");
|
152 |
|
153 |
TLeafF* elec_m = (TLeafF*) oldtree->GetLeaf("m_electron");
|
154 |
TLeafF* elec_pt = (TLeafF*) oldtree->GetLeaf("pt_electron");
|
155 |
TLeafF* elec_p = (TLeafF*) oldtree->GetLeaf("p_electron");
|
156 |
TLeafF* elec_e = (TLeafF*) oldtree->GetLeaf("e_electron");
|
157 |
TLeafF* elec_et = (TLeafF*) oldtree->GetLeaf("et_electron");
|
158 |
TLeafF* elec_phi = (TLeafF*) oldtree->GetLeaf("phi_electron");
|
159 |
TLeafF* elec_eta = (TLeafF*) oldtree->GetLeaf("eta_electron");
|
160 |
TLeafF* elec_px = (TLeafF*) oldtree->GetLeaf("px_electron");
|
161 |
TLeafF* elec_py = (TLeafF*) oldtree->GetLeaf("py_electron");
|
162 |
TLeafF* elec_pz = (TLeafF*) oldtree->GetLeaf("pz_electron");
|
163 |
TLeafF* elec_relIso = (TLeafF*) oldtree->GetLeaf("relIso_electron");
|
164 |
TLeafF* elec_d0 = (TLeafF*) oldtree->GetLeaf("d0_electron");
|
165 |
|
166 |
|
167 |
//TBranch *br4 = (TBranch*) oldtree->GetBranch("Photons");
|
168 |
|
169 |
TLeafF* phot_pt = (TLeafF*) oldtree->GetLeaf("pt_photon");
|
170 |
TLeafF* phot_p = (TLeafF*) oldtree->GetLeaf("p_photon");
|
171 |
TLeafF* phot_e = (TLeafF*) oldtree->GetLeaf("e_photon");
|
172 |
TLeafF* phot_et = (TLeafF*) oldtree->GetLeaf("et_photon");
|
173 |
TLeafF* phot_phi = (TLeafF*) oldtree->GetLeaf("phi_photon");
|
174 |
TLeafF* phot_eta = (TLeafF*) oldtree->GetLeaf("eta_photon");
|
175 |
TLeafF* phot_px = (TLeafF*) oldtree->GetLeaf("px_photon");
|
176 |
TLeafF* phot_py = (TLeafF*) oldtree->GetLeaf("py_photon");
|
177 |
TLeafF* phot_pz = (TLeafF*) oldtree->GetLeaf("pz_photon");
|
178 |
|
179 |
|
180 |
//TBranch *br5 = (TBranch*) oldtree->GetBranch("MET");
|
181 |
|
182 |
TLeafF* met_et = (TLeafF*) oldtree->GetLeaf("met");
|
183 |
TLeafF* met_phi = (TLeafF*) oldtree->GetLeaf("phi_met");
|
184 |
TLeafF* met_px = (TLeafF*) oldtree->GetLeaf("px_met");
|
185 |
TLeafF* met_py = (TLeafF*) oldtree->GetLeaf("py_met");
|
186 |
|
187 |
|
188 |
//TBranch *br6 = (TBranch*) oldtree->GetBranch("EventParameters");
|
189 |
|
190 |
TLeafF* event_drJ1J2 = (TLeafF*) oldtree->GetLeaf("drJ1J2");
|
191 |
TLeafF* event_drJ1J3 = (TLeafF*) oldtree->GetLeaf("drJ1J3");
|
192 |
TLeafF* event_drJ2J3 = (TLeafF*) oldtree->GetLeaf("drJ2J3");
|
193 |
TLeafF* event_MJ1J2 = (TLeafF*) oldtree->GetLeaf("MJ1J2");
|
194 |
TLeafF* event_MJ1J3 = (TLeafF*) oldtree->GetLeaf("MJ1J3");
|
195 |
TLeafF* event_MJ2J3 = (TLeafF*) oldtree->GetLeaf("MJ2J3");
|
196 |
TLeafF* event_drMinJ1 = (TLeafF*) oldtree->GetLeaf("drMinJ1");
|
197 |
TLeafF* event_drMinJ2 = (TLeafF*) oldtree->GetLeaf("drMinJ3");
|
198 |
TLeafF* event_drMinJ3 = (TLeafF*) oldtree->GetLeaf("drMinJ3");
|
199 |
TLeafF* event_etaJ1J2 = (TLeafF*) oldtree->GetLeaf("etaJ1J2");
|
200 |
TLeafF* event_etaJ1J3 = (TLeafF*) oldtree->GetLeaf("etaJ1J3");
|
201 |
TLeafF* event_etaJ2J3 = (TLeafF*) oldtree->GetLeaf("etaJ2J3");
|
202 |
TLeafF* event_etaJ1J2J3 = (TLeafF*) oldtree->GetLeaf("etaJ1J2J3");
|
203 |
TLeafF* event_MJ1J2J3 = (TLeafF*) oldtree->GetLeaf("MJ1J2J3");
|
204 |
TLeafF* event_HtJets = (TLeafF*) oldtree->GetLeaf("HtJets");
|
205 |
TLeafF* event_HJets = (TLeafF*) oldtree->GetLeaf("HJets");
|
206 |
TLeafF* event_HtJetsLepMET = (TLeafF*) oldtree->GetLeaf("HtJetsLepMET");
|
207 |
TLeafF* event_HJetsLepMET = (TLeafF*) oldtree->GetLeaf("HJetsLepMET");
|
208 |
TLeafI* event_jets = (TLeafI*) oldtree->GetLeaf("nJetsPt30");
|
209 |
TLeafI* event_bJets = (TLeafI*) oldtree->GetLeaf("bJets");
|
210 |
TLeafF* event_sphericity = (TLeafF*) oldtree->GetLeaf("sphericity");
|
211 |
TLeafF* event_aplanarity = (TLeafF*) oldtree->GetLeaf("aplanarity");
|
212 |
TLeafF* event_centrality = (TLeafF*) oldtree->GetLeaf("centrality");
|
213 |
|
214 |
//TBranch *nMu = (TBranch*) oldtree->GetBranch("nMuons");
|
215 |
//TBranch *nEl = (TBranch*) oldtree->GetBranch("nElectrons");
|
216 |
//TBranch *nPh = (TBranch*) oldtree->GetBranch("nPhotons");
|
217 |
//TBranch *nJe = (TBranch*) oldtree->GetBranch("nJets");
|
218 |
|
219 |
TLeafI* MU = (TLeafI*) oldtree->GetLeaf("nMuons");
|
220 |
TLeafI* EL = (TLeafI*) oldtree->GetLeaf("nElectrons");
|
221 |
TLeafI* PH = (TLeafI*) oldtree->GetLeaf("nPhotons");
|
222 |
TLeafI* JE = (TLeafI*) oldtree->GetLeaf("nJets");
|
223 |
|
224 |
int numEntries = 0;
|
225 |
numEntries = oldtree->GetEntries();
|
226 |
|
227 |
std::cout<<"analyzing "<<numEntries<<" entries"<<std::endl;
|
228 |
|
229 |
|
230 |
//Do Analysis:
|
231 |
for (int jEntry = 0; jEntry < numEntries; jEntry++) {
|
232 |
|
233 |
|
234 |
bool eventOK = false;
|
235 |
|
236 |
oldtree->GetEntry(jEntry);
|
237 |
|
238 |
|
239 |
nMuons = (int)MU->GetValue();
|
240 |
nElectrons = (int)EL->GetValue();
|
241 |
nPhotons = (int)PH->GetValue();
|
242 |
nJets = (int)JE->GetValue();
|
243 |
|
244 |
float *m_mu = (float*)muon_m->GetValuePointer();
|
245 |
float *pt_mu = (float*)muon_pt->GetValuePointer();
|
246 |
float *p_mu = (float*)muon_p->GetValuePointer();
|
247 |
float *eta_mu = (float*)muon_eta->GetValuePointer();
|
248 |
float *phi_mu = (float*)muon_phi->GetValuePointer();
|
249 |
float *e_mu = (float*)muon_e->GetValuePointer();
|
250 |
float *et_mu = (float*)muon_et->GetValuePointer();
|
251 |
float *px_mu = (float*)muon_px->GetValuePointer();
|
252 |
float *py_mu = (float*)muon_py->GetValuePointer();
|
253 |
float *pz_mu = (float*)muon_pz->GetValuePointer();
|
254 |
float *relIso_mu = (float*)muon_relIso->GetValuePointer();
|
255 |
float *d0_mu = (float*)muon_d0->GetValuePointer();
|
256 |
float *ptRel_mu = (float*)muon_ptRel->GetValuePointer();
|
257 |
float *drMinMuJ_mu = (float*)muon_drMinMuJ->GetValuePointer();
|
258 |
float *drMaxMuJ_mu = (float*)muon_drMaxMuJ->GetValuePointer();
|
259 |
float *dPhiMuMET_mu = (float*)muon_dPhiMuMET->GetValuePointer();
|
260 |
int *parentID_mu = (int*) muon_parentID->GetValuePointer();
|
261 |
float *MtMuMET_mu = (float*)muon_MtMuMET->GetValuePointer();
|
262 |
float *MtMuJetMET_mu = (float*)muon_MtMuJetMET->GetValuePointer();
|
263 |
float *MMuJet1_mu = (float*)muon_MMuJet1->GetValuePointer();
|
264 |
|
265 |
float *m_e = (float*)elec_m->GetValuePointer();
|
266 |
float *pt_e = (float*)elec_pt->GetValuePointer();
|
267 |
float *p_e = (float*)elec_p->GetValuePointer();
|
268 |
float *eta_e = (float*)elec_eta->GetValuePointer();
|
269 |
float *phi_e = (float*)elec_phi->GetValuePointer();
|
270 |
float *e_e = (float*)elec_e->GetValuePointer();
|
271 |
float *et_e = (float*)elec_et->GetValuePointer();
|
272 |
float *px_e = (float*)elec_px->GetValuePointer();
|
273 |
float *py_e = (float*)elec_py->GetValuePointer();
|
274 |
float *pz_e = (float*)elec_pz->GetValuePointer();
|
275 |
float *relIso_e = (float*)elec_relIso->GetValuePointer();
|
276 |
float *d0_e = (float*)elec_d0->GetValuePointer();
|
277 |
|
278 |
float *m_j = (float*)jet_m->GetValuePointer();
|
279 |
float *pt_j = (float*)jet_pt->GetValuePointer();
|
280 |
float *p_j = (float*)jet_p->GetValuePointer();
|
281 |
float *eta_j = (float*)jet_eta->GetValuePointer();
|
282 |
float *phi_j = (float*)jet_phi->GetValuePointer();
|
283 |
float *e_j = (float*)jet_e->GetValuePointer();
|
284 |
float *et_j = (float*)jet_et->GetValuePointer();
|
285 |
float *px_j = (float*)jet_px->GetValuePointer();
|
286 |
float *py_j = (float*)jet_py->GetValuePointer();
|
287 |
float *pz_j = (float*)jet_pz->GetValuePointer();
|
288 |
float *bTagDisc_j = (float*)jet_bTagDisc->GetValuePointer();
|
289 |
float *emFrac_j = (float*)jet_emFrac->GetValuePointer();
|
290 |
|
291 |
float *pt_p = (float*)phot_pt->GetValuePointer();
|
292 |
float *p_p = (float*)phot_p->GetValuePointer();
|
293 |
float *eta_p = (float*)phot_eta->GetValuePointer();
|
294 |
float *phi_p = (float*)phot_phi->GetValuePointer();
|
295 |
float *e_p = (float*)phot_e->GetValuePointer();
|
296 |
float *et_p = (float*)phot_et->GetValuePointer();
|
297 |
float *px_p = (float*)phot_px->GetValuePointer();
|
298 |
float *py_p = (float*)phot_py->GetValuePointer();
|
299 |
float *pz_p = (float*)phot_pz->GetValuePointer();
|
300 |
|
301 |
float et_misET = (float)met_et->GetValue();
|
302 |
float phi_misET = (float)met_phi->GetValue();
|
303 |
float px_misET = (float)met_px->GetValue();
|
304 |
float py_misET = (float)met_py->GetValue();
|
305 |
|
306 |
float drJ1J2_event = (float)event_drJ1J2->GetValue();
|
307 |
float drJ1J3_event = (float)event_drJ1J3->GetValue();
|
308 |
float drJ2J3_event = (float)event_drJ2J3->GetValue();
|
309 |
float drMinJ1_event = (float)event_drMinJ1->GetValue();
|
310 |
float drMinJ2_event = (float)event_drMinJ2->GetValue();
|
311 |
float drMinJ3_event = (float)event_drMinJ3->GetValue();
|
312 |
int nJets30_event = (int) event_jets->GetValue();
|
313 |
int bJets_event = (int) event_bJets->GetValue();
|
314 |
float HtJets_event = (float)event_HtJets->GetValue();
|
315 |
float HtJetsLepMET_event = (float)event_HtJetsLepMET->GetValue();
|
316 |
float HJets_event = (float)event_HJets->GetValue();
|
317 |
float HJetsLepMET_event = (float)event_HJetsLepMET->GetValue();
|
318 |
float MJ1J2J3_event = (float)event_MJ1J2J3->GetValue();
|
319 |
float etaJ1J2J3_event = (float)event_etaJ1J2J3->GetValue();
|
320 |
float MJ1J2_event = (float)event_MJ1J2->GetValue();
|
321 |
float MJ1J3_event = (float)event_MJ1J3->GetValue();
|
322 |
float MJ2J3_event = (float)event_MJ2J3->GetValue();
|
323 |
float etaJ1J2_event = (float)event_etaJ1J2->GetValue();
|
324 |
float etaJ2J3_event = (float)event_etaJ1J3->GetValue();
|
325 |
float etaJ1J3_event = (float)event_etaJ2J3->GetValue();
|
326 |
float sphericity_event = (float)event_sphericity->GetValue();
|
327 |
float aplanarity_event = (float)event_aplanarity->GetValue();
|
328 |
float centrality_event = (float)event_centrality->GetValue();
|
329 |
|
330 |
|
331 |
|
332 |
|
333 |
//Fill Histos here:
|
334 |
h_muon1_pt ->Fill(pt_mu[0]); //etc
|
335 |
h_muon1_eta ->Fill(eta_mu[0]);
|
336 |
h_muon1_d0 ->Fill(d0_mu[0]);
|
337 |
h_muon1_relIso ->Fill(relIso_mu[0]);
|
338 |
h_muon1_minDr ->Fill(drMinMuJ_mu[0]);
|
339 |
h_muon1_maxDr ->Fill(drMaxMuJ_mu[0]);
|
340 |
h_muon1_ptRel ->Fill(ptRel_mu[0]);
|
341 |
h_muon1_MET_dPhi->Fill(dPhiMuMET_mu[0]);
|
342 |
|
343 |
h_muon2_pt ->Fill(pt_mu[1]); //etc
|
344 |
h_muon2_eta ->Fill(eta_mu[1]);
|
345 |
h_muon2_d0 ->Fill(d0_mu[1]);
|
346 |
h_muon2_relIso ->Fill(relIso_mu[1]);
|
347 |
h_muon2_minDr ->Fill(drMinMuJ_mu[1]);
|
348 |
h_muon2_maxDr ->Fill(drMaxMuJ_mu[1]);
|
349 |
h_muon2_ptRel ->Fill(ptRel_mu[1]);
|
350 |
h_muon2_MET_dPhi->Fill(dPhiMuMET_mu[1]);
|
351 |
|
352 |
h_jet1_pt->Fill(pt_j[0]);
|
353 |
h_jet2_pt->Fill(pt_j[1]);
|
354 |
h_jet3_pt->Fill(pt_j[2]);
|
355 |
h_jet4_pt->Fill(pt_j[3]);
|
356 |
|
357 |
h_nElectrons->Fill(nElectrons);
|
358 |
h_nPhotons ->Fill(nPhotons);
|
359 |
h_nMuons ->Fill(nMuons);
|
360 |
h_nJets ->Fill(nJets);
|
361 |
|
362 |
h_electron1_pt ->Fill(pt_e[0]); //etc
|
363 |
h_electron1_eta ->Fill(eta_e[0]);
|
364 |
h_electron1_d0 ->Fill(d0_e[0]);
|
365 |
h_electron1_relIso ->Fill(relIso_e[0]);
|
366 |
|
367 |
h_MtMuMET ->Fill(MtMuMET_mu[0]);
|
368 |
h_MtMuJetMET ->Fill(MtMuJetMET_mu[0]);
|
369 |
h_MMuJet1 ->Fill(MMuJet1_mu[0]);
|
370 |
h_HtJets ->Fill(HtJets_event);
|
371 |
h_HtJetsLepMET ->Fill(HtJetsLepMET_event);
|
372 |
h_HJets ->Fill(HJets_event);
|
373 |
h_HJetsLepMET ->Fill(HtJetsLepMET_event);
|
374 |
h_centrality ->Fill(centrality_event);
|
375 |
h_sphericity ->Fill(sphericity_event);
|
376 |
|
377 |
|
378 |
|
379 |
|
380 |
|
381 |
}//for(jEntry...
|
382 |
|
383 |
|
384 |
|
385 |
|
386 |
// plot histograms for PAT Jets
|
387 |
|
388 |
gStyle->SetOptStat(11111);
|
389 |
TCanvas *c1 = new TCanvas("c1","");
|
390 |
c1->SetFillColor(10);
|
391 |
h_muon1_pt->SetTitle("Muon1 pT");
|
392 |
h_muon1_pt->Draw();
|
393 |
h_muon1_pt->GetXaxis()->SetTitle("GeV");
|
394 |
h_muon1_pt->GetYaxis()->SetTitle("");
|
395 |
c1->Print(plot01);
|
396 |
|
397 |
gStyle->SetOptStat(11111);
|
398 |
TCanvas *c1 = new TCanvas("c1","");
|
399 |
c1->SetFillColor(10);
|
400 |
h_muon1_relIso->SetTitle("Muon1 RelIso");
|
401 |
h_muon1_relIso->Draw();
|
402 |
h_muon1_relIso->GetXaxis()->SetTitle("RelIso");
|
403 |
h_muon1_relIso->GetYaxis()->SetTitle("");
|
404 |
c1->Print(plot02);
|
405 |
|
406 |
gStyle->SetOptStat(11111);
|
407 |
TCanvas *c1 = new TCanvas("c1","");
|
408 |
c1->SetFillColor(10);
|
409 |
h_muon1_eta->SetTitle("Muon1 Eta");
|
410 |
h_muon1_eta->Draw();
|
411 |
h_muon1_eta->GetXaxis()->SetTitle("Eta");
|
412 |
h_muon1_eta->GetYaxis()->SetTitle("");
|
413 |
c1->Print(plot03);
|
414 |
|
415 |
gStyle->SetOptStat(11111);
|
416 |
TCanvas *c1 = new TCanvas("c1","");
|
417 |
c1->SetFillColor(10);
|
418 |
h_muon1_d0->SetTitle("Muon1 d0");
|
419 |
h_muon1_d0->Draw();
|
420 |
h_muon1_d0->GetXaxis()->SetTitle("d0");
|
421 |
h_muon1_d0->GetYaxis()->SetTitle("");
|
422 |
c1->Print(plot04);
|
423 |
|
424 |
gStyle->SetOptStat(11111);
|
425 |
TCanvas *c1 = new TCanvas("c1","");
|
426 |
c1->SetFillColor(10);
|
427 |
h_muon1_ptRel->SetTitle("Muon1 ptRel");
|
428 |
h_muon1_ptRel->Draw();
|
429 |
h_muon1_ptRel->GetXaxis()->SetTitle("ptRel");
|
430 |
h_muon1_ptRel->GetYaxis()->SetTitle("");
|
431 |
c1->Print(plot05);
|
432 |
|
433 |
gStyle->SetOptStat(11111);
|
434 |
TCanvas *c1 = new TCanvas("c1","");
|
435 |
c1->SetFillColor(10);
|
436 |
h_muon1_minDr->SetTitle("Muon1 dRmin");
|
437 |
h_muon1_minDr->Draw();
|
438 |
h_muon1_minDr->GetXaxis()->SetTitle("dRmin");
|
439 |
h_muon1_minDr->GetYaxis()->SetTitle("");
|
440 |
c1->Print(plot06);
|
441 |
|
442 |
gStyle->SetOptStat(11111);
|
443 |
TCanvas *c1 = new TCanvas("c1","");
|
444 |
c1->SetFillColor(10);
|
445 |
h_muon1_maxDr->SetTitle("Muon1 dRmax");
|
446 |
h_muon1_maxDr->Draw();
|
447 |
h_muon1_maxDr->GetXaxis()->SetTitle("dRmax");
|
448 |
h_muon1_maxDr->GetYaxis()->SetTitle("");
|
449 |
c1->Print(plot07);
|
450 |
|
451 |
gStyle->SetOptStat(11111);
|
452 |
TCanvas *c1 = new TCanvas("c1","");
|
453 |
c1->SetFillColor(10);
|
454 |
h_muon1_MET_dPhi->SetTitle("dPhi Muon1-MET");
|
455 |
h_muon1_MET_dPhi->Draw();
|
456 |
h_muon1_MET_dPhi->GetXaxis()->SetTitle("dPhi");
|
457 |
h_muon1_MET_dPhi->GetYaxis()->SetTitle("");
|
458 |
c1->Print(plot08);
|
459 |
|
460 |
gStyle->SetOptStat(11111);
|
461 |
TCanvas *c1 = new TCanvas("c1","");
|
462 |
c1->SetFillColor(10);
|
463 |
h_muon2_pt->SetTitle("Muon2 pT");
|
464 |
h_muon2_pt->Draw();
|
465 |
h_muon2_pt->GetXaxis()->SetTitle("GeV");
|
466 |
h_muon2_pt->GetYaxis()->SetTitle("");
|
467 |
c1->Print(plot09);
|
468 |
|
469 |
gStyle->SetOptStat(11111);
|
470 |
TCanvas *c1 = new TCanvas("c1","");
|
471 |
c1->SetFillColor(10);
|
472 |
h_muon2_relIso->SetTitle("Muon2 RelIso");
|
473 |
h_muon2_relIso->Draw();
|
474 |
h_muon2_relIso->GetXaxis()->SetTitle("RelIso");
|
475 |
h_muon2_relIso->GetYaxis()->SetTitle("");
|
476 |
c1->Print(plot10);
|
477 |
|
478 |
gStyle->SetOptStat(11111);
|
479 |
TCanvas *c1 = new TCanvas("c1","");
|
480 |
c1->SetFillColor(10);
|
481 |
h_muon2_eta->SetTitle("Muon2 Eta");
|
482 |
h_muon2_eta->Draw();
|
483 |
h_muon2_eta->GetXaxis()->SetTitle("Eta");
|
484 |
h_muon2_eta->GetYaxis()->SetTitle("");
|
485 |
c1->Print(plot11);
|
486 |
|
487 |
gStyle->SetOptStat(11111);
|
488 |
TCanvas *c1 = new TCanvas("c1","");
|
489 |
c1->SetFillColor(10);
|
490 |
h_muon2_d0->SetTitle("Muon2 d0");
|
491 |
h_muon2_d0->Draw();
|
492 |
h_muon2_d0->GetXaxis()->SetTitle("d0");
|
493 |
h_muon2_d0->GetYaxis()->SetTitle("");
|
494 |
c1->Print(plot12);
|
495 |
|
496 |
gStyle->SetOptStat(11111);
|
497 |
TCanvas *c1 = new TCanvas("c1","");
|
498 |
c1->SetFillColor(10);
|
499 |
h_muon2_ptRel->SetTitle("Muon2 ptRel");
|
500 |
h_muon2_ptRel->Draw();
|
501 |
h_muon2_ptRel->GetXaxis()->SetTitle("ptRel");
|
502 |
h_muon2_ptRel->GetYaxis()->SetTitle("");
|
503 |
c1->Print(plot13);
|
504 |
|
505 |
gStyle->SetOptStat(11111);
|
506 |
TCanvas *c1 = new TCanvas("c1","");
|
507 |
c1->SetFillColor(10);
|
508 |
h_muon2_minDr->SetTitle("Muon2 dRmin");
|
509 |
h_muon2_minDr->Draw();
|
510 |
h_muon2_minDr->GetXaxis()->SetTitle("dRmin");
|
511 |
h_muon2_minDr->GetYaxis()->SetTitle("");
|
512 |
c1->Print(plot14);
|
513 |
|
514 |
gStyle->SetOptStat(11111);
|
515 |
TCanvas *c1 = new TCanvas("c1","");
|
516 |
c1->SetFillColor(10);
|
517 |
h_muon2_maxDr->SetTitle("Muon2 dRmax");
|
518 |
h_muon2_maxDr->Draw();
|
519 |
h_muon2_maxDr->GetXaxis()->SetTitle("dRmax");
|
520 |
h_muon2_maxDr->GetYaxis()->SetTitle("");
|
521 |
c1->Print(plot15);
|
522 |
|
523 |
gStyle->SetOptStat(11111);
|
524 |
TCanvas *c1 = new TCanvas("c1","");
|
525 |
c1->SetFillColor(10);
|
526 |
h_muon2_MET_dPhi->SetTitle("dPhi Muon2-MET");
|
527 |
h_muon2_MET_dPhi->Draw();
|
528 |
h_muon2_MET_dPhi->GetXaxis()->SetTitle("dPhi");
|
529 |
h_muon2_MET_dPhi->GetYaxis()->SetTitle("");
|
530 |
c1->Print(plot16);
|
531 |
|
532 |
gStyle->SetOptStat(11111);
|
533 |
TCanvas *c1 = new TCanvas("c1","");
|
534 |
c1->SetFillColor(10);
|
535 |
h_jet1_pt->SetTitle("Jet1 pT");
|
536 |
h_jet1_pt->Draw();
|
537 |
h_jet1_pt->GetXaxis()->SetTitle("GeV");
|
538 |
h_jet1_pt->GetYaxis()->SetTitle("");
|
539 |
c1->Print(plot17);
|
540 |
|
541 |
gStyle->SetOptStat(11111);
|
542 |
TCanvas *c1 = new TCanvas("c1","");
|
543 |
c1->SetFillColor(10);
|
544 |
h_jet2_pt->SetTitle("Jet2 pT");
|
545 |
h_jet2_pt->Draw();
|
546 |
h_jet2_pt->GetXaxis()->SetTitle("GeV");
|
547 |
h_jet2_pt->GetYaxis()->SetTitle("");
|
548 |
c1->Print(plot18);
|
549 |
|
550 |
gStyle->SetOptStat(11111);
|
551 |
TCanvas *c1 = new TCanvas("c1","");
|
552 |
c1->SetFillColor(10);
|
553 |
h_jet3_pt->SetTitle("Jet3 pT");
|
554 |
h_jet3_pt->Draw();
|
555 |
h_jet3_pt->GetXaxis()->SetTitle("GeV");
|
556 |
h_jet3_pt->GetYaxis()->SetTitle("");
|
557 |
c1->Print(plot19);
|
558 |
|
559 |
gStyle->SetOptStat(11111);
|
560 |
TCanvas *c1 = new TCanvas("c1","");
|
561 |
c1->SetFillColor(10);
|
562 |
h_jet4_pt->SetTitle("Jet4 pT");
|
563 |
h_jet4_pt->Draw();
|
564 |
h_jet4_pt->GetXaxis()->SetTitle("GeV");
|
565 |
h_jet4_pt->GetYaxis()->SetTitle("");
|
566 |
c1->Print(plot20);
|
567 |
|
568 |
gStyle->SetOptStat(11111);
|
569 |
TCanvas *c1 = new TCanvas("c1","");
|
570 |
c1->SetFillColor(10);
|
571 |
h_nElectrons->SetTitle("# of Electrons/Event");
|
572 |
h_nElectrons->Draw();
|
573 |
h_nElectrons->GetXaxis()->SetTitle("#");
|
574 |
h_nElectrons->GetYaxis()->SetTitle("");
|
575 |
c1->Print(plot21);
|
576 |
|
577 |
gStyle->SetOptStat(11111);
|
578 |
TCanvas *c1 = new TCanvas("c1","");
|
579 |
c1->SetFillColor(10);
|
580 |
h_nMuons->SetTitle("# of Muons/Event");
|
581 |
h_nMuons->Draw();
|
582 |
h_nMuons->GetXaxis()->SetTitle("#");
|
583 |
h_nMuons->GetYaxis()->SetTitle("");
|
584 |
c1->Print(plot22);
|
585 |
|
586 |
gStyle->SetOptStat(11111);
|
587 |
TCanvas *c1 = new TCanvas("c1","");
|
588 |
c1->SetFillColor(10);
|
589 |
h_nPhotons->SetTitle("# of Photons/Event");
|
590 |
h_nPhotons->Draw();
|
591 |
h_nPhotons->GetXaxis()->SetTitle("#");
|
592 |
h_nPhotons->GetYaxis()->SetTitle("");
|
593 |
c1->Print(plot23);
|
594 |
|
595 |
gStyle->SetOptStat(11111);
|
596 |
TCanvas *c1 = new TCanvas("c1","");
|
597 |
c1->SetFillColor(10);
|
598 |
h_nJets->SetTitle("# of Jets/Event");
|
599 |
h_nJets->Draw();
|
600 |
h_nJets->GetXaxis()->SetTitle("#");
|
601 |
h_nJets->GetYaxis()->SetTitle("");
|
602 |
c1->Print(plot24);
|
603 |
|
604 |
gStyle->SetOptStat(11111);
|
605 |
TCanvas *c1 = new TCanvas("c1","");
|
606 |
c1->SetFillColor(10);
|
607 |
h_electron1_pt->SetTitle("Electron1 pT");
|
608 |
h_electron1_pt->Draw();
|
609 |
h_electron1_pt->GetXaxis()->SetTitle("GeV");
|
610 |
h_electron1_pt->GetYaxis()->SetTitle("");
|
611 |
c1->Print(plot25);
|
612 |
|
613 |
|
614 |
gStyle->SetOptStat(11111);
|
615 |
TCanvas *c1 = new TCanvas("c1","");
|
616 |
c1->SetFillColor(10);
|
617 |
h_electron1_eta->SetTitle("Electron1 Eta");
|
618 |
h_electron1_eta->Draw();
|
619 |
h_electron1_eta->GetXaxis()->SetTitle("Eta");
|
620 |
h_electron1_eta->GetYaxis()->SetTitle("");
|
621 |
c1->Print(plot26);
|
622 |
|
623 |
gStyle->SetOptStat(11111);
|
624 |
TCanvas *c1 = new TCanvas("c1","");
|
625 |
c1->SetFillColor(10);
|
626 |
h_electron1_d0->SetTitle("Electron1 d0");
|
627 |
h_electron1_d0->Draw();
|
628 |
h_electron1_d0->GetXaxis()->SetTitle("d0");
|
629 |
h_electron1_d0->GetYaxis()->SetTitle("");
|
630 |
c1->Print(plot27);
|
631 |
|
632 |
gStyle->SetOptStat(11111);
|
633 |
TCanvas *c1 = new TCanvas("c1","");
|
634 |
c1->SetFillColor(10);
|
635 |
h_electron1_relIso->SetTitle("Electron1 RelIso");
|
636 |
h_electron1_relIso->Draw();
|
637 |
h_electron1_relIso->GetXaxis()->SetTitle("RelIso");
|
638 |
h_electron1_relIso->GetYaxis()->SetTitle("");
|
639 |
c1->Print(plot28);
|
640 |
|
641 |
gStyle->SetOptStat(11111);
|
642 |
TCanvas *c1 = new TCanvas("c1","");
|
643 |
c1->SetFillColor(10);
|
644 |
h_MtMuMET->SetTitle("MtMuMET");
|
645 |
h_MtMuMET->Draw();
|
646 |
h_MtMuMET->GetXaxis()->SetTitle("GeV");
|
647 |
h_MtMuMET->GetYaxis()->SetTitle("");
|
648 |
c1->Print(plot29);
|
649 |
|
650 |
gStyle->SetOptStat(11111);
|
651 |
TCanvas *c1 = new TCanvas("c1","");
|
652 |
c1->SetFillColor(10);
|
653 |
h_MtMuJetMET->SetTitle("MtMuJetMET");
|
654 |
h_MtMuJetMET->Draw();
|
655 |
h_MtMuJetMET->GetXaxis()->SetTitle("GeV");
|
656 |
h_MtMuJetMET->GetYaxis()->SetTitle("");
|
657 |
c1->Print(plot30);
|
658 |
|
659 |
gStyle->SetOptStat(11111);
|
660 |
TCanvas *c1 = new TCanvas("c1","");
|
661 |
c1->SetFillColor(10);
|
662 |
h_MMuJet1->SetTitle("MMuJet1");
|
663 |
h_MMuJet1->Draw();
|
664 |
h_MMuJet1->GetXaxis()->SetTitle("GeV");
|
665 |
h_MMuJet1->GetYaxis()->SetTitle("");
|
666 |
c1->Print(plot31);
|
667 |
|
668 |
gStyle->SetOptStat(11111);
|
669 |
TCanvas *c1 = new TCanvas("c1","");
|
670 |
c1->SetFillColor(10);
|
671 |
h_HtJets->SetTitle("HtJets");
|
672 |
h_HtJets->Draw();
|
673 |
h_HtJets->GetXaxis()->SetTitle("GeV");
|
674 |
h_HtJets->GetYaxis()->SetTitle("");
|
675 |
c1->Print(plot32);
|
676 |
|
677 |
gStyle->SetOptStat(11111);
|
678 |
TCanvas *c1 = new TCanvas("c1","");
|
679 |
c1->SetFillColor(10);
|
680 |
h_HJets->SetTitle("HJets");
|
681 |
h_HJets->Draw();
|
682 |
h_HJets->GetXaxis()->SetTitle("GeV");
|
683 |
h_HJets->GetYaxis()->SetTitle("");
|
684 |
c1->Print(plot33);
|
685 |
|
686 |
gStyle->SetOptStat(11111);
|
687 |
TCanvas *c1 = new TCanvas("c1","");
|
688 |
c1->SetFillColor(10);
|
689 |
h_HtJetsLepMET->SetTitle("HtJetsLepMET");
|
690 |
h_HtJetsLepMET->Draw();
|
691 |
h_HtJetsLepMET->GetXaxis()->SetTitle("GeV");
|
692 |
h_HtJetsLepMET->GetYaxis()->SetTitle("");
|
693 |
c1->Print(plot34);
|
694 |
|
695 |
gStyle->SetOptStat(11111);
|
696 |
TCanvas *c1 = new TCanvas("c1","");
|
697 |
c1->SetFillColor(10);
|
698 |
h_HJetsLepMET->SetTitle("HJetsLepMET");
|
699 |
h_HJetsLepMET->Draw();
|
700 |
h_HJetsLepMET->GetXaxis()->SetTitle("GeV");
|
701 |
h_HJetsLepMET->GetYaxis()->SetTitle("");
|
702 |
c1->Print(plot35);
|
703 |
|
704 |
gStyle->SetOptStat(11111);
|
705 |
TCanvas *c1 = new TCanvas("c1","");
|
706 |
c1->SetFillColor(10);
|
707 |
h_sphericity->SetTitle("Sphericity");
|
708 |
h_sphericity->Draw();
|
709 |
h_sphericity->GetXaxis()->SetTitle("Sphericity");
|
710 |
h_sphericity->GetYaxis()->SetTitle("");
|
711 |
c1->Print(plot36);
|
712 |
|
713 |
gStyle->SetOptStat(11111);
|
714 |
TCanvas *c1 = new TCanvas("c1","");
|
715 |
c1->SetFillColor(10);
|
716 |
h_centrality->SetTitle("Centrality");
|
717 |
h_centrality->Draw();
|
718 |
h_centrality->GetXaxis()->SetTitle("Centrality");
|
719 |
h_centrality->GetYaxis()->SetTitle("");
|
720 |
c1->Print(plot37);
|
721 |
|
722 |
|
723 |
|
724 |
|
725 |
|
726 |
|
727 |
|
728 |
file->Close();
|
729 |
gSystem->cd("../");
|
730 |
gROOT->Reset();
|
731 |
gROOT->ProcessLine(".q");
|
732 |
|
733 |
|
734 |
}//void patPlotter
|