CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
myFastSimVal.cc
Go to the documentation of this file.
1 // myFastSimVal.cc
2 // Description: Comparison between Jet Algorithms
3 // Author: Frank Chlebana
4 // Date: 08 - August - 2007
5 //
13 // #include "DataFormats/HepMCCandidate/interface/GenParticleCandidate.h"
15 // #include "FWCore/Framework/interface/Handle.h"
19 #include <TROOT.h>
20 #include <TSystem.h>
21 #include <TFile.h>
22 #include <TCanvas.h>
23 #include <cmath>
24 using namespace edm;
25 using namespace reco;
26 using namespace std;
27 
28 #define DEBUG 1
29 // #define MAXJETS 50
30 #define MAXJETS 100
31 
32 // Get the algorithm of the jet collections we will read from the .cfg file
33 // which defines the value of the strings CaloJetAlgorithm and GenJetAlgorithm.
35  CaloJetAlgorithm1( cfg.getParameter<string>( "CaloJetAlgorithm1" ) ),
36  CaloJetAlgorithm2( cfg.getParameter<string>( "CaloJetAlgorithm2" ) ),
37  CaloJetAlgorithm3( cfg.getParameter<string>( "CaloJetAlgorithm3" ) ),
38  CaloJetAlgorithm4( cfg.getParameter<string>( "CaloJetAlgorithm4" ) ),
39  GenJetAlgorithm1( cfg.getParameter<string>( "GenJetAlgorithm1" ) ),
40  GenJetAlgorithm2( cfg.getParameter<string>( "GenJetAlgorithm2" ) ),
41  GenJetAlgorithm3( cfg.getParameter<string>( "GenJetAlgorithm3" ) ),
42  GenJetAlgorithm4( cfg.getParameter<string>( "GenJetAlgorithm4" ) ),
43  JetCorrectionService( cfg.getParameter<string>( "JetCorrectionService" ) )
44 {
45 }
46 
47 
48 
49 int nEvent = 0;
50 
52 
53  // Open the histogram file and book some associated histograms
54  m_file=new TFile("histo.root","RECREATE");
55 
56  tMassGen = TH1F("tMassGen","T Mass Gen",100,0,200);
57  tbarMassGen = TH1F("tbarMassGen","Tbar Mass Gen",100,0,200);
58 
59  tMass = TH1F("tMass","T Mass",100,0,200);
60  tbarMass = TH1F("tbarMass","Tbar Mass",100,0,200);
61 
62  topMassParton = TH1F("topMassParton","Top Mass Parton",100,0,200);
63  topMass1 = TH1F("topMass1","Top Mass 1",100,0,200);
64  topMass2 = TH1F("topMass2","Top Mass 2",100,0,200);
65  topMass3 = TH1F("topMass3","Top Mass 3",100,0,200);
66 
67  ZpMass = TH1F("ZpMass","Generated Zp Mass",160,0,8000);
68  ZpMassGen = TH1F("ZpMassGen","Gen Zp Mass",160,0,8000);
69  ZpMassMatched1 = TH1F("ZpMassMatched1","Calor Zp Mass 1",160,0,8000);
70  ZpMassMatched2 = TH1F("ZpMassMatched2","Calor Zp Mass 2",160,0,8000);
71  ZpMassMatched3 = TH1F("ZpMassMatched3","Calor Zp Mass 3",160,0,8000);
72 
73  ZpMassGen10 = TH1F("ZpMassGen10","Gen Zp Mass",160,0,8000);
74  ZpMassGen13 = TH1F("ZpMassGen13","Gen Zp Mass",160,0,8000);
75  ZpMassGen40 = TH1F("ZpMassGen40","Gen Zp Mass",160,0,8000);
76 
77  ZpMass_700_10 = TH1F("ZpMass_700_10","Parton Zp Mass",100,0,1000);
78  ZpMass_700_13 = TH1F("ZpMass_700_13","Parton Zp Mass",100,0,1000);
79  ZpMass_700_40 = TH1F("ZpMass_700_40","Parton Zp Mass",100,0,1000);
80 
81  ZpMassGen_700_10 = TH1F("ZpMassGen_700_10","Gen Zp Mass",100,0,1000);
82  ZpMassGen_700_13 = TH1F("ZpMassGen_700_13","Gen Zp Mass",100,0,1000);
83  ZpMassGen_700_40 = TH1F("ZpMassGen_700_40","Gen Zp Mass",100,0,1000);
84 
85  ZpMassGen_2000_10 = TH1F("ZpMassGen_2000_10","Gen Zp Mass",100,1500,2500);
86  ZpMassGen_2000_13 = TH1F("ZpMassGen_2000_13","Gen Zp Mass",100,1500,2500);
87  ZpMassGen_2000_40 = TH1F("ZpMassGen_2000_40","Gen Zp Mass",100,1500,2500);
88 
89  ZpMass_2000_10 = TH1F("ZpMass_2000_10","Parton Zp Mass",100,1500,2500);
90  ZpMass_2000_13 = TH1F("ZpMass_2000_13","Parton Zp Mass",100,1500,2500);
91  ZpMass_2000_40 = TH1F("ZpMass_2000_40","Parton Zp Mass",100,1500,2500);
92 
93  ZpMassGen_5000_10 = TH1F("ZpMassGen_5000_10","Gen Zp Mass",150,4000,5500);
94  ZpMassGen_5000_13 = TH1F("ZpMassGen_5000_13","Gen Zp Mass",150,4000,5500);
95  ZpMassGen_5000_40 = TH1F("ZpMassGen_5000_40","Gen Zp Mass",150,4000,5500);
96 
97  ZpMass_5000_10 = TH1F("ZpMass_5000_10","Parton Zp Mass",150,4000,5500);
98  ZpMass_5000_13 = TH1F("ZpMass_5000_13","Parton Zp Mass",150,4000,5500);
99  ZpMass_5000_40 = TH1F("ZpMass_5000_40","Parton Zp Mass",150,4000,5500);
100 
101  ZpMassRes101 = TH1F("ZpMassRes101","Zp Mass Resolution 1",100,-2,2);
102  ZpMassRes102 = TH1F("ZpMassRes102","Zp Mass Resolution 2",100,-2,2);
103  ZpMassRes103 = TH1F("ZpMassRes103","Zp Mass Resolution 3",100,-2,2);
104 
105  ZpMassRes131 = TH1F("ZpMassRes131","Zp Mass Resolution 1",100,-2,2);
106  ZpMassRes132 = TH1F("ZpMassRes132","Zp Mass Resolution 2",100,-2,2);
107  ZpMassRes133 = TH1F("ZpMassRes133","Zp Mass Resolution 3",100,-2,2);
108 
109  ZpMassRes401 = TH1F("ZpMassRes401","Zp Mass Resolution 1",100,-2,2);
110  ZpMassRes402 = TH1F("ZpMassRes402","Zp Mass Resolution 2",100,-2,2);
111  ZpMassRes403 = TH1F("ZpMassRes403","Zp Mass Resolution 3",100,-2,2);
112 
113  ZpMassResL101 = TH1F("ZpMassResL101","Zp Mass Resolution Leading Jets 1",100,0,2);
114  ZpMassResL102 = TH1F("ZpMassResL102","Zp Mass Resolution Leading Jets 2",100,0,2);
115  ZpMassResL103 = TH1F("ZpMassResL103","Zp Mass Resolution Leading Jets 3",100,0,2);
116 
117  ZpMassResRL101 = TH1F("ZpMassResRL101","Zp Mass Res. Ratio Leading Jets 1",100,0,2);
118  ZpMassResRL102 = TH1F("ZpMassResRL102","Zp Mass Res. Ratio Leading Jets 2",100,0,2);
119  ZpMassResRL103 = TH1F("ZpMassResRL103","Zp Mass Res. Ratio Leading Jets 3",100,0,2);
120 
121  ZpMassResRLoP101 = TH1F("ZpMassResRLoP101","Zp Mass RLoP Ratio Leading Jets 1",100,0,2);
122  ZpMassResRLoP102 = TH1F("ZpMassResRLoP102","Zp Mass RLoP Ratio Leading Jets 2",100,0,2);
123  ZpMassResRLoP103 = TH1F("ZpMassResRLoP103","Zp Mass RLoP Ratio Leading Jets 3",100,0,2);
124 
125  ZpMassResPRL101 = TH1F("ZpMassResPRL101","Zp Mass Res. P Ratio Leading Jets 1",100,0,2);
126  ZpMassResPRL102 = TH1F("ZpMassResPRL102","Zp Mass Res. P Ratio Leading Jets 2",100,0,2);
127  ZpMassResPRL103 = TH1F("ZpMassResPRL103","Zp Mass Res. P Ratio Leading Jets 3",100,0,2);
128 
129 
130  ZpMassResL131 = TH1F("ZpMassResL131","Zp Mass Resolution Leading Jets 1",100,0,2);
131  ZpMassResL132 = TH1F("ZpMassResL132","Zp Mass Resolution Leading Jets 2",100,0,2);
132  ZpMassResL133 = TH1F("ZpMassResL133","Zp Mass Resolution Leading Jets 3",100,0,2);
133 
134  ZpMassResRL131 = TH1F("ZpMassResRL131","Zp Mass Res. Ratio Leading Jets 1",100,0,2);
135  ZpMassResRL132 = TH1F("ZpMassResRL132","Zp Mass Res. Ratio Leading Jets 2",100,0,2);
136  ZpMassResRL133 = TH1F("ZpMassResRL133","Zp Mass Res. Ratio Leading Jets 3",100,0,2);
137 
138  ZpMassResRLoP131 = TH1F("ZpMassResRLoP131","Zp Mass RLoP Ratio Leading Jets 1",100,0,2);
139  ZpMassResRLoP132 = TH1F("ZpMassResRLoP132","Zp Mass RLoP Ratio Leading Jets 2",100,0,2);
140  ZpMassResRLoP133 = TH1F("ZpMassResRLoP133","Zp Mass RLoP Ratio Leading Jets 3",100,0,2);
141 
142  ZpMassResPRL131 = TH1F("ZpMassResPRL131","Zp Mass Res. P Ratio Leading Jets 1",100,0,2);
143  ZpMassResPRL132 = TH1F("ZpMassResPRL132","Zp Mass Res. P Ratio Leading Jets 2",100,0,2);
144  ZpMassResPRL133 = TH1F("ZpMassResPRL133","Zp Mass Res. P Ratio Leading Jets 3",100,0,2);
145 
146 
147  ZpMassResL401 = TH1F("ZpMassResL401","Zp Mass Resolution Leading Jets 1",100,0,2);
148  ZpMassResL402 = TH1F("ZpMassResL402","Zp Mass Resolution Leading Jets 2",100,0,2);
149  ZpMassResL403 = TH1F("ZpMassResL403","Zp Mass Resolution Leading Jets 3",100,0,2);
150 
151  ZpMassResRL401 = TH1F("ZpMassResRL401","Zp Mass Res. Ratio Leading Jets 1",100,0,2);
152  ZpMassResRL402 = TH1F("ZpMassResRL402","Zp Mass Res. Ratio Leading Jets 2",100,0,2);
153  ZpMassResRL403 = TH1F("ZpMassResRL403","Zp Mass Res. Ratio Leading Jets 3",100,0,2);
154 
155  ZpMassResRLoP401 = TH1F("ZpMassResRLoP401","Zp Mass RLoP Ratio Leading Jets 1",100,0,2);
156  ZpMassResRLoP402 = TH1F("ZpMassResRLoP402","Zp Mass RLoP Ratio Leading Jets 2",100,0,2);
157  ZpMassResRLoP403 = TH1F("ZpMassResRLoP403","Zp Mass RLoP Ratio Leading Jets 3",100,0,2);
158 
159  ZpMassResPRL401 = TH1F("ZpMassResPRL401","Zp Mass Res. P Ratio Leading Jets 1",100,0,2);
160  ZpMassResPRL402 = TH1F("ZpMassResPRL402","Zp Mass Res. P Ratio Leading Jets 2",100,0,2);
161  ZpMassResPRL403 = TH1F("ZpMassResPRL403","Zp Mass Res. P Ratio Leading Jets 3",100,0,2);
162 
163  dijetMass1 = TH1F("dijetMass1","DiJet Mass 1",100,0,4000);
164  dijetMass12 = TH1F("dijetMass12","DiJet Mass 1 2",100,0,6000);
165  dijetMass13 = TH1F("dijetMass13","DiJet Mass 1 3",100,0,12000);
166  dijetMass2 = TH1F("dijetMass2","DiJet Mass 2",100,0,4000);
167  dijetMass22 = TH1F("dijetMass22","DiJet Mass 2 2",100,0,6000);
168  dijetMass23 = TH1F("dijetMass23","DiJet Mass 2 3",100,0,12000);
169  dijetMass3 = TH1F("dijetMass3","DiJet Mass 3",100,0,4000);
170  dijetMass32 = TH1F("dijetMass32","DiJet Mass 3 2",100,0,6000);
171  dijetMass33 = TH1F("dijetMass33","DiJet Mass 3 3",100,0,12000);
172  dijetMass4 = TH1F("dijetMass4","DiJet Mass 4",100,0,4000);
173  dijetMass42 = TH1F("dijetMass42","DiJet Mass 4 2",100,0,6000);
174  dijetMass43 = TH1F("dijetMass43","DiJet Mass 4 3",100,0,12000);
175 
176  dijetMass101 = TH1F("dijetMass101","DiJet Mass 1",100,0,6000);
177  dijetMass131 = TH1F("dijetMass131","DiJet Mass 1",100,0,6000);
178  dijetMass401 = TH1F("dijetMass401","DiJet Mass 1",100,0,6000);
179 
180  dijetMass102 = TH1F("dijetMass102","DiJet Mass 2",100,0,6000);
181  dijetMass132 = TH1F("dijetMass132","DiJet Mass 2",100,0,6000);
182  dijetMass402 = TH1F("dijetMass402","DiJet Mass 2",100,0,6000);
183 
184  dijetMass103 = TH1F("dijetMass103","DiJet Mass 3",100,0,10000);
185  dijetMass133 = TH1F("dijetMass133","DiJet Mass 3",100,0,10000);
186  dijetMass403 = TH1F("dijetMass403","DiJet Mass 3",100,0,10000);
187 
188  dijetMass_700_101 = TH1F("dijetMass_700_101","DiJet Mass 1",100,0,1000);
189  dijetMass_700_131 = TH1F("dijetMass_700_131","DiJet Mass 1",100,0,1000);
190  dijetMass_700_401 = TH1F("dijetMass_700_401","DiJet Mass 1",100,0,1000);
191 
192  dijetMass_2000_101 = TH1F("dijetMass_2000_101","DiJet Mass 1",100,1500,2500);
193  dijetMass_2000_131 = TH1F("dijetMass_2000_131","DiJet Mass 1",100,1500,2500);
194  dijetMass_2000_401 = TH1F("dijetMass_2000_401","DiJet Mass 1",100,1500,2500);
195 
196  dijetMass_5000_101 = TH1F("dijetMass_5000_101","DiJet Mass 1",150,4000,5500);
197  dijetMass_5000_131 = TH1F("dijetMass_5000_131","DiJet Mass 1",150,4000,5500);
198  dijetMass_5000_401 = TH1F("dijetMass_5000_401","DiJet Mass 1",150,4000,5500);
199 
200 
201  dijetMassCor1 = TH1F("dijetMassCor1","DiJet Mass 1",160,0,8000);
202  dijetMassCor101 = TH1F("dijetMassCor101","DiJet Mass Cor 101",160,0,8000);
203  dijetMassCor131 = TH1F("dijetMassCor131","DiJet Mass Cor 131",160,0,8000);
204  dijetMassCor401 = TH1F("dijetMassCor401","DiJet Mass Cor 401",160,0,8000);
205 
206  dijetMassCor_700_1 = TH1F("dijetMassCor_700_1","DiJet Mass 1",100,0,1000);
207  dijetMassCor_700_101 = TH1F("dijetMassCor_700_101","DiJet Mass Cor 101",100,0,1000);
208  dijetMassCor_700_131 = TH1F("dijetMassCor_700_131","DiJet Mass Cor 131",100,0,1000);
209  dijetMassCor_700_401 = TH1F("dijetMassCor_700_401","DiJet Mass Cor 401",100,0,1000);
210 
211  dijetMassCor_2000_1 = TH1F("dijetMassCor_2000_1","DiJet Mass 1",100,1500,2500);
212  dijetMassCor_2000_101 = TH1F("dijetMassCor_2000_101","DiJet Mass Cor 101",100,1500,2500);
213  dijetMassCor_2000_131 = TH1F("dijetMassCor_2000_131","DiJet Mass Cor 131",100,1500,2500);
214  dijetMassCor_2000_401 = TH1F("dijetMassCor_2000_401","DiJet Mass Cor 401",100,1500,2500);
215 
216  dijetMassCor_5000_1 = TH1F("dijetMassCor_5000_1","DiJet Mass 1",150,4000,5500);
217  dijetMassCor_5000_101 = TH1F("dijetMassCor_5000_101","DiJet Mass Cor 101",150,4000,5500);
218  dijetMassCor_5000_131 = TH1F("dijetMassCor_5000_131","DiJet Mass Cor 131",150,4000,5500);
219  dijetMassCor_5000_401 = TH1F("dijetMassCor_5000_401","DiJet Mass Cor 401",150,4000,5500);
220 
221  dijetMassP1 = TH1F("dijetMassP1","DiJet Mass P 1",160,0,8000);
222  dijetMassP2 = TH1F("dijetMassP2","DiJet Mass P 2",160,0,8000);
223  dijetMassP3 = TH1F("dijetMassP3","DiJet Mass P 3",160,0,8000);
224 
225 
226  dijetMassP101 = TH1F("dijetMassP101","DiJet Mass P 1",160,0,8000);
227  dijetMassP131 = TH1F("dijetMassP131","DiJet Mass P 1",160,0,8000);
228  dijetMassP401 = TH1F("dijetMassP401","DiJet Mass P 1",160,0,8000);
229 
230  dijetMassP_700_101 = TH1F("dijetMassP_700_101","DiJet Mass P 1",100,0,1000);
231  dijetMassP_700_131 = TH1F("dijetMassP_700_131","DiJet Mass P 1",100,0,1000);
232  dijetMassP_700_401 = TH1F("dijetMassP_700_401","DiJet Mass P 1",100,0,1000);
233 
234  dijetMassP_2000_101 = TH1F("dijetMassP_2000_101","DiJet Mass P 1",100,1500,2500);
235  dijetMassP_2000_131 = TH1F("dijetMassP_2000_131","DiJet Mass P 1",100,1500,2500);
236  dijetMassP_2000_401 = TH1F("dijetMassP_2000_401","DiJet Mass P 1",100,1500,2500);
237 
238  dijetMassP_5000_101 = TH1F("dijetMassP_5000_101","DiJet Mass P 1",150,4000,5500);
239  dijetMassP_5000_131 = TH1F("dijetMassP_5000_131","DiJet Mass P 1",150,4000,5500);
240  dijetMassP_5000_401 = TH1F("dijetMassP_5000_401","DiJet Mass P 1",150,4000,5500);
241 
242  totEneLeadJetEta1_1 = TH1F("totEneLeadJetEta1_1","Total Energy Lead Jet Eta1 1",100,0,1500);
243  totEneLeadJetEta2_1 = TH1F("totEneLeadJetEta2_1","Total Energy Lead Jet Eta2 1",100,0,1500);
244  totEneLeadJetEta3_1 = TH1F("totEneLeadJetEta3_1","Total Energy Lead Jet Eta3 1",100,0,1500);
245  hadEneLeadJetEta1_1 = TH1F("hadEneLeadJetEta1_1","Hadronic Energy Lead Jet Eta1 1",100,0,1500);
246  hadEneLeadJetEta2_1 = TH1F("hadEneLeadJetEta2_1","Hadronic Energy Lead Jet Eta2 1",100,0,1500);
247  hadEneLeadJetEta3_1 = TH1F("hadEneLeadJetEta3_1","Hadronic Energy Lead Jet Eta3 1",100,0,1500);
248  emEneLeadJetEta1_1 = TH1F("emEneLeadJetEta1_1","EM Energy Lead Jet Eta1 1",100,0,1500);
249  emEneLeadJetEta2_1 = TH1F("emEneLeadJetEta2_1","EM Energy Lead Jet Eta2 1",100,0,1500);
250  emEneLeadJetEta3_1 = TH1F("emEneLeadJetEta3_1","EM Energy Lead Jet Eta3 1",100,0,1500);
251 
252  totEneLeadJetEta1_2 = TH1F("totEneLeadJetEta1_2","Total Energy Lead Jet Eta1 2",100,0,6000);
253  totEneLeadJetEta2_2 = TH1F("totEneLeadJetEta2_2","Total Energy Lead Jet Eta2 2",100,0,6000);
254  totEneLeadJetEta3_2 = TH1F("totEneLeadJetEta3_2","Total Energy Lead Jet Eta3 2",100,0,6000);
255  hadEneLeadJetEta1_2 = TH1F("hadEneLeadJetEta1_2","Hadronic Energy Lead Jet Eta1 2",100,0,6000);
256  hadEneLeadJetEta2_2 = TH1F("hadEneLeadJetEta2_2","Hadronic Energy Lead Jet Eta2 2",100,0,6000);
257  hadEneLeadJetEta3_2 = TH1F("hadEneLeadJetEta3_2","Hadronic Energy Lead Jet Eta3 2",100,0,6000);
258  emEneLeadJetEta1_2 = TH1F("emEneLeadJetEta1_2","EM Energy Lead Jet Eta1 2",100,0,5000);
259  emEneLeadJetEta2_2 = TH1F("emEneLeadJetEta2_2","EM Energy Lead Jet Eta2 2",100,0,5000);
260  emEneLeadJetEta3_2 = TH1F("emEneLeadJetEta3_2","EM Energy Lead Jet Eta3 2",100,0,5000);
261 
262  hadEneLeadJet1 = TH1F("hadEneLeadJet1","Hadronic Energy Lead Jet 1",100,0,3000);
263  hadEneLeadJet12 = TH1F("hadEneLeadJet12","Hadronic Energy Lead Jet 1 2",100,0,4000);
264  hadEneLeadJet13 = TH1F("hadEneLeadJet13","Hadronic Energy Lead Jet 1 3",100,0,6000);
265  hadEneLeadJet2 = TH1F("hadEneLeadJet2","Hadronic Energy Lead Jet 2",100,0,3000);
266  hadEneLeadJet22 = TH1F("hadEneLeadJet22","Hadronic Energy Lead Jet 2 2",100,0,4000);
267  hadEneLeadJet23 = TH1F("hadEneLeadJet23","Hadronic Energy Lead Jet 2 3",100,0,6000);
268  hadEneLeadJet3 = TH1F("hadEneLeadJet3","Hadronic Energy Lead Jet 3",100,0,3000);
269  hadEneLeadJet32 = TH1F("hadEneLeadJet32","Hadronic Energy Lead Jet 3 2",100,0,4000);
270  hadEneLeadJet33 = TH1F("hadEneLeadJet33","Hadronic Energy Lead Jet 3 3",100,0,6000);
271 
272  emEneLeadJet1 = TH1F("emEneLeadJet1","EM Energy Lead Jet 1",100,0,1500);
273  emEneLeadJet12 = TH1F("emEneLeadJet12","EM Energy Lead Jet 1 2",100,0,3000);
274  emEneLeadJet13 = TH1F("emEneLeadJet13","EM Energy Lead Jet 1 3",100,0,5000);
275  emEneLeadJet2 = TH1F("emEneLeadJet2","EM Energy Lead Jet 2",100,0,1500);
276  emEneLeadJet22 = TH1F("emEneLeadJet22","EM Energy Lead Jet 2 2",100,0,3000);
277  emEneLeadJet23 = TH1F("emEneLeadJet23","EM Energy Lead Jet 2 3",100,0,5000);
278  emEneLeadJet3 = TH1F("emEneLeadJet3","EM Energy Lead Jet 3",100,0,1500);
279  emEneLeadJet32 = TH1F("emEneLeadJet32","EM Energy Lead Jet 3 2",100,0,3000);
280  emEneLeadJet33 = TH1F("emEneLeadJet33","EM Energy Lead Jet 3 3",100,0,5000);
281 
282  hadFracEta11 = TH1F("hadFracEta11","Hadronic Fraction Eta1 Jet 1",100,0,1);
283  hadFracEta21 = TH1F("hadFracEta21","Hadronic Fraction Eta2 Jet 1",100,0,1);
284  hadFracEta31 = TH1F("hadFracEta31","Hadronic Fraction Eta3 Jet 1",100,0,1);
285 
286  hadFracEta12 = TH1F("hadFracEta12","Hadronic Fraction Eta1 Jet 2",100,0,1);
287  hadFracEta22 = TH1F("hadFracEta22","Hadronic Fraction Eta2 Jet 2",100,0,1);
288  hadFracEta32 = TH1F("hadFracEta32","Hadronic Fraction Eta3 Jet 2",100,0,1);
289 
290  hadFracEta13 = TH1F("hadFracEta13","Hadronic Fraction Eta1 Jet 3",100,0,1);
291  hadFracEta23 = TH1F("hadFracEta23","Hadronic Fraction Eta2 Jet 3",100,0,1);
292  hadFracEta33 = TH1F("hadFracEta33","Hadronic Fraction Eta3 Jet 3",100,0,1);
293 
294  hadFracLeadJet1 = TH1F("hadFracLeadJet1","Hadronic Fraction Lead Jet 1",100,0,1);
295  hadFracLeadJet2 = TH1F("hadFracLeadJet2","Hadronic Fraction Lead Jet 2",100,0,1);
296  hadFracLeadJet3 = TH1F("hadFracLeadJet3","Hadronic Fraction Lead Jet 3",100,0,1);
297 
298  SumEt1 = TH1F("SumEt1","SumEt 1",100,0,1000);
299  SumEt12 = TH1F("SumEt12","SumEt 1 2",100,0,4000);
300  SumEt13 = TH1F("SumEt13","SumEt 1 3",100,0,15000);
301 
302  MET1 = TH1F("MET1", "MET 1",100,0,200);
303  MET12 = TH1F("MET12", "MET 1 2",100,0,1000);
304  MET13 = TH1F("MET13", "MET 1 3",100,0,3000);
305 
306  nTowersLeadJet1 = TH1F("nTowersLeadJet1","Number of Towers Lead Jet 1",100,0,100);
307  nTowersLeadJet2 = TH1F("nTowersLeadJet2","Number of Towers Lead Jet 2",100,0,100);
308  nTowersLeadJet3 = TH1F("nTowersLeadJet3","Number of Towers Lead Jet 3",100,0,100);
309 
310  nTowersSecondJet1 = TH1F("nTowersSecondJet1","Number of Towers Second Jet 1",100,0,100);
311  nTowersSecondJet2 = TH1F("nTowersSecondJet2","Number of Towers Second Jet 2",100,0,100);
312  nTowersSecondJet3 = TH1F("nTowersSecondJet3","Number of Towers Second Jet 3",100,0,100);
313 
314  hf_PtResponse1 = TProfile("PtResponse1","Pt Response 1", 100, -5, 5, 0, 10);
315  hf_PtResponse2 = TProfile("PtResponse2","Pt Response 2", 100, -5, 5, 0, 10);
316  hf_PtResponse3 = TProfile("PtResponse3","Pt Response 3", 100, -5, 5, 0, 10);
317  hf_PtResponse4 = TProfile("PtResponse4","Pt Response 4", 100, -5, 5, 0, 10);
318 
319  hf_TowerDelR1 = TProfile("hf_TowerDelR1","Tower Del R 1", 100, 0, 2, 0, 10);
320  hf_TowerDelR12 = TProfile("hf_TowerDelR12","Tower Del R 1", 80, 0, 0.8, 0, 10);
321  hf_TowerDelR2 = TProfile("hf_TowerDelR2","Tower Del R 2", 100, 0, 2, 0, 10);
322  hf_TowerDelR22 = TProfile("hf_TowerDelR22","Tower Del R 2", 80, 0, 0.8, 0, 10);
323  hf_TowerDelR3 = TProfile("hf_TowerDelR3","Tower Del R 3", 100, 0, 2, 0, 10);
324  hf_TowerDelR32 = TProfile("hf_TowerDelR32","Tower Del R 3", 80, 0, 0.8, 0, 10);
325 
326  hf_sumTowerAllEx = TH1F("sumTowerAllEx","Tower Ex",100,-1000,1000);
327  hf_sumTowerAllEy = TH1F("sumTowerAllEy","Tower Ey",100,-1000,1000);
328 
329  hf_TowerJetEt1 = TH1F("TowerJetEt1","Tower/Jet Et 1",50,0,1);
330 
331  nTowers1 = TH1F("nTowers1","Number of Towers pt 0.5",100,0,500);
332  nTowers2 = TH1F("nTowers2","Number of Towers pt 1.0",100,0,500);
333  nTowers3 = TH1F("nTowers3","Number of Towers pt 1.5",100,0,500);
334  nTowers4 = TH1F("nTowers4","Number of Towers pt 2.0",100,0,500);
335 
336  nTowersLeadJetPt1 = TH1F("nTowersLeadJetPt1","Number of Towers in Lead Jet pt 0.5",100,0,200);
337  nTowersLeadJetPt2 = TH1F("nTowersLeadJetPt2","Number of Towers in Lead Jet pt 1.0",100,0,200);
338  nTowersLeadJetPt3 = TH1F("nTowersLeadJetPt3","Number of Towers in Lead Jet pt 1.5",100,0,200);
339  nTowersLeadJetPt4 = TH1F("nTowersLeadJetPt4","Number of Towers in Lead Jet pt 2.0",100,0,200);
340 
341  TowerEtLeadJet1 = TH1F("TowerEtLeadJet1","Towers Et Lead Jet 1",100,0,2000);
342  TowerEtLeadJet12 = TH1F("TowerEtLeadJet12","Towers Et Lead Jet 1 2",100,0,6000);
343  TowerEtLeadJet13 = TH1F("TowerEtLeadJet13","Towers Et Lead Jet 1 3",100,0,300);
344  TowerEtLeadJet2 = TH1F("TowerEtLeadJet2","Towers Et Lead Jet 2",100,0,2000);
345  TowerEtLeadJet22 = TH1F("TowerEtLeadJet22","Towers Et Lead Jet 2 2",100,0,6000);
346  TowerEtLeadJet23 = TH1F("TowerEtLeadJet23","Towers Et Lead Jet 2 3",100,0,300);
347  TowerEtLeadJet3 = TH1F("TowerEtLeadJet3","Towers Et Lead Jet 3",100,0,2000);
348  TowerEtLeadJet32 = TH1F("TowerEtLeadJet32","Towers Et Lead Jet 3 2",100,0,6000);
349  TowerEtLeadJet33 = TH1F("TowerEtLeadJet33","Towers Et Lead Jet 3 3",100,0,300);
350 
351  hf_nJet1 = TProfile("hf_nJet1", "Num Jets 1", 100, 0, 5000, 0, 50);
352  hf_nJet2 = TProfile("hf_nJet2", "Num Jets 2", 100, 0, 5000, 0, 50);
353  hf_nJet3 = TProfile("hf_nJet3", "Num Jets 3", 100, 0, 5000, 0, 50);
354  hf_nJet4 = TProfile("hf_nJet4", "Num Jets 4", 100, 0, 5000, 0, 50);
355 
356  hf_nJet1s = TProfile("hf_nJet1s", "Num Jets 1", 100, 0, 200, 0, 50);
357  hf_nJet2s = TProfile("hf_nJet2s", "Num Jets 2", 100, 0, 200, 0, 50);
358  hf_nJet3s = TProfile("hf_nJet3s", "Num Jets 3", 100, 0, 200, 0, 50);
359  hf_nJet4s = TProfile("hf_nJet4s", "Num Jets 4", 100, 0, 200, 0, 50);
360 
361  hf_nJet11 = TProfile("hf_nJet11", "Num Jets 1 1", 100, 0, 3000, 0, 50);
362  hf_nJet21 = TProfile("hf_nJet21", "Num Jets 2 1", 100, 0, 3000, 0, 50);
363  hf_nJet31 = TProfile("hf_nJet31", "Num Jets 3 1", 100, 0, 3000, 0, 50);
364  hf_nJet41 = TProfile("hf_nJet41", "Num Jets 4 1", 100, 0, 3000, 0, 50);
365 
366  dRPar1 = TH1F("dRPar1","Parton dR with matched CaloJet1",100,0,0.5);
367  dPhiPar1 = TH1F("dPhiPar1","Parton dPhi with matched CaloJet1",200,-0.5,0.5);
368  dEtaPar1 = TH1F("dEtaPar1","Parton dEta with matched CaloJet1",200,-0.5,0.5);
369  dPtPar1 = TH1F("dPtPar1","Parton dPt with matched CaloJet1",200,-50,50);
370 
371  dRPar2 = TH1F("dRPar2","Parton dR with matched CaloJet2",100,0,0.5);
372  dPhiPar2 = TH1F("dPhiPar2","Parton dPhi with matched CaloJet2",200,-0.5,0.5);
373  dEtaPar2 = TH1F("dEtaPar2","Parton dEta with matched CaloJet2",200,-0.5,0.5);
374  dPtPar2 = TH1F("dPtPar2","Parton dPt with matched CaloJet2",200,-50,50);
375 
376  dRPar3 = TH1F("dRPar3","Parton dR with matched CaloJet3",100,0,0.5);
377  dPhiPar3 = TH1F("dPhiPar3","Parton dPhi with matched CaloJet3",200,-0.5,0.5);
378  dEtaPar3 = TH1F("dEtaPar3","Parton dEta with matched CaloJet3",200,-0.5,0.5);
379  dPtPar3 = TH1F("dPtPar3","Parton dPt with matched CaloJet3",200,-50,50);
380 
381  dRPar4 = TH1F("dRPar4","Parton dR with matched CaloJet4",100,0,0.5);
382  dPhiPar4 = TH1F("dPhiPar4","Parton dPhi with matched CaloJet4",200,-0.5,0.5);
383  dEtaPar4 = TH1F("dEtaPar4","Parton dEta with matched CaloJet4",200,-0.5,0.5);
384  dPtPar4 = TH1F("dPtPar4","Parton dPt with matched CaloJet4",200,-50,50);
385 
386  dRParton = TH1F("dRParton","dR Parton",100,0,10.0);
387  dRPartonMin = TH1F("dRPartonMin","Min dR Parton",100,0,2.0);
388 
389  dR1 = TH1F("dR1","GenJets dR with matched CaloJet",100,0,0.5);
390  dPhi1 = TH1F("dPhi1","GenJets dPhi with matched CaloJet",200,-0.5,0.5);
391  dEta1 = TH1F("dEta1","GenJets dEta with matched CaloJet",200,-0.5,0.5);
392  dPt1 = TH1F("dPt1","GenJets dPt with matched CaloJet",200,-100,100);
393  dPtFrac1 = TH1F("dPtFrac1","GenJets dPt frac with matched CaloJet",100,-1,1);
394  dPt20Frac1 = TH1F("dPt20Frac1","GenJets dPt frac with matched CaloJet",100,-1,1);
395  dPt40Frac1 = TH1F("dPt40Frac1","GenJets dPt frac with matched CaloJet",100,-1,1);
396  dPt80Frac1 = TH1F("dPt80Frac1","GenJets dPt frac with matched CaloJet",100,-1,1);
397  dPt100Frac1 = TH1F("dPt100Frac1","GenJets dPt frac with matched CaloJet",100,-1,1);
398 
399  dR2 = TH1F("dR2","GenJets dR with matched CaloJet",100,0,0.5);
400  dPhi2 = TH1F("dPhi2","GenJets dPhi with matched CaloJet",200,-0.5,0.5);
401  dEta2 = TH1F("dEta2","GenJets dEta with matched CaloJet",200,-0.5,0.5);
402  dPt2 = TH1F("dPt2","GenJets dPt with matched CaloJet",200,-100,100);
403  dPtFrac2 = TH1F("dPtFrac2","GenJets dPt frac with matched CaloJet",100,-1,1);
404  dPt20Frac2 = TH1F("dPt20Frac2","GenJets dPt frac with matched CaloJet",100,-1,1);
405  dPt40Frac2 = TH1F("dPt40Frac2","GenJets dPt frac with matched CaloJet",100,-1,1);
406  dPt80Frac2 = TH1F("dPt80Frac2","GenJets dPt frac with matched CaloJet",100,-1,1);
407  dPt100Frac2 = TH1F("dPt100Frac2","GenJets dPt frac with matched CaloJet",100,-1,1);
408 
409  dR3 = TH1F("dR3","GenJets dR with matched CaloJet",100,0,0.5);
410  dPhi3 = TH1F("dPhi3","GenJets dPhi with matched CaloJet",200,-0.5,0.5);
411  dEta3 = TH1F("dEta3","GenJets dEta with matched CaloJet",200,-0.5,0.5);
412  dPt3 = TH1F("dPt3","GenJets dPt with matched CaloJet",200,-100,100);
413  dPtFrac3 = TH1F("dPtFrac3","GenJets dPt frac with matched CaloJet",100,-1,1);
414  dPt20Frac3 = TH1F("dPt20Frac3","GenJets dPt frac with matched CaloJet",100,-1,1);
415  dPt40Frac3 = TH1F("dPt40Frac3","GenJets dPt frac with matched CaloJet",100,-1,1);
416  dPt80Frac3 = TH1F("dPt80Frac3","GenJets dPt frac with matched CaloJet",100,-1,1);
417  dPt100Frac3 = TH1F("dPt100Frac3","GenJets dPt frac with matched CaloJet",100,-1,1);
418 
419  dR4 = TH1F("dR4","GenJets dR with matched CaloJet",100,0,0.5);
420  dPhi4 = TH1F("dPhi4","GenJets dPhi with matched CaloJet",200,-0.5,0.5);
421  dEta4 = TH1F("dEta4","GenJets dEta with matched CaloJet",200,-0.5,0.5);
422  dPt4 = TH1F("dPt4","GenJets dPt with matched CaloJet",200,-100,100);
423  dPtFrac4 = TH1F("dPtFrac4","GenJets dPt frac with matched CaloJet",100,-1,1);
424  dPt20Frac4 = TH1F("dPt20Frac4","GenJets dPt frac with matched CaloJet",100,-1,1);
425  dPt40Frac4 = TH1F("dPt40Frac4","GenJets dPt frac with matched CaloJet",100,-1,1);
426  dPt80Frac4 = TH1F("dPt80Frac4","GenJets dPt frac with matched CaloJet",100,-1,1);
427  dPt100Frac4 = TH1F("dPt100Frac4","GenJets dPt frac with matched CaloJet",100,-1,1);
428 
429  dR12 = TH1F("dR12","dR MidPoint - SISCone",100,0,0.5);
430  dPhi12 = TH1F("dPhi12","dPhi MidPoint - SISCone",200,-0.5,0.5);
431  dEta12 = TH1F("dEta12","dEta MidPoint - SISCone",200,-0.5,0.5);
432  dPt12 = TH1F("dPt12","dPt MidPoint - SISCone",200,-100,100);
433 
434 
435 
436  h_nCalJets1 = TH1F( "nCalJets1", "Number of CalJets1", 20, 0, 20 );
437  h_nCalJets2 = TH1F( "nCalJets2", "Number of CalJets2", 20, 0, 20 );
438  h_nCalJets3 = TH1F( "nCalJets3", "Number of CalJets3", 20, 0, 20 );
439  h_nCalJets4 = TH1F( "nCalJets4", "Number of CalJets4", 20, 0, 20 );
440 
441  h_lowPtCal11 = TH1F( "lowPtCal11", "Low p_{T} of CalJet1 Eta1", 100, 0, 100 );
442  h_lowPtCal21 = TH1F( "lowPtCal21", "Low p_{T} of CalJet2 Eta1", 100, 0, 100 );
443  h_lowPtCal31 = TH1F( "lowPtCal31", "Low p_{T} of CalJet3 Eta1", 100, 0, 100 );
444  h_lowPtCal41 = TH1F( "lowPtCal41", "Low p_{T} of CalJet4 Eta1", 100, 0, 100 );
445 
446  h_lowPtCal12 = TH1F( "lowPtCal12", "Low p_{T} of CalJet1 Eta2", 100, 0, 100 );
447  h_lowPtCal22 = TH1F( "lowPtCal22", "Low p_{T} of CalJet2 Eta2", 100, 0, 100 );
448  h_lowPtCal32 = TH1F( "lowPtCal32", "Low p_{T} of CalJet3 Eta2", 100, 0, 100 );
449  h_lowPtCal42 = TH1F( "lowPtCal42", "Low p_{T} of CalJet4 Eta2", 100, 0, 100 );
450 
451  h_lowPtCal13 = TH1F( "lowPtCal13", "Low p_{T} of CalJet1 Eta3", 100, 0, 100 );
452  h_lowPtCal23 = TH1F( "lowPtCal23", "Low p_{T} of CalJet2 Eta3", 100, 0, 100 );
453  h_lowPtCal33 = TH1F( "lowPtCal33", "Low p_{T} of CalJet3 Eta3", 100, 0, 100 );
454  h_lowPtCal43 = TH1F( "lowPtCal43", "Low p_{T} of CalJet4 Eta3", 100, 0, 100 );
455 
456  h_lowPtCal1c11 = TH1F( "lowPtCal1c11", "Low p_{T} of CalJet1 c1 Eta1", 100, 0, 100 );
457  h_lowPtCal2c11 = TH1F( "lowPtCal2c11", "Low p_{T} of CalJet2 c1 Eta1", 100, 0, 100 );
458  h_lowPtCal3c11 = TH1F( "lowPtCal3c11", "Low p_{T} of CalJet3 c1 Eta1", 100, 0, 100 );
459  h_lowPtCal4c11 = TH1F( "lowPtCal4c11", "Low p_{T} of CalJet4 c1 Eta1", 100, 0, 100 );
460 
461  h_lowPtCal1c12 = TH1F( "lowPtCal1c12", "Low p_{T} of CalJet1 c1 Eta2", 100, 0, 100 );
462  h_lowPtCal2c12 = TH1F( "lowPtCal2c12", "Low p_{T} of CalJet2 c1 Eta2", 100, 0, 100 );
463  h_lowPtCal3c12 = TH1F( "lowPtCal3c12", "Low p_{T} of CalJet3 c1 Eta2", 100, 0, 100 );
464  h_lowPtCal4c12 = TH1F( "lowPtCal4c12", "Low p_{T} of CalJet4 c1 Eta2", 100, 0, 100 );
465 
466  h_lowPtCal1c13 = TH1F( "lowPtCal1c13", "Low p_{T} of CalJet1 c1 Eta3", 100, 0, 100 );
467  h_lowPtCal2c13 = TH1F( "lowPtCal2c13", "Low p_{T} of CalJet2 c1 Eta3", 100, 0, 100 );
468  h_lowPtCal3c13 = TH1F( "lowPtCal3c13", "Low p_{T} of CalJet3 c1 Eta3", 100, 0, 100 );
469  h_lowPtCal4c13 = TH1F( "lowPtCal4c13", "Low p_{T} of CalJet4 c1 Eta3", 100, 0, 100 );
470 
471 
472  matchedAllPt11 = TH1F( "matchedAllPt11", "p_{T} of CalJet1 Eta1", 50, 0, 250 );
473  matchedAllPt12 = TH1F( "matchedAllPt12", "p_{T} of CalJet1 Eta2", 50, 0, 250 );
474  matchedAllPt13 = TH1F( "matchedAllPt13", "p_{T} of CalJet1 Eta3", 50, 0, 250 );
475  matchedPt11 = TH1F( "matchedPt11", "p_{T} of CalJet1 Eta1", 50, 0, 250 );
476  matchedPt12 = TH1F( "matchedPt12", "p_{T} of CalJet1 Eta2", 50, 0, 250 );
477  matchedPt13 = TH1F( "matchedPt13", "p_{T} of CalJet1 Eta3", 50, 0, 250 );
478 
479  matchedAllPt21 = TH1F( "matchedAllPt21", "p_{T} of CalJet2 Eta1", 50, 0, 250 );
480  matchedAllPt22 = TH1F( "matchedAllPt22", "p_{T} of CalJet2 Eta2", 50, 0, 250 );
481  matchedAllPt23 = TH1F( "matchedAllPt23", "p_{T} of CalJet2 Eta3", 50, 0, 250 );
482  matchedPt21 = TH1F( "matchedPt21", "p_{T} of CalJet2 Eta1", 50, 0, 250 );
483  matchedPt22 = TH1F( "matchedPt22", "p_{T} of CalJet2 Eta2", 50, 0, 250 );
484  matchedPt23 = TH1F( "matchedPt23", "p_{T} of CalJet2 Eta3", 50, 0, 250 );
485 
486  matchedAllPt31 = TH1F( "matchedAllPt31", "p_{T} of CalJet3 Eta1", 50, 0, 250 );
487  matchedAllPt32 = TH1F( "matchedAllPt32", "p_{T} of CalJet3 Eta2", 50, 0, 250 );
488  matchedAllPt33 = TH1F( "matchedAllPt33", "p_{T} of CalJet3 Eta3", 50, 0, 250 );
489  matchedPt31 = TH1F( "matchedPt31", "p_{T} of CalJet3 Eta1", 50, 0, 250 );
490  matchedPt32 = TH1F( "matchedPt32", "p_{T} of CalJet3 Eta2", 50, 0, 250 );
491  matchedPt33 = TH1F( "matchedPt33", "p_{T} of CalJet3 Eta3", 50, 0, 250 );
492 
493  matchedAllPt41 = TH1F( "matchedAllPt41", "p_{T} of CalJet4 Eta1", 50, 0, 250 );
494  matchedAllPt42 = TH1F( "matchedAllPt42", "p_{T} of CalJet4 Eta2", 50, 0, 250 );
495  matchedAllPt43 = TH1F( "matchedAllPt43", "p_{T} of CalJet4 Eta3", 50, 0, 250 );
496  matchedPt41 = TH1F( "matchedPt41", "p_{T} of CalJet4 Eta1", 50, 0, 250 );
497  matchedPt42 = TH1F( "matchedPt42", "p_{T} of CalJet4 Eta2", 50, 0, 250 );
498  matchedPt43 = TH1F( "matchedPt43", "p_{T} of CalJet4 Eta3", 50, 0, 250 );
499 
500 
501 
502  h_ptCal1 = TH1F( "ptCal1", "p_{T} of CalJet1", 50, 0, 1000 );
503  h_ptCal12 = TH1F( "ptCal12", "p_{T} of CalJet1 2", 50, 0, 6000 );
504  h_ptCal13 = TH1F( "ptCal13", "p_{T} of CalJet1 2", 50, 0, 300 );
505 
506  h_ptCal2 = TH1F( "ptCal2", "p_{T} of CalJet2", 50, 0, 1000 );
507  h_ptCal22 = TH1F( "ptCal22", "p_{T} of CalJet2 2", 50, 0, 6000 );
508  h_ptCal23 = TH1F( "ptCal23", "p_{T} of CalJet2 2", 50, 0, 300 );
509 
510  h_ptCal3 = TH1F( "ptCal3", "p_{T} of CalJet3", 50, 0, 1000 );
511  h_ptCal32 = TH1F( "ptCal32", "p_{T} of CalJet3 2", 50, 0, 6000 );
512  h_ptCal33 = TH1F( "ptCal33", "p_{T} of CalJet3 2", 50, 0, 300 );
513 
514  h_ptCal4 = TH1F( "ptCal4", "p_{T} of CalJet4", 50, 0, 1000 );
515  h_ptCal42 = TH1F( "ptCal42", "p_{T} of CalJet4 2", 50, 0, 6000 );
516  h_ptCal43 = TH1F( "ptCal43", "p_{T} of CalJet4 2", 50, 0, 300 );
517 
518  h_etaCal1 = TH1F( "etaCal1", "#eta of CalJet1", 100, -4, 4 );
519  h_etaCal2 = TH1F( "etaCal2", "#eta of CalJet2", 100, -4, 4 );
520  h_etaCal3 = TH1F( "etaCal3", "#eta of CalJet3", 100, -4, 4 );
521  h_etaCal4 = TH1F( "etaCal4", "#eta of CalJet4", 100, -4, 4 );
522 
523  h_phiCal1 = TH1F( "phiCal1", "#phi of CalJet1", 50, -M_PI, M_PI );
524  h_phiCal2 = TH1F( "phiCal2", "#phi of CalJet2", 50, -M_PI, M_PI );
525  h_phiCal3 = TH1F( "phiCal3", "#phi of CalJet3", 50, -M_PI, M_PI );
526  h_phiCal4 = TH1F( "phiCal4", "#phi of CalJet4", 50, -M_PI, M_PI );
527 
528  h_ptCalL1 = TH1F( "ptCalL1", "p_{T} of CalJetL1", 50, 0, 300 );
529  h_ptCalL12 = TH1F( "ptCalL12", "p_{T} of CalJetL1 2", 50, 0, 1200 );
530  h_ptCalL13 = TH1F( "ptCalL13", "p_{T} of CalJetL1 3", 50, 0, 6000 );
531  h_ptCalL2 = TH1F( "ptCalL2", "p_{T} of CalJetL2", 50, 0, 300 );
532  h_ptCalL22 = TH1F( "ptCalL22", "p_{T} of CalJetL2 2", 50, 0, 1200 );
533  h_ptCalL23 = TH1F( "ptCalL23", "p_{T} of CalJetL2 3", 50, 0, 6000 );
534  h_ptCalL3 = TH1F( "ptCalL3", "p_{T} of CalJetL3", 50, 0, 300 );
535  h_ptCalL32 = TH1F( "ptCalL32", "p_{T} of CalJetL3 2", 50, 0, 1200 );
536  h_ptCalL33 = TH1F( "ptCalL33", "p_{T} of CalJetL3 3", 50, 0, 6000 );
537  h_ptCalL4 = TH1F( "ptCalL4", "p_{T} of CalJetL4", 50, 0, 300 );
538  h_ptCalL42 = TH1F( "ptCalL42", "p_{T} of CalJetL4 2", 50, 0, 1200 );
539  h_ptCalL43 = TH1F( "ptCalL43", "p_{T} of CalJetL4 3", 50, 0, 6000 );
540 
541 
542  h_etaCalL1 = TH1F( "etaCalL1", "#eta of CalJetL1", 100, -4, 4 );
543  h_etaCalL2 = TH1F( "etaCalL2", "#eta of CalJetL2", 100, -4, 4 );
544  h_etaCalL3 = TH1F( "etaCalL3", "#eta of CalJetL3", 100, -4, 4 );
545  h_etaCalL4 = TH1F( "etaCalL4", "#eta of CalJetL4", 100, -4, 4 );
546  h_phiCalL1 = TH1F( "phiCalL1", "#phi of CalJetL1", 50, -M_PI, M_PI );
547  h_phiCalL2 = TH1F( "phiCalL2", "#phi of CalJetL2", 50, -M_PI, M_PI );
548  h_phiCalL3 = TH1F( "phiCalL3", "#phi of CalJetL3", 50, -M_PI, M_PI );
549  h_phiCalL4 = TH1F( "phiCalL4", "#phi of CalJetL4", 50, -M_PI, M_PI );
550 
551  h_nGenJets1 = TH1F( "nGenJets1", "Number of GenJets1", 20, 0, 20 );
552  h_nGenJets2 = TH1F( "nGenJets2", "Number of GenJets2", 20, 0, 20 );
553  h_nGenJets3 = TH1F( "nGenJets3", "Number of GenJets3", 20, 0, 20 );
554  h_nGenJets4 = TH1F( "nGenJets4", "Number of GenJets4", 20, 0, 20 );
555 
556  h_ptGen1 = TH1F( "ptGen1", "p_{T} of GenJet1", 50, 0, 1000 );
557  h_ptGen12 = TH1F( "ptGen12", "p_{T} of GenJet1 2", 50, 0, 6000 );
558  h_ptGen13 = TH1F( "ptGen13", "p_{T} of GenJet1 3", 50, 0, 300 );
559 
560  h_ptGen2 = TH1F( "ptGen2", "p_{T} of GenJet2", 50, 0, 1000 );
561  h_ptGen22 = TH1F( "ptGen22", "p_{T} of GenJet2 2", 50, 0, 6000 );
562  h_ptGen23 = TH1F( "ptGen23", "p_{T} of GenJet2 3", 50, 0, 300 );
563 
564  h_ptGen3 = TH1F( "ptGen3", "p_{T} of GenJet3", 50, 0, 1000 );
565  h_ptGen32 = TH1F( "ptGen32", "p_{T} of GenJet3 2", 50, 0, 6000 );
566  h_ptGen33 = TH1F( "ptGen33", "p_{T} of GenJet3 3", 50, 0, 300 );
567 
568  h_ptGen4 = TH1F( "ptGen4", "p_{T} of GenJet4", 50, 0, 1000 );
569  h_ptGen42 = TH1F( "ptGen42", "p_{T} of GenJet4 2", 50, 0, 6000 );
570  h_ptGen43 = TH1F( "ptGen43", "p_{T} of GenJet4 3", 50, 0, 300 );
571 
572 
573  h_etaGen1 = TH1F( "etaGen1", "#eta of GenJet1", 100, -4, 4 );
574  h_etaGen2 = TH1F( "etaGen2", "#eta of GenJet2", 100, -4, 4 );
575  h_etaGen3 = TH1F( "etaGen3", "#eta of GenJet3", 100, -4, 4 );
576  h_phiGen1 = TH1F( "phiGen1", "#phi of GenJet1", 50, -M_PI, M_PI );
577  h_phiGen2 = TH1F( "phiGen2", "#phi of GenJet2", 50, -M_PI, M_PI );
578  h_phiGen3 = TH1F( "phiGen3", "#phi of GenJet3", 50, -M_PI, M_PI );
579 
580  h_ptGenL1 = TH1F( "ptGenL1", "p_{T} of GenJetL1", 50, 0, 300 );
581  h_ptGenL12 = TH1F( "ptGenL12", "p_{T} of GenJetL1 2", 50, 0, 1200 );
582  h_ptGenL13 = TH1F( "ptGenL13", "p_{T} of GenJetL1 3", 50, 0, 6000 );
583  h_ptGenL2 = TH1F( "ptGenL2", "p_{T} of GenJetL2", 50, 0, 300 );
584  h_ptGenL22 = TH1F( "ptGenL22", "p_{T} of GenJetL2 2", 50, 0, 1200 );
585  h_ptGenL23 = TH1F( "ptGenL23", "p_{T} of GenJetL2 3", 50, 0, 6000 );
586  h_ptGenL3 = TH1F( "ptGenL3", "p_{T} of GenJetL3", 50, 0, 300 );
587  h_ptGenL32 = TH1F( "ptGenL32", "p_{T} of GenJetL32", 50, 0, 1200 );
588  h_ptGenL33 = TH1F( "ptGenL33", "p_{T} of GenJetL33", 50, 0, 6000 );
589 
590 
591  h_etaGenL1 = TH1F( "etaGenL1", "#eta of GenJetL1", 100, -4, 4 );
592  h_etaGenL2 = TH1F( "etaGenL2", "#eta of GenJetL2", 100, -4, 4 );
593  h_etaGenL3 = TH1F( "etaGenL3", "#eta of GenJetL3", 100, -4, 4 );
594  h_phiGenL1 = TH1F( "phiGenL1", "#phi of GenJetL1", 50, -M_PI, M_PI );
595  h_phiGenL2 = TH1F( "phiGenL2", "#phi of GenJetL2", 50, -M_PI, M_PI );
596  h_phiGenL3 = TH1F( "phiGenL3", "#phi of GenJetL3", 50, -M_PI, M_PI );
597 
598  h_jetEt1 = TH1F( "jetEt1", "Total Jet Et", 100, 0, 3000 );
599  h_jetEt2 = TH1F( "jetEt2", "Total Jet Et", 100, 0, 3000 );
600  h_jetEt3 = TH1F( "jetEt3", "Total Jet Et", 100, 0, 3000 );
601 
602  h_jet1Pt1 = TH1F( "jet1Pt1", "Jet Pt", 100, 0, 3000 );
603  h_jet2Pt1 = TH1F( "jet2Pt1", "Jet Pt", 100, 0, 3000 );
604  h_jet3Pt1 = TH1F( "jet3Pt1", "Jet Pt", 100, 0, 3000 );
605  h_jet4Pt1 = TH1F( "jet4Pt1", "Jet Pt", 100, 0, 3000 );
606  h_jet5Pt1 = TH1F( "jet5Pt1", "Jet Pt", 100, 0, 3000 );
607  h_jet6Pt1 = TH1F( "jet6Pt1", "Jet Pt", 100, 0, 3000 );
608  h_jet7Pt1 = TH1F( "jet7Pt1", "Jet Pt", 100, 0, 3000 );
609 
610  h_jet1Pt2 = TH1F( "jet1Pt2", "Jet Pt", 100, 0, 3000 );
611  h_jet2Pt2 = TH1F( "jet2Pt2", "Jet Pt", 100, 0, 3000 );
612  h_jet3Pt2 = TH1F( "jet3Pt2", "Jet Pt", 100, 0, 3000 );
613  h_jet4Pt2 = TH1F( "jet4Pt2", "Jet Pt", 100, 0, 3000 );
614  h_jet5Pt2 = TH1F( "jet5Pt2", "Jet Pt", 100, 0, 3000 );
615  h_jet6Pt2 = TH1F( "jet6Pt2", "Jet Pt", 100, 0, 3000 );
616  h_jet7Pt2 = TH1F( "jet7Pt2", "Jet Pt", 100, 0, 3000 );
617 
618  h_jet1Pt3 = TH1F( "jet1Pt3", "Jet Pt", 100, 0, 3000 );
619  h_jet2Pt3 = TH1F( "jet2Pt3", "Jet Pt", 100, 0, 3000 );
620  h_jet3Pt3 = TH1F( "jet3Pt3", "Jet Pt", 100, 0, 3000 );
621  h_jet4Pt3 = TH1F( "jet4Pt3", "Jet Pt", 100, 0, 3000 );
622  h_jet5Pt3 = TH1F( "jet5Pt3", "Jet Pt", 100, 0, 3000 );
623  h_jet6Pt3 = TH1F( "jet6Pt3", "Jet Pt", 100, 0, 3000 );
624  h_jet7Pt3 = TH1F( "jet7Pt3", "Jet Pt", 100, 0, 3000 );
625 
626  h_jet1Pt4 = TH1F( "jet1Pt4", "Jet Pt", 100, 0, 3000 );
627  h_jet2Pt4 = TH1F( "jet2Pt4", "Jet Pt", 100, 0, 3000 );
628  h_jet3Pt4 = TH1F( "jet3Pt4", "Jet Pt", 100, 0, 3000 );
629  h_jet4Pt4 = TH1F( "jet4Pt4", "Jet Pt", 100, 0, 3000 );
630  h_jet5Pt4 = TH1F( "jet5Pt4", "Jet Pt", 100, 0, 3000 );
631  h_jet6Pt4 = TH1F( "jet6Pt4", "Jet Pt", 100, 0, 3000 );
632  h_jet7Pt4 = TH1F( "jet7Pt4", "Jet Pt", 100, 0, 3000 );
633 
634 
635  h_totMissEt1 = TH1F( "totMissEt1", "Total Unclustered Et", 100, 0, 500 );
636  h_totMissEt2 = TH1F( "totMissEt2", "Total Unclustered Et", 100, 0, 500 );
637  h_totMissEt3 = TH1F( "totMissEt3", "Total Unclustered Et", 100, 0, 500 );
638 
639  h_missEt1 = TH1F( "missEt1", "Unclustered Et", 100, 0, 50 );
640  h_missEt2 = TH1F( "missEt2", "Unclustered Et", 100, 0, 50 );
641  h_missEt3 = TH1F( "missEt3", "Unclustered Et", 100, 0, 50 );
642 
643  h_missEt1s = TH1F( "missEt1s", "Unclustered Et", 100, 0, 2 );
644  h_missEt2s = TH1F( "missEt2s", "Unclustered Et", 100, 0, 2 );
645  h_missEt3s = TH1F( "missEt3s", "Unclustered Et", 100, 0, 2 );
646 
647  ParMatch1 = TH1F( "ParMatch1", "Number of Matched Jets 1", 10, 0, 10 );
648  ParMatch2 = TH1F( "ParMatch2", "Number of Matched Jets 2", 10, 0, 10 );
649  ParMatch3 = TH1F( "ParMatch3", "Number of Matched Jets 3", 10, 0, 10 );
650 
651 }
652 
653 
654 void myFastSimVal::analyze( const Event& evt, const EventSetup& es ) {
655 
656  int EtaOk10, EtaOk13, EtaOk40;
657 
658  double ZpM, ZpMG, ZpMM;
659  double LeadMass1, LeadMass2, LeadMass3, LeadMass4;
660  double LeadMassP1, LeadMassP2, LeadMassP3;
661 
662 
663  float minJetPt = 30.;
664  float minJetPt10 = 10.;
665  int jetInd, allJetInd;
666  int usedInd = -1;
667  // double matchedDelR = 0.1;
668  double matchedDelR = 0.3;
669 
670  ZpMG = 0;
671  LeadMass1 = -1;
672  LeadMass2 = -1;
673  LeadMass3 = -1;
674 
675  math::XYZTLorentzVector p4tmp[2], p4cortmp[2];
676  nEvent++;
677 
678  // ********************************
679  // **** Get the CaloJet1 collection
680  // ********************************
681 
682  Handle<CaloJetCollection> caloJets1;
683  evt.getByLabel( CaloJetAlgorithm1, caloJets1 );
684 
685  // Count Jets above Pt cut
686  for (int istep = 0; istep < 100; ++istep) {
687  int njet = 0;
688  float ptStep = (istep * (5000./100.));
689  for ( CaloJetCollection::const_iterator cal = caloJets1->begin(); cal != caloJets1->end(); ++ cal ) {
690  if ( cal->pt() > ptStep ) njet++;
691  }
692 
693  hf_nJet1.Fill( ptStep, njet );
694  }
695 
696  // Count Jets above Pt cut
697  for (int istep = 0; istep < 100; ++istep) {
698  int njet = 0;
699  float ptStep = (istep * (200./100.));
700  for ( CaloJetCollection::const_iterator cal = caloJets1->begin(); cal != caloJets1->end(); ++ cal ) {
701  if ( cal->pt() > ptStep ) njet++;
702  }
703 
704  hf_nJet1s.Fill( ptStep, njet );
705  }
706 
707  // Count Jets above Pt cut
708  for (int istep = 0; istep < 100; ++istep) {
709  int njet = 0;
710  float ptStep = (istep * (3000./100.));
711  for ( CaloJetCollection::const_iterator cal = caloJets1->begin(); cal != caloJets1->end(); ++ cal ) {
712  if ( cal->pt() > ptStep ) njet++;
713  }
714 
715  hf_nJet11.Fill( ptStep, njet );
716  }
717 
718 
719  //Loop over the two leading CaloJets and fill some histograms
720  jetInd = 0;
721  allJetInd = 0;
722  EtaOk10 = 0;
723  EtaOk13 = 0;
724  EtaOk40 = 0;
725 
726  // const JetCorrector* corrector =
727  // JetCorrector::getJetCorrector (JetCorrectionService, es);
728 
729  double highestPt;
730  double nextPt;
731 
732  highestPt = 0.0;
733  nextPt = 0.0;
734 
735 
736  for( CaloJetCollection::const_iterator cal = caloJets1->begin(); cal != caloJets1->end(); ++ cal ) {
737 
738  // double scale = corrector->correction (*cal);
739  double scale = 1.0;
740  double corPt = scale*cal->pt();
741  // double corPt = cal->pt();
742 
743 
744  if (corPt>highestPt) {
745  nextPt = highestPt;
746  p4cortmp[1] = p4cortmp[0];
747  highestPt = corPt;
748  p4cortmp[0] = scale*cal->p4();
749  } else if (corPt>nextPt) {
750  nextPt = corPt;
751  p4cortmp[1] = scale*cal->p4();
752  }
753 
754  /***
755  std::cout << ">>> Corr Jet: corPt = "
756  << corPt << ", scale = " << scale
757  << " pt = " << cal->pt()
758  << " highestPt = " << highestPt
759  << " nextPt = " << nextPt
760  << std::endl;
761  ****/
762 
763  allJetInd++;
764  if (allJetInd == 1) {
765  h_jet1Pt1.Fill( cal->pt() );
766  p4tmp[0] = cal->p4();
767  if ( fabs(cal->eta()) < 1.0) EtaOk10++;
768  if ( fabs(cal->eta()) < 1.3) EtaOk13++;
769  if ( fabs(cal->eta()) < 4.0) EtaOk40++;
770  }
771  if (allJetInd == 2) {
772  h_jet2Pt1.Fill( cal->pt() );
773  p4tmp[1] = cal->p4();
774  if ( fabs(cal->eta()) < 1.0) EtaOk10++;
775  if ( fabs(cal->eta()) < 1.3) EtaOk13++;
776  if ( fabs(cal->eta()) < 4.0) EtaOk40++;
777  }
778  if ( (allJetInd == 1) || (allJetInd == 2) ) {
779 
780  h_ptCalL1.Fill( cal->pt() );
781  h_ptCalL12.Fill( cal->pt() );
782  h_ptCalL13.Fill( cal->pt() );
783 
784  h_etaCalL1.Fill( cal->eta() );
785  h_phiCalL1.Fill( cal->phi() );
786  }
787 
788  if (allJetInd == 3) h_jet3Pt1.Fill( cal->pt() );
789  if (allJetInd == 4) h_jet4Pt1.Fill( cal->pt() );
790  if (allJetInd == 5) h_jet5Pt1.Fill( cal->pt() );
791  if (allJetInd == 6) h_jet6Pt1.Fill( cal->pt() );
792  if (allJetInd == 7) h_jet7Pt1.Fill( cal->pt() );
793 
794  if ( fabs(cal->eta()) < 1.3) {
795  h_lowPtCal11.Fill( cal->pt() );
796  if ( cal->pt() > 10.) {
797  h_lowPtCal1c11.Fill( cal->pt() );
798  }
799  }
800  if ( (fabs(cal->eta())> 1.3) && ( fabs(cal->eta()) < 3.) ) {
801  h_lowPtCal12.Fill( cal->pt() );
802  if ( cal->pt() > 10.) {
803  h_lowPtCal1c12.Fill( cal->pt() );
804  }
805  }
806  if ( fabs(cal->eta()) > 3.0) {
807  h_lowPtCal13.Fill( cal->pt() );
808  if ( cal->pt() > 10.) {
809  h_lowPtCal1c13.Fill( cal->pt() );
810  }
811  }
812 
813 
814 
815  if ( cal->pt() > minJetPt) {
816  // std::cout << "CALO JET1 #" << jetInd << std::endl << cal->print() << std::endl;
817  h_ptCal1.Fill( cal->pt() );
818  h_ptCal12.Fill( cal->pt() );
819  h_ptCal13.Fill( cal->pt() );
820 
821  h_etaCal1.Fill( cal->eta() );
822  h_phiCal1.Fill( cal->phi() );
823  jetInd++;
824  }
825  }
826 
827  // h_nCalJets1.Fill( caloJets1->size() );
828  h_nCalJets1.Fill( jetInd );
829  if (jetInd > 1) {
830  LeadMass1 = (p4tmp[0]+p4tmp[1]).mass();
831  dijetMass1.Fill( LeadMass1 );
832  dijetMass12.Fill( LeadMass1 );
833  dijetMass13.Fill( LeadMass1 );
834  if (EtaOk10 == 2) {
835  dijetMass101.Fill( LeadMass1 );
836  dijetMass102.Fill( LeadMass1 );
837  dijetMass103.Fill( LeadMass1 );
838  dijetMass_700_101.Fill( LeadMass1 );
839  dijetMass_2000_101.Fill( LeadMass1 );
840  dijetMass_5000_101.Fill( LeadMass1 );
841  }
842  if (EtaOk13 == 2) {
843  dijetMass131.Fill( LeadMass1 );
844  dijetMass132.Fill( LeadMass1 );
845  dijetMass133.Fill( LeadMass1 );
846  dijetMass_700_131.Fill( LeadMass1 );
847  dijetMass_2000_131.Fill( LeadMass1 );
848  dijetMass_5000_131.Fill( LeadMass1 );
849  }
850  if (EtaOk40 == 2) {
851  dijetMass401.Fill( LeadMass1 );
852  dijetMass402.Fill( LeadMass1 );
853  dijetMass403.Fill( LeadMass1 );
854  dijetMass_700_401.Fill( LeadMass1 );
855  dijetMass_2000_401.Fill( LeadMass1 );
856  dijetMass_5000_401.Fill( LeadMass1 );
857  }
858 
859  LeadMass1 = (p4cortmp[0]+p4cortmp[1]).mass();
860 
861  /****
862  if (LeadMass1 < 30.) {
863  std::cout << " XXX Low Mass "
864  << (p4tmp[0]+p4tmp[1]).mass()
865  << " / "
866  << (p4cortmp[0]+p4cortmp[1]).mass()
867  << std::endl;
868 
869  std::cout << " p4 1 = " << p4tmp[0]
870  << " p4 2 = " << p4tmp[1]
871  << " p4 cor 1 = " << p4cortmp[0]
872  << " p4 cor 2 = " << p4cortmp[0]
873  << endl;
874 
875  }
876  ****/
877 
878  /****
879  dijetMassCor1.Fill( LeadMass1 );
880  dijetMassCor_700_1.Fill( LeadMass1 );
881  dijetMassCor_2000_1.Fill( LeadMass1 );
882  dijetMassCor_5000_1.Fill( LeadMass1 );
883 
884  if (EtaOk10 == 2) {
885  dijetMassCor101.Fill( LeadMass1 );
886  dijetMassCor_700_101.Fill( LeadMass1 );
887  dijetMassCor_2000_101.Fill( LeadMass1 );
888  dijetMassCor_5000_101.Fill( LeadMass1 );
889  }
890  if (EtaOk13 == 2) {
891  dijetMassCor131.Fill( LeadMass1 );
892  dijetMassCor_700_131.Fill( LeadMass1 );
893  dijetMassCor_2000_131.Fill( LeadMass1 );
894  dijetMassCor_5000_131.Fill( LeadMass1 );
895  }
896  if (EtaOk40 == 2) {
897  dijetMassCor401.Fill( LeadMass1 );
898  dijetMassCor_700_401.Fill( LeadMass1 );
899  dijetMassCor_2000_401.Fill( LeadMass1 );
900  dijetMassCor_5000_401.Fill( LeadMass1 );
901  }
902  ****/
903 
904  }
905 
906 
907  // ********************************
908  // **** Get the CaloJet2 collection
909  // ********************************
910  Handle<CaloJetCollection> caloJets2;
911  evt.getByLabel( CaloJetAlgorithm2, caloJets2 );
912 
913  // Count Jets above Pt cut
914  for (int istep = 0; istep < 100; ++istep) {
915  int njet = 0;
916  float ptStep = (istep * (5000./100.));
917 
918  for ( CaloJetCollection::const_iterator cal = caloJets2->begin(); cal != caloJets2->end(); ++ cal )
919  if ( cal->pt() > ptStep ) njet++;
920 
921  hf_nJet2.Fill( ptStep, njet );
922  }
923 
924  for (int istep = 0; istep < 100; ++istep) {
925  int njet = 0;
926  float ptStep = (istep * (200./100.));
927 
928  for ( CaloJetCollection::const_iterator cal = caloJets2->begin(); cal != caloJets2->end(); ++ cal )
929  if ( cal->pt() > ptStep ) njet++;
930 
931  hf_nJet2s.Fill( ptStep, njet );
932  }
933 
934 
935  for (int istep = 0; istep < 100; ++istep) {
936  int njet = 0;
937  float ptStep = (istep * (3000./100.));
938 
939  for ( CaloJetCollection::const_iterator cal = caloJets2->begin(); cal != caloJets2->end(); ++ cal )
940  if ( cal->pt() > ptStep ) njet++;
941 
942  hf_nJet21.Fill( ptStep, njet );
943  }
944 
945 
946 
947 
948 
949  //Loop over the two leading CaloJets and fill some histograms
950  jetInd = 0;
951  allJetInd = 0;
952  for( CaloJetCollection::const_iterator cal = caloJets2->begin(); cal != caloJets2->end(); ++cal ) {
953 
954  allJetInd++;
955  if (allJetInd == 1) {
956  h_jet1Pt2.Fill( cal->pt() );
957  p4tmp[0] = cal->p4();
958  }
959  if (allJetInd == 2) {
960  h_jet2Pt2.Fill( cal->pt() );
961  p4tmp[1] = cal->p4();
962  }
963  if ( (allJetInd == 1) || (allJetInd == 2) ) {
964  h_ptCalL2.Fill( cal->pt() );
965  h_ptCalL22.Fill( cal->pt() );
966  h_ptCalL23.Fill( cal->pt() );
967 
968  h_etaCalL2.Fill( cal->eta() );
969  h_phiCalL2.Fill( cal->phi() );
970  }
971  if (allJetInd == 3) h_jet3Pt2.Fill( cal->pt() );
972  if (allJetInd == 4) h_jet4Pt2.Fill( cal->pt() );
973  if (allJetInd == 5) h_jet5Pt2.Fill( cal->pt() );
974  if (allJetInd == 6) h_jet6Pt2.Fill( cal->pt() );
975  if (allJetInd == 7) h_jet7Pt2.Fill( cal->pt() );
976 
977  if ( fabs(cal->eta()) < 1.3) {
978  h_lowPtCal21.Fill( cal->pt() );
979  if ( cal->pt() > 10.) {
980  h_lowPtCal2c11.Fill( cal->pt() );
981  }
982  }
983  if ( (fabs(cal->eta())> 1.3) && ( fabs(cal->eta()) < 3.) ) {
984  h_lowPtCal22.Fill( cal->pt() );
985  if ( cal->pt() > 10.) {
986  h_lowPtCal2c12.Fill( cal->pt() );
987  }
988  }
989  if ( fabs(cal->eta()) > 3.0) {
990  h_lowPtCal23.Fill( cal->pt() );
991  if ( cal->pt() > 10.) {
992  h_lowPtCal2c13.Fill( cal->pt() );
993  }
994  }
995 
996 
997  if ( cal->pt() > minJetPt) {
998  h_ptCal2.Fill( cal->pt() );
999  h_ptCal22.Fill( cal->pt() );
1000  h_ptCal23.Fill( cal->pt() );
1001 
1002  h_etaCal2.Fill( cal->eta() );
1003  h_phiCal2.Fill( cal->phi() );
1004  jetInd++;
1005  }
1006  }
1007  // h_nCalJets2.Fill( caloJets2->size() );
1008  h_nCalJets2.Fill( jetInd );
1009  if (jetInd > 1) {
1010  LeadMass2 = (p4tmp[0]+p4tmp[1]).mass();
1011  dijetMass2.Fill( LeadMass2 );
1012  dijetMass22.Fill( LeadMass2 );
1013  dijetMass23.Fill( LeadMass2 );
1014 
1015 
1016  dijetMassCor1.Fill( LeadMass2 );
1017  dijetMassCor_700_1.Fill( LeadMass2 );
1018  dijetMassCor_2000_1.Fill( LeadMass2 );
1019  dijetMassCor_5000_1.Fill( LeadMass2 );
1020 
1021  if (EtaOk10 == 2) {
1022  dijetMassCor101.Fill( LeadMass2 );
1023  dijetMassCor_700_101.Fill( LeadMass2 );
1024  dijetMassCor_2000_101.Fill( LeadMass2 );
1025  dijetMassCor_5000_101.Fill( LeadMass2 );
1026  }
1027  if (EtaOk13 == 2) {
1028  dijetMassCor131.Fill( LeadMass2 );
1029  dijetMassCor_700_131.Fill( LeadMass2 );
1030  dijetMassCor_2000_131.Fill( LeadMass2 );
1031  dijetMassCor_5000_131.Fill( LeadMass2 );
1032  }
1033  if (EtaOk40 == 2) {
1034  dijetMassCor401.Fill( LeadMass2 );
1035  dijetMassCor_700_401.Fill( LeadMass2 );
1036  dijetMassCor_2000_401.Fill( LeadMass2 );
1037  dijetMassCor_5000_401.Fill( LeadMass2 );
1038  }
1039 
1040 
1041  }
1042 
1043 
1044 
1045  // ********************************
1046  // **** Get the CaloJet3 collection
1047  // ********************************
1048  Handle<CaloJetCollection> caloJets3;
1049  evt.getByLabel( CaloJetAlgorithm3, caloJets3 );
1050 
1051  //Loop over the two leading CaloJets and fill some histograms
1052  jetInd = 0;
1053  allJetInd = 0;
1054 
1055  // Count Jets above Pt cut
1056  for (int istep = 0; istep < 100; ++istep) {
1057  int njet = 0;
1058  float ptStep = (istep * (5000./100.));
1059 
1060  for ( CaloJetCollection::const_iterator cal = caloJets3->begin(); cal != caloJets3->end(); ++ cal )
1061  if ( cal->pt() > ptStep ) njet++;
1062 
1063 
1064  hf_nJet3.Fill( ptStep, njet );
1065  }
1066 
1067  for (int istep = 0; istep < 100; ++istep) {
1068  int njet = 0;
1069  float ptStep = (istep * (200./100.));
1070 
1071  for ( CaloJetCollection::const_iterator cal = caloJets3->begin(); cal != caloJets3->end(); ++ cal )
1072  if ( cal->pt() > ptStep ) njet++;
1073 
1074  hf_nJet3s.Fill( ptStep, njet );
1075  }
1076 
1077  for (int istep = 0; istep < 100; ++istep) {
1078  int njet = 0;
1079  float ptStep = (istep * (3000./100.));
1080 
1081  for ( CaloJetCollection::const_iterator cal = caloJets3->begin(); cal != caloJets3->end(); ++ cal )
1082  if ( cal->pt() > ptStep ) njet++;
1083 
1084  hf_nJet31.Fill( ptStep, njet );
1085  }
1086 
1087 
1088  for( CaloJetCollection::const_iterator cal = caloJets3->begin(); cal != caloJets3->end(); ++ cal ) {
1089 
1090  allJetInd++;
1091  if (allJetInd == 1) {
1092  h_jet1Pt3.Fill( cal->pt() );
1093  p4tmp[0] = cal->p4();
1094  }
1095  if (allJetInd == 2) {
1096  h_jet2Pt3.Fill( cal->pt() );
1097  p4tmp[1] = cal->p4();
1098  }
1099  if ( (allJetInd == 1) || (allJetInd == 2) ) {
1100  h_ptCalL3.Fill( cal->pt() );
1101  h_ptCalL32.Fill( cal->pt() );
1102  h_ptCalL33.Fill( cal->pt() );
1103 
1104  h_etaCalL3.Fill( cal->eta() );
1105  h_phiCalL3.Fill( cal->phi() );
1106  }
1107  if (allJetInd == 3) h_jet3Pt3.Fill( cal->pt() );
1108  if (allJetInd == 4) h_jet4Pt3.Fill( cal->pt() );
1109  if (allJetInd == 5) h_jet5Pt3.Fill( cal->pt() );
1110  if (allJetInd == 6) h_jet6Pt3.Fill( cal->pt() );
1111  if (allJetInd == 7) h_jet7Pt3.Fill( cal->pt() );
1112 
1113 
1114  if ( fabs(cal->eta()) < 1.3) {
1115  h_lowPtCal31.Fill( cal->pt() );
1116  if ( cal->pt() > 10.) {
1117  h_lowPtCal3c11.Fill( cal->pt() );
1118  }
1119  }
1120  if ( (fabs(cal->eta())> 1.3) && ( fabs(cal->eta()) < 3.) ) {
1121  h_lowPtCal32.Fill( cal->pt() );
1122  if ( cal->pt() > 10.) {
1123  h_lowPtCal3c12.Fill( cal->pt() );
1124  }
1125  }
1126  if ( fabs(cal->eta()) > 3.0) {
1127  h_lowPtCal33.Fill( cal->pt() );
1128  if ( cal->pt() > 10.) {
1129  h_lowPtCal3c13.Fill( cal->pt() );
1130  }
1131  }
1132 
1133 
1134 
1135  if ( cal->pt() > minJetPt) {
1136  // std::cout << "CALO JET3 #" << jetInd << std::endl << cal->print() << std::endl;
1137  h_ptCal3.Fill( cal->pt() );
1138  h_ptCal32.Fill( cal->pt() );
1139  h_ptCal33.Fill( cal->pt() );
1140 
1141  h_etaCal3.Fill( cal->eta() );
1142  h_phiCal3.Fill( cal->phi() );
1143  jetInd++;
1144  }
1145  }
1146  // h_nCalJets3.Fill( caloJets3->size() );
1147  h_nCalJets3.Fill( jetInd );
1148  if (jetInd > 1) {
1149  LeadMass3 = (p4tmp[0]+p4tmp[1]).mass();
1150  dijetMass3.Fill( LeadMass3 );
1151  dijetMass32.Fill( LeadMass3 );
1152  dijetMass33.Fill( LeadMass3 );
1153  }
1154 
1155 
1156 
1157  // ********************************
1158  // **** Get the CaloJet4 collection
1159  // ********************************
1160 
1161  Handle<CaloJetCollection> caloJets4;
1162  evt.getByLabel( CaloJetAlgorithm4, caloJets4 );
1163 
1164  //Loop over the two leading CaloJets and fill some histograms
1165  jetInd = 0;
1166  allJetInd = 0;
1167 
1168  // Count Jets above Pt cut
1169  for (int istep = 0; istep < 100; ++istep) {
1170  int njet = 0;
1171  float ptStep = (istep * (5000./100.));
1172 
1173  for ( CaloJetCollection::const_iterator cal = caloJets4->begin(); cal != caloJets4->end(); ++ cal )
1174  if ( cal->pt() > ptStep ) njet++;
1175 
1176 
1177  hf_nJet4.Fill( ptStep, njet );
1178  }
1179 
1180  for (int istep = 0; istep < 100; ++istep) {
1181  int njet = 0;
1182  float ptStep = (istep * (200./100.));
1183 
1184  for ( CaloJetCollection::const_iterator cal = caloJets4->begin(); cal != caloJets4->end(); ++ cal )
1185  if ( cal->pt() > ptStep ) njet++;
1186 
1187  hf_nJet4s.Fill( ptStep, njet );
1188  }
1189 
1190  for (int istep = 0; istep < 100; ++istep) {
1191  int njet = 0;
1192  float ptStep = (istep * (3000./100.));
1193 
1194  for ( CaloJetCollection::const_iterator cal = caloJets4->begin(); cal != caloJets4->end(); ++ cal )
1195  if ( cal->pt() > ptStep ) njet++;
1196 
1197  hf_nJet41.Fill( ptStep, njet );
1198  }
1199 
1200 
1201  for( CaloJetCollection::const_iterator cal = caloJets4->begin(); cal != caloJets4->end(); ++ cal ) {
1202 
1203  allJetInd++;
1204  if (allJetInd == 1) {
1205  h_jet1Pt4.Fill( cal->pt() );
1206  p4tmp[0] = cal->p4();
1207  }
1208  if (allJetInd == 2) {
1209  h_jet2Pt4.Fill( cal->pt() );
1210  p4tmp[1] = cal->p4();
1211  }
1212  if ( (allJetInd == 1) || (allJetInd == 2) ) {
1213  h_ptCalL4.Fill( cal->pt() );
1214  h_ptCalL42.Fill( cal->pt() );
1215  h_ptCalL43.Fill( cal->pt() );
1216 
1217  h_etaCalL4.Fill( cal->eta() );
1218  h_phiCalL4.Fill( cal->phi() );
1219  }
1220  if (allJetInd == 3) h_jet3Pt4.Fill( cal->pt() );
1221  if (allJetInd == 4) h_jet4Pt4.Fill( cal->pt() );
1222  if (allJetInd == 5) h_jet5Pt4.Fill( cal->pt() );
1223  if (allJetInd == 6) h_jet6Pt4.Fill( cal->pt() );
1224  if (allJetInd == 7) h_jet7Pt4.Fill( cal->pt() );
1225 
1226 
1227  if ( fabs(cal->eta()) < 1.3) {
1228  h_lowPtCal41.Fill( cal->pt() );
1229  if ( cal->pt() > 10.) {
1230  h_lowPtCal4c11.Fill( cal->pt() );
1231  }
1232  }
1233  if ( (fabs(cal->eta())> 1.3) && ( fabs(cal->eta()) < 3.) ) {
1234  h_lowPtCal42.Fill( cal->pt() );
1235  if ( cal->pt() > 10.) {
1236  h_lowPtCal4c12.Fill( cal->pt() );
1237  }
1238  }
1239  if ( fabs(cal->eta()) > 3.0) {
1240  h_lowPtCal43.Fill( cal->pt() );
1241  if ( cal->pt() > 10.) {
1242  h_lowPtCal4c13.Fill( cal->pt() );
1243  }
1244  }
1245 
1246 
1247  if ( cal->pt() > minJetPt) {
1248  // std::cout << "CALO JET4 #" << jetInd << std::endl << cal->print() << std::endl;
1249  h_ptCal4.Fill( cal->pt() );
1250  h_ptCal42.Fill( cal->pt() );
1251  h_ptCal43.Fill( cal->pt() );
1252 
1253  h_etaCal4.Fill( cal->eta() );
1254  h_phiCal4.Fill( cal->phi() );
1255  jetInd++;
1256  }
1257  }
1258  // h_nCalJets4.Fill( caloJets4->size() );
1259  h_nCalJets4.Fill( jetInd );
1260  if (jetInd > 1) {
1261  LeadMass4 = (p4tmp[0]+p4tmp[1]).mass();
1262  dijetMass4.Fill( LeadMass4 );
1263  dijetMass42.Fill( LeadMass4 );
1264  dijetMass43.Fill( LeadMass4 );
1265  }
1266 
1267 
1268 
1269  // *********************************************
1270  // *********************************************
1271 
1272 
1273  //**** Get the GenJet1 collection
1274  Handle<GenJetCollection> genJets1;
1275  evt.getByLabel( GenJetAlgorithm1, genJets1 );
1276 
1277 
1278  //Loop over the two leading GenJets and fill some histograms
1279  jetInd = 0;
1280  allJetInd = 0;
1281  for( GenJetCollection::const_iterator gen = genJets1->begin(); gen != genJets1->end(); ++ gen ) {
1282  allJetInd++;
1283  if (allJetInd == 1) {
1284  p4tmp[0] = gen->p4();
1285  }
1286  if (allJetInd == 2) {
1287  p4tmp[1] = gen->p4();
1288  }
1289 
1290  if ( (allJetInd == 1) || (allJetInd == 2) ) {
1291  h_ptGenL1.Fill( gen->pt() );
1292  h_ptGenL12.Fill( gen->pt() );
1293  h_ptGenL13.Fill( gen->pt() );
1294 
1295  h_etaGenL1.Fill( gen->eta() );
1296  h_phiGenL1.Fill( gen->phi() );
1297  }
1298 
1299  if ( gen->pt() > minJetPt) {
1300  // std::cout << "GEN JET1 #" << jetInd << std::endl << gen->print() << std::endl;
1301  h_ptGen1.Fill( gen->pt() );
1302  h_ptGen12.Fill( gen->pt() );
1303  h_ptGen13.Fill( gen->pt() );
1304 
1305  h_etaGen1.Fill( gen->eta() );
1306  h_phiGen1.Fill( gen->phi() );
1307  jetInd++;
1308  }
1309  }
1310 
1311  LeadMassP1 = (p4tmp[0]+p4tmp[1]).mass();
1312  dijetMassP1.Fill( LeadMassP1 );
1313  if (EtaOk10 == 2) {
1314  dijetMassP101.Fill( LeadMassP1 );
1315  dijetMassP_700_101.Fill( LeadMassP1 );
1316  dijetMassP_2000_101.Fill( LeadMassP1 );
1317  dijetMassP_5000_101.Fill( LeadMassP1 );
1318  }
1319  if (EtaOk13 == 2) {
1320  dijetMassP131.Fill( LeadMassP1 );
1321  dijetMassP_700_131.Fill( LeadMassP1 );
1322  dijetMassP_2000_131.Fill( LeadMassP1 );
1323  dijetMassP_5000_131.Fill( LeadMassP1 );
1324 
1325  }
1326  if (EtaOk40 == 2) {
1327  dijetMassP401.Fill( LeadMassP1 );
1328  dijetMassP_5000_401.Fill( LeadMassP1 );
1329  dijetMassP_5000_401.Fill( LeadMassP1 );
1330  dijetMassP_5000_401.Fill( LeadMassP1 );
1331  }
1332 
1333  // h_nGenJets1.Fill( genJets1->size() );
1334  h_nGenJets1.Fill( jetInd );
1335 
1336  //**** Get the GenJet2 collection
1337  Handle<GenJetCollection> genJets2;
1338  evt.getByLabel( GenJetAlgorithm2, genJets2 );
1339 
1340  //Loop over the two leading GenJets and fill some histograms
1341  jetInd = 0;
1342  allJetInd = 0;
1343  for( GenJetCollection::const_iterator gen = genJets2->begin(); gen != genJets2->end(); ++ gen ) {
1344  allJetInd++;
1345  if (allJetInd == 1) {
1346  p4tmp[0] = gen->p4();
1347  }
1348  if (allJetInd == 2) {
1349  p4tmp[1] = gen->p4();
1350  }
1351  if ( (allJetInd == 1) || (allJetInd == 2) ) {
1352  h_ptGenL2.Fill( gen->pt() );
1353  h_ptGenL22.Fill( gen->pt() );
1354  h_ptGenL23.Fill( gen->pt() );
1355 
1356  h_etaGenL2.Fill( gen->eta() );
1357  h_phiGenL2.Fill( gen->phi() );
1358  }
1359 
1360  if ( gen->pt() > minJetPt) {
1361  // std::cout << "GEN JET2 #" << jetInd << std::endl << gen->print() << std::endl;
1362  h_ptGen2.Fill( gen->pt() );
1363  h_ptGen22.Fill( gen->pt() );
1364  h_ptGen23.Fill( gen->pt() );
1365 
1366  h_etaGen2.Fill( gen->eta() );
1367  h_phiGen2.Fill( gen->phi() );
1368  jetInd++;
1369  }
1370  }
1371 
1372  LeadMassP2 = (p4tmp[0]+p4tmp[1]).mass();
1373  dijetMassP2.Fill( LeadMassP2 );
1374 
1375 
1376  // h_nGenJets2.Fill( genJets2->size() );
1377  h_nGenJets2.Fill( jetInd );
1378 
1379  //**** Get the GenJet3 collection
1380  Handle<GenJetCollection> genJets3;
1381  evt.getByLabel( GenJetAlgorithm3, genJets3 );
1382 
1383  //Loop over the two leading GenJets and fill some histograms
1384  jetInd = 0;
1385  allJetInd = 0;
1386  for( GenJetCollection::const_iterator gen = genJets3->begin(); gen != genJets3->end(); ++ gen ) {
1387  allJetInd++;
1388  if (allJetInd == 1) {
1389  p4tmp[0] = gen->p4();
1390  }
1391  if (allJetInd == 2) {
1392  p4tmp[1] = gen->p4();
1393  }
1394  if ( (allJetInd == 1) || (allJetInd == 2) ) {
1395  h_ptGenL3.Fill( gen->pt() );
1396  h_ptGenL32.Fill( gen->pt() );
1397  h_ptGenL33.Fill( gen->pt() );
1398 
1399  h_etaGenL3.Fill( gen->eta() );
1400  h_phiGenL3.Fill( gen->phi() );
1401  }
1402 
1403  if ( gen->pt() > minJetPt) {
1404  // std::cout << "GEN JET3 #" << jetInd << std::endl << gen->print() << std::endl;
1405  h_ptGen3.Fill( gen->pt() );
1406  h_ptGen32.Fill( gen->pt() );
1407  h_ptGen33.Fill( gen->pt() );
1408 
1409  h_etaGen3.Fill( gen->eta() );
1410  h_phiGen3.Fill( gen->phi() );
1411  jetInd++;
1412  }
1413  }
1414 
1415  LeadMassP3 = (p4tmp[0]+p4tmp[1]).mass();
1416  dijetMassP3.Fill( LeadMassP3 );
1417 
1418 
1419  // h_nGenJets3.Fill( genJets3->size() );
1420  h_nGenJets3.Fill( jetInd );
1421 
1422 
1423  // *********************
1424  // MidPoint Jet Matching
1425 
1426  Handle<GenJetCollection> genJets;
1427  Handle<CaloJetCollection> caloJets;
1428 
1429  // evt.getByLabel( "midPointCone5GenJets", genJets );
1430  // evt.getByLabel( "midPointCone5CaloJets", caloJets );
1431  evt.getByLabel( GenJetAlgorithm1, genJets );
1432  evt.getByLabel( CaloJetAlgorithm1, caloJets );
1433 
1434 
1435  int maxJets = MAXJETS;
1436 
1437  jetInd = 0;
1438  double dRmin[MAXJETS];
1439  math::XYZTLorentzVector p4gen[MAXJETS], p4cal[MAXJETS],
1440  p4par[MAXJETS], p4Zp[MAXJETS], p4part[MAXJETS];
1441 
1442  int used[MAXJETS];
1443  int nj;
1444 
1445  for( int i=0; i<maxJets; ++i ) used[i] = 0;
1446 
1447  // cout << ">>>>>>>>> " << endl;
1448 
1449 
1450 
1451  for( GenJetCollection::const_iterator gen = genJets->begin();
1452  gen != genJets->end() && jetInd<maxJets; ++ gen ) {
1453 
1454  p4gen[jetInd] = gen->p4(); //Gen 4-vector
1455  dRmin[jetInd] = 1000.0;
1456 
1457  nj = 0;
1458  usedInd = -1;
1459 
1460  for( CaloJetCollection::const_iterator cal = caloJets->begin(); cal != caloJets->end(); ++ cal ) {
1461 
1462  double delR = deltaR( cal->eta(), cal->phi(), gen->eta(), gen->phi() );
1463 
1464  if ( (delR<dRmin[jetInd]) && (delR < matchedDelR) && (used[nj] == 0) ) {
1465  dRmin[jetInd] = delR; // delta R of match
1466  p4cal[jetInd] = cal->p4(); // Matched Cal 4-vector
1467  usedInd = nj;
1468  }
1469 
1470  nj++;
1471  }
1472 
1473  if (fabs(p4gen[jetInd].eta()) < 1.3) {
1474  matchedAllPt11.Fill(p4gen[jetInd].pt());
1475  }
1476  if ((fabs(p4gen[jetInd].eta()) > 1.3) && (fabs(p4gen[jetInd].eta()) < 3.) ) {
1477  matchedAllPt12.Fill(p4gen[jetInd].pt());
1478  }
1479  if (fabs(p4gen[jetInd].eta()) > 3.) {
1480  matchedAllPt13.Fill(p4gen[jetInd].pt());
1481  }
1482 
1483  if (usedInd != -1) {
1484 
1485  used[usedInd] = 1;
1486 
1487  if (p4cal[jetInd].pt() > minJetPt10)
1488  hf_PtResponse1.Fill(p4cal[jetInd].eta(), p4cal[jetInd].pt()/p4gen[jetInd].pt());
1489 
1490  if (fabs(p4gen[jetInd].eta()) < 1.3) {
1491  matchedPt11.Fill(p4gen[jetInd].pt());
1492  }
1493  if ((fabs(p4gen[jetInd].eta()) > 1.3) && (fabs(p4gen[jetInd].eta()) < 3.) ) {
1494  matchedPt12.Fill(p4gen[jetInd].pt());
1495  }
1496  if (fabs(p4gen[jetInd].eta()) > 3.) {
1497  matchedPt13.Fill(p4gen[jetInd].pt());
1498  }
1499  /***
1500  cout << " >>>SISCone "
1501  << jetInd << " "
1502  << p4gen[jetInd].pt() << " "
1503  << p4gen[jetInd].eta() << " "
1504  << p4gen[jetInd].phi() << " "
1505  << p4cal[jetInd].pt() << " "
1506  << p4cal[jetInd].eta() << " "
1507  << p4cal[jetInd].phi()
1508  << endl;
1509  ***/
1510 
1511  double dpt = p4cal[jetInd].pt() - p4gen[jetInd].pt();
1512  if (fabs(p4gen[jetInd].eta()) < 1.3) {
1513  if ( (p4gen[jetInd].pt() > 20) && (p4gen[jetInd].pt() < 40) ) {
1514  dPt20Frac1.Fill(dpt/p4gen[jetInd].pt());
1515  }
1516  if ( (p4gen[jetInd].pt() > 40) && (p4gen[jetInd].pt() < 60) ) {
1517  dPt40Frac1.Fill(dpt/p4gen[jetInd].pt());
1518  }
1519  if ( (p4gen[jetInd].pt() > 80) && (p4gen[jetInd].pt() < 100) ) {
1520  dPt80Frac1.Fill(dpt/p4gen[jetInd].pt());
1521  }
1522  if ( (p4gen[jetInd].pt() > 100) && (p4gen[jetInd].pt() < 120) ) {
1523  dPt100Frac1.Fill(dpt/p4gen[jetInd].pt());
1524  }
1525  }
1526  if ( (p4gen[jetInd].pt() > minJetPt10) && (fabs(p4gen[jetInd].eta()) < 1.3) ) {
1527 
1528  dR1.Fill(dRmin[jetInd]);
1529  double dphi = deltaPhi(p4cal[jetInd].phi(), p4gen[jetInd].phi());
1530  dPhi1.Fill(dphi);
1531  double deta = p4cal[jetInd].eta() - p4gen[jetInd].eta();
1532  dEta1.Fill(deta);
1533  dPt1.Fill(dpt);
1534  dPtFrac1.Fill(dpt/p4gen[jetInd].pt());
1535 
1536  if ( ( (dpt/p4gen[jetInd].pt()) < -0.5 ) && ( fabs(dpt) > 90. ) ) {
1537 
1538  cout << " deltaR min = " << dRmin[jetInd]
1539  << " Ind = " << jetInd << " / " << usedInd << " / " << used[nj]
1540  << " Del pt / frac = " << dpt
1541  << " / " << dpt/p4gen[jetInd].pt()
1542  << " cal/gen pt = " << p4cal[jetInd].pt()
1543  << " / " << p4gen[jetInd].pt()
1544  << " cal/gen eta = " << p4cal[jetInd].eta()
1545  << " / " << p4gen[jetInd].eta()
1546  << " cal/gen phi = " << p4cal[jetInd].phi()
1547  << " / " << p4gen[jetInd].phi()
1548  << endl;
1549  }
1550 
1551  }
1552 
1553  jetInd++;
1554 
1555  }
1556 
1557  }
1558 
1559 
1560 
1561  // *********************
1562  // Seedless Jet Matching
1563 
1564  // Handle<GenJetCollection> genJets;
1565  // Handle<CaloJetCollection> caloJets;
1566 
1567  // evt.getByLabel( "sisCone5GenJets", genJets );
1568  // evt.getByLabel( "sisCone5CaloJets", caloJets );
1569  evt.getByLabel( GenJetAlgorithm2, genJets );
1570  evt.getByLabel( CaloJetAlgorithm2, caloJets );
1571 
1572  // int maxJets = 20;
1573  jetInd = 0;
1574  // double dRmin[20];
1575  // math::XYZTLorentzVector p4jet[20], p4gen[20], p4cal[20], p4cor[20];
1576 
1577  for( int i=0; i<maxJets; ++i ) used[i] = 0;
1578  for( GenJetCollection::const_iterator gen = genJets->begin();
1579  gen != genJets->end() && jetInd<maxJets; ++ gen ) {
1580  p4gen[jetInd] = gen->p4(); //Gen 4-vector
1581  dRmin[jetInd] = 1000.0;
1582 
1583  nj = 0;
1584  usedInd = -1;
1585 
1586  for( CaloJetCollection::const_iterator cal = caloJets->begin();
1587  cal != caloJets->end(); ++ cal ) {
1588  double delR = deltaR( cal->eta(), cal->phi(), gen->eta(), gen->phi() );
1589 
1590  if ( (delR<dRmin[jetInd]) && (delR < matchedDelR) && (used[nj] == 0) ) {
1591  dRmin[jetInd] = delR; // delta R of match
1592  p4cal[jetInd] = cal->p4(); // Matched Cal 4-vector
1593  usedInd = nj;
1594  }
1595  nj++;
1596  }
1597 
1598  if (fabs(p4gen[jetInd].eta()) < 1.3) {
1599  matchedAllPt21.Fill(p4gen[jetInd].pt());
1600  }
1601  if ((fabs(p4gen[jetInd].eta()) > 1.3) && (fabs(p4gen[jetInd].eta()) < 3.) ) {
1602  matchedAllPt22.Fill(p4gen[jetInd].pt());
1603  }
1604  if (fabs(p4gen[jetInd].eta()) > 3.) {
1605  matchedAllPt23.Fill(p4gen[jetInd].pt());
1606  }
1607 
1608 
1609  if (usedInd != -1) {
1610 
1611  used[usedInd] = 1;
1612 
1613  if (p4cal[jetInd].pt() > minJetPt10)
1614  hf_PtResponse2.Fill(p4cal[jetInd].eta(), p4cal[jetInd].pt()/p4gen[jetInd].pt());
1615 
1616  if (fabs(p4gen[jetInd].eta()) < 1.3) {
1617  matchedPt21.Fill(p4gen[jetInd].pt());
1618  }
1619  if ((fabs(p4gen[jetInd].eta()) > 1.3) && (fabs(p4gen[jetInd].eta()) < 3.) ) {
1620  matchedPt22.Fill(p4gen[jetInd].pt());
1621  }
1622  if (fabs(p4gen[jetInd].eta()) > 3.) {
1623  matchedPt23.Fill(p4gen[jetInd].pt());
1624  }
1625  /***
1626  cout << " >>>IterCone "
1627  << jetInd << " "
1628  << p4gen[jetInd].pt() << " "
1629  << p4gen[jetInd].eta() << " "
1630  << p4gen[jetInd].phi() << " "
1631  << p4cal[jetInd].pt() << " "
1632  << p4cal[jetInd].eta() << " "
1633  << p4cal[jetInd].phi()
1634  << endl;
1635  ***/
1636 
1637 
1638  double dpt = p4cal[jetInd].pt() - p4gen[jetInd].pt();
1639  if (fabs(p4gen[jetInd].eta()) < 1.3) {
1640  if ( (p4gen[jetInd].pt() > 20) && (p4gen[jetInd].pt() < 40) ) {
1641  dPt20Frac2.Fill(dpt/p4gen[jetInd].pt());
1642  }
1643  if ( (p4gen[jetInd].pt() > 40) && (p4gen[jetInd].pt() < 60) ) {
1644  dPt40Frac2.Fill(dpt/p4gen[jetInd].pt());
1645  }
1646  if ( (p4gen[jetInd].pt() > 80) && (p4gen[jetInd].pt() < 100) ) {
1647  dPt80Frac2.Fill(dpt/p4gen[jetInd].pt());
1648  }
1649  if ( (p4gen[jetInd].pt() > 100) && (p4gen[jetInd].pt() < 120) ) {
1650  dPt100Frac2.Fill(dpt/p4gen[jetInd].pt());
1651  }
1652  }
1653  if ( (p4gen[jetInd].pt() > minJetPt10) && (fabs(p4gen[jetInd].eta()) < 1.3) ) {
1654 
1655  dR2.Fill(dRmin[jetInd]);
1656  double dphi = deltaPhi(p4cal[jetInd].phi(), p4gen[jetInd].phi());
1657  dPhi2.Fill(dphi);
1658  double deta = p4cal[jetInd].eta() - p4gen[jetInd].eta();
1659  dEta2.Fill(deta);
1660  dPt2.Fill(dpt);
1661  dPtFrac2.Fill(dpt/p4gen[jetInd].pt());
1662 
1663  }
1664 
1665  jetInd++;
1666  }
1667 
1668  }
1669 
1670  // *********************
1671  // Kt Jet Matching
1672 
1673  // Handle<GenJetCollection> genJets;
1674  // Handle<CaloJetCollection> caloJets;
1675 
1676  // evt.getByLabel( "sisCone5GenJets", genJets );
1677  // evt.getByLabel( "sisCone5CaloJets", caloJets );
1678  evt.getByLabel( GenJetAlgorithm3, genJets );
1679  evt.getByLabel( CaloJetAlgorithm3, caloJets );
1680 
1681  // int maxJets = 20;
1682  jetInd = 0;
1683  // double dRmin[20];
1684  // math::XYZTLorentzVector p4jet[20], p4gen[20], p4cal[20], p4cor[20];
1685 
1686  for( int i=0; i<maxJets; ++i ) used[i] = 0;
1687  for( GenJetCollection::const_iterator gen = genJets->begin();
1688  gen != genJets->end() && jetInd<maxJets; ++ gen ) {
1689  p4gen[jetInd] = gen->p4(); //Gen 4-vector
1690  dRmin[jetInd] = 1000.0;
1691 
1692  nj = 0;
1693  usedInd = -1;
1694 
1695  for( CaloJetCollection::const_iterator cal = caloJets->begin(); cal != caloJets->end(); ++ cal ) {
1696  double delR = deltaR( cal->eta(), cal->phi(), gen->eta(), gen->phi() );
1697 
1698  if ( (delR<dRmin[jetInd]) && (delR < matchedDelR) && (used[nj] == 0) ) {
1699  dRmin[jetInd] = delR; // delta R of match
1700  p4cal[jetInd] = cal->p4(); // Matched Cal 4-vector
1701  usedInd = nj;
1702  }
1703  nj++;
1704  }
1705 
1706  if (fabs(p4gen[jetInd].eta()) < 1.3) {
1707  matchedAllPt31.Fill(p4gen[jetInd].pt());
1708  }
1709  if ((fabs(p4gen[jetInd].eta()) > 1.3) && (fabs(p4gen[jetInd].eta()) < 3.) ) {
1710  matchedAllPt32.Fill(p4gen[jetInd].pt());
1711  }
1712  if (fabs(p4gen[jetInd].eta()) > 3.) {
1713  matchedAllPt33.Fill(p4gen[jetInd].pt());
1714  }
1715 
1716 
1717  if (usedInd != -1) {
1718  used[usedInd] = 1;
1719 
1720  if (p4cal[jetInd].pt() > minJetPt10)
1721  hf_PtResponse3.Fill(p4cal[jetInd].eta(), p4cal[jetInd].pt()/p4gen[jetInd].pt());
1722 
1723  if (fabs(p4gen[jetInd].eta()) < 1.3) {
1724  matchedPt31.Fill(p4gen[jetInd].pt());
1725  }
1726  if ((fabs(p4gen[jetInd].eta()) > 1.3) && (fabs(p4gen[jetInd].eta()) < 3.) ) {
1727  matchedPt32.Fill(p4gen[jetInd].pt());
1728  }
1729  if (fabs(p4gen[jetInd].eta()) > 3.) {
1730  matchedPt33.Fill(p4gen[jetInd].pt());
1731  }
1732  /***
1733  cout << " >>>MidPoint "
1734  << jetInd << " "
1735  << p4gen[jetInd].pt() << " "
1736  << p4gen[jetInd].eta() << " "
1737  << p4gen[jetInd].phi() << " "
1738  << p4cal[jetInd].pt() << " "
1739  << p4cal[jetInd].eta() << " "
1740  << p4cal[jetInd].phi()
1741  << endl;
1742  ***/
1743 
1744  double dpt = p4cal[jetInd].pt() - p4gen[jetInd].pt();
1745  if (fabs(p4gen[jetInd].eta()) < 1.3) {
1746  if ( (p4gen[jetInd].pt() > 20) && (p4gen[jetInd].pt() < 40) ) {
1747  dPt20Frac3.Fill(dpt/p4gen[jetInd].pt());
1748  }
1749  if ( (p4gen[jetInd].pt() > 40) && (p4gen[jetInd].pt() < 60) ) {
1750  dPt40Frac3.Fill(dpt/p4gen[jetInd].pt());
1751  }
1752  if ( (p4gen[jetInd].pt() > 80) && (p4gen[jetInd].pt() < 100) ) {
1753  dPt80Frac3.Fill(dpt/p4gen[jetInd].pt());
1754  }
1755  if ( (p4gen[jetInd].pt() > 100) && (p4gen[jetInd].pt() < 120) ) {
1756  dPt100Frac3.Fill(dpt/p4gen[jetInd].pt());
1757  }
1758  }
1759 
1760  if ( (p4gen[jetInd].pt() > minJetPt10) && (fabs(p4gen[jetInd].eta()) < 1.3) ) {
1761 
1762  dR3.Fill(dRmin[jetInd]);
1763  double dphi = deltaPhi(p4cal[jetInd].phi(), p4gen[jetInd].phi());
1764  dPhi3.Fill(dphi);
1765  double deta = p4cal[jetInd].eta() - p4gen[jetInd].eta();
1766  dEta3.Fill(deta);
1767  dPt3.Fill(dpt);
1768  dPtFrac3.Fill(dpt/p4gen[jetInd].pt());
1769 
1770 
1771  }
1772 
1773  jetInd++;
1774  }
1775  }
1776 
1777  // *********************
1778  // Jet Algorithm 4
1779 
1780  evt.getByLabel( GenJetAlgorithm4, genJets );
1781  evt.getByLabel( CaloJetAlgorithm4, caloJets );
1782 
1783  // int maxJets = 20;
1784  jetInd = 0;
1785  // double dRmin[20];
1786  // math::XYZTLorentzVector p4jet[20], p4gen[20], p4cal[20], p4cor[20];
1787 
1788  for( int i=0; i<maxJets; ++i ) used[i] = 0;
1789  for( GenJetCollection::const_iterator gen = genJets->begin();
1790  gen != genJets->end() && jetInd<maxJets; ++ gen ) {
1791  p4gen[jetInd] = gen->p4(); //Gen 4-vector
1792  dRmin[jetInd] = 1000.0;
1793 
1794  nj = 0;
1795  usedInd = -1;
1796 
1797  for( CaloJetCollection::const_iterator cal = caloJets->begin();
1798  cal != caloJets->end(); ++ cal ) {
1799  double delR = deltaR( cal->eta(), cal->phi(), gen->eta(), gen->phi() );
1800 
1801  if ( (delR<dRmin[jetInd]) && (delR < matchedDelR) && (used[nj] == 0) ) {
1802  dRmin[jetInd] = delR; // delta R of match
1803  p4cal[jetInd] = cal->p4(); // Matched Cal 4-vector
1804  usedInd = nj;
1805  }
1806  nj++;
1807  }
1808 
1809  if (fabs(p4gen[jetInd].eta()) < 1.3) {
1810  matchedAllPt41.Fill(p4gen[jetInd].pt());
1811  }
1812  if ((fabs(p4gen[jetInd].eta()) > 1.3) && (fabs(p4gen[jetInd].eta()) < 3.) ) {
1813  matchedAllPt42.Fill(p4gen[jetInd].pt());
1814  }
1815  if (fabs(p4gen[jetInd].eta()) > 3.) {
1816  matchedAllPt43.Fill(p4gen[jetInd].pt());
1817  }
1818 
1819 
1820  if (usedInd != -1) {
1821 
1822  used[usedInd] = 1;
1823 
1824  if (p4cal[jetInd].pt() > minJetPt10)
1825  hf_PtResponse4.Fill(p4cal[jetInd].eta(), p4cal[jetInd].pt()/p4gen[jetInd].pt());
1826 
1827  if (fabs(p4gen[jetInd].eta()) < 1.3) {
1828  matchedPt41.Fill(p4gen[jetInd].pt());
1829  }
1830  if ((fabs(p4gen[jetInd].eta()) > 1.3) && (fabs(p4gen[jetInd].eta()) < 3.) ) {
1831  matchedPt42.Fill(p4gen[jetInd].pt());
1832  }
1833  if (fabs(p4gen[jetInd].eta()) > 3.) {
1834  matchedPt43.Fill(p4gen[jetInd].pt());
1835  }
1836 
1837  /***
1838  cout << " >>>KtClus "
1839  << jetInd << " "
1840  << p4gen[jetInd].pt() << " "
1841  << p4gen[jetInd].eta() << " "
1842  << p4gen[jetInd].phi() << " "
1843  << p4cal[jetInd].pt() << " "
1844  << p4cal[jetInd].eta() << " "
1845  << p4cal[jetInd].phi()
1846  << endl;
1847  ***/
1848 
1849 
1850  double dpt = p4cal[jetInd].pt() - p4gen[jetInd].pt();
1851  if (fabs(p4gen[jetInd].eta()) < 1.3) {
1852  if ( (p4gen[jetInd].pt() > 20) && (p4gen[jetInd].pt() < 40) ) {
1853  dPt20Frac4.Fill(dpt/p4gen[jetInd].pt());
1854  }
1855  if ( (p4gen[jetInd].pt() > 40) && (p4gen[jetInd].pt() < 60) ) {
1856  dPt40Frac4.Fill(dpt/p4gen[jetInd].pt());
1857  }
1858  if ( (p4gen[jetInd].pt() > 80) && (p4gen[jetInd].pt() < 100) ) {
1859  dPt80Frac4.Fill(dpt/p4gen[jetInd].pt());
1860  }
1861  if ( (p4gen[jetInd].pt() > 100) && (p4gen[jetInd].pt() < 120) ) {
1862  dPt100Frac4.Fill(dpt/p4gen[jetInd].pt());
1863  }
1864  }
1865 
1866  if ( (p4gen[jetInd].pt() > minJetPt10) && (fabs(p4gen[jetInd].eta()) < 1.3) ) {
1867 
1868  dR4.Fill(dRmin[jetInd]);
1869  double dphi = deltaPhi(p4cal[jetInd].phi(), p4gen[jetInd].phi());
1870  dPhi4.Fill(dphi);
1871  double deta = p4cal[jetInd].eta() - p4gen[jetInd].eta();
1872  dEta4.Fill(deta);
1873  dPt4.Fill(dpt);
1874  dPtFrac4.Fill(dpt/p4gen[jetInd].pt());
1875 
1876  }
1877 
1878  jetInd++;
1879  }
1880 
1881  }
1882 
1883 
1884 
1885  // *********************
1886  // MidPoint - Seedless Jet Matching
1887 
1888  Handle<CaloJetCollection> calo1Jets;
1889  Handle<CaloJetCollection> calo2Jets;
1890  Handle<CaloJetCollection> calo3Jets;
1891 
1892  evt.getByLabel( CaloJetAlgorithm1, calo1Jets );
1893  evt.getByLabel( CaloJetAlgorithm2, calo2Jets );
1894  evt.getByLabel( CaloJetAlgorithm3, calo3Jets );
1895 
1896  jetInd = 0;
1897 
1898  for( int i=0; i<maxJets; ++i ) used[i] = 0;
1899  for( CaloJetCollection::const_iterator cal1 = calo1Jets->begin();
1900  cal1 != calo1Jets->end() && jetInd<maxJets; ++cal1 ) {
1901 
1902  p4gen[jetInd] = cal1->p4(); //Gen 4-vector
1903  dRmin[jetInd] = 1000.0;
1904 
1905  nj = 0;
1906  for( CaloJetCollection::const_iterator cal2 = calo2Jets->begin(); cal2 != calo2Jets->end(); ++cal2 ) {
1907 
1908  double delR = deltaR( cal1->eta(), cal1->phi(), cal2->eta(), cal2->phi() );
1909  if ( (delR<dRmin[jetInd]) && (used[nj] == 0) ) {
1910  dRmin[jetInd] = delR; // delta R of match
1911  p4cal[jetInd] = cal2->p4(); // Matched Cal 4-vector
1912  usedInd = nj;
1913  }
1914  nj++;
1915  }
1916  used[usedInd] = 1;
1917 
1918  if (p4gen[jetInd].pt() > minJetPt) {
1919  dR12.Fill(dRmin[jetInd]);
1920  double dphi = deltaPhi(p4cal[jetInd].phi(), p4gen[jetInd].phi());
1921  dPhi12.Fill(dphi);
1922  double deta = p4cal[jetInd].eta() - p4gen[jetInd].eta();
1923  dEta12.Fill(deta);
1924  double dpt = p4cal[jetInd].pt() - p4gen[jetInd].pt();
1925  dPt12.Fill(dpt);
1926  }
1927 
1928  jetInd++;
1929  }
1930 
1931  // ******************************************
1932  // ******************************************
1933 
1934 
1936  evt.getByLabel("genParticleCandidates",genParticles);
1937 
1938 
1939  // *********************
1940  // Partons (Z')
1941 
1942  int nPart = 0;
1943  for (size_t i =0;i< genParticles->size(); i++) {
1944 
1945  const Candidate &p = (*genParticles)[i];
1946  // int Status = p.status();
1947  // bool ParticleIsStable = Status==1;
1948  int id = p.pdgId();
1949 
1950  if (id == 32) {
1951 
1952  if (p.numberOfDaughters() != 0) {
1953  /***
1954  cout << "Z': part = " << i << " id = " << id
1955  << " daughters = " << p.numberOfDaughters()
1956  << " mass = " << p.mass()
1957  << endl;
1958  ***/
1959  ZpMG = p.mass();
1960  ZpMassGen.Fill( ZpMG );
1961  if (EtaOk10 == 2) {
1962  ZpMassGen10.Fill( ZpMG );
1963  ZpMassGen_700_10.Fill( ZpMG );
1964  ZpMassGen_2000_10.Fill( ZpMG );
1965  ZpMassGen_5000_10.Fill( ZpMG );
1966  }
1967  if (EtaOk13 == 2) {
1968  ZpMassGen13.Fill( ZpMG );
1969  ZpMassGen_700_13.Fill( ZpMG );
1970  ZpMassGen_2000_13.Fill( ZpMG );
1971  ZpMassGen_5000_13.Fill( ZpMG );
1972  }
1973  if (EtaOk40 == 2) {
1974  ZpMassGen40.Fill( ZpMG );
1975  ZpMassGen_700_40.Fill( ZpMG );
1976  ZpMassGen_2000_40.Fill( ZpMG );
1977  ZpMassGen_5000_40.Fill( ZpMG );
1978  }
1979  }
1980 
1981  for( int id1=0, nd1=p.numberOfDaughters(); id1 < nd1; ++id1 ) {
1982 
1983  const Candidate * d1 = p.daughter(id1);
1984 
1985  if ( abs(d1->pdgId()) != 32) {
1986  math::XYZTLorentzVector momentum=d1->p4();
1987  p4Zp[nPart] = momentum=d1->p4();
1988  nPart++;
1989  }
1990 
1991  }
1992  }
1993 
1994  }
1995 
1996  // *********************
1997  // Match jets to Zp
1998  int genInd = 0;
1999 
2000  if (nPart == 2) {
2001 
2002  ZpM = (p4Zp[0]+p4Zp[1]).mass();
2003  ZpMass.Fill( ZpM );
2004 
2005  if (EtaOk10 == 2) {
2006  ZpMass_700_10.Fill( ZpM );
2007  ZpMass_2000_10.Fill( ZpM );
2008  ZpMass_5000_10.Fill( ZpM );
2009  }
2010  if (EtaOk13 == 2) {
2011  ZpMass_700_13.Fill( ZpM );
2012  ZpMass_2000_13.Fill( ZpM );
2013  ZpMass_5000_13.Fill( ZpM );
2014  }
2015  if (EtaOk40 == 2) {
2016  ZpMass_700_40.Fill( ZpM );
2017  ZpMass_2000_40.Fill( ZpM );
2018  ZpMass_5000_40.Fill( ZpM );
2019  }
2020 
2021  int usedInd;
2022 
2023  // ***********
2024  // **** Calor1
2025  usedInd = -1;
2026  jetInd = 0;
2027 
2028  for( int i=0; i<maxJets; ++i ) used[i] = 0;
2029  for( int i=0; i<2; ++i ) {
2030 
2031  dRmin[jetInd] = 1000.0;
2032 
2033  int nj = 0;
2034  for( CaloJetCollection::const_iterator cal1 = calo1Jets->begin();
2035  cal1 != calo1Jets->end() && jetInd<maxJets; ++cal1 ) {
2036 
2037  double delR = deltaR( cal1->eta(), cal1->phi(), p4Zp[i].eta(), p4Zp[i].phi() );
2038 
2039  // if ( (delR < dRmin[jetInd]) && (delR < matchedDelR) && (used[nj] == 0) ) {
2040  if ( (delR < dRmin[jetInd]) && (used[nj] == 0) ) {
2041  dRmin[jetInd] = delR; // delta R of match
2042  p4cal[jetInd] = cal1->p4(); // Matched Cal 4-vector
2043  usedInd = nj;
2044  genInd = i;
2045  }
2046 
2047  /****
2048  cout << "Delta R = " << delR
2049  << " deltaR min = " << dRmin[jetInd]
2050  << " Ind = " << jetInd << " / " << nj << " / " << used[nj]
2051  << " cal1 eta = " << cal1->eta()
2052  << " p4par eta = " << p4Zp[i].eta()
2053  << " cal1 phi = " << cal1->phi()
2054  << " p4par phi = " << p4Zp[i].phi()
2055  << endl;
2056  cout << " "
2057  << " p4par = " << p4Zp[i]
2058  << " p4cal = " << cal1->p4()
2059  << endl;
2060  ***/
2061 
2062  nj++;
2063  }
2064 
2065  // Found matched jet
2066  if (usedInd != -1) {
2067  used[usedInd] = 1;
2068  jetInd++;
2069  }
2070 
2071  }
2072 
2073  ZpMM = (p4cal[0]+p4cal[1]).mass();
2074  ZpMassMatched1.Fill( ZpMM );
2075 
2076  if ((ZpMG != 0) && (EtaOk40 == 2)) {
2077  ZpMassRes401.Fill( (ZpMM - ZpMG) / ZpMG );
2078 
2079  ZpMassResL401.Fill( (LeadMass1 - ZpMG) / ZpMG );
2080  ZpMassResL402.Fill( (LeadMass2 - ZpMG) / ZpMG );
2081  ZpMassResL403.Fill( (LeadMass3 - ZpMG) / ZpMG );
2082 
2083  ZpMassResRL401.Fill( LeadMass1 / ZpMG );
2084  ZpMassResRL402.Fill( LeadMass2 / ZpMG );
2085  ZpMassResRL403.Fill( LeadMass3 / ZpMG );
2086 
2087  ZpMassResRLoP401.Fill( LeadMass1 / LeadMassP1 );
2088  ZpMassResRLoP402.Fill( LeadMass2 / LeadMassP2 );
2089  ZpMassResRLoP403.Fill( LeadMass3 / LeadMassP2 );
2090 
2091  ZpMassResPRL401.Fill( LeadMassP1 / ZpMG );
2092  ZpMassResPRL402.Fill( LeadMassP2 / ZpMG );
2093  ZpMassResPRL403.Fill( LeadMassP3 / ZpMG );
2094 
2095  }
2096 
2097  if ((ZpMG != 0) && (EtaOk10 == 2)) {
2098  ZpMassRes101.Fill( (ZpMM - ZpMG) / ZpMG );
2099 
2100  ZpMassResL101.Fill( (LeadMass1 - ZpMG) / ZpMG );
2101  ZpMassResL102.Fill( (LeadMass2 - ZpMG) / ZpMG );
2102  ZpMassResL103.Fill( (LeadMass3 - ZpMG) / ZpMG );
2103 
2104  ZpMassResRL101.Fill( LeadMass1 / ZpMG );
2105  ZpMassResRL102.Fill( LeadMass2 / ZpMG );
2106  ZpMassResRL103.Fill( LeadMass3 / ZpMG );
2107 
2108  ZpMassResRLoP101.Fill( LeadMass1 / LeadMassP1 );
2109  ZpMassResRLoP102.Fill( LeadMass2 / LeadMassP2 );
2110  ZpMassResRLoP103.Fill( LeadMass3 / LeadMassP2 );
2111 
2112  ZpMassResPRL101.Fill( LeadMassP1 / ZpMG );
2113  ZpMassResPRL102.Fill( LeadMassP2 / ZpMG );
2114  ZpMassResPRL103.Fill( LeadMassP3 / ZpMG );
2115 
2116  }
2117 
2118  if ((ZpMG != 0) && (EtaOk13 == 2)) {
2119  ZpMassRes131.Fill( (ZpMM - ZpMG) / ZpMG );
2120 
2121  ZpMassResL131.Fill( (LeadMass1 - ZpMG) / ZpMG );
2122  ZpMassResL132.Fill( (LeadMass2 - ZpMG) / ZpMG );
2123  ZpMassResL133.Fill( (LeadMass3 - ZpMG) / ZpMG );
2124 
2125  ZpMassResRL131.Fill( LeadMass1 / ZpMG );
2126  ZpMassResRL132.Fill( LeadMass2 / ZpMG );
2127  ZpMassResRL133.Fill( LeadMass3 / ZpMG );
2128 
2129  ZpMassResRLoP131.Fill( LeadMass1 / LeadMassP1 );
2130  ZpMassResRLoP132.Fill( LeadMass2 / LeadMassP2 );
2131  ZpMassResRLoP133.Fill( LeadMass3 / LeadMassP2 );
2132 
2133  ZpMassResPRL131.Fill( LeadMassP1 / ZpMG );
2134  ZpMassResPRL132.Fill( LeadMassP2 / ZpMG );
2135  ZpMassResPRL133.Fill( LeadMassP3 / ZpMG );
2136 
2137  }
2138 
2139 
2140 
2141  // ***********
2142  // **** Calor2
2143  usedInd = -1;
2144  jetInd = 0;
2145 
2146  for( int i=0; i<maxJets; ++i ) used[i] = 0;
2147  for( int i=0; i<2; ++i ) {
2148 
2149  dRmin[jetInd] = 1000.0;
2150 
2151  int nj = 0;
2152  for( CaloJetCollection::const_iterator cal2 = calo2Jets->begin();
2153  cal2 != calo2Jets->end() && jetInd<maxJets; ++cal2 ) {
2154 
2155  double delR = deltaR( cal2->eta(), cal2->phi(), p4Zp[i].eta(), p4Zp[i].phi() );
2156 
2157  if ( (delR < dRmin[jetInd]) && (delR < matchedDelR) && (used[nj] == 0) ) {
2158  dRmin[jetInd] = delR; // delta R of match
2159  p4cal[jetInd] = cal2->p4(); // Matched Cal 4-vector
2160  usedInd = nj;
2161  }
2162 
2163  /****
2164  cout << "Delta R = " << delR
2165  << " deltaR min = " << dRmin[jetInd]
2166  << " Ind = " << jetInd << " / " << nj << " / " << used[nj]
2167  << " p4par = " << p4par[i]
2168  << " p4cal = " << cal1->p4()
2169  << " cal1 eta = " << cal1->eta()
2170  << " p4par eta = " << p4par[i].eta()
2171  << endl;
2172  ****/
2173 
2174  nj++;
2175  }
2176 
2177  // Found matched jet
2178  if (usedInd != -1) {
2179  used[usedInd] = 1;
2180  jetInd++;
2181  }
2182 
2183  }
2184 
2185  ZpMM = (p4cal[0]+p4cal[1]).mass();
2186  ZpMassMatched2.Fill( ZpMM );
2187  ZpMassRes402.Fill( (ZpMM - ZpM) / ZpM );
2188 
2189 
2190  // ***********
2191  // **** Calor3
2192  usedInd = -1;
2193  jetInd = 0;
2194 
2195  for( int i=0; i<maxJets; ++i ) used[i] = 0;
2196  for( int i=0; i<2; ++i ) {
2197 
2198  dRmin[jetInd] = 1000.0;
2199 
2200  int nj = 0;
2201  for( CaloJetCollection::const_iterator cal3 = calo3Jets->begin();
2202  cal3 != calo3Jets->end() && jetInd<maxJets; ++cal3 ) {
2203 
2204  double delR = deltaR( cal3->eta(), cal3->phi(), p4Zp[i].eta(), p4Zp[i].phi() );
2205 
2206  if ( (delR < dRmin[jetInd]) && (delR < matchedDelR) && (used[nj] == 0) ) {
2207  dRmin[jetInd] = delR; // delta R of match
2208  p4cal[jetInd] = cal3->p4(); // Matched Cal 4-vector
2209  usedInd = nj;
2210  }
2211 
2212  /****
2213  cout << "Delta R = " << delR
2214  << " deltaR min = " << dRmin[jetInd]
2215  << " Ind = " << jetInd << " / " << nj << " / " << used[nj]
2216  << " p4par = " << p4par[i]
2217  << " p4cal = " << cal1->p4()
2218  << " cal1 eta = " << cal1->eta()
2219  << " p4par eta = " << p4par[i].eta()
2220  << endl;
2221  ****/
2222 
2223  nj++;
2224  }
2225 
2226 
2227  // Found matched jet
2228  if (usedInd != -1) {
2229  used[usedInd] = 1;
2230  jetInd++;
2231  }
2232 
2233  }
2234 
2235  ZpMM = (p4cal[0]+p4cal[1]).mass();
2236  ZpMassMatched3.Fill( ZpMM );
2237  ZpMassRes403.Fill( (ZpMM - ZpM) / ZpM );
2238 
2239  } else {
2240  cout << "Z' (3): nPart = " << nPart << endl;
2241  }
2242 
2243 
2244 
2245  // *********************
2246  // Partons (ttbar) Jet Matching
2247 
2248  // cout << ">>> Begin MC list" << endl;
2249  int nJet = 0;
2250 
2251 
2252  int ii = 1;
2253  int jj = 4;
2254 
2255  for (size_t i =0;i< genParticles->size(); i++) {
2256 
2257  const Candidate &p = (*genParticles)[i];
2258  // int Status = p.status();
2259  // bool ParticleIsStable = Status==1;
2260  int id = p.pdgId();
2261 
2262  // Top Quarks
2263  if (abs(id) == 6) {
2264  cout << "TOP: id = " << id << " mass = " << p.mass() << endl;
2265 
2266  topMassParton.Fill(p.mass());
2267 
2268  if (id == 6) tMassGen.Fill(p.mass());
2269  if (id == -6) tbarMassGen.Fill(p.mass());
2270 
2271  for( size_t id1=0, nd1=p.numberOfDaughters(); id1 < nd1; ++id1 ) {
2272 
2273  const Candidate * d1 = p.daughter(id1);
2274 
2275  // b - quark
2276  if ( abs(d1->pdgId()) == 5) {
2277 
2278  math::XYZTLorentzVector momentum=d1->p4();
2279  p4par[nJet++] = momentum=d1->p4();
2280 
2281  cout << "Daughter1: id = " << d1->pdgId()
2282  << " daughters = " << d1->numberOfDaughters()
2283  << " mother 1 = " << (d1->mother())->pdgId()
2284  << " Momentum " << momentum << " GeV/c"
2285  << endl;
2286 
2287 
2288  if ( (d1->mother())->pdgId() == 6 ) {
2289  p4part[0] = momentum=d1->p4();
2290  cout << ">>> part0 = " << p4part[0] << endl;
2291  }
2292  if ( (d1->mother())->pdgId() == -6) {
2293  p4part[3] = momentum=d1->p4();
2294  cout << ">>> part3 = " << p4part[3] << endl;
2295  }
2296 
2297  }
2298 
2299 
2300  // W
2301  // Check for fully hadronic decay
2302 
2303  if ( abs(d1->pdgId()) == 24) {
2304 
2305  for( size_t id2=0, nd2=d1->numberOfDaughters(); id2 < nd2; ++id2 ) {
2306 
2307  const Candidate * d2 = d1->daughter(id2);
2308 
2309  if (abs(d2->pdgId()) < 9) {
2310 
2311  math::XYZVector vertex(d2->vx(),d2->vy(),d2->vz());
2312  math::XYZTLorentzVector momentum=d2->p4();
2313  p4par[nJet++] = momentum=d2->p4();
2314 
2315  if ( (d1->mother())->pdgId() == 6 ) {
2316  p4part[ii] = momentum=d2->p4();
2317  cout << ">>> part" << ii << " = " << p4part[ii] << endl;
2318  ii++;
2319  }
2320  if ( (d1->mother())->pdgId() == -6 ) {
2321  p4part[jj] = momentum=d2->p4();
2322  cout << ">>> part" << jj << " = " << p4part[jj] << endl;
2323  jj++;
2324  }
2325 
2326  cout << "Daughter2: id = " << d2->pdgId()
2327  << " daughters = " << d2->numberOfDaughters()
2328  << " mother 2 = " << (d2->mother())->pdgId()
2329  << " Momentum " << momentum << " GeV/c"
2330  << endl;
2331  }
2332 
2333  }
2334  }
2335 
2336  // if ( pdgId == d->pdgId() && d->status() == 1 ) {
2337  // }
2338  }
2339  }
2340 
2341  }
2342  // cout << ">>> N Jets = " << nJet << endl;
2343 
2344  if (nJet == 6) {
2345 
2346  double tmass = (p4part[0]+p4part[1]+p4part[2]).mass();
2347  double tbarmass = (p4part[3]+p4part[4]+p4part[5]).mass();
2348 
2349  tMass.Fill(tmass);
2350  tbarMass.Fill(tbarmass);
2351 
2352  cout << ">>> T Mass = " << tmass << " / " << tbarmass << endl;
2353 
2354  double mindR = 1000.;
2355  for( size_t i=0; i<6; ++i ) {
2356  for( size_t j=0; j<6; ++j ) {
2357  if (j > i) {
2358  double delR = deltaR( p4par[i].eta(), p4par[i].phi(), p4par[j].eta(), p4par[j].phi() );
2359  if (delR < mindR) mindR = delR;
2360  dRParton.Fill(delR);
2361  }
2362  }
2363  }
2364  dRPartonMin.Fill(mindR);
2365 
2366  int usedInd;
2367  usedInd = -1;
2368  jetInd = 0;
2369 
2370  for( int i=0; i<maxJets; ++i ) used[i] = 0;
2371  for( int i=0; i<6; ++i ) {
2372 
2373  dRmin[jetInd] = 1000.0;
2374 
2375  int nj = 0;
2376  for( CaloJetCollection::const_iterator cal1 = calo1Jets->begin();
2377  cal1 != calo1Jets->end() && jetInd<maxJets; ++cal1 ) {
2378 
2379  double delR = deltaR( cal1->eta(), cal1->phi(), p4par[i].eta(), p4par[i].phi() );
2380 
2381  if ( (delR < dRmin[jetInd]) && (delR < matchedDelR) && (used[nj] == 0) ) {
2382  dRmin[jetInd] = delR; // delta R of match
2383  p4cal[jetInd] = cal1->p4(); // Matched Cal 4-vector
2384  usedInd = nj;
2385  genInd = i;
2386  }
2387 
2388  /****
2389  cout << "Delta R = " << delR
2390  << " deltaR min = " << dRmin[jetInd]
2391  << " Ind = " << jetInd << " / " << nj << " / " << used[nj]
2392  << " p4par = " << p4par[i]
2393  << " p4cal = " << cal1->p4()
2394  << " cal1 eta = " << cal1->eta()
2395  << " p4par eta = " << p4par[i].eta()
2396  << endl;
2397  ****/
2398 
2399 
2400  nj++;
2401  }
2402 
2403 
2404  // Found matched jet
2405  if (usedInd != -1) {
2406  used[usedInd] = 1;
2407 
2408  dRPar1.Fill(dRmin[jetInd]);
2409  double dphi = deltaPhi(p4cal[jetInd].phi(), p4par[genInd].phi());
2410  dPhiPar1.Fill(dphi);
2411  double deta = p4cal[jetInd].eta() - p4par[genInd].eta();
2412  dEtaPar1.Fill(deta);
2413  double dpt = p4cal[jetInd].pt() - p4par[genInd].pt();
2414  dPtPar1.Fill(dpt);
2415  jetInd++;
2416  }
2417 
2418  }
2419  ParMatch1.Fill(jetInd);
2420  if (jetInd == 6) {
2421  topMass1.Fill( (p4cal[0]+p4cal[1]+p4cal[2]).mass() );
2422  topMass1.Fill( (p4cal[3]+p4cal[4]+p4cal[5]).mass() );
2423  }
2424 
2425  /***
2426  cout << "Collection Size = " << calo1Jets->size()
2427  << " / " << jetInd
2428  << endl;
2429  ***/
2430 
2431  // ***********************
2432  jetInd = 0;
2433  usedInd = -1;
2434 
2435  for( int i=0; i<maxJets; ++i ) used[i] = 0;
2436  for( int i=0; i<6; ++i ) {
2437 
2438  dRmin[jetInd] = 1000.0;
2439 
2440  int nj = 0;
2441  for( CaloJetCollection::const_iterator cal2 = calo2Jets->begin();
2442  cal2 != calo2Jets->end() && jetInd<maxJets; ++cal2 ) {
2443 
2444  double delR = deltaR( cal2->eta(), cal2->phi(), p4par[i].eta(), p4par[i].phi() );
2445 
2446  if ( (delR < dRmin[jetInd]) && (delR < matchedDelR) && (used[nj] == 0) ) {
2447  dRmin[jetInd] = delR; // delta R of match
2448  p4cal[jetInd] = cal2->p4(); // Matched Cal 4-vector
2449  usedInd = nj;
2450  genInd = i;
2451  }
2452 
2453  /****
2454  cout << "Delta R = " << delR
2455  << " deltaR min = " << dRmin[jetInd]
2456  << " Ind = " << jetInd << " / " << nj << " / " << used[nj]
2457  << " cal2 eta = " << cal2->eta()
2458  << " p4par eta = " << p4par[i].eta()
2459  << endl;
2460  ****/
2461 
2462  nj++;
2463  }
2464  if (usedInd != -1) {
2465  used[usedInd] = 1;
2466 
2467  dRPar2.Fill(dRmin[jetInd]);
2468  double dphi = deltaPhi(p4cal[jetInd].phi(), p4par[genInd].phi());
2469  dPhiPar2.Fill(dphi);
2470  double deta = p4cal[jetInd].eta() - p4par[genInd].eta();
2471  dEtaPar2.Fill(deta);
2472  double dpt = p4cal[jetInd].pt() - p4par[genInd].pt();
2473  dPtPar2.Fill(dpt);
2474 
2475  jetInd++;
2476  }
2477 
2478  }
2479  ParMatch2.Fill(jetInd);
2480  if (jetInd == 6) {
2481  topMass2.Fill( (p4cal[0]+p4cal[1]+p4cal[2]).mass() );
2482  topMass2.Fill( (p4cal[3]+p4cal[4]+p4cal[5]).mass() );
2483  }
2484 
2485 
2486  /***
2487  cout << "Collection Size = " << calo2Jets->size()
2488  << " / " << jetInd
2489  << endl;
2490  ***/
2491 
2492 
2493  // ***********************
2494  jetInd = 0;
2495  usedInd = -1;
2496 
2497  for( int i=0; i<maxJets; ++i ) used[i] = 0;
2498  for( int i=0; i<6; ++i ) {
2499 
2500  dRmin[jetInd] = 1000.0;
2501 
2502  int nj = 0;
2503  for( CaloJetCollection::const_iterator cal3 = calo3Jets->begin();
2504  cal3 != calo3Jets->end() && jetInd<maxJets; ++cal3 ) {
2505 
2506  double delR = deltaR( cal3->eta(), cal3->phi(), p4par[i].eta(), p4par[i].phi() );
2507 
2508  if ( (delR < dRmin[jetInd]) && (delR < matchedDelR) && (used[nj] == 0) ) {
2509  dRmin[jetInd] = delR; // delta R of match
2510  p4cal[jetInd] = cal3->p4(); // Matched Cal 4-vector
2511  usedInd = nj;
2512  genInd = i;
2513  }
2514  /****
2515  cout << "Delta R = " << delR
2516  << " deltaR min = " << dRmin[jetInd]
2517  << " Ind = " << jetInd << " / " << nj << " / " << used[nj]
2518  << " cal3 eta = " << cal3->eta()
2519  << " p4par eta = " << p4par[i].eta()
2520  << endl;
2521  ****/
2522 
2523  nj++;
2524  }
2525  if (usedInd != -1) {
2526  used[usedInd] = 1;
2527 
2528  dRPar3.Fill(dRmin[jetInd]);
2529  double dphi = deltaPhi(p4cal[jetInd].phi(), p4par[genInd].phi());
2530  dPhiPar3.Fill(dphi);
2531  double deta = p4cal[jetInd].eta() - p4par[genInd].eta();
2532  dEtaPar3.Fill(deta);
2533  double dpt = p4cal[jetInd].pt() - p4par[genInd].pt();
2534  dPtPar3.Fill(dpt);
2535 
2536  jetInd++;
2537  }
2538  }
2539  ParMatch3.Fill(jetInd);
2540  if (jetInd == 6) {
2541  topMass3.Fill( (p4cal[0]+p4cal[1]+p4cal[2]).mass() );
2542  topMass3.Fill( (p4cal[3]+p4cal[4]+p4cal[5]).mass() );
2543  }
2544 
2545  /***
2546  cout << "Collection Size = " << calo3Jets->size()
2547  << " / " << jetInd
2548  << endl;
2549  ***/
2550 
2551  }
2552 
2553  int nTow1, nTow2, nTow3, nTow4;
2554 
2556 
2557  // *********************
2558  // Jet Properties
2559  // *********************
2560 
2561 
2562 
2563  // --- Loop over jets and make a list of all the used towers
2564  evt.getByLabel( CaloJetAlgorithm1, jets );
2565  int jjet = 0;
2566  for ( CaloJetCollection::const_iterator ijet=jets->begin(); ijet!=jets->end(); ijet++) {
2567  jjet++;
2568 
2569  float hadEne = ijet->hadEnergyInHB() + ijet->hadEnergyInHO() +
2570  ijet->hadEnergyInHE() + ijet->hadEnergyInHF();
2571  float emEne = ijet->emEnergyInEB() + ijet->emEnergyInEE() + ijet->emEnergyInHF();
2572  float had = ijet->energyFractionHadronic();
2573 
2574  float j_et = ijet->et();
2575 
2576  if (fabs(ijet->eta()) < 1.3) {
2577  totEneLeadJetEta1_1.Fill(hadEne+emEne);
2578  hadEneLeadJetEta1_1.Fill(hadEne);
2579  emEneLeadJetEta1_1.Fill(emEne);
2580 
2581  totEneLeadJetEta1_2.Fill(hadEne+emEne);
2582  hadEneLeadJetEta1_2.Fill(hadEne);
2583  emEneLeadJetEta1_2.Fill(emEne);
2584 
2585  if (ijet->pt() > minJetPt10)
2586  hadFracEta11.Fill(had);
2587  }
2588  if ((fabs(ijet->eta()) > 1.3) && (fabs(ijet->eta()) < 3.) ) {
2589 
2590  totEneLeadJetEta2_1.Fill(hadEne+emEne);
2591  hadEneLeadJetEta2_1.Fill(hadEne);
2592  emEneLeadJetEta2_1.Fill(emEne);
2593 
2594  totEneLeadJetEta2_2.Fill(hadEne+emEne);
2595  hadEneLeadJetEta2_2.Fill(hadEne);
2596  emEneLeadJetEta2_2.Fill(emEne);
2597 
2598  if (ijet->pt() > minJetPt10)
2599  hadFracEta21.Fill(had);
2600  }
2601  if (fabs(ijet->eta()) > 3.) {
2602 
2603  totEneLeadJetEta3_1.Fill(hadEne+emEne);
2604  hadEneLeadJetEta3_1.Fill(hadEne);
2605  emEneLeadJetEta3_1.Fill(emEne);
2606 
2607  totEneLeadJetEta3_2.Fill(hadEne+emEne);
2608  hadEneLeadJetEta3_2.Fill(hadEne);
2609  emEneLeadJetEta3_2.Fill(emEne);
2610 
2611  if (ijet->pt() > minJetPt10)
2612  hadFracEta31.Fill(had);
2613  }
2614 
2615 
2616  if (jjet == 1) {
2617  hadFracLeadJet1.Fill(had);
2618  hadEneLeadJet1.Fill(hadEne);
2619  hadEneLeadJet12.Fill(hadEne);
2620  hadEneLeadJet13.Fill(hadEne);
2621  emEneLeadJet1.Fill(emEne);
2622  emEneLeadJet12.Fill(emEne);
2623  emEneLeadJet13.Fill(emEne);
2624  }
2625 
2626  const std::vector<CaloTowerPtr> jetCaloRefs = ijet->getCaloConstituents();
2627  int nConstituents = jetCaloRefs.size();
2628 
2629  if (jjet == 1) {
2630 
2631  nTow1 = nTow2 = nTow3 = nTow4 = 0;
2632  for (int i = 0; i <nConstituents ; i++){
2633 
2634  float et = jetCaloRefs[i]->et();
2635 
2636  if (et > 0.5) nTow1++;
2637  if (et > 1.0) nTow2++;
2638  if (et > 1.5) nTow3++;
2639  if (et > 2.0) nTow4++;
2640 
2641  hf_TowerJetEt1.Fill(et/j_et);
2642 
2643  }
2644 
2645  nTowersLeadJetPt1.Fill(nTow1);
2646  nTowersLeadJetPt2.Fill(nTow2);
2647  nTowersLeadJetPt3.Fill(nTow3);
2648  nTowersLeadJetPt4.Fill(nTow4);
2649 
2650  }
2651 
2652  if ( (jjet == 1) && (fabs(ijet->eta()) < 1.3) ) {
2653  nTowersLeadJet1.Fill( nConstituents );
2654 
2655  for (int i = 0; i <nConstituents ; i++){
2656  float t_et = jetCaloRefs[i]->et();
2657  double delR = deltaR( ijet->eta(), ijet->phi(), jetCaloRefs[i]->eta(), jetCaloRefs[i]->phi() );
2658  hf_TowerDelR1.Fill( delR, t_et/j_et);
2659  hf_TowerDelR12.Fill( delR, t_et/j_et);
2660  TowerEtLeadJet1.Fill( t_et );
2661  TowerEtLeadJet12.Fill( t_et );
2662  TowerEtLeadJet13.Fill( t_et );
2663  }
2664  }
2665 
2666 
2667  if ( (jjet == 2) && (fabs(ijet->eta()) < 1.3) ) {
2668  nTowersSecondJet1.Fill( nConstituents );
2669  }
2670 
2671 
2672 
2673  }
2674 
2675  // *********************
2676  // Unclustered Energy
2677  // *********************
2678 
2679  double SumPtJet(0);
2680 
2681  double SumEtNotJets(0);
2682  double SumEtJets(0);
2683  double SumEtTowers(0);
2684 
2685  double sumJetPx(0);
2686  double sumJetPy(0);
2687 
2688  double sumTowerAllPx(0);
2689  double sumTowerAllPy(0);
2690 
2691  double sumTowerAllEx(0);
2692  double sumTowerAllEy(0);
2693 
2694  std::vector<CaloTowerPtr> UsedTowerList;
2695  std::vector<CaloTower> TowerUsedInJets;
2696  std::vector<CaloTower> TowerNotUsedInJets;
2697 
2698 
2699  // *********************
2700  // Towers
2701 
2703  evt.getByLabel( "towerMaker", caloTowers );
2704 
2705 
2706 
2707  nTow1 = nTow2 = nTow3 = nTow4 = 0;
2708 
2709  double sum_et = 0.0;
2710  double sum_ex = 0.0;
2711  double sum_ey = 0.0;
2712  // double sum_ez = 0.0;
2713 
2714  // --- Loop over towers and make a lists of used and unused towers
2715  for (CaloTowerCollection::const_iterator tower = caloTowers->begin();
2716  tower != caloTowers->end(); tower++) {
2717 
2718  Double_t et = tower->et();
2719 
2720  if (et > 0.5) nTow1++;
2721  if (et > 1.0) nTow2++;
2722  if (et > 1.5) nTow3++;
2723  if (et > 2.0) nTow4++;
2724 
2725  if(et>0.5) {
2726 
2727  // ********
2728  double phix = tower->phi();
2729  // double theta = tower->theta();
2730  // double e = tower->energy();
2731  // double et = e*sin(theta);
2732  // double et = tower->emEt() + tower->hadEt();
2733  double et = tower->et();
2734 
2735  // sum_ez += e*cos(theta);
2736  sum_et += et;
2737  sum_ex += et*cos(phix);
2738  sum_ey += et*sin(phix);
2739  // ********
2740 
2741  Double_t phi = tower->phi();
2742  SumEtTowers += tower->et();
2743 
2744  sumTowerAllEx += et*cos(phi);
2745  sumTowerAllEy += et*sin(phi);
2746 
2747  }
2748 
2749  }
2750 
2751  SumEt1.Fill(sum_et);
2752  SumEt12.Fill(sum_et);
2753  SumEt13.Fill(sum_et);
2754 
2755  MET1.Fill(sqrt( sum_ex*sum_ex + sum_ey*sum_ey));
2756  MET12.Fill(sqrt( sum_ex*sum_ex + sum_ey*sum_ey));
2757  MET13.Fill(sqrt( sum_ex*sum_ex + sum_ey*sum_ey));
2758 
2759  // met->mex = -sum_ex;
2760  // met->mey = -sum_ey;
2761  // met->mez = -sum_ez;
2762  // met->met = sqrt( sum_ex*sum_ex + sum_ey*sum_ey );
2763  // cout << "MET = " << met->met << endl;
2764  // met->sumet = sum_et;
2765  // met->phi = atan2( -sum_ey, -sum_ex );
2766 
2767 
2768 
2769  hf_sumTowerAllEx.Fill(sumTowerAllEx);
2770  hf_sumTowerAllEy.Fill(sumTowerAllEy);
2771 
2772  nTowers1.Fill(nTow1);
2773  nTowers2.Fill(nTow2);
2774  nTowers3.Fill(nTow3);
2775  nTowers4.Fill(nTow4);
2776 
2777  // *********************
2778  // MidPoint
2779  //
2780  UsedTowerList.clear();
2781  TowerUsedInJets.clear();
2782  TowerNotUsedInJets.clear();
2783 
2784  // --- Loop over jets and make a list of all the used towers
2785  evt.getByLabel( CaloJetAlgorithm1, jets );
2786  for ( CaloJetCollection::const_iterator ijet=jets->begin(); ijet!=jets->end(); ijet++) {
2787 
2788  Double_t jetPt = ijet->pt();
2789  Double_t jetPhi = ijet->phi();
2790 
2791  // if (jetPt>5.0) {
2792 
2793  Double_t jetPx = jetPt*cos(jetPhi);
2794  Double_t jetPy = jetPt*sin(jetPhi);
2795 
2796  sumJetPx +=jetPx;
2797  sumJetPy +=jetPy;
2798 
2799  const std::vector<CaloTowerPtr> jetCaloRefs = ijet->getCaloConstituents();
2800  int nConstituents = jetCaloRefs.size();
2801  for (int i = 0; i <nConstituents ; i++){
2802  UsedTowerList.push_back(jetCaloRefs[i]);
2803  }
2804 
2805  SumPtJet +=jetPt;
2806  // }
2807 
2808  }
2809 
2810 
2811  int NTowersUsed = UsedTowerList.size();
2812 
2813  // --- Loop over towers and make a lists of used and unused towers
2814  for (CaloTowerCollection::const_iterator tower = caloTowers->begin();
2815  tower != caloTowers->end(); tower++) {
2816 
2817  CaloTower t = *tower;
2818  Double_t et = tower->et();
2819 
2820  if(et>0) {
2821 
2822  Double_t phi = tower->phi();
2823  SumEtTowers += tower->et();
2824 
2825  sumTowerAllPx += et*cos(phi);
2826  sumTowerAllPy += et*sin(phi);
2827 
2828  bool used = false;
2829 
2830  for(int i=0; i<NTowersUsed; i++){
2831  if(tower->id() == UsedTowerList[i]->id()){
2832  used=true;
2833  break;
2834  }
2835  }
2836 
2837  if (used) {
2838  TowerUsedInJets.push_back(t);
2839  } else {
2840  TowerNotUsedInJets.push_back(t);
2841  }
2842 
2843  }
2844 
2845  }
2846 
2847  int nUsed = TowerUsedInJets.size();
2848  int nNotUsed = TowerNotUsedInJets.size();
2849 
2850  SumEtJets = 0;
2851  SumEtNotJets = 0;
2852 
2853  for(int i=0;i<nUsed;i++){
2854  SumEtJets += TowerUsedInJets[i].et();
2855  }
2856  h_jetEt1.Fill(SumEtJets);
2857 
2858  for(int i=0;i<nNotUsed;i++){
2859  if (TowerNotUsedInJets[i].et() > 0.5)
2860  SumEtNotJets += TowerNotUsedInJets[i].et();
2861  h_missEt1.Fill(TowerNotUsedInJets[i].et());
2862  h_missEt1s.Fill(TowerNotUsedInJets[i].et());
2863  }
2864  h_totMissEt1.Fill(SumEtNotJets);
2865 
2866 
2867 
2868  // *********************
2869  // SISCone
2870  //
2871  UsedTowerList.clear();
2872  TowerUsedInJets.clear();
2873  TowerNotUsedInJets.clear();
2874 
2875  // --- Loop over jets and make a list of all the used towers
2876  evt.getByLabel( CaloJetAlgorithm2, jets );
2877  for ( CaloJetCollection::const_iterator ijet=jets->begin(); ijet!=jets->end(); ijet++) {
2878 
2879  Double_t jetPt = ijet->pt();
2880  Double_t jetPhi = ijet->phi();
2881 
2882  // if (jetPt>5.0) {
2883 
2884  Double_t jetPx = jetPt*cos(jetPhi);
2885  Double_t jetPy = jetPt*sin(jetPhi);
2886 
2887  sumJetPx +=jetPx;
2888  sumJetPy +=jetPy;
2889 
2890  const std::vector<CaloTowerPtr> jetCaloRefs = ijet->getCaloConstituents();
2891  int nConstituents = jetCaloRefs.size();
2892  for (int i = 0; i <nConstituents ; i++){
2893  UsedTowerList.push_back(jetCaloRefs[i]);
2894  }
2895 
2896  SumPtJet +=jetPt;
2897  // }
2898 
2899  }
2900 
2901 
2902  // Handle<CaloTowerCollection> caloTowers;
2903  // evt.getByLabel( "towerMaker", caloTowers );
2904 
2905  NTowersUsed = UsedTowerList.size();
2906 
2907  // --- Loop over towers and make a lists of used and unused towers
2908  for (CaloTowerCollection::const_iterator tower = caloTowers->begin();
2909  tower != caloTowers->end(); tower++) {
2910 
2911  CaloTower t = *tower;
2912  Double_t et = tower->et();
2913 
2914  if(et>0) {
2915 
2916  Double_t phi = tower->phi();
2917 
2918  SumEtTowers += tower->et();
2919 
2920  sumTowerAllPx += et*cos(phi);
2921  sumTowerAllPy += et*sin(phi);
2922 
2923  bool used = false;
2924 
2925  for(int i=0; i<NTowersUsed; i++){
2926  if(tower->id() == UsedTowerList[i]->id()){
2927  used=true;
2928  break;
2929  }
2930  }
2931 
2932  if (used) {
2933  TowerUsedInJets.push_back(t);
2934  } else {
2935  TowerNotUsedInJets.push_back(t);
2936  }
2937 
2938  }
2939 
2940  }
2941 
2942  nUsed = TowerUsedInJets.size();
2943  nNotUsed = TowerNotUsedInJets.size();
2944 
2945  SumEtJets = 0;
2946  SumEtNotJets = 0;
2947 
2948  for(int i=0;i<nUsed;i++){
2949  SumEtJets += TowerUsedInJets[i].et();
2950  }
2951  h_jetEt2.Fill(SumEtJets);
2952 
2953  for(int i=0;i<nNotUsed;i++){
2954  if (TowerNotUsedInJets[i].et() > 0.5)
2955  SumEtNotJets += TowerNotUsedInJets[i].et();
2956  h_missEt2.Fill(TowerNotUsedInJets[i].et());
2957  h_missEt2s.Fill(TowerNotUsedInJets[i].et());
2958  }
2959  h_totMissEt2.Fill(SumEtNotJets);
2960 
2961 
2962  // *********************
2963  // KtClus
2964  //
2965  UsedTowerList.clear();
2966  TowerUsedInJets.clear();
2967  TowerNotUsedInJets.clear();
2968 
2969  // --- Loop over jets and make a list of all the used towers
2970  evt.getByLabel( CaloJetAlgorithm3, jets );
2971  for ( CaloJetCollection::const_iterator ijet=jets->begin(); ijet!=jets->end(); ijet++) {
2972 
2973  Double_t jetPt = ijet->pt();
2974  Double_t jetPhi = ijet->phi();
2975 
2976  // if (jetPt>5.0) {
2977 
2978  Double_t jetPx = jetPt*cos(jetPhi);
2979  Double_t jetPy = jetPt*sin(jetPhi);
2980 
2981  sumJetPx +=jetPx;
2982  sumJetPy +=jetPy;
2983 
2984  const std::vector<CaloTowerPtr> jetCaloRefs = ijet->getCaloConstituents();
2985  int nConstituents = jetCaloRefs.size();
2986  for (int i = 0; i <nConstituents ; i++){
2987  UsedTowerList.push_back(jetCaloRefs[i]);
2988  }
2989 
2990  SumPtJet +=jetPt;
2991  // }
2992 
2993  }
2994 
2995 
2996  // Handle<CaloTowerCollection> caloTowers;
2997  // evt.getByLabel( "towerMaker", caloTowers );
2998 
2999  NTowersUsed = UsedTowerList.size();
3000 
3001  // --- Loop over towers and make a lists of used and unused towers
3002  for (CaloTowerCollection::const_iterator tower = caloTowers->begin();
3003  tower != caloTowers->end(); tower++) {
3004 
3005  CaloTower t = *tower;
3006  Double_t et = tower->et();
3007 
3008  if(et>0) {
3009 
3010  // Double_t phi = tower->phi();
3011 
3012  // SumEtTowers += tower->et();
3013  // sumTowerAllPx += et*cos(phi);
3014  // sumTowerAllPy += et*sin(phi);
3015 
3016  bool used = false;
3017 
3018  for(int i=0; i<NTowersUsed; i++){
3019  if(tower->id() == UsedTowerList[i]->id()){
3020  used=true;
3021  break;
3022  }
3023  }
3024 
3025  if (used) {
3026  TowerUsedInJets.push_back(t);
3027  } else {
3028  TowerNotUsedInJets.push_back(t);
3029  }
3030 
3031  }
3032 
3033  }
3034 
3035  nUsed = TowerUsedInJets.size();
3036  nNotUsed = TowerNotUsedInJets.size();
3037 
3038  SumEtJets = 0;
3039  SumEtNotJets = 0;
3040 
3041  for(int i=0;i<nUsed;i++){
3042  SumEtJets += TowerUsedInJets[i].et();
3043  }
3044  h_jetEt3.Fill(SumEtJets);
3045 
3046  for(int i=0;i<nNotUsed;i++){
3047  if (TowerNotUsedInJets[i].et() > 0.5)
3048  SumEtNotJets += TowerNotUsedInJets[i].et();
3049  h_missEt3.Fill(TowerNotUsedInJets[i].et());
3050  h_missEt3s.Fill(TowerNotUsedInJets[i].et());
3051  }
3052  h_totMissEt3.Fill(SumEtNotJets);
3053 
3054 }
3055 
3056 
3057 
3059 
3060  //Write out the histogram file.
3061  m_file->Write();
3062 
3063 }
TH1F ZpMassResRL132
Definition: myFastSimVal.h:91
TH1F totEneLeadJetEta1_1
Definition: myFastSimVal.h:45
TH1F ZpMassResL403
Definition: myFastSimVal.h:89
TH1F ZpMassResRLoP102
Definition: myFastSimVal.h:93
TH1F ZpMassGen_2000_40
Definition: myFastSimVal.h:80
TH1F ZpMass_5000_40
Definition: myFastSimVal.h:81
TH1F ZpMassGen_5000_13
Definition: myFastSimVal.h:82
TProfile hf_nJet2
Definition: myFastSimVal.h:32
TH1F hadEneLeadJetEta1_2
Definition: myFastSimVal.h:49
TH1F hadEneLeadJet2
Definition: myFastSimVal.h:61
TH1F hadFracEta33
Definition: myFastSimVal.h:69
TH1F TowerEtLeadJet23
Definition: myFastSimVal.h:75
TH1F ZpMassResL133
Definition: myFastSimVal.h:88
int i
Definition: DBlmapReader.cc:9
TH1F hadEneLeadJetEta3_2
Definition: myFastSimVal.h:49
TH1F dijetMass_700_101
Definition: myFastSimVal.h:114
TH1F matchedAllPt31
Definition: myFastSimVal.h:54
TH1F hadFracEta31
Definition: myFastSimVal.h:67
std::string GenJetAlgorithm3
Definition: myFastSimVal.h:26
virtual const Candidate * daughter(size_type i) const =0
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
TH1F hadFracEta11
Definition: myFastSimVal.h:67
TH1F dijetMassCor_700_101
Definition: myFastSimVal.h:103
TH1F emEneLeadJet32
Definition: myFastSimVal.h:65
TH1F ZpMassResPRL402
Definition: myFastSimVal.h:98
TH1F ZpMassRes103
Definition: myFastSimVal.h:99
TH1F dijetMass_5000_131
Definition: myFastSimVal.h:116
TH1F emEneLeadJet3
Definition: myFastSimVal.h:64
TH1F ZpMassResPRL131
Definition: myFastSimVal.h:97
TH1F hadFracEta13
Definition: myFastSimVal.h:69
TH1F matchedAllPt12
Definition: myFastSimVal.h:52
TH1F h_lowPtCal1c12
Definition: myFastSimVal.h:178
TH1F ZpMassResRLoP131
Definition: myFastSimVal.h:94
TH1F ZpMassResPRL103
Definition: myFastSimVal.h:96
virtual const Candidate * mother(size_type i=0) const =0
return pointer to mother
TH1F hadEneLeadJet33
Definition: myFastSimVal.h:63
std::string CaloJetAlgorithm3
Definition: myFastSimVal.h:24
TH1F ZpMass_700_13
Definition: myFastSimVal.h:77
std::string GenJetAlgorithm1
Definition: myFastSimVal.h:26
TProfile hf_TowerDelR1
Definition: myFastSimVal.h:30
TH1F tbarMassGen
Definition: myFastSimVal.h:86
TH1F h_lowPtCal2c12
Definition: myFastSimVal.h:178
TH1F ZpMassResL101
Definition: myFastSimVal.h:87
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
TH1F totEneLeadJetEta3_2
Definition: myFastSimVal.h:48
TH1F ZpMassResRLoP402
Definition: myFastSimVal.h:95
TH1F matchedAllPt43
Definition: myFastSimVal.h:55
virtual double mass() const =0
mass
std::string CaloJetAlgorithm4
Definition: myFastSimVal.h:24
TH1F dijetMassP_5000_101
Definition: myFastSimVal.h:122
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
TH1F hadEneLeadJetEta3_1
Definition: myFastSimVal.h:46
TH1F hadEneLeadJet3
Definition: myFastSimVal.h:61
TH1F TowerEtLeadJet22
Definition: myFastSimVal.h:74
std::vector< CaloTower >::const_iterator const_iterator
virtual double vx() const =0
x coordinate of vertex position
TProfile hf_nJet31
Definition: myFastSimVal.h:34
TH1F hadEneLeadJet12
Definition: myFastSimVal.h:62
TH1F ZpMassGen10
Definition: myFastSimVal.h:76
#define abs(x)
Definition: mlp_lapack.h:159
TH1F dijetMassCor_5000_101
Definition: myFastSimVal.h:105
TH1F hadFracEta23
Definition: myFastSimVal.h:69
TH1F h_lowPtCal1c11
Definition: myFastSimVal.h:177
TProfile hf_TowerDelR22
Definition: myFastSimVal.h:31
TH1F h_lowPtCal3c12
Definition: myFastSimVal.h:178
TH1F dijetMassP101
Definition: myFastSimVal.h:118
TH1F dijetMassCor_2000_131
Definition: myFastSimVal.h:104
TH1F ZpMassResL401
Definition: myFastSimVal.h:89
TProfile hf_TowerDelR2
Definition: myFastSimVal.h:30
TH1F dijetMass_700_131
Definition: myFastSimVal.h:114
TH1F dijetMassCor_5000_131
Definition: myFastSimVal.h:105
TH1F emEneLeadJetEta3_1
Definition: myFastSimVal.h:47
TH1F ZpMass_700_10
Definition: myFastSimVal.h:77
T eta() const
TProfile hf_TowerDelR3
Definition: myFastSimVal.h:30
TH1F h_lowPtCal4c13
Definition: myFastSimVal.h:179
TH1F nTowersSecondJet1
Definition: myFastSimVal.h:70
TH1F ZpMassResRL103
Definition: myFastSimVal.h:90
int njet
Definition: HydjetWrapper.h:91
TH1F ZpMassGen_2000_10
Definition: myFastSimVal.h:80
TH1F dijetMass_2000_131
Definition: myFastSimVal.h:115
TH1F hadEneLeadJet13
Definition: myFastSimVal.h:63
TH1F dijetMassP_2000_101
Definition: myFastSimVal.h:121
TH1F ZpMassMatched1
Definition: myFastSimVal.h:107
int nEvent
Definition: myFastSimVal.cc:49
virtual double vy() const =0
y coordinate of vertex position
TProfile hf_nJet3
Definition: myFastSimVal.h:32
#define MAXJETS
Definition: myFastSimVal.cc:30
TH1F dijetMass_700_401
Definition: myFastSimVal.h:114
TH1F nTowersLeadJet1
Definition: myFastSimVal.h:70
TH1F matchedAllPt32
Definition: myFastSimVal.h:54
TH1F TowerEtLeadJet32
Definition: myFastSimVal.h:74
TH1F ZpMassResRLoP403
Definition: myFastSimVal.h:95
myFastSimVal(const edm::ParameterSet &)
Definition: myFastSimVal.cc:34
TH1F ZpMassGen_5000_10
Definition: myFastSimVal.h:82
TH1F matchedAllPt23
Definition: myFastSimVal.h:53
TH1F ZpMassResPRL101
Definition: myFastSimVal.h:96
TH1F topMassParton
Definition: myFastSimVal.h:83
TH1F emEneLeadJetEta2_1
Definition: myFastSimVal.h:47
TH1F dijetMassCor_2000_101
Definition: myFastSimVal.h:104
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:30
TH1F ZpMassResPRL401
Definition: myFastSimVal.h:98
TH1F matchedPt23
Definition: myFastSimVal.h:57
TH1F matchedPt33
Definition: myFastSimVal.h:58
TH1F emEneLeadJet13
Definition: myFastSimVal.h:66
virtual size_type numberOfDaughters() const =0
number of daughters
TProfile hf_PtResponse1
Definition: myFastSimVal.h:35
TH1F matchedPt32
Definition: myFastSimVal.h:58
TH1F ZpMassResL103
Definition: myFastSimVal.h:87
TH1F matchedAllPt21
Definition: myFastSimVal.h:53
TH1F dijetMassCor_2000_401
Definition: myFastSimVal.h:104
TH1F dijetMassP_5000_401
Definition: myFastSimVal.h:122
TProfile hf_nJet4s
Definition: myFastSimVal.h:33
TH1F nTowersLeadJetPt1
Definition: myFastSimVal.h:44
TH1F ZpMassResRL401
Definition: myFastSimVal.h:92
TH1F ZpMass_5000_13
Definition: myFastSimVal.h:81
TH1F ZpMassResL402
Definition: myFastSimVal.h:89
TH1F nTowersLeadJetPt3
Definition: myFastSimVal.h:44
TProfile hf_nJet1
Definition: myFastSimVal.h:32
TH1F TowerEtLeadJet33
Definition: myFastSimVal.h:75
TH1F ZpMassMatched3
Definition: myFastSimVal.h:107
TH1F ZpMassResRL131
Definition: myFastSimVal.h:91
TH1F dijetMassP_5000_131
Definition: myFastSimVal.h:122
TH1F matchedPt21
Definition: myFastSimVal.h:57
TH1F h_lowPtCal4c12
Definition: myFastSimVal.h:178
TProfile hf_nJet1s
Definition: myFastSimVal.h:33
TH1F hadFracEta21
Definition: myFastSimVal.h:67
TProfile hf_nJet3s
Definition: myFastSimVal.h:33
TH1F ZpMassResRLoP133
Definition: myFastSimVal.h:94
TH1F matchedPt41
Definition: myFastSimVal.h:59
TH1F nTowersLeadJetPt4
Definition: myFastSimVal.h:44
TH1F ZpMassResRL102
Definition: myFastSimVal.h:90
T sqrt(T t)
Definition: SSEVec.h:46
TH1F hadFracEta22
Definition: myFastSimVal.h:68
vector< PseudoJet > jets
TH1F dijetMassP_700_401
Definition: myFastSimVal.h:120
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
TH1F emEneLeadJet2
Definition: myFastSimVal.h:64
void analyze(const edm::Event &, const edm::EventSetup &)
TH1F hadFracEta12
Definition: myFastSimVal.h:68
TH1F ZpMassResPRL102
Definition: myFastSimVal.h:96
TH1F dijetMassP_700_101
Definition: myFastSimVal.h:120
int j
Definition: DBlmapReader.cc:9
TH1F ZpMassRes102
Definition: myFastSimVal.h:99
TProfile hf_PtResponse2
Definition: myFastSimVal.h:35
TH1F dijetMassCor_5000_1
Definition: myFastSimVal.h:105
TH1F hadFracEta32
Definition: myFastSimVal.h:68
TH1F dijetMass_5000_101
Definition: myFastSimVal.h:116
TH1F dijetMassCor_700_131
Definition: myFastSimVal.h:103
TProfile hf_PtResponse3
Definition: myFastSimVal.h:35
TH1F totEneLeadJetEta3_1
Definition: myFastSimVal.h:45
TProfile hf_TowerDelR12
Definition: myFastSimVal.h:31
TH1F matchedAllPt41
Definition: myFastSimVal.h:55
TH1F ZpMassResPRL133
Definition: myFastSimVal.h:97
TH1F hadEneLeadJet22
Definition: myFastSimVal.h:62
TH1F ZpMassGen_2000_13
Definition: myFastSimVal.h:80
TH1F ZpMass_2000_40
Definition: myFastSimVal.h:79
TH1F nTowersLeadJet3
Definition: myFastSimVal.h:72
TH1F ZpMassResL131
Definition: myFastSimVal.h:88
TH1F ZpMassResRLoP401
Definition: myFastSimVal.h:95
TH1F nTowersLeadJet2
Definition: myFastSimVal.h:71
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
TH1F ZpMassRes101
Definition: myFastSimVal.h:99
TH1F ZpMass_700_40
Definition: myFastSimVal.h:77
TH1F emEneLeadJet22
Definition: myFastSimVal.h:65
TH1F hadEneLeadJetEta2_2
Definition: myFastSimVal.h:49
TH1F ZpMassResL132
Definition: myFastSimVal.h:88
TH1F ZpMassGen_700_10
Definition: myFastSimVal.h:78
TH1F ZpMassResRLoP103
Definition: myFastSimVal.h:93
TH1F ZpMassResL102
Definition: myFastSimVal.h:87
TH1F ZpMassGen_5000_40
Definition: myFastSimVal.h:82
TH1F TowerEtLeadJet12
Definition: myFastSimVal.h:74
TH1F matchedAllPt13
Definition: myFastSimVal.h:52
TH1F h_lowPtCal3c11
Definition: myFastSimVal.h:177
TH1F TowerEtLeadJet2
Definition: myFastSimVal.h:73
TH1F hadEneLeadJetEta1_1
Definition: myFastSimVal.h:46
TH1F ZpMassGen_700_13
Definition: myFastSimVal.h:78
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
TH1F ZpMass_2000_13
Definition: myFastSimVal.h:79
TH1F matchedAllPt22
Definition: myFastSimVal.h:53
TH1F dijetMassCor_700_1
Definition: myFastSimVal.h:103
TH1F dijetMassCor_2000_1
Definition: myFastSimVal.h:104
virtual int pdgId() const =0
PDG identifier.
TProfile hf_nJet41
Definition: myFastSimVal.h:34
TH1F totEneLeadJetEta2_1
Definition: myFastSimVal.h:45
TH1F matchedPt13
Definition: myFastSimVal.h:56
TH1F dijetMassCor_5000_401
Definition: myFastSimVal.h:105
std::string GenJetAlgorithm4
Definition: myFastSimVal.h:26
TString nPart(Int_t part, TString string, TString delimit=";", Bool_t removerest=true)
TH1F dijetMassCor_700_401
Definition: myFastSimVal.h:103
TH1F ZpMassMatched2
Definition: myFastSimVal.h:107
TH1F matchedPt12
Definition: myFastSimVal.h:56
#define M_PI
Definition: BFit3D.cc:3
TH1F ZpMass_2000_10
Definition: myFastSimVal.h:79
TH1F matchedPt22
Definition: myFastSimVal.h:57
TH1F hadEneLeadJet23
Definition: myFastSimVal.h:63
TH1F dijetMassP401
Definition: myFastSimVal.h:118
TH1F hadFracLeadJet2
Definition: myFastSimVal.h:71
TH1F hadFracLeadJet1
Definition: myFastSimVal.h:70
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
TH1F ZpMassGen13
Definition: myFastSimVal.h:76
TH1F dijetMassCor101
Definition: myFastSimVal.h:124
TH1F nTowersSecondJet2
Definition: myFastSimVal.h:71
TH1F h_lowPtCal4c11
Definition: myFastSimVal.h:177
TH1F dijetMassCor131
Definition: myFastSimVal.h:124
TProfile hf_TowerDelR32
Definition: myFastSimVal.h:31
TH1F hf_sumTowerAllEy
Definition: myFastSimVal.h:37
TH1F dijetMassP_2000_401
Definition: myFastSimVal.h:121
TH1F emEneLeadJetEta2_2
Definition: myFastSimVal.h:50
TH1F emEneLeadJetEta1_1
Definition: myFastSimVal.h:47
TH1F dijetMassP_700_131
Definition: myFastSimVal.h:120
TH1F emEneLeadJet12
Definition: myFastSimVal.h:65
TH1F h_lowPtCal2c13
Definition: myFastSimVal.h:179
TProfile hf_nJet21
Definition: myFastSimVal.h:34
TH1F TowerEtLeadJet3
Definition: myFastSimVal.h:73
TH1F dijetMass_2000_401
Definition: myFastSimVal.h:115
TH1F emEneLeadJet23
Definition: myFastSimVal.h:66
TH1F emEneLeadJetEta3_2
Definition: myFastSimVal.h:50
TH1F emEneLeadJetEta1_2
Definition: myFastSimVal.h:50
TH1F dijetMass_2000_101
Definition: myFastSimVal.h:115
TH1F ZpMassResRL133
Definition: myFastSimVal.h:91
TH1F ZpMassResPRL132
Definition: myFastSimVal.h:97
virtual double vz() const =0
z coordinate of vertex position
std::string CaloJetAlgorithm1
Definition: myFastSimVal.h:24
TH1F totEneLeadJetEta2_2
Definition: myFastSimVal.h:48
TH1F ZpMassGen40
Definition: myFastSimVal.h:76
TH1F emEneLeadJet1
Definition: myFastSimVal.h:64
TH1F hf_sumTowerAllEx
Definition: myFastSimVal.h:37
TH1F hf_TowerJetEt1
Definition: myFastSimVal.h:41
TProfile hf_nJet2s
Definition: myFastSimVal.h:33
TH1F hadEneLeadJetEta2_1
Definition: myFastSimVal.h:46
TH1F emEneLeadJet33
Definition: myFastSimVal.h:66
TH1F ZpMassResRL402
Definition: myFastSimVal.h:92
tuple mass
Definition: scaleCards.py:27
TH1F matchedAllPt11
Definition: myFastSimVal.h:52
TH1F ZpMass_5000_10
Definition: myFastSimVal.h:81
TH1F matchedAllPt33
Definition: myFastSimVal.h:54
TH1F matchedPt42
Definition: myFastSimVal.h:59
TH1F ZpMassGen_700_40
Definition: myFastSimVal.h:78
tuple cout
Definition: gather_cfg.py:121
TProfile hf_nJet11
Definition: myFastSimVal.h:34
TH1F nTowersLeadJetPt2
Definition: myFastSimVal.h:44
TH1F TowerEtLeadJet1
Definition: myFastSimVal.h:73
TH1F h_lowPtCal1c13
Definition: myFastSimVal.h:179
TH1F ZpMassResRL101
Definition: myFastSimVal.h:90
TH1F ZpMassResRL403
Definition: myFastSimVal.h:92
TFile * m_file
Definition: myFastSimVal.h:193
TH1F hadFracLeadJet3
Definition: myFastSimVal.h:72
std::string GenJetAlgorithm2
Definition: myFastSimVal.h:26
TProfile hf_PtResponse4
Definition: myFastSimVal.h:35
TH1F dijetMassCor1
Definition: myFastSimVal.h:124
TH1F dijetMassCor401
Definition: myFastSimVal.h:124
TProfile hf_nJet4
Definition: myFastSimVal.h:32
std::string CaloJetAlgorithm2
Definition: myFastSimVal.h:24
TH1F h_lowPtCal2c11
Definition: myFastSimVal.h:177
TH1F dijetMassP131
Definition: myFastSimVal.h:118
TH1F totEneLeadJetEta1_2
Definition: myFastSimVal.h:48
TH1F ZpMassResPRL403
Definition: myFastSimVal.h:98
TH1F TowerEtLeadJet13
Definition: myFastSimVal.h:75
TH1F matchedPt43
Definition: myFastSimVal.h:59
TH1F dijetMassP_2000_131
Definition: myFastSimVal.h:121
TH1F matchedPt31
Definition: myFastSimVal.h:58
void beginJob()
Definition: myFastSimVal.cc:51
TH1F matchedAllPt42
Definition: myFastSimVal.h:55
TH1F hadEneLeadJet1
Definition: myFastSimVal.h:61
TH1F ZpMassResRLoP132
Definition: myFastSimVal.h:94
TH1F matchedPt11
Definition: myFastSimVal.h:56
TH1F nTowersSecondJet3
Definition: myFastSimVal.h:72
TH1F dijetMass_5000_401
Definition: myFastSimVal.h:116
TH1F hadEneLeadJet32
Definition: myFastSimVal.h:62
TH1F h_lowPtCal3c13
Definition: myFastSimVal.h:179
TH1F ZpMassResRLoP101
Definition: myFastSimVal.h:93
virtual const LorentzVector & p4() const =0
four-momentum Lorentz vector
Definition: DDAxes.h:10