CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/HLTriggerOffline/SUSYBSM/src/PlotMakerL1.cc

Go to the documentation of this file.
00001 /*  \class PlotMakerL1
00002 *
00003 *  Class to produce some plots of Off-line variables in the TriggerValidation Code
00004 *
00005 *  Author: Massimiliano Chiorboli      Date: September 2007
00006 //         Maurizio Pierini
00007 //         Maria Spiropulu
00008 *
00009 */
00010 #include "HLTriggerOffline/SUSYBSM/interface/PlotMakerL1.h"
00011 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00012 
00013 
00014 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00015 #include "TDirectory.h"
00016 
00017 #include "HLTriggerOffline/SUSYBSM/interface/PtSorter.h"
00018 
00019 
00020 using namespace edm;
00021 using namespace reco;
00022 using namespace std;
00023 using namespace l1extra;
00024 
00025 PlotMakerL1::PlotMakerL1(edm::ParameterSet PlotMakerL1Input)
00026 {
00027   m_l1extra              = PlotMakerL1Input.getParameter<string>("l1extramc");
00028 
00029   dirname_          = PlotMakerL1Input.getParameter<std::string>("dirname");
00030 
00031 }
00032 
00033 void PlotMakerL1::fillPlots(const edm::Event& iEvent)
00034 {
00035   this->handleObjects(iEvent);
00036 
00037 
00038 
00039   //**********************
00040   // Fill the L1 Object Histos
00041   //**********************
00042 
00043   //**********************
00044   // Fill the Jet Histos
00045   //**********************
00046 
00047   
00048 
00049   hL1CentralJetMult->Fill(theL1CentralJetCollection.size());
00050   if(theL1CentralJetCollection.size()>0) {
00051     hL1CentralJet1Pt->Fill(theL1CentralJetCollection[0].pt());
00052     hL1CentralJet1Eta->Fill(theL1CentralJetCollection[0].eta());
00053     hL1CentralJet1Phi->Fill(theL1CentralJetCollection[0].phi());
00054   }
00055   if(theL1CentralJetCollection.size()>1) {
00056     hL1CentralJet2Pt->Fill(theL1CentralJetCollection[1].pt());
00057     hL1CentralJet2Eta->Fill(theL1CentralJetCollection[1].eta());
00058     hL1CentralJet2Phi->Fill(theL1CentralJetCollection[1].phi());
00059   }
00060   for(unsigned int i=0; i<l1bits_->size(); i++) {
00061     if(l1bits_->at(i)) {
00062       hL1CentralJetMultAfterL1[i]->Fill(theL1CentralJetCollection.size());
00063       if(theL1CentralJetCollection.size()>0) {
00064         hL1CentralJet1PtAfterL1[i]->Fill(theL1CentralJetCollection[0].pt());
00065         hL1CentralJet1EtaAfterL1[i]->Fill(theL1CentralJetCollection[0].eta());
00066         hL1CentralJet1PhiAfterL1[i]->Fill(theL1CentralJetCollection[0].phi());
00067       }
00068       if(theL1CentralJetCollection.size()>1) {
00069         hL1CentralJet2PtAfterL1[i]->Fill(theL1CentralJetCollection[1].pt());
00070         hL1CentralJet2EtaAfterL1[i]->Fill(theL1CentralJetCollection[1].eta());
00071         hL1CentralJet2PhiAfterL1[i]->Fill(theL1CentralJetCollection[1].phi());
00072       }
00073     }
00074   }
00075   for(unsigned int i=0; i<hltbits_->size(); i++) {
00076     if(hltbits_->at(i)) {
00077       hL1CentralJetMultAfterHLT[i]->Fill(theL1CentralJetCollection.size());
00078       if(theL1CentralJetCollection.size()>0) {
00079         hL1CentralJet1PtAfterHLT[i]->Fill(theL1CentralJetCollection[0].pt());
00080         hL1CentralJet1EtaAfterHLT[i]->Fill(theL1CentralJetCollection[0].eta());
00081         hL1CentralJet1PhiAfterHLT[i]->Fill(theL1CentralJetCollection[0].phi());
00082       }
00083       if(theL1CentralJetCollection.size()>1) {
00084         hL1CentralJet2PtAfterHLT[i]->Fill(theL1CentralJetCollection[1].pt());
00085         hL1CentralJet2EtaAfterHLT[i]->Fill(theL1CentralJetCollection[1].eta());
00086         hL1CentralJet2PhiAfterHLT[i]->Fill(theL1CentralJetCollection[1].phi());
00087       }
00088     }
00089   }
00090 
00091 
00092 
00093 
00094 
00095   hL1ForwardJetMult->Fill(theL1ForwardJetCollection.size());
00096   if(theL1ForwardJetCollection.size()>0) {
00097     hL1ForwardJet1Pt->Fill(theL1ForwardJetCollection[0].pt());
00098     hL1ForwardJet1Eta->Fill(theL1ForwardJetCollection[0].eta());
00099     hL1ForwardJet1Phi->Fill(theL1ForwardJetCollection[0].phi());
00100   }
00101   if(theL1ForwardJetCollection.size()>1) {
00102     hL1ForwardJet2Pt->Fill(theL1ForwardJetCollection[1].pt());
00103     hL1ForwardJet2Eta->Fill(theL1ForwardJetCollection[1].eta());
00104     hL1ForwardJet2Phi->Fill(theL1ForwardJetCollection[1].phi());
00105   }
00106   for(unsigned int i=0; i<l1bits_->size(); i++) {
00107     if(l1bits_->at(i)) {
00108       hL1ForwardJetMultAfterL1[i]->Fill(theL1ForwardJetCollection.size());
00109       if(theL1ForwardJetCollection.size()>0) {
00110         hL1ForwardJet1PtAfterL1[i]->Fill(theL1ForwardJetCollection[0].pt());
00111         hL1ForwardJet1EtaAfterL1[i]->Fill(theL1ForwardJetCollection[0].eta());
00112         hL1ForwardJet1PhiAfterL1[i]->Fill(theL1ForwardJetCollection[0].phi());
00113       }
00114       if(theL1ForwardJetCollection.size()>1) {
00115         hL1ForwardJet2PtAfterL1[i]->Fill(theL1ForwardJetCollection[1].pt());
00116         hL1ForwardJet2EtaAfterL1[i]->Fill(theL1ForwardJetCollection[1].eta());
00117         hL1ForwardJet2PhiAfterL1[i]->Fill(theL1ForwardJetCollection[1].phi());
00118       }
00119     }
00120   }
00121   for(unsigned int i=0; i<hltbits_->size(); i++) {
00122     if(hltbits_->at(i)) {
00123       hL1ForwardJetMultAfterHLT[i]->Fill(theL1ForwardJetCollection.size());
00124       if(theL1ForwardJetCollection.size()>0) {
00125         hL1ForwardJet1PtAfterHLT[i]->Fill(theL1ForwardJetCollection[0].pt());
00126         hL1ForwardJet1EtaAfterHLT[i]->Fill(theL1ForwardJetCollection[0].eta());
00127         hL1ForwardJet1PhiAfterHLT[i]->Fill(theL1ForwardJetCollection[0].phi());
00128       }
00129       if(theL1ForwardJetCollection.size()>1) {
00130         hL1ForwardJet2PtAfterHLT[i]->Fill(theL1ForwardJetCollection[1].pt());
00131         hL1ForwardJet2EtaAfterHLT[i]->Fill(theL1ForwardJetCollection[1].eta());
00132         hL1ForwardJet2PhiAfterHLT[i]->Fill(theL1ForwardJetCollection[1].phi());
00133       }
00134     }
00135   }
00136 
00137 
00138 
00139 
00140 
00141   hL1TauJetMult->Fill(theL1TauJetCollection.size());
00142   if(theL1TauJetCollection.size()>0) {
00143     hL1TauJet1Pt->Fill(theL1TauJetCollection[0].pt());
00144     hL1TauJet1Eta->Fill(theL1TauJetCollection[0].eta());
00145     hL1TauJet1Phi->Fill(theL1TauJetCollection[0].phi());
00146   }
00147   if(theL1TauJetCollection.size()>1) {
00148     hL1TauJet2Pt->Fill(theL1TauJetCollection[1].pt());
00149     hL1TauJet2Eta->Fill(theL1TauJetCollection[1].eta());
00150     hL1TauJet2Phi->Fill(theL1TauJetCollection[1].phi());
00151   }
00152 
00153   for(unsigned int i=0; i<l1bits_->size(); i++) {
00154     if(l1bits_->at(i)) {
00155       hL1TauJetMultAfterL1[i]->Fill(theL1TauJetCollection.size());
00156       if(theL1TauJetCollection.size()>0) {
00157         hL1TauJet1PtAfterL1[i]->Fill(theL1TauJetCollection[0].pt());
00158         hL1TauJet1EtaAfterL1[i]->Fill(theL1TauJetCollection[0].eta());
00159         hL1TauJet1PhiAfterL1[i]->Fill(theL1TauJetCollection[0].phi());
00160       }
00161       if(theL1TauJetCollection.size()>1) {
00162         hL1TauJet2PtAfterL1[i]->Fill(theL1TauJetCollection[1].pt());
00163         hL1TauJet2EtaAfterL1[i]->Fill(theL1TauJetCollection[1].eta());
00164         hL1TauJet2PhiAfterL1[i]->Fill(theL1TauJetCollection[1].phi());
00165       }
00166     }
00167   }
00168   for(unsigned int i=0; i<hltbits_->size(); i++) {
00169     if(hltbits_->at(i)) {
00170       hL1TauJetMultAfterHLT[i]->Fill(theL1TauJetCollection.size());
00171       if(theL1TauJetCollection.size()>0) {
00172         hL1TauJet1PtAfterHLT[i]->Fill(theL1TauJetCollection[0].pt());
00173         hL1TauJet1EtaAfterHLT[i]->Fill(theL1TauJetCollection[0].eta());
00174         hL1TauJet1PhiAfterHLT[i]->Fill(theL1TauJetCollection[0].phi());
00175       }
00176       if(theL1TauJetCollection.size()>1) {
00177         hL1TauJet2PtAfterHLT[i]->Fill(theL1TauJetCollection[1].pt());
00178         hL1TauJet2EtaAfterHLT[i]->Fill(theL1TauJetCollection[1].eta());
00179         hL1TauJet2PhiAfterHLT[i]->Fill(theL1TauJetCollection[1].phi());
00180       }
00181     }
00182   }
00183 
00184 
00185 
00186 
00187   hL1EmIsoMult->Fill(theL1EmIsoCollection.size());
00188   if(theL1EmIsoCollection.size()>0) {
00189     hL1EmIso1Pt->Fill(theL1EmIsoCollection[0].pt());
00190     hL1EmIso1Eta->Fill(theL1EmIsoCollection[0].eta());
00191     hL1EmIso1Phi->Fill(theL1EmIsoCollection[0].phi());
00192   }
00193   if(theL1EmIsoCollection.size()>1) {
00194     hL1EmIso2Pt->Fill(theL1EmIsoCollection[1].pt());
00195     hL1EmIso2Eta->Fill(theL1EmIsoCollection[1].eta());
00196     hL1EmIso2Phi->Fill(theL1EmIsoCollection[1].phi());
00197   }
00198   for(unsigned int i=0; i<l1bits_->size(); i++) {
00199     if(l1bits_->at(i)) {
00200       hL1EmIsoMultAfterL1[i]->Fill(theL1EmIsoCollection.size());
00201       if(theL1EmIsoCollection.size()>0) {
00202         hL1EmIso1PtAfterL1[i]->Fill(theL1EmIsoCollection[0].pt());
00203         hL1EmIso1EtaAfterL1[i]->Fill(theL1EmIsoCollection[0].eta());
00204         hL1EmIso1PhiAfterL1[i]->Fill(theL1EmIsoCollection[0].phi());
00205       }
00206       if(theL1EmIsoCollection.size()>1) {
00207         hL1EmIso2PtAfterL1[i]->Fill(theL1EmIsoCollection[1].pt());
00208         hL1EmIso2EtaAfterL1[i]->Fill(theL1EmIsoCollection[1].eta());
00209         hL1EmIso2PhiAfterL1[i]->Fill(theL1EmIsoCollection[1].phi());
00210       }
00211     }
00212   }
00213   for(unsigned int i=0; i<hltbits_->size(); i++) {
00214     if(hltbits_->at(i)) {
00215       hL1EmIsoMultAfterHLT[i]->Fill(theL1EmIsoCollection.size());
00216       if(theL1EmIsoCollection.size()>0) {
00217         hL1EmIso1PtAfterHLT[i]->Fill(theL1EmIsoCollection[0].pt());
00218         hL1EmIso1EtaAfterHLT[i]->Fill(theL1EmIsoCollection[0].eta());
00219         hL1EmIso1PhiAfterHLT[i]->Fill(theL1EmIsoCollection[0].phi());
00220       }
00221       if(theL1EmIsoCollection.size()>1) {
00222         hL1EmIso2PtAfterHLT[i]->Fill(theL1EmIsoCollection[1].pt());
00223         hL1EmIso2EtaAfterHLT[i]->Fill(theL1EmIsoCollection[1].eta());
00224         hL1EmIso2PhiAfterHLT[i]->Fill(theL1EmIsoCollection[1].phi());
00225       }
00226     }
00227   }
00228 
00229 
00230 
00231   hL1EmNotIsoMult->Fill(theL1EmNotIsoCollection.size());
00232   if(theL1EmNotIsoCollection.size()>0) {
00233     hL1EmNotIso1Pt->Fill(theL1EmNotIsoCollection[0].pt());
00234     hL1EmNotIso1Eta->Fill(theL1EmNotIsoCollection[0].eta());
00235     hL1EmNotIso1Phi->Fill(theL1EmNotIsoCollection[0].phi());
00236   }
00237   if(theL1EmNotIsoCollection.size()>1) {
00238     hL1EmNotIso2Pt->Fill(theL1EmNotIsoCollection[1].pt());
00239     hL1EmNotIso2Eta->Fill(theL1EmNotIsoCollection[1].eta());
00240     hL1EmNotIso2Phi->Fill(theL1EmNotIsoCollection[1].phi());
00241   }
00242   for(unsigned int i=0; i<l1bits_->size(); i++) {
00243     if(l1bits_->at(i)) {
00244       hL1EmNotIsoMultAfterL1[i]->Fill(theL1EmNotIsoCollection.size());
00245       if(theL1EmNotIsoCollection.size()>0) {
00246         hL1EmNotIso1PtAfterL1[i]->Fill(theL1EmNotIsoCollection[0].pt());
00247         hL1EmNotIso1EtaAfterL1[i]->Fill(theL1EmNotIsoCollection[0].eta());
00248         hL1EmNotIso1PhiAfterL1[i]->Fill(theL1EmNotIsoCollection[0].phi());
00249       }
00250       if(theL1EmNotIsoCollection.size()>1) {
00251         hL1EmNotIso2PtAfterL1[i]->Fill(theL1EmNotIsoCollection[1].pt());
00252         hL1EmNotIso2EtaAfterL1[i]->Fill(theL1EmNotIsoCollection[1].eta());
00253         hL1EmNotIso2PhiAfterL1[i]->Fill(theL1EmNotIsoCollection[1].phi());
00254       }
00255     }
00256   }
00257   for(unsigned int i=0; i<hltbits_->size(); i++) {
00258     if(hltbits_->at(i)) {
00259       hL1EmNotIsoMultAfterHLT[i]->Fill(theL1EmNotIsoCollection.size());
00260       if(theL1EmNotIsoCollection.size()>0) {
00261         hL1EmNotIso1PtAfterHLT[i]->Fill(theL1EmNotIsoCollection[0].pt());
00262         hL1EmNotIso1EtaAfterHLT[i]->Fill(theL1EmNotIsoCollection[0].eta());
00263         hL1EmNotIso1PhiAfterHLT[i]->Fill(theL1EmNotIsoCollection[0].phi());
00264       }
00265       if(theL1EmNotIsoCollection.size()>1) {
00266         hL1EmNotIso2PtAfterHLT[i]->Fill(theL1EmNotIsoCollection[1].pt());
00267         hL1EmNotIso2EtaAfterHLT[i]->Fill(theL1EmNotIsoCollection[1].eta());
00268         hL1EmNotIso2PhiAfterHLT[i]->Fill(theL1EmNotIsoCollection[1].phi());
00269       }
00270     }
00271   }
00272 
00273 
00274 
00275 
00276   //**********************
00277   // Fill the Muon Histos
00278   //**********************
00279   
00280   hL1MuonMult->Fill(theL1MuonCollection.size());
00281   if(theL1MuonCollection.size()>0) {
00282     hL1Muon1Pt->Fill(theL1MuonCollection[0].pt());
00283     hL1Muon1Eta->Fill(theL1MuonCollection[0].eta());
00284     hL1Muon1Phi->Fill(theL1MuonCollection[0].phi());
00285   }
00286   if(theL1MuonCollection.size()>1) {
00287     hL1Muon2Pt->Fill(theL1MuonCollection[1].pt());
00288     hL1Muon2Eta->Fill(theL1MuonCollection[1].eta());
00289     hL1Muon2Phi->Fill(theL1MuonCollection[1].phi());
00290   }
00291   for(unsigned int i=0; i<l1bits_->size(); i++) {
00292     if(l1bits_->at(i)) {
00293       hL1MuonMultAfterL1[i]->Fill(theL1MuonCollection.size());
00294       if(theL1MuonCollection.size()>0) {
00295         hL1Muon1PtAfterL1[i]->Fill(theL1MuonCollection[0].pt());
00296         hL1Muon1EtaAfterL1[i]->Fill(theL1MuonCollection[0].eta());
00297         hL1Muon1PhiAfterL1[i]->Fill(theL1MuonCollection[0].phi());
00298       }
00299       if(theL1MuonCollection.size()>1) {
00300         hL1Muon2PtAfterL1[i]->Fill(theL1MuonCollection[1].pt());
00301         hL1Muon2EtaAfterL1[i]->Fill(theL1MuonCollection[1].eta());
00302         hL1Muon2PhiAfterL1[i]->Fill(theL1MuonCollection[1].phi());
00303       }
00304     }
00305   }
00306   for(unsigned int i=0; i<hltbits_->size(); i++) {
00307     if(hltbits_->at(i)) {
00308       hL1MuonMultAfterHLT[i]->Fill(theL1MuonCollection.size());
00309       if(theL1MuonCollection.size()>0) {
00310         hL1Muon1PtAfterHLT[i]->Fill(theL1MuonCollection[0].pt());
00311         hL1Muon1EtaAfterHLT[i]->Fill(theL1MuonCollection[0].eta());
00312         hL1Muon1PhiAfterHLT[i]->Fill(theL1MuonCollection[0].phi());
00313       }
00314       if(theL1MuonCollection.size()>1) {
00315         hL1Muon2PtAfterHLT[i]->Fill(theL1MuonCollection[1].pt());
00316         hL1Muon2EtaAfterHLT[i]->Fill(theL1MuonCollection[1].eta());
00317         hL1Muon2PhiAfterHLT[i]->Fill(theL1MuonCollection[1].phi());
00318       }
00319     }
00320   }
00321 
00322   //**********************
00323   // Fill the MET Histos
00324   //**********************
00325   
00326   hL1MET->Fill(theL1METCollection[0].etMiss());
00327   hL1METx->Fill(theL1METCollection[0].px());
00328   hL1METy->Fill(theL1METCollection[0].py());
00329   hL1METphi->Fill(theL1METCollection[0].phi());
00330   hL1SumEt->Fill(theL1METCollection[0].etTotal());
00331   double L1MetSig = theL1METCollection[0].etMiss() / sqrt(theL1METCollection[0].etTotal());
00332   hL1METSignificance->Fill(L1MetSig);
00333   for(unsigned int i=0; i<l1bits_->size(); i++) {
00334     if(l1bits_->at(i)) {
00335       hL1METAfterL1[i]->Fill(theL1METCollection[0].etMiss());
00336       hL1METxAfterL1[i]->Fill(theL1METCollection[0].px());
00337       hL1METyAfterL1[i]->Fill(theL1METCollection[0].py());
00338       hL1METphiAfterL1[i]->Fill(theL1METCollection[0].phi());
00339       hL1SumEtAfterL1[i]->Fill(theL1METCollection[0].etTotal());
00340       hL1METSignificanceAfterL1[i]->Fill(L1MetSig);
00341     }
00342   }
00343   for(unsigned int i=0; i<hltbits_->size(); i++) {
00344     if(hltbits_->at(i)) {
00345       hL1METAfterHLT[i]->Fill(theL1METCollection[0].etMiss());
00346       hL1METxAfterHLT[i]->Fill(theL1METCollection[0].px());
00347       hL1METyAfterHLT[i]->Fill(theL1METCollection[0].py());
00348       hL1METphiAfterHLT[i]->Fill(theL1METCollection[0].phi());
00349       hL1SumEtAfterHLT[i]->Fill(theL1METCollection[0].etTotal());
00350       hL1METSignificanceAfterHLT[i]->Fill(L1MetSig);
00351     }
00352   }
00353 
00354 }
00355 
00356 
00357 
00358 
00359 void PlotMakerL1::bookHistos(DQMStore * dbe_, std::vector<int>* l1bits, std::vector<int>* hltbits, 
00360                            std::vector<std::string>* l1Names_, std::vector<std::string>* hlNames_)
00361 {
00362 
00363   this->setBits(l1bits, hltbits);
00364 
00365   //******************
00366   //Book histos for L1 Objects
00367   //******************
00368   
00369   
00370   //******************
00371   //Book Jets
00372   //******************
00373   //  std::string dirname_="HLTOffline/TriggerValidator/"; 
00374 
00375   dbe_->setCurrentFolder(dirname_+"/L1Jets/Central/General");
00376   hL1CentralJetMult = dbe_->book1D("JetMult", "Jet Multiplicity", 10, 0, 10);
00377   hL1CentralJet1Pt  = dbe_->book1D("Jet1Pt",  "Jet 1 Pt ",        100, 0, 1000);
00378   hL1CentralJet2Pt  = dbe_->book1D("Jet2Pt",  "Jet 2 Pt ",        100, 0, 1000);
00379   hL1CentralJet1Eta  = dbe_->book1D("Jet1Eta",  "Jet 1 Eta ",     100, -3, 3);
00380   hL1CentralJet2Eta  = dbe_->book1D("Jet2Eta",  "Jet 2 Eta ",     100, -3, 3);
00381   hL1CentralJet1Phi  = dbe_->book1D("Jet1Phi",  "Jet 1 Phi ",     100, -3.2, 3.2);
00382   hL1CentralJet2Phi  = dbe_->book1D("Jet2Phi",  "Jet 2 Phi ",     100, -3.2, 3.2);
00383 
00384   dbe_->setCurrentFolder(dirname_+"/L1Jets/Central/L1");
00385   for(unsigned int i=0; i<l1bits_->size(); i++){
00386     myHistoName = "JetMult_" + (*l1Names_)[i];
00387     myHistoTitle = "Jet Multiplicity for L1 path " + (*l1Names_)[i];
00388     hL1CentralJetMultAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10, 0, 10));
00389     myHistoName = "Jet1Pt_" + (*l1Names_)[i];
00390     myHistoTitle = "Jet 1 Pt for L1 path " + (*l1Names_)[i];
00391     hL1CentralJet1PtAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 1000));
00392     myHistoName = "Jet2Pt_" + (*l1Names_)[i];
00393     myHistoTitle = "Jet 2 Pt for L1 path " + (*l1Names_)[i];
00394     hL1CentralJet2PtAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 1000));
00395     myHistoName = "Jet1Eta_" + (*l1Names_)[i];
00396     myHistoTitle = "Jet 1 Eta for L1 path " + (*l1Names_)[i];
00397     hL1CentralJet1EtaAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3, 3));
00398     myHistoName = "Jet2Eta_" + (*l1Names_)[i];
00399     myHistoTitle = "Jet 2 Eta for L1 path " + (*l1Names_)[i];
00400     hL1CentralJet2EtaAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3, 3));
00401     myHistoName = "Jet1Phi_" + (*l1Names_)[i];
00402     myHistoTitle = "Jet 1 Phi for L1 path " + (*l1Names_)[i];
00403    hL1CentralJet1PhiAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3.2, 3.2));
00404     myHistoName = "Jet2Phi_" + (*l1Names_)[i];
00405     myHistoTitle = "Jet 2 Phi for L1 path " + (*l1Names_)[i];
00406     hL1CentralJet2PhiAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3.2, 3.2));
00407   }
00408 
00409   dbe_->setCurrentFolder(dirname_+"/L1Jets/Central/HLT");
00410   for(unsigned int i=0; i<hltbits_->size(); i++){
00411     myHistoName = "JetMult_" + (*hlNames_)[i];
00412     myHistoTitle = "Jet Multiplicity for HLT path " + (*hlNames_)[i];
00413     hL1CentralJetMultAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10, 0, 10));
00414     myHistoName = "Jet1Pt_" + (*hlNames_)[i];
00415     myHistoTitle = "Jet 1 Pt for HLT path " + (*hlNames_)[i];
00416     hL1CentralJet1PtAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 1000));
00417     myHistoName = "Jet2Pt_" + (*hlNames_)[i];
00418     myHistoTitle = "Jet 2 Pt for HLT path " + (*hlNames_)[i];
00419     hL1CentralJet2PtAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 1000));
00420     myHistoName = "Jet1Eta_" + (*hlNames_)[i];
00421     myHistoTitle = "Jet 1 Eta for HLT path " + (*hlNames_)[i];
00422     hL1CentralJet1EtaAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3, 3));
00423     myHistoName = "Jet2Eta_" + (*hlNames_)[i];
00424     myHistoTitle = "Jet 2 Eta for HLT path " + (*hlNames_)[i];
00425     hL1CentralJet2EtaAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3, 3));
00426     myHistoName = "Jet1Phi_" + (*hlNames_)[i];
00427     myHistoTitle = "Jet 1 Phi for HLT path " + (*hlNames_)[i];
00428     hL1CentralJet1PhiAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3.2, 3.2));
00429     myHistoName = "Jet2Phi_" + (*hlNames_)[i];
00430     myHistoTitle = "Jet 2 Phi for HLT path " + (*hlNames_)[i];
00431     hL1CentralJet2PhiAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3.2, 3.2));
00432   }
00433 
00434   dbe_->setCurrentFolder(dirname_+"/L1Jets/Forward/General");
00435   hL1ForwardJetMult = dbe_->book1D("JetMult", "Jet Multiplicity", 10, 0, 10);
00436   hL1ForwardJet1Pt  = dbe_->book1D("Jet1Pt",  "Jet 1 Pt ",        100, 0, 1000);
00437   hL1ForwardJet2Pt  = dbe_->book1D("Jet2Pt",  "Jet 2 Pt ",        100, 0, 1000);
00438   hL1ForwardJet1Eta  = dbe_->book1D("Jet1Eta",  "Jet 1 Eta ",        100, -3, 3);
00439   hL1ForwardJet2Eta  = dbe_->book1D("Jet2Eta",  "Jet 2 Eta ",        100, -3, 3);
00440   hL1ForwardJet1Phi  = dbe_->book1D("Jet1Phi",  "Jet 1 Phi ",        100, -3.2, 3.2);
00441   hL1ForwardJet2Phi  = dbe_->book1D("Jet2Phi",  "Jet 2 Phi ",        100, -3.2, 3.2);
00442 
00443 
00444   dbe_->setCurrentFolder(dirname_+"/L1Jets/Forward/L1");
00445   for(unsigned int i=0; i<l1bits_->size(); i++){
00446     myHistoName = "JetMult_" + (*l1Names_)[i];
00447     myHistoTitle = "Jet Multiplicity for L1 path " + (*l1Names_)[i];
00448     hL1ForwardJetMultAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10, 0, 10));
00449     myHistoName = "Jet1Pt_" + (*l1Names_)[i];
00450     myHistoTitle = "Jet 1 Pt for L1 path " + (*l1Names_)[i];
00451     hL1ForwardJet1PtAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 1000));
00452     myHistoName = "Jet2Pt_" + (*l1Names_)[i];
00453     myHistoTitle = "Jet 2 Pt for L1 path " + (*l1Names_)[i];
00454     hL1ForwardJet2PtAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 1000));
00455     myHistoName = "Jet1Eta_" + (*l1Names_)[i];
00456     myHistoTitle = "Jet 1 Eta for L1 path " + (*l1Names_)[i];
00457     hL1ForwardJet1EtaAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3, 3));
00458     myHistoName = "Jet2Eta_" + (*l1Names_)[i];
00459     myHistoTitle = "Jet 2 Eta for L1 path " + (*l1Names_)[i];
00460     hL1ForwardJet2EtaAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3, 3));
00461     myHistoName = "Jet1Phi_" + (*l1Names_)[i];
00462     myHistoTitle = "Jet 1 Phi for L1 path " + (*l1Names_)[i];
00463     hL1ForwardJet1PhiAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3.2, 3.2));
00464     myHistoName = "Jet2Phi_" + (*l1Names_)[i];
00465     myHistoTitle = "Jet 2 Phi for L1 path " + (*l1Names_)[i];
00466     hL1ForwardJet2PhiAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3.2, 3.2));
00467   }
00468 
00469   dbe_->setCurrentFolder(dirname_+"/L1Jets/Forward/HLT");
00470   for(unsigned int i=0; i<hltbits_->size(); i++){
00471     myHistoName = "JetMult_" + (*hlNames_)[i];
00472     myHistoTitle = "Jet Multiplicity for HLT path " + (*hlNames_)[i];
00473     hL1ForwardJetMultAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10, 0, 10));
00474     myHistoName = "Jet1Pt_" + (*hlNames_)[i];
00475     myHistoTitle = "Jet 1 Pt for HLT path " + (*hlNames_)[i];
00476     hL1ForwardJet1PtAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 1000));
00477     myHistoName = "Jet2Pt_" + (*hlNames_)[i];
00478     myHistoTitle = "Jet 2 Pt for HLT path " + (*hlNames_)[i];
00479     hL1ForwardJet2PtAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 1000));
00480     myHistoName = "Jet1Eta_" + (*hlNames_)[i];
00481     myHistoTitle = "Jet 1 Eta for HLT path " + (*hlNames_)[i];
00482     hL1ForwardJet1EtaAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3, 3));
00483     myHistoName = "Jet2Eta_" + (*hlNames_)[i];
00484     myHistoTitle = "Jet 2 Eta for HLT path " + (*hlNames_)[i];
00485     hL1ForwardJet2EtaAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3, 3));
00486     myHistoName = "Jet1Phi_" + (*hlNames_)[i];
00487     myHistoTitle = "Jet 1 Phi for HLT path " + (*hlNames_)[i];
00488     hL1ForwardJet1PhiAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3.2, 3.2));
00489     myHistoName = "Jet2Phi_" + (*hlNames_)[i];
00490     myHistoTitle = "Jet 2 Phi for HLT path " + (*hlNames_)[i];
00491     hL1ForwardJet2PhiAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3.2, 3.2));
00492   }
00493 
00494 
00495   dbe_->setCurrentFolder(dirname_+"/L1Jets/Tau/General");
00496   hL1TauJetMult = dbe_->book1D("JetMult", "Jet Multiplicity", 10, 0, 10);
00497   hL1TauJet1Pt  = dbe_->book1D("Jet1Pt",  "Jet 1 Pt ",        100, 0, 1000);
00498   hL1TauJet2Pt  = dbe_->book1D("Jet2Pt",  "Jet 2 Pt ",        100, 0, 1000);
00499   hL1TauJet1Eta  = dbe_->book1D("Jet1Eta",  "Jet 1 Eta ",        100, -3, 3);
00500   hL1TauJet2Eta  = dbe_->book1D("Jet2Eta",  "Jet 2 Eta ",        100, -3, 3);
00501   hL1TauJet1Phi  = dbe_->book1D("Jet1Phi",  "Jet 1 Phi ",        100, -3.2, 3.2);
00502   hL1TauJet2Phi  = dbe_->book1D("Jet2Phi",  "Jet 2 Phi ",        100, -3.2, 3.2);
00503 
00504   dbe_->setCurrentFolder(dirname_+"/L1Jets/Tau/L1");
00505   for(unsigned int i=0; i<l1bits_->size(); i++){
00506     myHistoName = "JetMult_" + (*l1Names_)[i];
00507     myHistoTitle = "Jet Multiplicity for L1 path " + (*l1Names_)[i];
00508     hL1TauJetMultAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10, 0, 10));
00509     myHistoName = "Jet1Pt_" + (*l1Names_)[i];
00510     myHistoTitle = "Jet 1 Pt for L1 path " + (*l1Names_)[i];
00511     hL1TauJet1PtAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 1000));
00512     myHistoName = "Jet2Pt_" + (*l1Names_)[i];
00513     myHistoTitle = "Jet 2 Pt for L1 path " + (*l1Names_)[i];
00514     hL1TauJet2PtAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 1000));
00515     myHistoName = "Jet1Eta_" + (*l1Names_)[i];
00516     myHistoTitle = "Jet 1 Eta for L1 path " + (*l1Names_)[i];
00517     hL1TauJet1EtaAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3, 3));
00518     myHistoName = "Jet2Eta_" + (*l1Names_)[i];
00519     myHistoTitle = "Jet 2 Eta for L1 path " + (*l1Names_)[i];
00520     hL1TauJet2EtaAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3, 3));
00521     myHistoName = "Jet1Phi_" + (*l1Names_)[i];
00522     myHistoTitle = "Jet 1 Phi for L1 path " + (*l1Names_)[i];
00523     hL1TauJet1PhiAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3.2, 3.2));
00524     myHistoName = "Jet2Phi_" + (*l1Names_)[i];
00525     myHistoTitle = "Jet 2 Phi for L1 path " + (*l1Names_)[i];
00526     hL1TauJet2PhiAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3.2, 3.2));
00527   }
00528 
00529   dbe_->setCurrentFolder(dirname_+"/L1Jets/Tau/HLT");
00530   for(unsigned int i=0; i<hltbits_->size(); i++){
00531     myHistoName = "JetMult_" + (*hlNames_)[i];
00532     myHistoTitle = "Jet Multiplicity for HLT path " + (*hlNames_)[i];
00533     hL1TauJetMultAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10, 0, 10));
00534     myHistoName = "Jet1Pt_" + (*hlNames_)[i];
00535     myHistoTitle = "Jet 1 Pt for HLT path " + (*hlNames_)[i];
00536     hL1TauJet1PtAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 1000));
00537     myHistoName = "Jet2Pt_" + (*hlNames_)[i];
00538     myHistoTitle = "Jet 2 Pt for HLT path " + (*hlNames_)[i];
00539     hL1TauJet2PtAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 1000));
00540     myHistoName = "Jet1Eta_" + (*hlNames_)[i];
00541     myHistoTitle = "Jet 1 Eta for HLT path " + (*hlNames_)[i];
00542     hL1TauJet1EtaAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3, 3));
00543     myHistoName = "Jet2Eta_" + (*hlNames_)[i];
00544     myHistoTitle = "Jet 2 Eta for HLT path " + (*hlNames_)[i];
00545     hL1TauJet2EtaAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3, 3));
00546     myHistoName = "Jet1Phi_" + (*hlNames_)[i];
00547     myHistoTitle = "Jet 1 Phi for HLT path " + (*hlNames_)[i];
00548     hL1TauJet1PhiAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3.2, 3.2));
00549     myHistoName = "Jet2Phi_" + (*hlNames_)[i];
00550     myHistoTitle = "Jet 2 Phi for HLT path " + (*hlNames_)[i];
00551     hL1TauJet2PhiAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3.2, 3.2));
00552   }
00553 
00554 
00555 
00556   dbe_->setCurrentFolder(dirname_+"/L1Em/Isolated/General");
00557   hL1EmIsoMult = dbe_->book1D("ElecMult", "Elec Multiplicity", 10, 0, 10);
00558   hL1EmIso1Pt  = dbe_->book1D("Elec1Pt",  "Elec 1 Pt ",        100, 0, 100);
00559   hL1EmIso2Pt  = dbe_->book1D("Elec2Pt",  "Elec 2 Pt ",        100, 0, 100);
00560   hL1EmIso1Eta  = dbe_->book1D("Elec1Eta",  "Elec 1 Eta ",        100, -3, 3);
00561   hL1EmIso2Eta  = dbe_->book1D("Elec2Eta",  "Elec 2 Eta ",        100, -3, 3);
00562   hL1EmIso1Phi  = dbe_->book1D("Elec1Phi",  "Elec 1 Phi ",        100, -3.2, 3.2);
00563   hL1EmIso2Phi  = dbe_->book1D("Elec2Phi",  "Elec 2 Phi ",        100, -3.2, 3.2);
00564   
00565   dbe_->setCurrentFolder(dirname_+"/L1Em/Isolated/L1");
00566   for(unsigned int i=0; i<l1bits_->size(); i++){
00567     myHistoName = "ElecMult_" + (*l1Names_)[i];
00568     myHistoTitle = "Elec Multiplicity for L1 path " + (*l1Names_)[i];
00569     hL1EmIsoMultAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10, 0, 10));
00570     myHistoName = "Elec1Pt_" + (*l1Names_)[i];
00571     myHistoTitle = "Elec 1 Pt for L1 path " + (*l1Names_)[i];
00572     hL1EmIso1PtAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 100));
00573     myHistoName = "Elec2Pt_" + (*l1Names_)[i];
00574     myHistoTitle = "Elec 2 Pt for L1 path " + (*l1Names_)[i];
00575     hL1EmIso2PtAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 100));
00576     myHistoName = "Elec1Eta_" + (*l1Names_)[i];
00577     myHistoTitle = "Elec 1 Eta for L1 path " + (*l1Names_)[i];
00578     hL1EmIso1EtaAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3, 3));
00579     myHistoName = "Elec2Eta_" + (*l1Names_)[i];
00580     myHistoTitle = "Elec 2 Eta for L1 path " + (*l1Names_)[i];
00581     hL1EmIso2EtaAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3, 3));
00582     myHistoName = "Elec1Phi_" + (*l1Names_)[i];
00583     myHistoTitle = "Elec 1 Phi for L1 path " + (*l1Names_)[i];
00584     hL1EmIso1PhiAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3.2, 3.2));
00585     myHistoName = "Elec2Phi_" + (*l1Names_)[i];
00586     myHistoTitle = "Elec 2 Phi for L1 path " + (*l1Names_)[i];
00587     hL1EmIso2PhiAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3.2, 3.2));
00588   }
00589 
00590   dbe_->setCurrentFolder(dirname_+"/L1Em/Isolated/HLT");
00591   for(unsigned int i=0; i<hltbits_->size(); i++){
00592     myHistoName = "ElecMult_" + (*hlNames_)[i];
00593     myHistoTitle = "Elec Multiplicity for HLT path " + (*hlNames_)[i];    
00594     hL1EmIsoMultAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10, 0, 10));
00595     myHistoName = "Elec1Pt_" + (*hlNames_)[i];
00596     myHistoTitle = "Elec 1 Pt for HLT path " + (*hlNames_)[i];
00597     hL1EmIso1PtAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 100));
00598     myHistoName = "Elec2Pt_" + (*hlNames_)[i];
00599     myHistoTitle = "Elec 2 Pt for HLT path " + (*hlNames_)[i];
00600     hL1EmIso2PtAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 100));
00601     myHistoName = "Elec1Eta_" + (*hlNames_)[i];
00602     myHistoTitle = "Elec 1 Eta for HLT path " + (*hlNames_)[i];
00603     hL1EmIso1EtaAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3, 3));
00604     myHistoName = "Elec2Eta_" + (*hlNames_)[i];
00605     myHistoTitle = "Elec 2 Eta for HLT path " + (*hlNames_)[i];
00606     hL1EmIso2EtaAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3, 3));
00607     myHistoName = "Elec1Phi_" + (*hlNames_)[i];
00608     myHistoTitle = "Elec 1 Phi for HLT path " + (*hlNames_)[i];
00609     hL1EmIso1PhiAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3.2, 3.2));
00610     myHistoName = "Elec2Phi_" + (*hlNames_)[i];
00611     myHistoTitle = "Elec 2 Phi for HLT path " + (*hlNames_)[i];
00612     hL1EmIso2PhiAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3.2, 3.2));
00613   }
00614   dbe_->setCurrentFolder(dirname_);
00615 
00616 
00617 
00618   dbe_->setCurrentFolder(dirname_+"/L1Em/NotIsolated/General");
00619   hL1EmNotIsoMult = dbe_->book1D("ElecMult", "Elec Multiplicity", 10, 0, 10);
00620   hL1EmNotIso1Pt  = dbe_->book1D("Elec1Pt",  "Elec 1 Pt ",        100, 0, 100);
00621   hL1EmNotIso2Pt  = dbe_->book1D("Elec2Pt",  "Elec 2 Pt ",        100, 0, 100);
00622   hL1EmNotIso1Eta  = dbe_->book1D("Elec1Eta",  "Elec 1 Eta ",        100, -3, 3);
00623   hL1EmNotIso2Eta  = dbe_->book1D("Elec2Eta",  "Elec 2 Eta ",        100, -3, 3);
00624   hL1EmNotIso1Phi  = dbe_->book1D("Elec1Phi",  "Elec 1 Phi ",        100, -3.2, 3.2);
00625   hL1EmNotIso2Phi  = dbe_->book1D("Elec2Phi",  "Elec 2 Phi ",        100, -3.2, 3.2);
00626   
00627   dbe_->setCurrentFolder(dirname_+"/L1Em/NotIsolated/L1");
00628   for(unsigned int i=0; i<l1bits_->size(); i++){
00629     myHistoName = "ElecMult_" + (*l1Names_)[i];
00630     myHistoTitle = "Elec Multiplicity for L1 path " + (*l1Names_)[i];
00631     hL1EmNotIsoMultAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10, 0, 10));
00632     myHistoName = "Elec1Pt_" + (*l1Names_)[i];
00633     myHistoTitle = "Elec 1 Pt for L1 path " + (*l1Names_)[i];
00634     hL1EmNotIso1PtAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 100));
00635     myHistoName = "Elec2Pt_" + (*l1Names_)[i];
00636     myHistoTitle = "Elec 2 Pt for L1 path " + (*l1Names_)[i];
00637     hL1EmNotIso2PtAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 100));
00638     myHistoName = "Elec1Eta_" + (*l1Names_)[i];
00639     myHistoTitle = "Elec 1 Eta for L1 path " + (*l1Names_)[i];
00640     hL1EmNotIso1EtaAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3, 3));
00641     myHistoName = "Elec2Eta_" + (*l1Names_)[i];
00642     myHistoTitle = "Elec 2 Eta for L1 path " + (*l1Names_)[i];
00643     hL1EmNotIso2EtaAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3, 3));
00644     myHistoName = "Elec1Phi_" + (*l1Names_)[i];
00645     myHistoTitle = "Elec 1 Phi for L1 path " + (*l1Names_)[i];
00646     hL1EmNotIso1PhiAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3.2, 3.2));
00647     myHistoName = "Elec2Phi_" + (*l1Names_)[i];
00648     myHistoTitle = "Elec 2 Phi for L1 path " + (*l1Names_)[i];
00649     hL1EmNotIso2PhiAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3.2, 3.2));
00650    }
00651 
00652   dbe_->setCurrentFolder(dirname_+"/L1Em/NotIsolated/HLT");
00653   for(unsigned int i=0; i<hltbits_->size(); i++){
00654     myHistoName = "ElecMult_" + (*hlNames_)[i];
00655     myHistoTitle = "Elec Multiplicity for HLT path " + (*hlNames_)[i];    
00656     hL1EmNotIsoMultAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10, 0, 10));
00657     myHistoName = "Elec1Pt_" + (*hlNames_)[i];
00658     myHistoTitle = "Elec 1 Pt for HLT path " + (*hlNames_)[i];
00659     hL1EmNotIso1PtAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 100));
00660     myHistoName = "Elec2Pt_" + (*hlNames_)[i];
00661     myHistoTitle = "Elec 2 Pt for HLT path " + (*hlNames_)[i];
00662     hL1EmNotIso2PtAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 100));
00663     myHistoName = "Elec1Eta_" + (*hlNames_)[i];
00664     myHistoTitle = "Elec 1 Eta for HLT path " + (*hlNames_)[i];
00665     hL1EmNotIso1EtaAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3, 3));
00666     myHistoName = "Elec2Eta_" + (*hlNames_)[i];
00667     myHistoTitle = "Elec 2 Eta for HLT path " + (*hlNames_)[i];
00668     hL1EmNotIso2EtaAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3, 3));
00669     myHistoName = "Elec1Phi_" + (*hlNames_)[i];
00670     myHistoTitle = "Elec 1 Phi for HLT path " + (*hlNames_)[i];
00671     hL1EmNotIso1PhiAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3.2, 3.2));
00672     myHistoName = "Elec2Phi_" + (*hlNames_)[i];
00673     myHistoTitle = "Elec 2 Phi for HLT path " + (*hlNames_)[i];
00674     hL1EmNotIso2PhiAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3.2, 3.2));
00675   }
00676   dbe_->setCurrentFolder(dirname_);
00677 
00678   //******************
00679   //Book Muons
00680   //******************
00681   
00682   dbe_->setCurrentFolder(dirname_+"/L1Muons/General");
00683   hL1MuonMult = dbe_->book1D("MuonMult", "Muon Multiplicity", 10, 0, 10);
00684   hL1Muon1Pt  = dbe_->book1D("Muon1Pt",  "Muon 1 Pt ",        100, 0, 100);
00685   hL1Muon2Pt  = dbe_->book1D("Muon2Pt",  "Muon 2 Pt ",        100, 0, 100);
00686   hL1Muon1Eta  = dbe_->book1D("Muon1Eta",  "Muon 1 Eta ",        100, -3, 3);
00687   hL1Muon2Eta  = dbe_->book1D("Muon2Eta",  "Muon 2 Eta ",        100, -3, 3);
00688   hL1Muon1Phi  = dbe_->book1D("Muon1Phi",  "Muon 1 Phi ",        100, -3.2, 3.2);
00689   hL1Muon2Phi  = dbe_->book1D("Muon2Phi",  "Muon 2 Phi ",        100, -3.2, 3.2);
00690   
00691   dbe_->setCurrentFolder(dirname_+"/L1Muons/L1");
00692   for(unsigned int i=0; i<l1bits_->size(); i++){
00693     myHistoName = "MuonMult_" + (*l1Names_)[i];
00694     myHistoTitle = "Muon Multiplicity for L1 path " + (*l1Names_)[i];
00695     hL1MuonMultAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10, 0, 10));
00696     myHistoName = "Muon1Pt_" + (*l1Names_)[i];
00697     myHistoTitle = "Muon 1 Pt for L1 path " + (*l1Names_)[i];
00698     hL1Muon1PtAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 100));
00699     myHistoName = "Muon2Pt_" + (*l1Names_)[i];
00700     myHistoTitle = "Muon 2 Pt for L1 path " + (*l1Names_)[i];
00701     hL1Muon2PtAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 100));
00702     myHistoName = "Muon1Eta_" + (*l1Names_)[i];
00703     myHistoTitle = "Muon 1 Eta for L1 path " + (*l1Names_)[i];
00704     hL1Muon1EtaAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3, 3));
00705     myHistoName = "Muon2Eta_" + (*l1Names_)[i];
00706     myHistoTitle = "Muon 2 Eta for L1 path " + (*l1Names_)[i];
00707     hL1Muon2EtaAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3, 3));
00708     myHistoName = "Muon1Phi_" + (*l1Names_)[i];
00709     myHistoTitle = "Muon 1 Phi for L1 path " + (*l1Names_)[i];
00710     hL1Muon1PhiAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3.2, 3.2));
00711     myHistoName = "Muon2Phi_" + (*l1Names_)[i];
00712     myHistoTitle = "Muon 2 Phi for L1 path " + (*l1Names_)[i];
00713     hL1Muon2PhiAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3.2, 3.2));
00714   }
00715 
00716   dbe_->setCurrentFolder(dirname_+"/L1Muons/HLT");
00717   for(unsigned int i=0; i<hltbits_->size(); i++){
00718     myHistoName = "MuonMult_" + (*hlNames_)[i];
00719     myHistoTitle = "Muon Multiplicity for HLT path " + (*hlNames_)[i];    
00720     hL1MuonMultAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 10, 0, 10));
00721     myHistoName = "Muon1Pt_" + (*hlNames_)[i];
00722     myHistoTitle = "Muon 1 Pt for HLT path " + (*hlNames_)[i];
00723     hL1Muon1PtAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 100));
00724     myHistoName = "Muon2Pt_" + (*hlNames_)[i];
00725     myHistoTitle = "Muon 2 Pt for HLT path " + (*hlNames_)[i];
00726     hL1Muon2PtAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 100));
00727     myHistoName = "Muon1Eta_" + (*hlNames_)[i];
00728     myHistoTitle = "Muon 1 Eta for HLT path " + (*hlNames_)[i];
00729     hL1Muon1EtaAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3, 3));
00730     myHistoName = "Muon2Eta_" + (*hlNames_)[i];
00731     myHistoTitle = "Muon 2 Eta for HLT path " + (*hlNames_)[i];
00732     hL1Muon2EtaAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3, 3));
00733     myHistoName = "Muon1Phi_" + (*hlNames_)[i];
00734     myHistoTitle = "Muon 1 Phi for HLT path " + (*hlNames_)[i];
00735     hL1Muon1PhiAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3.2, 3.2));
00736     myHistoName = "Muon2Phi_" + (*hlNames_)[i];
00737     myHistoTitle = "Muon 2 Phi for HLT path " + (*hlNames_)[i];
00738     hL1Muon2PhiAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3.2, 3.2));
00739   }
00740   dbe_->setCurrentFolder(dirname_);
00741 
00742 
00743 
00744   //******************
00745   //Book MET
00746   //******************
00747   
00748   dbe_->setCurrentFolder(dirname_+"/L1MET/General");
00749   hL1MET = dbe_->book1D("MET", "MET", 35, 0, 1050);
00750   hL1METx   = dbe_->book1D("METx", "METx", 35, 0, 1050);
00751   hL1METy   = dbe_->book1D("METy", "METy", 35, 0, 1050);
00752   hL1METphi = dbe_->book1D("METphi", "METphi", 100, -3.2, 3.2);
00753   hL1SumEt  = dbe_->book1D("SumEt", "SumEt", 35, 0, 1050);
00754   hL1METSignificance = dbe_->book1D("METSignificance", "METSignificance", 100, 0, 100);
00755 
00756 
00757   dbe_->setCurrentFolder(dirname_+"/L1MET/L1");
00758   for(unsigned int i=0; i<l1bits_->size(); i++){
00759     myHistoName = "MET_" + (*l1Names_)[i];
00760     myHistoTitle = "MET for L1 path " + (*l1Names_)[i];
00761     hL1METAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 35, 0, 1050));
00762     myHistoName = "METx_" + (*l1Names_)[i];
00763     myHistoTitle = "METx for L1 path " + (*l1Names_)[i];
00764     hL1METxAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 35, 0, 1050));
00765     myHistoName = "METy_" + (*l1Names_)[i];
00766     myHistoTitle = "METy for L1 path " + (*l1Names_)[i];
00767     hL1METyAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 35, 0, 1050));
00768     myHistoName = "METphi_" + (*l1Names_)[i];
00769     myHistoTitle = "METphi for L1 path " + (*l1Names_)[i];
00770     hL1METphiAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3.2, 3.2));
00771     myHistoName = "SumEt_" + (*l1Names_)[i];
00772     myHistoTitle = "SumEt for L1 path " + (*l1Names_)[i];
00773     hL1SumEtAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 35, 0, 1050));
00774     myHistoName = "METSignificance_" + (*l1Names_)[i];
00775     myHistoTitle = "METSignificance for L1 path " + (*l1Names_)[i];
00776     hL1METSignificanceAfterL1.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 100));
00777   }
00778 
00779   dbe_->setCurrentFolder(dirname_+"/L1MET/HLT");
00780   for(unsigned int i=0; i<hltbits_->size(); i++){
00781     myHistoName = "MET_" + (*hlNames_)[i];
00782     myHistoTitle = "MET for HLT path " + (*hlNames_)[i];    
00783     hL1METAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 35, 0, 1050));
00784     myHistoName = "METx_" + (*hlNames_)[i];
00785     myHistoTitle = "METx for HLT path " + (*hlNames_)[i];    
00786     hL1METxAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 35, 0, 1050));
00787     myHistoName = "METy_" + (*hlNames_)[i];
00788     myHistoTitle = "METy for HLT path " + (*hlNames_)[i];    
00789     hL1METyAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 35, 0, 1050));
00790     myHistoName = "METphi_" + (*hlNames_)[i];
00791     myHistoTitle = "METphi for HLT path " + (*hlNames_)[i];    
00792     hL1METphiAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, -3.2, 3.2));
00793     myHistoName = "SumEt_" + (*hlNames_)[i];
00794     myHistoTitle = "SumEt for HLT path " + (*hlNames_)[i];    
00795     hL1SumEtAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 35, 0, 1050));
00796     myHistoName = "METSignificance_" + (*hlNames_)[i];
00797     myHistoTitle = "METSignificance for HLT path " + (*hlNames_)[i];    
00798     hL1METSignificanceAfterHLT.push_back(dbe_->book1D(myHistoName.c_str(), myHistoTitle.c_str() , 100, 0, 100));
00799   }
00800   dbe_->setCurrentFolder(dirname_);
00801 
00802 
00803 
00804 }
00805 
00806 
00807 
00808 
00809 
00810 void PlotMakerL1::handleObjects(const edm::Event& iEvent)
00811 {
00812 
00813 
00814   //**************************************************
00815   // Get the L1 Objects through the l1extra Collection
00816   //**************************************************
00817 
00818   //Get the EM objects
00819 
00820   Handle<l1extra::L1EmParticleCollection> theL1EmIsoHandle, theL1EmNotIsoHandle;
00821   iEvent.getByLabel(m_l1extra,"Isolated",theL1EmIsoHandle);
00822   iEvent.getByLabel(m_l1extra,"NonIsolated",theL1EmNotIsoHandle);
00823   theL1EmIsoCollection = *theL1EmIsoHandle;
00824   std::sort(theL1EmIsoCollection.begin(), theL1EmIsoCollection.end(), PtSorter());
00825   theL1EmNotIsoCollection = *theL1EmNotIsoHandle;
00826   std::sort(theL1EmNotIsoCollection.begin(), theL1EmNotIsoCollection.end(), PtSorter());
00827 
00828   //Get the Muons  
00829   Handle<l1extra::L1MuonParticleCollection> theL1MuonHandle;
00830   iEvent.getByLabel(m_l1extra,theL1MuonHandle);
00831   theL1MuonCollection = *theL1MuonHandle;
00832   std::sort(theL1MuonCollection.begin(), theL1MuonCollection.end(),PtSorter());
00833 
00834   //Get the Jets
00835   Handle<l1extra::L1JetParticleCollection> theL1CentralJetHandle,theL1ForwardJetHandle,theL1TauJetHandle;
00836   iEvent.getByLabel(m_l1extra,"Central",theL1CentralJetHandle);
00837   iEvent.getByLabel(m_l1extra,"Forward",theL1ForwardJetHandle);
00838   iEvent.getByLabel(m_l1extra,"Tau",theL1TauJetHandle);
00839   theL1CentralJetCollection = *theL1CentralJetHandle;
00840   std::sort(theL1CentralJetCollection.begin(), theL1CentralJetCollection.end(), PtSorter());
00841   theL1ForwardJetCollection = *theL1ForwardJetHandle;
00842   std::sort(theL1ForwardJetCollection.begin(), theL1ForwardJetCollection.end(), PtSorter());
00843   theL1TauJetCollection = *theL1TauJetHandle;
00844   std::sort(theL1TauJetCollection.begin(), theL1TauJetCollection.end(), PtSorter());
00845 
00846 
00847   //Get the MET
00848   Handle<l1extra::L1EtMissParticleCollection> theL1METHandle;
00849   iEvent.getByLabel(m_l1extra,"MET",theL1METHandle);
00850   //iEvent.getByLabel(m_l1extra,theL1METHandle);
00851   theL1METCollection = *theL1METHandle;
00852   std::sort(theL1METCollection.begin(), theL1METCollection.end(),PtSorter());
00853 
00854 }
00855 
00856 double PlotMakerL1::invariantMass(reco::Candidate* p1, reco::Candidate* p2) {
00857   double mass = sqrt( (p1->energy() + p2->energy())*(p1->energy() + p2->energy()) -
00858                (p1->px() + p2->px())*(p1->px() + p2->px()) -
00859                (p1->py() + p2->py())*(p1->py() + p2->py()) -
00860                (p1->pz() + p2->pz())*(p1->pz() + p2->pz()) );
00861 
00862 
00863 //   cout << "p1->energy() = " << p1->energy() << " p2->energy() = " << p2->energy() << endl;
00864 //   cout << "p1->px() = " << p1->px() << " p2->px() = " << p2->px() << endl;
00865 //   cout << "p1->py() = " << p1->py() << " p2->py() = " << p2->py() << endl;
00866 //   cout << "p1->pz() = " << p1->pz() << " p2->pz() = " << p2->pz() << endl;
00867 //   cout << "invmass = " << mass << endl;
00868 
00869 
00870   return mass;
00871 }
00872