CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PlotMakerReco.cc
Go to the documentation of this file.
1 /* \class PlotMakerReco
2 *
3 * Class to produce some plots of Off-line variables in the TriggerValidation Code
4 *
5 * Author: Massimiliano Chiorboli Date: September 2007
6 // Maurizio Pierini
7 // Maria Spiropulu
8 *
9 */
12 
13 
15 #include "TDirectory.h"
16 
18 
19 
20 using namespace edm;
21 using namespace reco;
22 using namespace std;
23 using namespace l1extra;
24 
26 {
27  m_electronSrc = PlotMakerRecoInput.getParameter<string>("electrons");
28  m_muonSrc = PlotMakerRecoInput.getParameter<string>("muons");
29  m_jetsSrc = PlotMakerRecoInput.getParameter<string>("jets");
30  m_photonProducerSrc = PlotMakerRecoInput.getParameter<string>("photonProducer");
31  m_photonSrc = PlotMakerRecoInput.getParameter<string>("photons");
32  m_calometSrc = PlotMakerRecoInput.getParameter<string>("calomet");
33 
34  def_electronPtMin = PlotMakerRecoInput.getParameter<double>("def_electronPtMin");
35  def_muonPtMin = PlotMakerRecoInput.getParameter<double>("def_muonPtMin");
36  def_jetPtMin = PlotMakerRecoInput.getParameter<double>("def_jetPtMin");
37  def_photonPtMin = PlotMakerRecoInput.getParameter<double>("def_photonPtMin");
38 
39  binFactor = PlotMakerRecoInput.getParameter<int>("BinFactor");
40 
41  dirname_ = PlotMakerRecoInput.getParameter<std::string>("dirname");
42 
43  edm::LogInfo("PlotMakerRecoObjects") << endl;
44  edm::LogInfo("PlotMakerRecoObjects") << "Object definition cuts:" << endl;
45  edm::LogInfo("PlotMakerRecoObjects") << " def_electronPtMin " << def_electronPtMin << endl;
46  edm::LogInfo("PlotMakerRecoObjects") << " def_muonPtMin " << def_muonPtMin << endl;
47  edm::LogInfo("PlotMakerRecoObjects") << " def_jetPtMin " << def_jetPtMin << endl;
48  edm::LogInfo("PlotMakerRecoObjects") << " def_photonPtMin " << def_photonPtMin << endl;
49 
50 
51 }
52 
54 {
55  this->handleObjects(iEvent);
56 
57 
58 
59  //**********************
60  // Fill the Reco Object Histos
61  //**********************
62  //**********************
63  // Fill the Jet Histos
64  //**********************
65 
66  int nJets = 0;
67  std::vector<double> diJetInvMass;
68  for(unsigned int i=0; i<theCaloJetCollection.size(); i++) {
69  if(theCaloJetCollection[i].pt() > def_jetPtMin ) {
70  nJets++;
71  for(unsigned int j=i+1; j<theCaloJetCollection.size(); j++) {
72  if(theCaloJetCollection[j].pt() > def_jetPtMin ) {
73  diJetInvMass.push_back(invariantMass(&theCaloJetCollection[i],&theCaloJetCollection[j]));
74  }
75  }
76  }
77  }
78 
79  hJetMult->Fill(nJets);
80  for(unsigned int j=0; j<diJetInvMass.size(); j++) {hDiJetInvMass->Fill(diJetInvMass[j]);}
81  if(theCaloJetCollection.size()>0) {
82  hJet1Pt->Fill(theCaloJetCollection[0].pt());
83  hJet1Eta->Fill(theCaloJetCollection[0].eta());
84  hJet1Phi->Fill(theCaloJetCollection[0].phi());
85  }
86  if(theCaloJetCollection.size()>1) {
87  hJet2Pt->Fill(theCaloJetCollection[1].pt());
88  hJet2Eta->Fill(theCaloJetCollection[1].eta());
89  hJet2Phi->Fill(theCaloJetCollection[1].phi());
90  }
91 
92  for(unsigned int i=0; i<l1bits_->size(); i++) {
93  if(l1bits_->at(i)) {
94  hJetMultAfterL1[i]->Fill(nJets);
95  for(unsigned int j=0; j<diJetInvMass.size(); j++) {hDiJetInvMassAfterL1[i]->Fill(diJetInvMass[j]);}
96  if(theCaloJetCollection.size()>0) {
97  hJet1PtAfterL1[i]->Fill(theCaloJetCollection[0].pt());
98  hJet1EtaAfterL1[i]->Fill(theCaloJetCollection[0].eta());
99  hJet1PhiAfterL1[i]->Fill(theCaloJetCollection[0].phi());
100  }
101  if(theCaloJetCollection.size()>1) {
102  hJet2PtAfterL1[i]->Fill(theCaloJetCollection[1].pt());
103  hJet2EtaAfterL1[i]->Fill(theCaloJetCollection[1].eta());
104  hJet2PhiAfterL1[i]->Fill(theCaloJetCollection[1].phi());
105  }
106  }
107  }
108  for(unsigned int i=0; i<hltbits_->size(); i++) {
109  if(hltbits_->at(i)) {
110  hJetMultAfterHLT[i]->Fill(nJets);
111  for(unsigned int j=0; j<diJetInvMass.size(); j++) {hDiJetInvMassAfterHLT[i]->Fill(diJetInvMass[j]);}
112  if(theCaloJetCollection.size()>0) {
113  hJet1PtAfterHLT[i]->Fill(theCaloJetCollection[0].pt());
114  hJet1EtaAfterHLT[i]->Fill(theCaloJetCollection[0].eta());
115  hJet1PhiAfterHLT[i]->Fill(theCaloJetCollection[0].phi());
116  }
117  if(theCaloJetCollection.size()>1) {
118  hJet2PtAfterHLT[i]->Fill(theCaloJetCollection[1].pt());
119  hJet2EtaAfterHLT[i]->Fill(theCaloJetCollection[1].eta());
120  hJet2PhiAfterHLT[i]->Fill(theCaloJetCollection[1].phi());
121  }
122  }
123  }
124 
125 
126  //**********************
127  // Fill the Electron Histos
128  //**********************
129 
130  int nElectrons = 0;
131  std::vector<double> diElecInvMass;
132  for(unsigned int i=0; i<theElectronCollection.size(); i++) {
133  if(theElectronCollection[i].pt() > def_electronPtMin ) {
134  nElectrons++;
135  for(unsigned int j=i+1; j<theElectronCollection.size(); j++) {
136  if(theElectronCollection[j].pt() > def_electronPtMin ) {
137  if(theElectronCollection[i].charge()*theElectronCollection[j].charge() < 0)
138  diElecInvMass.push_back(invariantMass(&theElectronCollection[i],&theElectronCollection[j]));
139  }
140  }
141  }
142  }
143 
144  hElecMult->Fill(nElectrons);
145  for(unsigned int j=0; j<diElecInvMass.size(); j++) {hDiElecInvMass->Fill(diElecInvMass[j]);}
146  if(theElectronCollection.size()>0) {
147  hElec1Pt->Fill(theElectronCollection[0].pt());
148  hElec1Eta->Fill(theElectronCollection[0].eta());
149  hElec1Phi->Fill(theElectronCollection[0].phi());
150  }
151  if(theElectronCollection.size()>1) {
152  hElec2Pt->Fill(theElectronCollection[1].pt());
153  hElec2Eta->Fill(theElectronCollection[1].eta());
154  hElec2Phi->Fill(theElectronCollection[1].phi());
155  }
156 
157  for(unsigned int i=0; i<l1bits_->size(); i++) {
158  if(l1bits_->at(i)) {
159  hElecMultAfterL1[i]->Fill(nElectrons);
160  for(unsigned int j=0; j<diElecInvMass.size(); j++) {hDiElecInvMassAfterL1[i]->Fill(diElecInvMass[j]);}
161  if(theElectronCollection.size()>0) {
162  hElec1PtAfterL1[i]->Fill(theElectronCollection[0].pt());
163  hElec1EtaAfterL1[i]->Fill(theElectronCollection[0].eta());
164  hElec1PhiAfterL1[i]->Fill(theElectronCollection[0].phi());
165  }
166  if(theElectronCollection.size()>1) {
167  hElec2PtAfterL1[i]->Fill(theElectronCollection[1].pt());
168  hElec2EtaAfterL1[i]->Fill(theElectronCollection[1].eta());
169  hElec2PhiAfterL1[i]->Fill(theElectronCollection[1].phi());
170  }
171  }
172  }
173  for(unsigned int i=0; i<hltbits_->size(); i++) {
174  if(hltbits_->at(i)) {
175  hElecMultAfterHLT[i]->Fill(nElectrons);
176  for(unsigned int j=0; j<diElecInvMass.size(); j++) {hDiElecInvMassAfterHLT[i]->Fill(diElecInvMass[j]);}
177  if(theElectronCollection.size()>0) {
178  hElec1PtAfterHLT[i]->Fill(theElectronCollection[0].pt());
179  hElec1EtaAfterHLT[i]->Fill(theElectronCollection[0].eta());
180  hElec1PhiAfterHLT[i]->Fill(theElectronCollection[0].phi());
181  }
182  if(theElectronCollection.size()>1) {
183  hElec2PtAfterHLT[i]->Fill(theElectronCollection[1].pt());
184  hElec2EtaAfterHLT[i]->Fill(theElectronCollection[1].eta());
185  hElec2PhiAfterHLT[i]->Fill(theElectronCollection[1].phi());
186  }
187  }
188  }
189 
190 
191  //**********************
192  // Fill the Muon Histos
193  //**********************
194 
195  int nMuons = 0;
196  std::vector<double> diMuonInvMass;
197  for(unsigned int i=0; i<theMuonCollection.size(); i++) {
198  if(theMuonCollection[i].pt() > def_muonPtMin ) {
199  nMuons++;
200  for(unsigned int j=i+1; j<theMuonCollection.size(); j++) {
201  if(theMuonCollection[j].pt() > def_muonPtMin ) {
202  if(theMuonCollection[i].charge()*theMuonCollection[j].charge() < 0)
203  diMuonInvMass.push_back(invariantMass(&theMuonCollection[i],&theMuonCollection[j]));
204  }
205  }
206  }
207  }
208 
209 
210  hMuonMult->Fill(nMuons);
211  for(unsigned int j=0; j<diMuonInvMass.size(); j++) {hDiMuonInvMass->Fill(diMuonInvMass[j]);}
212  if(theMuonCollection.size()>0) {
213  hMuon1Pt->Fill(theMuonCollection[0].pt());
214  hMuon1Eta->Fill(theMuonCollection[0].eta());
215  hMuon1Phi->Fill(theMuonCollection[0].phi());
216  }
217  if(theMuonCollection.size()>1) {
218  hMuon2Pt->Fill(theMuonCollection[1].pt());
219  hMuon2Eta->Fill(theMuonCollection[1].eta());
220  hMuon2Phi->Fill(theMuonCollection[1].phi());
221  }
222 
223  for(unsigned int i=0; i<l1bits_->size(); i++) {
224  if(l1bits_->at(i)) {
225  hMuonMultAfterL1[i]->Fill(nMuons);
226  for(unsigned int j=0; j<diMuonInvMass.size(); j++) {hDiMuonInvMassAfterL1[i]->Fill(diMuonInvMass[j]);}
227  if(theMuonCollection.size()>0) {
228  hMuon1PtAfterL1[i]->Fill(theMuonCollection[0].pt());
229  hMuon1EtaAfterL1[i]->Fill(theMuonCollection[0].eta());
230  hMuon1PhiAfterL1[i]->Fill(theMuonCollection[0].phi());
231  }
232  if(theMuonCollection.size()>1) {
233  hMuon2PtAfterL1[i]->Fill(theMuonCollection[1].pt());
234  hMuon2EtaAfterL1[i]->Fill(theMuonCollection[1].eta());
235  hMuon2PhiAfterL1[i]->Fill(theMuonCollection[1].phi());
236  }
237  }
238  }
239  for(unsigned int i=0; i<hltbits_->size(); i++) {
240  if(hltbits_->at(i)) {
241  hMuonMultAfterHLT[i]->Fill(nMuons);
242  for(unsigned int j=0; j<diMuonInvMass.size(); j++) {hDiMuonInvMassAfterHLT[i]->Fill(diMuonInvMass[j]);}
243  if(theMuonCollection.size()>0) {
244  hMuon1PtAfterHLT[i]->Fill(theMuonCollection[0].pt());
245  hMuon1EtaAfterHLT[i]->Fill(theMuonCollection[0].eta());
246  hMuon1PhiAfterHLT[i]->Fill(theMuonCollection[0].phi());
247  }
248  if(theMuonCollection.size()>1) {
249  hMuon2PtAfterHLT[i]->Fill(theMuonCollection[1].pt());
250  hMuon2EtaAfterHLT[i]->Fill(theMuonCollection[1].eta());
251  hMuon2PhiAfterHLT[i]->Fill(theMuonCollection[1].phi());
252  }
253  }
254  }
255 
256  //**********************
257  // Fill the Photon Histos
258  //**********************
259 
260  int nPhotons = 0;
261  std::vector<double> diPhotonInvMass;
262  for(unsigned int i=0; i<thePhotonCollection.size(); i++) {
263  if(thePhotonCollection[i].pt() > def_photonPtMin ) {
264  nPhotons++;
265  for(unsigned int j=i+1; j<thePhotonCollection.size(); j++) {
266  if(thePhotonCollection[j].pt() > def_photonPtMin ) {
267  diPhotonInvMass.push_back(invariantMass(&thePhotonCollection[i],&thePhotonCollection[j]));
268  }
269  }
270  }
271  }
272 
273  hPhotonMult->Fill(nPhotons);
274  for(unsigned int j=0; j<diPhotonInvMass.size(); j++) {hDiPhotonInvMass->Fill(diPhotonInvMass[j]);}
275  if(thePhotonCollection.size()>0) {
276  hPhoton1Pt->Fill(thePhotonCollection[0].et());
277  hPhoton1Eta->Fill(thePhotonCollection[0].eta());
278  hPhoton1Phi->Fill(thePhotonCollection[0].phi());
279  }
280  if(thePhotonCollection.size()>1) {
281  hPhoton2Pt->Fill(thePhotonCollection[1].et());
282  hPhoton2Eta->Fill(thePhotonCollection[1].eta());
283  hPhoton2Phi->Fill(thePhotonCollection[1].phi());
284  }
285  for(unsigned int i=0; i<l1bits_->size(); i++) {
286  if(l1bits_->at(i)) {
287  hPhotonMultAfterL1[i]->Fill(nPhotons);
288  for(unsigned int j=0; j<diPhotonInvMass.size(); j++) {hDiPhotonInvMassAfterL1[i]->Fill(diPhotonInvMass[j]);}
289  if(thePhotonCollection.size()>0) {
290  hPhoton1PtAfterL1[i]->Fill(thePhotonCollection[0].et());
291  hPhoton1EtaAfterL1[i]->Fill(thePhotonCollection[0].eta());
292  hPhoton1PhiAfterL1[i]->Fill(thePhotonCollection[0].phi());
293  }
294  if(thePhotonCollection.size()>1) {
295  hPhoton2PtAfterL1[i]->Fill(thePhotonCollection[1].et());
296  hPhoton2EtaAfterL1[i]->Fill(thePhotonCollection[1].eta());
297  hPhoton2PhiAfterL1[i]->Fill(thePhotonCollection[1].phi());
298  }
299  }
300  }
301  for(unsigned int i=0; i<hltbits_->size(); i++) {
302  if(hltbits_->at(i)) {
303  hPhotonMultAfterHLT[i]->Fill(nPhotons);
304  for(unsigned int j=0; j<diPhotonInvMass.size(); j++) {hDiPhotonInvMassAfterHLT[i]->Fill(diPhotonInvMass[j]);}
305  if(thePhotonCollection.size()>0) {
306  hPhoton1PtAfterHLT[i]->Fill(thePhotonCollection[0].et());
307  hPhoton1EtaAfterHLT[i]->Fill(thePhotonCollection[0].eta());
308  hPhoton1PhiAfterHLT[i]->Fill(thePhotonCollection[0].phi());
309  }
310  if(thePhotonCollection.size()>1) {
311  hPhoton2PtAfterHLT[i]->Fill(thePhotonCollection[1].et());
312  hPhoton2EtaAfterHLT[i]->Fill(thePhotonCollection[1].eta());
313  hPhoton2PhiAfterHLT[i]->Fill(thePhotonCollection[1].phi());
314  }
315  }
316  }
317 
318 
319  //**********************
320  // Fill the MET Histos
321  //**********************
322 
323  hMET->Fill((theCaloMETCollection.front()).pt());
324  hMETx->Fill((theCaloMETCollection.front()).px());
325  hMETy->Fill((theCaloMETCollection.front()).py());
326  hMETphi->Fill((theCaloMETCollection.front()).phi());
327  hSumEt->Fill((theCaloMETCollection.front()).sumEt());
328  double RecoMetSig = (theCaloMETCollection.front()).pt() / sqrt( (theCaloMETCollection.front()).sumEt() );
329  hMETSignificance->Fill(RecoMetSig);
330  for(unsigned int i=0; i<l1bits_->size(); i++) {
331  if(l1bits_->at(i)) {
332  hMETAfterL1[i]->Fill((theCaloMETCollection.front()).pt());
333  hMETxAfterL1[i]->Fill((theCaloMETCollection.front()).px());
334  hMETyAfterL1[i]->Fill((theCaloMETCollection.front()).py());
335  hMETphiAfterL1[i]->Fill((theCaloMETCollection.front()).phi());
336  hSumEtAfterL1[i]->Fill((theCaloMETCollection.front()).sumEt());
337  hMETSignificanceAfterL1[i]->Fill(RecoMetSig);
338  }
339  }
340  for(unsigned int i=0; i<hltbits_->size(); i++) {
341  if(hltbits_->at(i)) {
342  hMETAfterHLT[i]->Fill((theCaloMETCollection.front()).pt());
343  hMETxAfterHLT[i]->Fill((theCaloMETCollection.front()).px());
344  hMETyAfterHLT[i]->Fill((theCaloMETCollection.front()).py());
345  hMETphiAfterHLT[i]->Fill((theCaloMETCollection.front()).phi());
346  hSumEtAfterHLT[i]->Fill((theCaloMETCollection.front()).sumEt());
347  hMETSignificanceAfterHLT[i]->Fill(RecoMetSig);
348  }
349  }
350 
351 
352 }
353 
354 
355 
356 
357 void PlotMakerReco::bookHistos(DQMStore * dbe_, std::vector<int>* l1bits, std::vector<int>* hltbits,
358  std::vector<std::string>* l1Names_, std::vector<std::string>* hlNames_)
359 {
360 
361  this->setBits(l1bits, hltbits);
362 
363 
364  //******************
365  //Book histos Reco Objects
366  //******************
367 
368  //******************
369  //Book Jets
370  //******************
371 
372  dbe_->setCurrentFolder(dirname_+"/RecoJets/General");
373  hJetMult = dbe_->book1D("JetMult", "Jet Multiplicity", 10, 0, 10);
374  hJet1Pt = dbe_->book1D("Jet1Pt", "Jet 1 Pt ", 100, 0, 1000);
375  hJet2Pt = dbe_->book1D("Jet2Pt", "Jet 2 Pt ", 100, 0, 1000);
376  hJet1Eta = dbe_->book1D("Jet1Eta", "Jet 1 Eta ", 10*binFactor, -3 , 3 );
377  hJet2Eta = dbe_->book1D("Jet2Eta", "Jet 2 Eta ", 10*binFactor, -3 , 3 );
378  hJet1Phi = dbe_->book1D("Jet1Phi", "Jet 1 Phi ", 10*binFactor, -3.2 , 3.2 );
379  hJet2Phi = dbe_->book1D("Jet2Phi", "Jet 2 Phi ", 10*binFactor, -3.2 , 3.2 );
380 
381  hDiJetInvMass = dbe_->book1D("DiJetInvMass", "DiJet Invariant Mass", 100*binFactor, 0, 1000);
382 
383 
384  dbe_->setCurrentFolder(dirname_+"/RecoJets/L1");
385  for(unsigned int i=0; i<l1bits_->size(); i++){
386  myHistoName = "JetMult_" + (*l1Names_)[i];
387  myHistoTitle = "Jet Multiplicity for L1 path " + (*l1Names_)[i];
388  hJetMultAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10, 0, 10));
389  myHistoName = "Jet1Pt_" + (*l1Names_)[i];
390  myHistoTitle = "Jet 1 Pt for L1 path " + (*l1Names_)[i];
391  hJet1PtAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 1000));
392  myHistoName = "Jet2Pt_" + (*l1Names_)[i];
393  myHistoTitle = "Jet 2 Pt for L1 path " + (*l1Names_)[i];
394  hJet2PtAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 1000));
395  myHistoName = "Jet1Eta_" + (*l1Names_)[i];
396  myHistoTitle = "Jet 1 Eta for L1 path " + (*l1Names_)[i];
397  hJet1EtaAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3, 3));
398  myHistoName = "Jet2Eta_" + (*l1Names_)[i];
399  myHistoTitle = "Jet 2 Eta for L1 path " + (*l1Names_)[i];
400  hJet2EtaAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3, 3));
401  myHistoName = "Jet1Phi_" + (*l1Names_)[i];
402  myHistoTitle = "Jet 1 Phi for L1 path " + (*l1Names_)[i];
403  hJet1PhiAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3.2, 3.2));
404  myHistoName = "Jet2Phi_" + (*l1Names_)[i];
405  myHistoTitle = "Jet 2 Phi for L1 path " + (*l1Names_)[i];
406  hJet2PhiAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3.2, 3.2));
407 
408  myHistoName = "DiJetInvMass_" + (*l1Names_)[i];
409  myHistoTitle = "DiJet Invariant Mass for L1 path " + (*l1Names_)[i];
410  hDiJetInvMassAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100*binFactor, 0, 1000));
411 
412  }
413 
414  dbe_->setCurrentFolder(dirname_+"/RecoJets/HLT");
415  for(unsigned int i=0; i<hltbits_->size(); i++){
416  myHistoName = "JetMult_" + (*hlNames_)[i];
417  myHistoTitle = "Jet Multiplicity for HLT path " + (*hlNames_)[i];
418  hJetMultAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10, 0, 10));
419  myHistoName = "Jet1Pt_" + (*hlNames_)[i];
420  myHistoTitle = "Jet 1 Pt for HLT path " + (*hlNames_)[i];
421  hJet1PtAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 1000));
422  myHistoName = "Jet2Pt_" + (*hlNames_)[i];
423  myHistoTitle = "Jet 2 Pt for HLT path " + (*hlNames_)[i];
424  hJet2PtAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 1000));
425  myHistoName = "Jet1Eta_" + (*hlNames_)[i];
426  myHistoTitle = "Jet 1 Eta for HLT path " + (*hlNames_)[i];
427  hJet1EtaAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3, 3));
428  myHistoName = "Jet2Eta_" + (*hlNames_)[i];
429  myHistoTitle = "Jet 2 Eta for HLT path " + (*hlNames_)[i];
430  hJet2EtaAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3, 3));
431  myHistoName = "Jet1Phi_" + (*hlNames_)[i];
432  myHistoTitle = "Jet 1 Phi for HLT path " + (*hlNames_)[i];
433  hJet1PhiAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3.2, 3.2));
434  myHistoName = "Jet2Phi_" + (*hlNames_)[i];
435  myHistoTitle = "Jet 2 Phi for HLT path " + (*hlNames_)[i];
436  hJet2PhiAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3.2, 3.2));
437 
438  myHistoName = "DiJetInvMass_" + (*hlNames_)[i];
439  myHistoTitle = "DiJet Invariant Mass for HLT path " + (*hlNames_)[i];
440  hDiJetInvMassAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100*binFactor, 0, 1000));
441 
442  }
443  dbe_->setCurrentFolder(dirname_);
444 
445 
446 
447 
448  //******************
449  //Book Electrons
450  //******************
451 
452  dbe_->setCurrentFolder(dirname_+"/RecoElectrons/General");
453  hElecMult = dbe_->book1D("ElecMult", "Elec Multiplicity", 10, 0, 10);
454  hElec1Pt = dbe_->book1D("Elec1Pt", "Elec 1 Pt ", 100, 0, 100);
455  hElec2Pt = dbe_->book1D("Elec2Pt", "Elec 2 Pt ", 100, 0, 100);
456  hElec1Eta = dbe_->book1D("Elec1Eta", "Elec 1 Eta ", 10*binFactor, -3, 3);
457  hElec2Eta = dbe_->book1D("Elec2Eta", "Elec 2 Eta ", 10*binFactor, -3, 3);
458  hElec1Phi = dbe_->book1D("Elec1Phi", "Elec 1 Phi ", 10*binFactor, -3.2, 3.2);
459  hElec2Phi = dbe_->book1D("Elec2Phi", "Elec 2 Phi ", 10*binFactor, -3.2, 3.2);
460 
461  hDiElecInvMass = dbe_->book1D("DiElecInvMass", "DiElec Invariant Mass", 100*binFactor, 0, 1000);
462 
463  dbe_->setCurrentFolder(dirname_+"/RecoElectrons/L1");
464  for(unsigned int i=0; i<l1bits_->size(); i++){
465  myHistoName = "ElecMult_" + (*l1Names_)[i];
466  myHistoTitle = "Elec Multiplicity for L1 path " + (*l1Names_)[i];
467  hElecMultAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10, 0, 10));
468  myHistoName = "Elec1Pt_" + (*l1Names_)[i];
469  myHistoTitle = "Elec 1 Pt for L1 path " + (*l1Names_)[i];
470  hElec1PtAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 100));
471  myHistoName = "Elec2Pt_" + (*l1Names_)[i];
472  myHistoTitle = "Elec 2 Pt for L1 path " + (*l1Names_)[i];
473  hElec2PtAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 100));
474  myHistoName = "Elec1Eta_" + (*l1Names_)[i];
475  myHistoTitle = "Elec 1 Eta for L1 path " + (*l1Names_)[i];
476  hElec1EtaAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3, 3));
477  myHistoName = "Elec2Eta_" + (*l1Names_)[i];
478  myHistoTitle = "Elec 2 Eta for L1 path " + (*l1Names_)[i];
479  hElec2EtaAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3, 3));
480  myHistoName = "Elec1Phi_" + (*l1Names_)[i];
481  myHistoTitle = "Elec 1 Phi for L1 path " + (*l1Names_)[i];
482  hElec1PhiAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3.2, 3.2));
483  myHistoName = "Elec2Phi_" + (*l1Names_)[i];
484  myHistoTitle = "Elec 2 Phi for L1 path " + (*l1Names_)[i];
485  hElec2PhiAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3.2, 3.2));
486 
487  myHistoName = "DiElecInvMass_" + (*l1Names_)[i];
488  myHistoTitle = "DiElec Invariant Mass for L1 path " + (*l1Names_)[i];
489  hDiElecInvMassAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100*binFactor, 0, 1000));
490 
491  }
492 
493  dbe_->setCurrentFolder(dirname_+"/RecoElectrons/HLT");
494  for(unsigned int i=0; i<hltbits_->size(); i++){
495  myHistoName = "ElecMult_" + (*hlNames_)[i];
496  myHistoTitle = "Elec Multiplicity for HLT path " + (*hlNames_)[i];
497  hElecMultAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10, 0, 10));
498  myHistoName = "Elec1Pt_" + (*hlNames_)[i];
499  myHistoTitle = "Elec 1 Pt for HLT path " + (*hlNames_)[i];
500  hElec1PtAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 100));
501  myHistoName = "Elec2Pt_" + (*hlNames_)[i];
502  myHistoTitle = "Elec 2 Pt for HLT path " + (*hlNames_)[i];
503  hElec2PtAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 100));
504  myHistoName = "Elec1Eta_" + (*hlNames_)[i];
505  myHistoTitle = "Elec 1 Eta for HLT path " + (*hlNames_)[i];
506  hElec1EtaAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3, 3));
507  myHistoName = "Elec2Eta_" + (*hlNames_)[i];
508  myHistoTitle = "Elec 2 Eta for HLT path " + (*hlNames_)[i];
509  hElec2EtaAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3, 3));
510  myHistoName = "Elec1Phi_" + (*hlNames_)[i];
511  myHistoTitle = "Elec 1 Phi for HLT path " + (*hlNames_)[i];
512  hElec1PhiAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3.2, 3.2));
513  myHistoName = "Elec2Phi_" + (*hlNames_)[i];
514  myHistoTitle = "Elec 2 Phi for HLT path " + (*hlNames_)[i];
515  hElec2PhiAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3.2, 3.2));
516 
517  myHistoName = "DiElecInvMass_" + (*hlNames_)[i];
518  myHistoTitle = "DiElec Invariant Mass for HLT path " + (*hlNames_)[i];
519  hDiElecInvMassAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100*binFactor, 0, 1000));
520 
521  }
522  dbe_->setCurrentFolder(dirname_);
523 
524 
525  //******************
526  //Book Muons
527  //******************
528 
529  dbe_->setCurrentFolder(dirname_+"/RecoMuons/General");
530  hMuonMult = dbe_->book1D("MuonMult", "Muon Multiplicity", 10, 0, 10);
531  hMuon1Pt = dbe_->book1D("Muon1Pt", "Muon 1 Pt ", 100, 0, 100);
532  hMuon2Pt = dbe_->book1D("Muon2Pt", "Muon 2 Pt ", 100, 0, 100);
533  hMuon1Eta = dbe_->book1D("Muon1Eta", "Muon 1 Eta ", 10*binFactor, -3, 3);
534  hMuon2Eta = dbe_->book1D("Muon2Eta", "Muon 2 Eta ", 10*binFactor, -3, 3);
535  hMuon1Phi = dbe_->book1D("Muon1Phi", "Muon 1 Phi ", 10*binFactor, -3.2, 3.2);
536  hMuon2Phi = dbe_->book1D("Muon2Phi", "Muon 2 Phi ", 10*binFactor, -3.2, 3.2);
537 
538  hDiMuonInvMass = dbe_->book1D("DiMuonInvMass", "DiMuon Invariant Mass", 100*binFactor, 0, 1000);
539 
540  dbe_->setCurrentFolder(dirname_+"/RecoMuons/L1");
541  for(unsigned int i=0; i<l1bits_->size(); i++){
542  myHistoName = "MuonMult_" + (*l1Names_)[i];
543  myHistoTitle = "Muon Multiplicity for L1 path " + (*l1Names_)[i];
544  hMuonMultAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10, 0, 10));
545  myHistoName = "Muon1Pt_" + (*l1Names_)[i];
546  myHistoTitle = "Muon 1 Pt for L1 path " + (*l1Names_)[i];
547  hMuon1PtAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 100));
548  myHistoName = "Muon2Pt_" + (*l1Names_)[i];
549  myHistoTitle = "Muon 2 Pt for L1 path " + (*l1Names_)[i];
550  hMuon2PtAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 100));
551  myHistoName = "Muon1Eta_" + (*l1Names_)[i];
552  myHistoTitle = "Muon 1 Eta for L1 path " + (*l1Names_)[i];
553  hMuon1EtaAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3, 3));
554  myHistoName = "Muon2Eta_" + (*l1Names_)[i];
555  myHistoTitle = "Muon 2 Eta for L1 path " + (*l1Names_)[i];
556  hMuon2EtaAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3, 3));
557  myHistoName = "Muon1Phi_" + (*l1Names_)[i];
558  myHistoTitle = "Muon 1 Phi for L1 path " + (*l1Names_)[i];
559  hMuon1PhiAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3.2, 3.2));
560  myHistoName = "Muon2Phi_" + (*l1Names_)[i];
561  myHistoTitle = "Muon 2 Phi for L1 path " + (*l1Names_)[i];
562  hMuon2PhiAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3.2, 3.2));
563 
564  myHistoName = "DiMuonInvMass_" + (*l1Names_)[i];
565  myHistoTitle = "DiMuon Invariant Mass for L1 path " + (*l1Names_)[i];
566  hDiMuonInvMassAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100*binFactor, 0, 1000));
567 
568  }
569 
570  dbe_->setCurrentFolder(dirname_+"/RecoMuons/HLT");
571  for(unsigned int i=0; i<hltbits_->size(); i++){
572  myHistoName = "MuonMult_" + (*hlNames_)[i];
573  myHistoTitle = "Muon Multiplicity for HLT path " + (*hlNames_)[i];
574  hMuonMultAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10, 0, 10));
575  myHistoName = "Muon1Pt_" + (*hlNames_)[i];
576  myHistoTitle = "Muon 1 Pt for HLT path " + (*hlNames_)[i];
577  hMuon1PtAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 100));
578  myHistoName = "Muon2Pt_" + (*hlNames_)[i];
579  myHistoTitle = "Muon 2 Pt for HLT path " + (*hlNames_)[i];
580  hMuon2PtAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 100));
581  myHistoName = "Muon1Eta_" + (*hlNames_)[i];
582  myHistoTitle = "Muon 1 Eta for HLT path " + (*hlNames_)[i];
583  hMuon1EtaAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3, 3));
584  myHistoName = "Muon2Eta_" + (*hlNames_)[i];
585  myHistoTitle = "Muon 2 Eta for HLT path " + (*hlNames_)[i];
586  hMuon2EtaAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3, 3));
587  myHistoName = "Muon1Phi_" + (*hlNames_)[i];
588  myHistoTitle = "Muon 1 Phi for HLT path " + (*hlNames_)[i];
589  hMuon1PhiAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3.2, 3.2));
590  myHistoName = "Muon2Phi_" + (*hlNames_)[i];
591  myHistoTitle = "Muon 2 Phi for HLT path " + (*hlNames_)[i];
592  hMuon2PhiAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3.2, 3.2));
593 
594  myHistoName = "DiMuonInvMass_" + (*hlNames_)[i];
595  myHistoTitle = "DiMuon Invariant Mass for HLT path " + (*hlNames_)[i];
596  hDiMuonInvMassAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100*binFactor, 0, 1000));
597 
598  }
599  dbe_->setCurrentFolder(dirname_);
600 
601 
602 
603  //******************
604  //Book Photons
605  //******************
606 
607  dbe_->setCurrentFolder(dirname_+"/RecoPhotons/General");
608  hPhotonMult = dbe_->book1D("PhotonMult", "Photon Multiplicity", 10, 0, 10);
609  hPhoton1Pt = dbe_->book1D("Photon1Pt", "Photon 1 Pt ", 100, 0, 100);
610  hPhoton2Pt = dbe_->book1D("Photon2Pt", "Photon 2 Pt ", 100, 0, 100);
611  hPhoton1Eta = dbe_->book1D("Photon1Eta", "Photon 1 Eta ", 10*binFactor, -3, 3);
612  hPhoton2Eta = dbe_->book1D("Photon2Eta", "Photon 2 Eta ", 10*binFactor, -3, 3);
613  hPhoton1Phi = dbe_->book1D("Photon1Phi", "Photon 1 Phi ", 10*binFactor, -3.2, 3.2);
614  hPhoton2Phi = dbe_->book1D("Photon2Phi", "Photon 2 Phi ", 10*binFactor, -3.2, 3.2);
615 
616  hDiPhotonInvMass = dbe_->book1D("DiPhotonInvMass", "DiPhoton Invariant Mass", 100*binFactor, 0, 1000);
617 
618  dbe_->setCurrentFolder(dirname_+"/RecoPhotons/L1");
619  for(unsigned int i=0; i<l1bits_->size(); i++){
620  myHistoName = "PhotonMult_" + (*l1Names_)[i];
621  myHistoTitle = "Photon Multiplicity for L1 path " + (*l1Names_)[i];
622  hPhotonMultAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10, 0, 10));
623  myHistoName = "Photon1Pt_" + (*l1Names_)[i];
624  myHistoTitle = "Photon 1 Pt for L1 path " + (*l1Names_)[i];
625  hPhoton1PtAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 100));
626  myHistoName = "Photon2Pt_" + (*l1Names_)[i];
627  myHistoTitle = "Photon 2 Pt for L1 path " + (*l1Names_)[i];
628  hPhoton2PtAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 100));
629  myHistoName = "Photon1Eta_" + (*l1Names_)[i];
630  myHistoTitle = "Photon 1 Eta for L1 path " + (*l1Names_)[i];
631  hPhoton1EtaAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3, 3));
632  myHistoName = "Photon2Eta_" + (*l1Names_)[i];
633  myHistoTitle = "Photon 2 Eta for L1 path " + (*l1Names_)[i];
634  hPhoton2EtaAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3, 3));
635  myHistoName = "Photon1Phi_" + (*l1Names_)[i];
636  myHistoTitle = "Photon 1 Phi for L1 path " + (*l1Names_)[i];
637  hPhoton1PhiAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3.2, 3.2));
638  myHistoName = "Photon2Phi_" + (*l1Names_)[i];
639  myHistoTitle = "Photon 2 Phi for L1 path " + (*l1Names_)[i];
640  hPhoton2PhiAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3.2, 3.2));
641 
642  myHistoName = "DiPhotonInvMass_" + (*l1Names_)[i];
643  myHistoTitle = "DiPhoton Invariant Mass for L1 path " + (*l1Names_)[i];
644  hDiPhotonInvMassAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100*binFactor, 0, 1000));
645 
646  }
647 
648  dbe_->setCurrentFolder(dirname_+"/RecoPhotons/HLT");
649  for(unsigned int i=0; i<hltbits_->size(); i++){
650  myHistoName = "PhotonMult_" + (*hlNames_)[i];
651  myHistoTitle = "Photon Multiplicity for HLT path " + (*hlNames_)[i];
652  hPhotonMultAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10, 0, 10));
653  myHistoName = "Photon1Pt_" + (*hlNames_)[i];
654  myHistoTitle = "Photon 1 Pt for HLT path " + (*hlNames_)[i];
655  hPhoton1PtAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 100));
656  myHistoName = "Photon2Pt_" + (*hlNames_)[i];
657  myHistoTitle = "Photon 2 Pt for HLT path " + (*hlNames_)[i];
658  hPhoton2PtAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 100));
659  myHistoName = "Photon1Eta_" + (*hlNames_)[i];
660  myHistoTitle = "Photon 1 Eta for HLT path " + (*hlNames_)[i];
661  hPhoton1EtaAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3, 3));
662  myHistoName = "Photon2Eta_" + (*hlNames_)[i];
663  myHistoTitle = "Photon 2 Eta for HLT path " + (*hlNames_)[i];
664  hPhoton2EtaAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3, 3));
665  myHistoName = "Photon1Phi_" + (*hlNames_)[i];
666  myHistoTitle = "Photon 1 Phi for HLT path " + (*hlNames_)[i];
667  hPhoton1PhiAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3.2, 3.2));
668  myHistoName = "Photon2Phi_" + (*hlNames_)[i];
669  myHistoTitle = "Photon 2 Phi for HLT path " + (*hlNames_)[i];
670  hPhoton2PhiAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3.2, 3.2));
671 
672  myHistoName = "DiPhotonInvMass_" + (*hlNames_)[i];
673  myHistoTitle = "DiPhoton Invariant Mass for HLT path " + (*hlNames_)[i];
674  hDiPhotonInvMassAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100*binFactor, 0, 1000));
675 
676  }
677  dbe_->setCurrentFolder(dirname_);
678 
679 
680 
681  //******************
682  //Book MET
683  //******************
684 
685  dbe_->setCurrentFolder(dirname_+"/RecoMET/General");
686  hMET = dbe_->book1D("MET", "MET", 35, 0, 1050);
687  hMETx = dbe_->book1D("METx", "METx", 35, 0, 1050);
688  hMETy = dbe_->book1D("METy", "METy", 35, 0, 1050);
689  hMETphi = dbe_->book1D("METphi", "METphi", 10*binFactor, -3.2, 3.2);
690  hSumEt = dbe_->book1D("SumEt" , "SumEt", 35, 0, 1050);
691  hMETSignificance = dbe_->book1D("METSignificance", "METSignificance", 100, 0, 100);
692  dbe_->setCurrentFolder(dirname_+"/RecoMET/L1");
693  for(unsigned int i=0; i<l1bits_->size(); i++){
694  myHistoName = "MET_" + (*l1Names_)[i];
695  myHistoTitle = "MET for L1 path " + (*l1Names_)[i];
696  hMETAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 35, 0, 1050));
697  myHistoName = "METx_" + (*l1Names_)[i];
698  myHistoTitle = "METx for L1 path " + (*l1Names_)[i];
699  hMETxAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 35, 0, 1050));
700  myHistoName = "METy_" + (*l1Names_)[i];
701  myHistoTitle = "METy for L1 path " + (*l1Names_)[i];
702  hMETyAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 35, 0, 1050));
703  myHistoName = "METPhi_" + (*l1Names_)[i];
704  myHistoTitle = "METPhi for L1 path " + (*l1Names_)[i];
705  hMETphiAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3.2, 3.2));
706  myHistoName = "SumEt_" + (*l1Names_)[i];
707  myHistoTitle = "SumEt for L1 path " + (*l1Names_)[i];
708  hSumEtAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 35, 0, 1050));
709  myHistoName = "METSignificance_" + (*l1Names_)[i];
710  myHistoTitle = "METSignificance for L1 path " + (*l1Names_)[i];
711  hMETSignificanceAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, 0, 100));
712  }
713 
714  dbe_->setCurrentFolder(dirname_+"/RecoMET/HLT");
715  for(unsigned int i=0; i<hltbits_->size(); i++){
716  myHistoName = "MET_" + (*hlNames_)[i];
717  myHistoTitle = "MET for HLT path " + (*hlNames_)[i];
718  hMETAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 35, 0, 1050));
719  myHistoName = "METx_" + (*hlNames_)[i];
720  myHistoTitle = "METx for HLT path " + (*hlNames_)[i];
721  hMETxAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 35, 0, 1050));
722  myHistoName = "METy_" + (*hlNames_)[i];
723  myHistoTitle = "METy for HLT path " + (*hlNames_)[i];
724  hMETyAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 35, 0, 1050));
725  myHistoName = "METPhi_" + (*hlNames_)[i];
726  myHistoTitle = "METPhi for HLT path " + (*hlNames_)[i];
727  hMETphiAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, -3.2, 3.2 ));
728  myHistoName = "SumEt_" + (*hlNames_)[i];
729  myHistoTitle = "SumEt for HLT path " + (*hlNames_)[i];
730  hSumEtAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 35, 0, 1050));
731  myHistoName = "METSignificance_" + (*hlNames_)[i];
732  myHistoTitle = "METSignificance for HLT path " + (*hlNames_)[i];
733  hMETSignificanceAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10*binFactor, 0, 100));
734  }
735  dbe_->setCurrentFolder(dirname_);
736 
737 
738 
739 
740 }
741 
742 
743 
744 
745 
746 
748 {
749 
750 
751  //***********************************************
752  // Get the RECO Objects
753  //***********************************************
754 
755 
756  //Get the electrons
757  Handle<GsfElectronCollection> theElectronCollectionHandle;
758  iEvent.getByLabel(m_electronSrc, theElectronCollectionHandle);
759  theElectronCollection = *theElectronCollectionHandle;
760  std::sort(theElectronCollection.begin(), theElectronCollection.end(), PtSorter());
761 
762  //Get the Muons
763  Handle<MuonCollection> theMuonCollectionHandle;
764  iEvent.getByLabel(m_muonSrc, theMuonCollectionHandle);
765  theMuonCollection = *theMuonCollectionHandle;
766  std::sort(theMuonCollection.begin(), theMuonCollection.end(), PtSorter());
767 
768  //Get the Photons
769  Handle<PhotonCollection> thePhotonCollectionHandle;
770  iEvent.getByLabel(m_photonProducerSrc, m_photonSrc, thePhotonCollectionHandle);
771  thePhotonCollection = *thePhotonCollectionHandle;
772  std::sort(thePhotonCollection.begin(), thePhotonCollection.end(), PtSorter());
773 
774  //Get the CaloJets
775  Handle<CaloJetCollection> theCaloJetCollectionHandle;
776  iEvent.getByLabel(m_jetsSrc, theCaloJetCollectionHandle);
777  theCaloJetCollection = *theCaloJetCollectionHandle;
778  std::sort(theCaloJetCollection.begin(), theCaloJetCollection.end(), PtSorter());
779 
780  //Get the CaloMET
781  Handle<CaloMETCollection> theCaloMETCollectionHandle;
782  iEvent.getByLabel(m_calometSrc, theCaloMETCollectionHandle);
783  theCaloMETCollection = *theCaloMETCollectionHandle;
784 }
785 
787  double mass = sqrt( (p1->energy() + p2->energy())*(p1->energy() + p2->energy()) -
788  (p1->px() + p2->px())*(p1->px() + p2->px()) -
789  (p1->py() + p2->py())*(p1->py() + p2->py()) -
790  (p1->pz() + p2->pz())*(p1->pz() + p2->pz()) );
791 
792 
793 // cout << "p1->energy() = " << p1->energy() << " p2->energy() = " << p2->energy() << endl;
794 // cout << "p1->px() = " << p1->px() << " p2->px() = " << p2->px() << endl;
795 // cout << "p1->py() = " << p1->py() << " p2->py() = " << p2->py() << endl;
796 // cout << "p1->pz() = " << p1->pz() << " p2->pz() = " << p2->pz() << endl;
797 // cout << "invmass = " << mass << endl;
798 
799 
800  return mass;
801 }
802 
double invariantMass(reco::Candidate *, reco::Candidate *)
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
virtual double energy() const =0
energy
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:722
virtual double pz() const =0
z coordinate of momentum vector
T eta() const
double charge(const std::vector< uint8_t > &Ampls)
PlotMakerReco(edm::ParameterSet objectList)
int iEvent
Definition: GenABIO.cc:243
void handleObjects(const edm::Event &)
T sqrt(T t)
Definition: SSEVec.h:48
void fillPlots(const edm::Event &)
int j
Definition: DBlmapReader.cc:9
virtual double py() const =0
y coordinate of momentum vector
double p2[4]
Definition: TauolaWrapper.h:90
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
DQMStore * dbe_
virtual double px() const =0
x coordinate of momentum vector
void bookHistos(DQMStore *, std::vector< int > *, std::vector< int > *, std::vector< std::string > *, std::vector< std::string > *)
double p1[4]
Definition: TauolaWrapper.h:89
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
Definition: DDAxes.h:10