CMS 3D CMS Logo

FourVectorHLTOffline.cc

Go to the documentation of this file.
00001 // $Id: FourVectorHLTOffline.cc,v 1.18 2008/12/11 17:39:49 berryhil Exp $
00002 // See header file for information. 
00003 #include "FWCore/Framework/interface/EDAnalyzer.h"
00004 #include "DataFormats/Common/interface/Handle.h"
00005 #include "FWCore/Framework/interface/Run.h"
00006 #include "FWCore/Framework/interface/MakerMacros.h"
00007 
00008 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00009 #include "DQMOffline/Trigger/interface/FourVectorHLTOffline.h"
00010 
00011 #include "DataFormats/HLTReco/interface/TriggerObject.h"
00012 #include "FWCore/Framework/interface/TriggerNames.h"
00013 #include "DataFormats/Common/interface/TriggerResults.h"
00014 #include "DataFormats/HLTReco/interface/TriggerEvent.h"
00015 #include "DataFormats/HLTReco/interface/TriggerTypeDefs.h"
00016 #include "HLTrigger/HLTcore/interface/HLTConfigProvider.h"
00017 
00018 #include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h"
00019 #include "DataFormats/EgammaCandidates/interface/PhotonFwd.h"
00020 #include "DataFormats/EgammaCandidates/interface/Photon.h"
00021 #include "DataFormats/MuonReco/interface/MuonFwd.h"
00022 #include "DataFormats/MuonReco/interface/Muon.h"
00023 #include "DataFormats/JetReco/interface/CaloJetCollection.h"
00024 #include "DataFormats/JetReco/interface/CaloJet.h"
00025 #include "DataFormats/TauReco/interface/CaloTauFwd.h"
00026 #include "DataFormats/TauReco/interface/CaloTau.h"
00027 #include "DataFormats/METReco/interface/CaloMETCollection.h"
00028 #include "DataFormats/METReco/interface/CaloMET.h"
00029 
00030 #include "DataFormats/L1Trigger/interface/L1EmParticle.h"
00031 #include "DataFormats/L1Trigger/interface/L1EmParticleFwd.h"
00032 #include "DataFormats/L1Trigger/interface/L1JetParticle.h"
00033 #include "DataFormats/L1Trigger/interface/L1JetParticleFwd.h"
00034 #include "DataFormats/L1Trigger/interface/L1MuonParticle.h"
00035 #include "DataFormats/L1Trigger/interface/L1MuonParticleFwd.h"
00036 #include "DataFormats/L1Trigger/interface/L1EtMissParticle.h"
00037 #include "DataFormats/L1Trigger/interface/L1EtMissParticleFwd.h"
00038 
00039 #include "PhysicsTools/Utilities/interface/deltaR.h"
00040 
00041 #include "DQMServices/Core/interface/MonitorElement.h"
00042 
00043 using namespace edm;
00044 
00045 FourVectorHLTOffline::FourVectorHLTOffline(const edm::ParameterSet& iConfig):
00046   resetMe_(true),  currentRun_(-99)
00047 {
00048   LogDebug("FourVectorHLTOffline") << "constructor...." ;
00049 
00050   dbe_ = Service < DQMStore > ().operator->();
00051   if ( ! dbe_ ) {
00052     LogInfo("FourVectorHLTOffline") << "unabel to get DQMStore service?";
00053   }
00054   if (iConfig.getUntrackedParameter < bool > ("DQMStore", false)) {
00055     dbe_->setVerbose(0);
00056   }
00057   
00058   
00059   dirname_="HLTOffline/FourVectorHLTOffline" + 
00060     iConfig.getParameter<std::string>("@module_label");
00061   
00062   if (dbe_ != 0 ) {
00063     dbe_->setCurrentFolder(dirname_);
00064   }
00065   
00066   processname_ = iConfig.getParameter<std::string>("processname");
00067 
00068   // plotting paramters
00069   ptMin_ = iConfig.getUntrackedParameter<double>("ptMin",0.);
00070   ptMax_ = iConfig.getUntrackedParameter<double>("ptMax",1000.);
00071   nBins_ = iConfig.getUntrackedParameter<unsigned int>("Nbins",40);
00072   
00073   plotAll_ = iConfig.getUntrackedParameter<bool>("plotAll", false);
00074 
00075   if (!plotAll_)
00076  {
00077   // this is the list of paths to look at.
00078   std::vector<edm::ParameterSet> paths = 
00079     iConfig.getParameter<std::vector<edm::ParameterSet> >("paths");
00080   for(std::vector<edm::ParameterSet>::iterator 
00081         pathconf = paths.begin() ; pathconf != paths.end(); 
00082       pathconf++) {
00083     std::string denompathname = pathconf->getParameter<std::string>("denompathname");  
00084     std::string pathname = pathconf->getParameter<std::string>("pathname");  
00085     std::string l1pathname = pathconf->getParameter<std::string>("l1pathname");  
00086     std::string filtername = pathconf->getParameter<std::string>("filtername");
00087     int objectType = pathconf->getParameter<unsigned int>("type");
00088     float ptMin = pathconf->getUntrackedParameter<double>("ptMin");
00089     float ptMax = pathconf->getUntrackedParameter<double>("ptMax");
00090     hltPaths_.push_back(PathInfo(denompathname, pathname, l1pathname, filtername, processname_, objectType, ptMin, ptMax));
00091   }
00092 
00093   if (hltPaths_.size() > 0)
00094     {
00095       // book a histogram of scalers
00096      scalersSelect = dbe_->book1D("selectedScalers","Selected Scalers", hltPaths_.size(), 0.0, (double)hltPaths_.size());
00097     }
00098 
00099  }
00100   triggerSummaryLabel_ = 
00101     iConfig.getParameter<edm::InputTag>("triggerSummaryLabel");
00102   triggerResultsLabel_ = 
00103     iConfig.getParameter<edm::InputTag>("triggerResultsLabel");
00104  
00105   
00106 }
00107 
00108 
00109 FourVectorHLTOffline::~FourVectorHLTOffline()
00110 {
00111  
00112    // do anything here that needs to be done at desctruction time
00113    // (e.g. close files, deallocate resources etc.)
00114 
00115 }
00116 
00117 
00118 //
00119 // member functions
00120 //
00121 
00122 // ------------ method called to for each event  ------------
00123 void
00124 FourVectorHLTOffline::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup)
00125 {
00126   using namespace edm;
00127   using namespace trigger;
00128   using namespace l1extra;
00129   ++nev_;
00130   LogDebug("FourVectorHLTOffline")<< "FourVectorHLTOffline: analyze...." ;
00131   
00132   edm::Handle<TriggerResults> triggerResults;
00133   iEvent.getByLabel(triggerResultsLabel_,triggerResults);
00134   if(!triggerResults.isValid()) { 
00135     edm::LogInfo("FourVectorHLTOffline") << "TriggerResults not found, "
00136       "skipping event"; 
00137     return;
00138   }
00139   TriggerNames triggerNames(*triggerResults);  
00140   int npath = triggerResults->size();
00141 
00142   edm::Handle<TriggerEvent> triggerObj;
00143   iEvent.getByLabel(triggerSummaryLabel_,triggerObj); 
00144   if(!triggerObj.isValid()) { 
00145     edm::LogInfo("FourVectorHLTOffline") << "Summary HLT objects not found, "
00146       "skipping event"; 
00147     return;
00148   }
00149   
00150   const trigger::TriggerObjectCollection & toc(triggerObj->getObjects());
00151 
00152 
00153   edm::Handle<reco::MuonCollection> muonHandle;
00154   iEvent.getByLabel("muons",muonHandle);
00155   if(!muonHandle.isValid()) { 
00156     edm::LogInfo("FourVectorHLTOffline") << "muonHandle not found, ";
00157     //  "skipping event"; 
00158     //  return;
00159    }
00160 
00161   edm::Handle<l1extra::L1MuonParticleCollection> l1MuonHandle;
00162   iEvent.getByType(l1MuonHandle);
00163   if(!l1MuonHandle.isValid()) { 
00164     edm::LogInfo("FourVectorHLTOffline") << "l1MuonHandle not found, "
00165     "skipping event"; 
00166     return;
00167    }
00168   const l1extra::L1MuonParticleCollection l1MuonCollection = *(l1MuonHandle.product());
00169 
00170   edm::Handle<reco::PixelMatchGsfElectronCollection> gsfElectrons;
00171   iEvent.getByLabel("pixelMatchGsfElectrons",gsfElectrons); 
00172   if(!gsfElectrons.isValid()) { 
00173     edm::LogInfo("FourVectorHLTOffline") << "gsfElectrons not found, ";
00174       //"skipping event"; 
00175       //return;
00176   }
00177 
00178   std::vector<edm::Handle<l1extra::L1EmParticleCollection> > l1ElectronHandleList;
00179   iEvent.getManyByType(l1ElectronHandleList);        
00180   std::vector<edm::Handle<l1extra::L1EmParticleCollection> >::iterator l1ElectronHandle;
00181 
00182   
00183   edm::Handle<reco::CaloTauCollection> tauHandle;
00184   iEvent.getByLabel("caloRecoTauProducer",tauHandle);
00185   if(!tauHandle.isValid()) { 
00186     edm::LogInfo("FourVectorHLTOffline") << "tauHandle not found, ";
00187       //"skipping event"; 
00188       //return;
00189   }
00190 
00191 
00192 
00193   std::vector<edm::Handle<l1extra::L1JetParticleCollection> > l1TauHandleList;
00194   iEvent.getManyByType(l1TauHandleList);        
00195   std::vector<edm::Handle<l1extra::L1JetParticleCollection> >::iterator l1TauHandle;
00196 
00197   edm::Handle<reco::CaloJetCollection> jetHandle;
00198   iEvent.getByLabel("iterativeCone5CaloJets",jetHandle);
00199   if(!jetHandle.isValid()) { 
00200     edm::LogInfo("FourVectorHLTOffline") << "jetHandle not found, ";
00201       //"skipping event"; 
00202       //return;
00203   }
00204 
00205 
00206   std::vector<edm::Handle<l1extra::L1JetParticleCollection> > l1JetHandleList;
00207   iEvent.getManyByType(l1JetHandleList);        
00208   std::vector<edm::Handle<l1extra::L1JetParticleCollection> >::iterator l1JetHandle;
00209 
00210   edm::Handle<reco::CaloMETCollection> metHandle;
00211   iEvent.getByLabel("met",metHandle);
00212   if(!metHandle.isValid()) { 
00213     edm::LogInfo("FourVectorHLTOffline") << "metHandle not found, ";
00214       //"skipping event"; 
00215       //return;
00216   }
00217 
00218 
00219   Handle< L1EtMissParticleCollection > l1MetHandle ;
00220   iEvent.getByType(l1MetHandle) ;
00221   if(!l1MetHandle.isValid()) { 
00222     edm::LogInfo("FourVectorHLTOffline") << "l1MetHandle not found, "
00223     "skipping event"; 
00224     return;
00225   }
00226   const l1extra::L1EtMissParticleCollection l1MetCollection = *(l1MetHandle.product());
00227 
00228   edm::Handle<reco::PhotonCollection> photonHandle;
00229   iEvent.getByLabel("photons",photonHandle);
00230   if(!photonHandle.isValid()) { 
00231     edm::LogInfo("FourVectorHLTOffline") << "photonHandle not found, ";
00232       //"skipping event"; 
00233       //return;
00234   }
00235 
00236 
00237   std::vector<edm::Handle<l1extra::L1EmParticleCollection> > l1PhotonHandleList;
00238   iEvent.getManyByType(l1PhotonHandleList);        
00239   std::vector<edm::Handle<l1extra::L1EmParticleCollection> >::iterator l1PhotonHandle;
00240  
00241     for(PathInfoCollection::iterator v = hltPaths_.begin();
00242         v!= hltPaths_.end(); ++v ) 
00243 { 
00244 
00245   // did we pass the denomPath?
00246   bool denompassed = false;
00247   for(int i = 0; i < npath; ++i) {
00248      if (triggerNames.triggerName(i) == v->getDenomPath() && triggerResults->accept(i)) denompassed = true;
00249   }
00250 
00251   if (denompassed)
00252     {  
00253 
00254 
00255 
00256       // ok plot denominator L1, and denominator offline, and numerator L1Off objects 
00257       int triggertype = 0;     
00258       //if (idtype.size() > 0) triggertype = *idtype.begin();
00259       triggertype = v->getObjectType();
00260 
00261 
00262       // for muon triggers, loop over and fill offline 4-vectors
00263       if (triggertype == trigger::TriggerMuon || triggertype == trigger::TriggerL1Mu){
00264         if (muonHandle.isValid()){
00265          const reco::MuonCollection muonCollection = *(muonHandle.product());
00266          for (reco::MuonCollection::const_iterator muonIter=muonCollection.begin(); muonIter!=muonCollection.end(); muonIter++)
00267          {
00268           v->getOffEtOffHisto()->Fill((*muonIter).pt());
00269           v->getOffEtaOffHisto()->Fill((*muonIter).eta());
00270           v->getOffPhiOffHisto()->Fill((*muonIter).phi());
00271           v->getOffEtaVsOffPhiOffHisto()->Fill((*muonIter).eta(),(*muonIter).phi());
00272          }
00273         }
00274          for (l1extra::L1MuonParticleCollection::const_iterator l1MuonIter=l1MuonCollection.begin(); l1MuonIter!=l1MuonCollection.end(); l1MuonIter++)
00275          {
00276           v->getL1EtL1Histo()->Fill((*l1MuonIter).pt());
00277           v->getL1EtaL1Histo()->Fill((*l1MuonIter).eta());
00278           v->getL1PhiL1Histo()->Fill((*l1MuonIter).phi());
00279           v->getL1EtaVsL1PhiL1Histo()->Fill((*l1MuonIter).eta(),(*l1MuonIter).phi());
00280           if (muonHandle.isValid()){
00281          const reco::MuonCollection muonCollection = *(muonHandle.product());
00282          for (reco::MuonCollection::const_iterator muonIter=muonCollection.begin(); muonIter!=muonCollection.end(); muonIter++)
00283          {
00284            if (reco::deltaR((*muonIter).eta(),(*muonIter).phi(),(*l1MuonIter).eta(),(*l1MuonIter).phi()) < 0.3){
00285           v->getOffEtL1OffHisto()->Fill((*muonIter).pt());
00286           v->getOffEtaL1OffHisto()->Fill((*muonIter).eta());
00287           v->getOffPhiL1OffHisto()->Fill((*muonIter).phi());
00288           v->getOffEtaVsOffPhiL1OffHisto()->Fill((*muonIter).eta(),(*muonIter).phi());
00289            }}
00290          }
00291          }
00292       }
00293       // for electron triggers, loop over and fill offline 4-vectors
00294       else if (triggertype == trigger::TriggerElectron)
00295         {
00296           //      std::cout << "Electron trigger" << std::endl;
00297           if (gsfElectrons.isValid()){
00298          for (reco::PixelMatchGsfElectronCollection::const_iterator gsfIter=gsfElectrons->begin(); gsfIter!=gsfElectrons->end(); gsfIter++)
00299          {
00300           v->getOffEtOffHisto()->Fill(gsfIter->pt());
00301           v->getOffEtaOffHisto()->Fill(gsfIter->eta());
00302           v->getOffPhiOffHisto()->Fill(gsfIter->phi());
00303           v->getOffEtaVsOffPhiOffHisto()->Fill(gsfIter->eta(), gsfIter->phi());
00304          }}
00305          for (l1ElectronHandle=l1ElectronHandleList.begin(); l1ElectronHandle!=l1ElectronHandleList.end(); l1ElectronHandle++) {
00306 
00307          const L1EmParticleCollection l1ElectronCollection = *(l1ElectronHandle->product());
00308            for (L1EmParticleCollection::const_iterator l1ElectronIter=l1ElectronCollection.begin(); l1ElectronIter!=l1ElectronCollection.end(); l1ElectronIter++){
00309           v->getL1EtL1Histo()->Fill((*l1ElectronIter).pt());
00310           v->getL1EtaL1Histo()->Fill((*l1ElectronIter).eta());
00311           v->getL1PhiL1Histo()->Fill((*l1ElectronIter).phi());
00312           v->getL1EtaVsL1PhiL1Histo()->Fill((*l1ElectronIter).eta(),(*l1ElectronIter).phi());
00313           if (gsfElectrons.isValid()){
00314          for (reco::PixelMatchGsfElectronCollection::const_iterator gsfIter=gsfElectrons->begin(); gsfIter!=gsfElectrons->end(); gsfIter++)
00315          {
00316            if (reco::deltaR(gsfIter->eta(),gsfIter->phi(),(*l1ElectronIter).eta(),(*l1ElectronIter).phi()) < 0.3){
00317           v->getOffEtL1OffHisto()->Fill(gsfIter->pt());
00318           v->getOffEtaL1OffHisto()->Fill(gsfIter->eta());
00319           v->getOffPhiL1OffHisto()->Fill(gsfIter->phi());
00320           v->getOffEtaVsOffPhiL1OffHisto()->Fill(gsfIter->eta(), gsfIter->phi());}
00321          }}
00322            }
00323            }
00324         }
00325     
00326 
00327       // for tau triggers, loop over and fill offline 4-vectors
00328       else if (triggertype == trigger::TriggerTau)
00329         {
00330           if (tauHandle.isValid()){
00331             const reco::CaloTauCollection tauCollection = *(tauHandle.product());
00332          for (reco::CaloTauCollection::const_iterator tauIter=tauCollection.begin(); tauIter!=tauCollection.end(); tauIter++)
00333          {
00334           v->getOffEtOffHisto()->Fill((*tauIter).pt());
00335           v->getOffEtaOffHisto()->Fill((*tauIter).eta());
00336           v->getOffPhiOffHisto()->Fill((*tauIter).phi());
00337           v->getOffEtaVsOffPhiOffHisto()->Fill((*tauIter).eta(),(*tauIter).phi());
00338          }}
00339          for (l1TauHandle=l1TauHandleList.begin(); l1TauHandle!=l1TauHandleList.end(); l1TauHandle++) {
00340            if (!l1TauHandle->isValid())
00341              {
00342             edm::LogInfo("FourVectorHLTOffline") << "l1TauHandle not found, "
00343             "skipping event"; 
00344             return;
00345              } 
00346          const L1JetParticleCollection l1TauCollection = *(l1TauHandle->product());
00347            for (L1JetParticleCollection::const_iterator l1TauIter=l1TauCollection.begin(); l1TauIter!=l1TauCollection.end(); l1TauIter++){
00348           v->getL1EtL1Histo()->Fill((*l1TauIter).pt());
00349           v->getL1EtaL1Histo()->Fill((*l1TauIter).eta());
00350           v->getL1PhiL1Histo()->Fill((*l1TauIter).phi());
00351           v->getL1EtaVsL1PhiL1Histo()->Fill((*l1TauIter).eta(),(*l1TauIter).phi());
00352          if (tauHandle.isValid()){
00353            const reco::CaloTauCollection tauCollection = *(tauHandle.product());
00354          for (reco::CaloTauCollection::const_iterator tauIter=tauCollection.begin(); tauIter!=tauCollection.end(); tauIter++)
00355          {
00356            if (reco::deltaR((*tauIter).eta(),(*tauIter).phi(),(*l1TauIter).eta(),(*l1TauIter).phi()) < 0.3){
00357           v->getOffEtL1OffHisto()->Fill((*tauIter).pt());
00358           v->getOffEtaL1OffHisto()->Fill((*tauIter).eta());
00359           v->getOffPhiL1OffHisto()->Fill((*tauIter).phi());
00360           v->getOffEtaVsOffPhiL1OffHisto()->Fill((*tauIter).eta(),(*tauIter).phi());}
00361          }}
00362            }
00363          }
00364         }
00365 
00366 
00367       // for jet triggers, loop over and fill offline 4-vectors
00368       else if (triggertype == trigger::TriggerJet)
00369         {
00370           if (jetHandle.isValid()){
00371          const reco::CaloJetCollection jetCollection = *(jetHandle.product());
00372          for (reco::CaloJetCollection::const_iterator jetIter=jetCollection.begin(); jetIter!=jetCollection.end(); jetIter++)
00373          {
00374           v->getOffEtOffHisto()->Fill((*jetIter).pt());
00375           v->getOffEtaOffHisto()->Fill((*jetIter).eta());
00376           v->getOffPhiOffHisto()->Fill((*jetIter).phi());
00377           v->getOffEtaVsOffPhiOffHisto()->Fill((*jetIter).eta(),(*jetIter).phi());
00378          }}
00379          for (l1JetHandle=l1JetHandleList.begin(); l1JetHandle!=l1JetHandleList.end(); l1JetHandle++) {
00380            if (!l1JetHandle->isValid())
00381              {
00382             edm::LogInfo("FourVectorHLTOffline") << "l1JetHandle not found, "
00383             "skipping event"; 
00384             return;
00385              } 
00386          const L1JetParticleCollection l1JetCollection = *(l1JetHandle->product());
00387            for (L1JetParticleCollection::const_iterator l1JetIter=l1JetCollection.begin(); l1JetIter!=l1JetCollection.end(); l1JetIter++){
00388           v->getL1EtL1Histo()->Fill((*l1JetIter).pt());
00389           v->getL1EtaL1Histo()->Fill((*l1JetIter).eta());
00390           v->getL1PhiL1Histo()->Fill((*l1JetIter).phi());
00391           v->getL1EtaVsL1PhiL1Histo()->Fill((*l1JetIter).eta(),(*l1JetIter).phi());
00392           if (jetHandle.isValid()){
00393          const reco::CaloJetCollection jetCollection = *(jetHandle.product());
00394          for (reco::CaloJetCollection::const_iterator jetIter=jetCollection.begin(); jetIter!=jetCollection.end(); jetIter++)
00395          {
00396            if (reco::deltaR((*jetIter).eta(),(*jetIter).phi(),(*l1JetIter).eta(),(*l1JetIter).phi()) < 0.3){
00397           v->getOffEtL1OffHisto()->Fill((*jetIter).pt());
00398           v->getOffEtaL1OffHisto()->Fill((*jetIter).eta());
00399           v->getOffPhiL1OffHisto()->Fill((*jetIter).phi());
00400           v->getOffEtaVsOffPhiL1OffHisto()->Fill((*jetIter).eta(),(*jetIter).phi());}
00401          }}
00402           }
00403          }
00404         }
00405 
00406       // for bjet triggers, loop over and fill offline 4-vectors
00407       else if (triggertype == trigger::TriggerBJet)
00408         {
00409         }
00410       // for met triggers, loop over and fill offline 4-vectors
00411       else if (triggertype == trigger::TriggerMET)
00412         {
00413           if (metHandle.isValid()){
00414          const reco::CaloMETCollection metCollection = *(metHandle.product());
00415          for (reco::CaloMETCollection::const_iterator metIter=metCollection.begin(); metIter!=metCollection.end(); metIter++)
00416          {
00417           v->getOffEtOffHisto()->Fill((*metIter).pt());
00418           v->getOffEtaOffHisto()->Fill((*metIter).eta());
00419           v->getOffPhiOffHisto()->Fill((*metIter).phi());
00420           v->getOffEtaVsOffPhiOffHisto()->Fill((*metIter).eta(),(*metIter).phi());
00421          }}
00422 
00423          for (l1extra::L1EtMissParticleCollection::const_iterator l1MetIter=l1MetCollection.begin(); l1MetIter!=l1MetCollection.end(); l1MetIter++)
00424          {
00425           v->getL1EtL1Histo()->Fill((*l1MetIter).pt());
00426           v->getL1EtaL1Histo()->Fill((*l1MetIter).eta());
00427           v->getL1PhiL1Histo()->Fill((*l1MetIter).phi());
00428           v->getL1EtaVsL1PhiL1Histo()->Fill((*l1MetIter).eta(),(*l1MetIter).phi());
00429           if (metHandle.isValid()){
00430          const reco::CaloMETCollection metCollection = *(metHandle.product());
00431          for (reco::CaloMETCollection::const_iterator metIter=metCollection.begin(); metIter!=metCollection.end(); metIter++)
00432          {
00433            if (reco::deltaR((*metIter).eta(),(*metIter).phi(),(*l1MetIter).eta(),(*l1MetIter).phi()) < 0.3){
00434           v->getOffEtL1OffHisto()->Fill((*metIter).pt());
00435           v->getOffEtaL1OffHisto()->Fill((*metIter).eta());
00436           v->getOffPhiL1OffHisto()->Fill((*metIter).phi());
00437           v->getOffEtaVsOffPhiL1OffHisto()->Fill((*metIter).eta(),(*metIter).phi());}
00438          }}
00439           }
00440 
00441         }
00442 
00443 
00444       // for photon triggers, loop over and fill offline and L1 4-vectors
00445       else if (triggertype == trigger::TriggerPhoton)
00446         {
00447           if (photonHandle.isValid()){
00448           const reco::PhotonCollection photonCollection = *(photonHandle.product());
00449          for (reco::PhotonCollection::const_iterator photonIter=photonCollection.begin(); photonIter!=photonCollection.end(); photonIter++)
00450          {
00451           v->getOffEtOffHisto()->Fill((*photonIter).pt());
00452           v->getOffEtaOffHisto()->Fill((*photonIter).eta());
00453           v->getOffPhiOffHisto()->Fill((*photonIter).phi());
00454           v->getOffEtaVsOffPhiOffHisto()->Fill((*photonIter).eta(),(*photonIter).phi());
00455          }
00456           }
00457 
00458          for (l1PhotonHandle=l1PhotonHandleList.begin(); l1PhotonHandle!=l1PhotonHandleList.end(); l1PhotonHandle++) {
00459            if (!l1PhotonHandle->isValid())
00460              {
00461             edm::LogInfo("FourVectorHLTOffline") << "photonHandle not found, "
00462             "skipping event"; 
00463             return;
00464              } 
00465          const L1EmParticleCollection l1PhotonCollection = *(l1PhotonHandle->product());
00466            for (L1EmParticleCollection::const_iterator l1PhotonIter=l1PhotonCollection.begin(); l1PhotonIter!=l1PhotonCollection.end(); l1PhotonIter++){
00467           v->getL1EtL1Histo()->Fill((*l1PhotonIter).pt());
00468           v->getL1EtaL1Histo()->Fill((*l1PhotonIter).eta());
00469           v->getL1PhiL1Histo()->Fill((*l1PhotonIter).phi());
00470           v->getL1EtaVsL1PhiL1Histo()->Fill((*l1PhotonIter).eta(),(*l1PhotonIter).phi());
00471           if (photonHandle.isValid()){
00472           const reco::PhotonCollection photonCollection = *(photonHandle.product());
00473          for (reco::PhotonCollection::const_iterator photonIter=photonCollection.begin(); photonIter!=photonCollection.end(); photonIter++)
00474          {
00475            if (reco::deltaR((*photonIter).eta(),(*photonIter).phi(),(*l1PhotonIter).eta(),(*l1PhotonIter).phi()) < 0.3){
00476           v->getOffEtL1OffHisto()->Fill((*photonIter).pt());
00477           v->getOffEtaL1OffHisto()->Fill((*photonIter).eta());
00478           v->getOffPhiL1OffHisto()->Fill((*photonIter).phi());
00479           v->getOffEtaVsOffPhiL1OffHisto()->Fill((*photonIter).eta(),(*photonIter).phi());}
00480          }}
00481            }
00482          }
00483        }
00484 
00485     // did we pass the numerator path?
00486   bool numpassed = false;
00487   for(int i = 0; i < npath; ++i) {
00488      if (triggerNames.triggerName(i) == v->getPath() && triggerResults->accept(i)) numpassed = true;
00489   }
00490 
00491   if (numpassed)
00492     {  
00493     // ok plot On, L1On, and OnOff objects
00494 
00495     // fill scaler histograms
00496       edm::InputTag filterTag = v->getTag();
00497       if (plotAll_)
00498         {
00499         // loop through indices and see if the filter is on the list of filters used by this path
00500       
00501     if (v->getLabel() == "dummy"){
00502         const std::vector<std::string> filterLabels = hltConfig_.moduleLabels(v->getPath());
00503         //loop over labels
00504         for (std::vector<std::string>::const_iterator labelIter= filterLabels.begin(); labelIter!=filterLabels.end(); labelIter++)          
00505          {
00506            //cout << v->getPath() << "\t" << *labelIter << endl;
00507            // last match wins...
00508            edm::InputTag testTag(*labelIter,"",processname_);
00509            //           cout << v->getPath() << "\t" << testTag.label() << "\t" << testTag.process() << endl;
00510            int testindex = triggerObj->filterIndex(testTag);
00511            if ( !(testindex >= triggerObj->sizeFilters()) ) {
00512              //cout << "found one! " << v->getPath() << "\t" << testTag.label() << endl; 
00513             filterTag = testTag; v->setLabel(*labelIter);}
00514          }
00515          }
00516         }
00517 
00518       const int index = triggerObj->filterIndex(filterTag);
00519       if ( index >= triggerObj->sizeFilters() ) {
00520         //        cout << "WTF no index "<< index << " of that name "
00521         //           << filterTag << endl;
00522         continue; // not in this event
00523       }
00524       LogDebug("FourVectorHLTOffline") << "filling ... " ;
00525       const trigger::Keys & k = triggerObj->filterKeys(index);
00526       //      const trigger::Vids & idtype = triggerObj->filterIds(index);
00527       // assume for now the first object type is the same as all objects in the collection
00528       //    cout << filterTag << "\t" << idtype.size() << "\t" << k.size() << endl;
00529       //     cout << "path " << v->getPath() << " trigger type "<<triggertype << endl;
00530       if (k.size() > 0) v->getNOnHisto()->Fill(k.size());
00531       for (trigger::Keys::const_iterator ki = k.begin(); ki !=k.end(); ++ki ) {
00532         v->getOnEtOnHisto()->Fill(toc[*ki].pt());
00533         v->getOnEtaOnHisto()->Fill(toc[*ki].eta());
00534         v->getOnPhiOnHisto()->Fill(toc[*ki].phi());
00535         v->getOnEtaVsOnPhiOnHisto()->Fill(toc[*ki].eta(), toc[*ki].phi());
00536         //        cout << "pdgId "<<toc[*ki].id() << endl;
00537       // for muon triggers, loop over and fill offline 4-vectors
00538       if (triggertype == trigger::TriggerMuon || triggertype == trigger::TriggerL1Mu)
00539         {
00540           if (muonHandle.isValid()){
00541          const reco::MuonCollection muonCollection = *(muonHandle.product());
00542          for (reco::MuonCollection::const_iterator muonIter=muonCollection.begin(); muonIter!=muonCollection.end(); muonIter++)
00543          {
00544            if (reco::deltaR((*muonIter).eta(),(*muonIter).phi(),toc[*ki].eta(),toc[*ki].phi()) < 0.3){
00545           v->getOffEtOnOffHisto()->Fill((*muonIter).pt());
00546           v->getOffEtaOnOffHisto()->Fill((*muonIter).eta());
00547           v->getOffPhiOnOffHisto()->Fill((*muonIter).phi());
00548           v->getOffEtaVsOffPhiOnOffHisto()->Fill((*muonIter).eta(),(*muonIter).phi());
00549            }
00550          }}
00551          for (l1extra::L1MuonParticleCollection::const_iterator l1MuonIter=l1MuonCollection.begin(); l1MuonIter!=l1MuonCollection.end(); l1MuonIter++)
00552          {
00553            if (reco::deltaR((*l1MuonIter).eta(),(*l1MuonIter).phi(),toc[*ki].eta(),toc[*ki].phi()) < 0.3){
00554           v->getL1EtL1OnHisto()->Fill((*l1MuonIter).pt());
00555           v->getL1EtaL1OnHisto()->Fill((*l1MuonIter).eta());
00556           v->getL1PhiL1OnHisto()->Fill((*l1MuonIter).phi());
00557           v->getL1EtaVsL1PhiL1OnHisto()->Fill((*l1MuonIter).eta(),(*l1MuonIter).phi());
00558            }
00559          }
00560         }
00561 
00562       // for electron triggers, loop over and fill offline 4-vectors
00563       else if (triggertype == trigger::TriggerElectron)
00564         {
00565           //      std::cout << "Electron trigger" << std::endl;
00566           if (gsfElectrons.isValid()){
00567          for (reco::PixelMatchGsfElectronCollection::const_iterator gsfIter=gsfElectrons->begin(); gsfIter!=gsfElectrons->end(); gsfIter++)
00568          {
00569            if (reco::deltaR((*gsfIter).eta(),(*gsfIter).phi(),toc[*ki].eta(),toc[*ki].phi()) < 0.3){
00570           v->getOffEtOnOffHisto()->Fill(gsfIter->pt());
00571           v->getOffEtaOnOffHisto()->Fill(gsfIter->eta());
00572           v->getOffPhiOnOffHisto()->Fill(gsfIter->phi());
00573           v->getOffEtaVsOffPhiOnOffHisto()->Fill(gsfIter->eta(), gsfIter->phi());
00574            }
00575          }}
00576          for (l1ElectronHandle=l1ElectronHandleList.begin(); l1ElectronHandle!=l1ElectronHandleList.end(); l1ElectronHandle++) {
00577 
00578          const L1EmParticleCollection l1ElectronCollection = *(l1ElectronHandle->product());
00579            for (L1EmParticleCollection::const_iterator l1ElectronIter=l1ElectronCollection.begin(); l1ElectronIter!=l1ElectronCollection.end(); l1ElectronIter++){
00580            if (reco::deltaR((*l1ElectronIter).eta(),(*l1ElectronIter).phi(),toc[*ki].eta(),toc[*ki].phi()) < 0.3){
00581           v->getL1EtL1OnHisto()->Fill((*l1ElectronIter).pt());
00582           v->getL1EtaL1OnHisto()->Fill((*l1ElectronIter).eta());
00583           v->getL1PhiL1OnHisto()->Fill((*l1ElectronIter).phi());
00584           v->getL1EtaVsL1PhiL1OnHisto()->Fill((*l1ElectronIter).eta(),(*l1ElectronIter).phi());
00585            }
00586            }
00587          }
00588         }
00589 
00590 
00591       // for tau triggers, loop over and fill offline 4-vectors
00592       else if (triggertype == trigger::TriggerTau)
00593         {
00594           if (tauHandle.isValid()){
00595             const reco::CaloTauCollection tauCollection = *(tauHandle.product());
00596          for (reco::CaloTauCollection::const_iterator tauIter=tauCollection.begin(); tauIter!=tauCollection.end(); tauIter++)
00597          {
00598            if (reco::deltaR((*tauIter).eta(),(*tauIter).phi(),toc[*ki].eta(),toc[*ki].phi()) < 0.3){
00599           v->getOffEtOnOffHisto()->Fill((*tauIter).pt());
00600           v->getOffEtaOnOffHisto()->Fill((*tauIter).eta());
00601           v->getOffPhiOnOffHisto()->Fill((*tauIter).phi());
00602           v->getOffEtaVsOffPhiOnOffHisto()->Fill((*tauIter).eta(),(*tauIter).phi());
00603            }
00604          }}
00605 
00606 
00607          for (l1TauHandle=l1TauHandleList.begin(); l1TauHandle!=l1TauHandleList.end(); l1TauHandle++) {
00608            if (!l1TauHandle->isValid())
00609              {
00610             edm::LogInfo("FourVectorHLTOffline") << "photonHandle not found, "
00611             "skipping event"; 
00612             return;
00613              } 
00614          const L1JetParticleCollection l1TauCollection = *(l1TauHandle->product());
00615            for (L1JetParticleCollection::const_iterator l1TauIter=l1TauCollection.begin(); l1TauIter!=l1TauCollection.end(); l1TauIter++){
00616            if (reco::deltaR((*l1TauIter).eta(),(*l1TauIter).phi(),toc[*ki].eta(),toc[*ki].phi()) < 0.3){
00617           v->getL1EtL1OnHisto()->Fill((*l1TauIter).pt());
00618           v->getL1EtaL1OnHisto()->Fill((*l1TauIter).eta());
00619           v->getL1PhiL1OnHisto()->Fill((*l1TauIter).phi());
00620           v->getL1EtaVsL1PhiL1OnHisto()->Fill((*l1TauIter).eta(),(*l1TauIter).phi());
00621            }
00622            }
00623          }
00624         }
00625 
00626 
00627       // for jet triggers, loop over and fill offline 4-vectors
00628       else if (triggertype == trigger::TriggerJet)
00629         {
00630           if (jetHandle.isValid()){
00631          const reco::CaloJetCollection jetCollection = *(jetHandle.product());
00632          for (reco::CaloJetCollection::const_iterator jetIter=jetCollection.begin(); jetIter!=jetCollection.end(); jetIter++)
00633          {
00634            if (reco::deltaR((*jetIter).eta(),(*jetIter).phi(),toc[*ki].eta(),toc[*ki].phi()) < 0.3){
00635           v->getOffEtOnOffHisto()->Fill((*jetIter).pt());
00636           v->getOffEtaOnOffHisto()->Fill((*jetIter).eta());
00637           v->getOffPhiOnOffHisto()->Fill((*jetIter).phi());
00638           v->getOffEtaVsOffPhiOnOffHisto()->Fill((*jetIter).eta(),(*jetIter).phi());
00639            }
00640          }}
00641          for (l1JetHandle=l1JetHandleList.begin(); l1JetHandle!=l1JetHandleList.end(); l1JetHandle++) {
00642            if (!l1JetHandle->isValid())
00643              {
00644             edm::LogInfo("FourVectorHLTOffline") << "l1JetHandle not found, "
00645             "skipping event"; 
00646             return;
00647              } 
00648          const L1JetParticleCollection l1JetCollection = *(l1JetHandle->product());
00649            for (L1JetParticleCollection::const_iterator l1JetIter=l1JetCollection.begin(); l1JetIter!=l1JetCollection.end(); l1JetIter++){
00650            if (reco::deltaR((*l1JetIter).eta(),(*l1JetIter).phi(),toc[*ki].eta(),toc[*ki].phi()) < 0.3){
00651           v->getL1EtL1OnHisto()->Fill((*l1JetIter).pt());
00652           v->getL1EtaL1OnHisto()->Fill((*l1JetIter).eta());
00653           v->getL1PhiL1OnHisto()->Fill((*l1JetIter).phi());
00654           v->getL1EtaVsL1PhiL1OnHisto()->Fill((*l1JetIter).eta(),(*l1JetIter).phi());
00655            }
00656            }
00657          }
00658         }
00659 
00660       // for bjet triggers, loop over and fill offline 4-vectors
00661       else if (triggertype == trigger::TriggerBJet)
00662         {
00663         }
00664       // for met triggers, loop over and fill offline 4-vectors
00665       else if (triggertype == trigger::TriggerMET)
00666         {
00667           if (metHandle.isValid()){
00668          const reco::CaloMETCollection metCollection = *(metHandle.product());
00669          for (reco::CaloMETCollection::const_iterator metIter=metCollection.begin(); metIter!=metCollection.end(); metIter++)
00670          {
00671            if (reco::deltaR((*metIter).eta(),(*metIter).phi(),toc[*ki].eta(),toc[*ki].phi()) < 0.3){
00672           v->getOffEtOnOffHisto()->Fill((*metIter).pt());
00673           v->getOffEtaOnOffHisto()->Fill((*metIter).eta());
00674           v->getOffPhiOnOffHisto()->Fill((*metIter).phi());
00675           v->getOffEtaVsOffPhiOnOffHisto()->Fill((*metIter).eta(),(*metIter).phi());
00676            }
00677          }}
00678 
00679          for (l1extra::L1EtMissParticleCollection::const_iterator l1MetIter=l1MetCollection.begin(); l1MetIter!=l1MetCollection.end(); l1MetIter++)
00680          {
00681            if (reco::deltaR((*l1MetIter).eta(),(*l1MetIter).phi(),toc[*ki].eta(),toc[*ki].phi()) < 0.3){
00682           v->getL1EtL1OnHisto()->Fill((*l1MetIter).pt());
00683           v->getL1EtaL1OnHisto()->Fill((*l1MetIter).eta());
00684           v->getL1PhiL1OnHisto()->Fill((*l1MetIter).phi());
00685           v->getL1EtaVsL1PhiL1OnHisto()->Fill((*l1MetIter).eta(),(*l1MetIter).phi());
00686            }
00687          }
00688 
00689         }
00690 
00691 
00692       // for photon triggers, loop over and fill offline and L1 4-vectors
00693       else if (triggertype == trigger::TriggerPhoton)
00694         {
00695           if (photonHandle.isValid()){
00696           const reco::PhotonCollection photonCollection = *(photonHandle.product());
00697          for (reco::PhotonCollection::const_iterator photonIter=photonCollection.begin(); photonIter!=photonCollection.end(); photonIter++)
00698          {
00699            if (reco::deltaR((*photonIter).eta(),(*photonIter).phi(),toc[*ki].eta(),toc[*ki].phi()) < 0.3){
00700           v->getOffEtOnOffHisto()->Fill((*photonIter).pt());
00701           v->getOffEtaOnOffHisto()->Fill((*photonIter).eta());
00702           v->getOffPhiOnOffHisto()->Fill((*photonIter).phi());
00703           v->getOffEtaVsOffPhiOnOffHisto()->Fill((*photonIter).eta(),(*photonIter).phi());
00704            }
00705          }}
00706 
00707 
00708          for (l1PhotonHandle=l1PhotonHandleList.begin(); l1PhotonHandle!=l1PhotonHandleList.end(); l1PhotonHandle++) {
00709            if (!l1PhotonHandle->isValid())
00710              {
00711             edm::LogInfo("FourVectorHLTOffline") << "l1photonHandle not found, "
00712             "skipping event"; 
00713             return;
00714              } 
00715          const L1EmParticleCollection l1PhotonCollection = *(l1PhotonHandle->product());
00716            for (L1EmParticleCollection::const_iterator l1PhotonIter=l1PhotonCollection.begin(); l1PhotonIter!=l1PhotonCollection.end(); l1PhotonIter++){
00717            if (reco::deltaR((*l1PhotonIter).eta(),(*l1PhotonIter).phi(),toc[*ki].eta(),toc[*ki].phi()) < 0.3){
00718           v->getL1EtL1OnHisto()->Fill((*l1PhotonIter).pt());
00719           v->getL1EtaL1OnHisto()->Fill((*l1PhotonIter).eta());
00720           v->getL1PhiL1OnHisto()->Fill((*l1PhotonIter).phi());
00721           v->getL1EtaVsL1PhiL1OnHisto()->Fill((*l1PhotonIter).eta(),(*l1PhotonIter).phi());
00722            }
00723            
00724 
00725          }
00726        }
00727      }
00728 
00729     }
00730    }
00731     }
00732  }
00733 }
00734 
00735 
00736 
00737 // -- method called once each job just before starting event loop  --------
00738 void 
00739 FourVectorHLTOffline::beginJob(const edm::EventSetup&)
00740 {
00741   nev_ = 0;
00742   DQMStore *dbe = 0;
00743   dbe = Service<DQMStore>().operator->();
00744   
00745   if (dbe) {
00746     dbe->setCurrentFolder(dirname_);
00747     dbe->rmdir(dirname_);
00748   }
00749   
00750   
00751   if (dbe) {
00752     dbe->setCurrentFolder(dirname_);
00753     }  
00754 }
00755 
00756 // - method called once each job just after ending the event loop  ------------
00757 void 
00758 FourVectorHLTOffline::endJob() 
00759 {
00760    LogInfo("FourVectorHLTOffline") << "analyzed " << nev_ << " events";
00761    return;
00762 }
00763 
00764 
00765 // BeginRun
00766 void FourVectorHLTOffline::beginRun(const edm::Run& run, const edm::EventSetup& c)
00767 {
00768   LogDebug("FourVectorHLTOffline") << "beginRun, run " << run.id();
00769 // HLT config does not change within runs!
00770  
00771   if (!hltConfig_.init(processname_)) {
00772   LogDebug("FourVectorHLTOffline") << "HLTConfigProvider failed to initialize.";
00773     // check if trigger name in (new) config
00774     //  cout << "Available TriggerNames are: " << endl;
00775         //      hltConfig_.dump("Triggers");
00776       }
00777 
00778 
00779     // get provenance, HLT PSet 
00780   //     std::vector<edm::ParameterSet> ps;
00781   //   if (run.getProcessParameterSet(processname_,ps))
00782   //   {
00783   //    cout << ps << endl;
00784   //   }
00785 
00786 
00787 
00788 
00789 
00790 
00791   if (1)
00792  {
00793   DQMStore *dbe = 0;
00794   dbe = Service<DQMStore>().operator->();
00795   
00796   if (dbe) {
00797     dbe->setCurrentFolder(dirname_);
00798   }
00799 
00800 
00801     const unsigned int n(hltConfig_.size());
00802     for (unsigned int j=0; j!=n; ++j) {
00803     for (unsigned int i=0; i!=n; ++i) {
00804       // cout << hltConfig_.triggerName(i) << endl;
00805     
00806     std::string denompathname = hltConfig_.triggerName(j);  
00807     std::string pathname = hltConfig_.triggerName(i);  
00808     std::string l1pathname = "dummy";
00809     int objectType = 0;
00810     int denomobjectType = 0;
00811     //parse pathname to guess object type
00812     if (pathname.find("Jet") != std::string::npos) 
00813       objectType = trigger::TriggerJet;    
00814     if (pathname.find("BJet") != std::string::npos) 
00815       objectType = trigger::TriggerBJet;    
00816     if (pathname.find("MET") != std::string::npos) 
00817       objectType = trigger::TriggerMET;    
00818     if (pathname.find("Mu") != std::string::npos) 
00819       objectType = trigger::TriggerMuon;    
00820     if (pathname.find("Ele") != std::string::npos) 
00821       objectType = trigger::TriggerElectron;    
00822     if (pathname.find("Photon") != std::string::npos) 
00823       objectType = trigger::TriggerPhoton;    
00824     if (pathname.find("Tau") != std::string::npos) 
00825       objectType = trigger::TriggerTau;    
00826 
00827 
00828     //parse denompathname to guess denomobject type
00829     if (denompathname.find("Jet") != std::string::npos) 
00830       denomobjectType = trigger::TriggerJet;    
00831     if (denompathname.find("BJet") != std::string::npos) 
00832       denomobjectType = trigger::TriggerBJet;    
00833     if (denompathname.find("MET") != std::string::npos) 
00834       denomobjectType = trigger::TriggerMET;    
00835     if (denompathname.find("Mu") != std::string::npos) 
00836       denomobjectType = trigger::TriggerMuon;    
00837     if (denompathname.find("Ele") != std::string::npos) 
00838       denomobjectType = trigger::TriggerElectron;    
00839     if (denompathname.find("Photon") != std::string::npos) 
00840       denomobjectType = trigger::TriggerPhoton;    
00841     if (denompathname.find("Tau") != std::string::npos) 
00842       denomobjectType = trigger::TriggerTau;    
00843 
00844     // find L1 condition for numpath with numpath objecttype 
00845     // find PSet for L1 global seed for numpath, 
00846     // get L1 path name which has numpath objecttype (pick just one for now)
00847     
00848 
00849 
00850 
00851     std::string filtername("dummy");
00852     float ptMin = 0.0;
00853     float ptMax = 100.0;
00854     if (pathname.find("HLT_") != std::string::npos && plotAll_ && denomobjectType == objectType && objectType != 0)
00855     hltPaths_.push_back(PathInfo(denompathname, pathname, l1pathname, filtername, processname_, objectType, ptMin, ptMax));
00856     }
00857     }
00858     // now set up all of the histos for each path
00859     for(PathInfoCollection::iterator v = hltPaths_.begin();
00860           v!= hltPaths_.end(); ++v ) {
00861         MonitorElement *NOn, *onEtOn, *onEtaOn, *onPhiOn, *onEtavsonPhiOn=0;
00862         MonitorElement *offEtOff, *offEtaOff, *offPhiOff, *offEtavsoffPhiOff=0;
00863         MonitorElement *l1EtL1, *l1EtaL1, *l1PhiL1, *l1Etavsl1PhiL1=0;
00864         MonitorElement *l1EtL1On, *l1EtaL1On, *l1PhiL1On, *l1Etavsl1PhiL1On=0;
00865         MonitorElement *offEtL1Off, *offEtaL1Off, *offPhiL1Off, *offEtavsoffPhiL1Off=0;
00866         MonitorElement *offEtOnOff, *offEtaOnOff, *offPhiOnOff, *offEtavsoffPhiOnOff=0;
00867         std::string labelname("dummy");
00868         labelname = v->getPath() + " " + v->getDenomPath();
00869         std::string histoname(labelname+"_NOn");
00870         std::string title(labelname+" N online");
00871         NOn =  dbe->book1D(histoname.c_str(),
00872                           title.c_str(),10,
00873                           0.5,
00874                           10.5);
00875       
00876         histoname = labelname+"_onEtOn";
00877         title = labelname+" onE_t online";
00878         onEtOn =  dbe->book1D(histoname.c_str(),
00879                            title.c_str(),nBins_, 
00880                            v->getPtMin(),
00881                            v->getPtMax());
00882 
00883         histoname = labelname+"_offEtOff";
00884         title = labelname+" offE_t offline";
00885         offEtOff =  dbe->book1D(histoname.c_str(),
00886                            title.c_str(),nBins_, 
00887                            v->getPtMin(),
00888                            v->getPtMax());
00889 
00890         histoname = labelname+"_l1EtL1";
00891         title = labelname+" l1E_t L1";
00892         l1EtL1 =  dbe->book1D(histoname.c_str(),
00893                            title.c_str(),nBins_, 
00894                            v->getPtMin(),
00895                            v->getPtMax());
00896 
00897         histoname = labelname+"_onEtaOn";
00898         title = labelname+" on#eta online";
00899         onEtaOn =  dbe->book1D(histoname.c_str(),
00900                            title.c_str(),nBins_,-2.7,2.7);
00901 
00902         histoname = labelname+"_offEtaOff";
00903         title = labelname+" off#eta offline";
00904         offEtaOff =  dbe->book1D(histoname.c_str(),
00905                            title.c_str(),nBins_,-2.7,2.7);
00906 
00907         histoname = labelname+"_l1EtaL1";
00908         title = labelname+" l1#eta L1";
00909         l1EtaL1 =  dbe->book1D(histoname.c_str(),
00910                            title.c_str(),nBins_,-2.7,2.7);
00911 
00912         histoname = labelname+"_onPhiOn";
00913         title = labelname+" on#phi online";
00914         onPhiOn =  dbe->book1D(histoname.c_str(),
00915                            histoname.c_str(),nBins_,-3.14,3.14);
00916 
00917         histoname = labelname+"_offPhiOff";
00918         title = labelname+" off#phi offline";
00919         offPhiOff =  dbe->book1D(histoname.c_str(),
00920                            histoname.c_str(),nBins_,-3.14,3.14);
00921 
00922         histoname = labelname+"_l1PhiL1";
00923         title = labelname+" l1#phi L1";
00924         l1PhiL1 =  dbe->book1D(histoname.c_str(),
00925                            histoname.c_str(),nBins_,-3.14,3.14);
00926  
00927 
00928         histoname = labelname+"_onEtaonPhiOn";
00929         title = labelname+" on#eta vs on#phi online";
00930         onEtavsonPhiOn =  dbe->book2D(histoname.c_str(),
00931                                 title.c_str(),
00932                                 nBins_,-2.7,2.7,
00933                                 nBins_,-3.14, 3.14);
00934 
00935         histoname = labelname+"_offEtaoffPhiOff";
00936         title = labelname+" off#eta vs off#phi offline";
00937         offEtavsoffPhiOff =  dbe->book2D(histoname.c_str(),
00938                                 title.c_str(),
00939                                 nBins_,-2.7,2.7,
00940                                 nBins_,-3.14, 3.14);
00941 
00942         histoname = labelname+"_l1Etal1PhiL1";
00943         title = labelname+" l1#eta vs l1#phi L1";
00944         l1Etavsl1PhiL1 =  dbe->book2D(histoname.c_str(),
00945                                 title.c_str(),
00946                                 nBins_,-2.7,2.7,
00947                                 nBins_,-3.14, 3.14);
00948 
00949         histoname = labelname+"_l1EtL1On";
00950         title = labelname+" l1E_t L1+online";
00951         l1EtL1On =  dbe->book1D(histoname.c_str(),
00952                            title.c_str(),nBins_, 
00953                            v->getPtMin(),
00954                            v->getPtMax());
00955 
00956         histoname = labelname+"_offEtL1Off";
00957         title = labelname+" offE_t L1+offline";
00958         offEtL1Off =  dbe->book1D(histoname.c_str(),
00959                            title.c_str(),nBins_, 
00960                            v->getPtMin(),
00961                            v->getPtMax());
00962 
00963         histoname = labelname+"_offEtOnOff";
00964         title = labelname+" offE_t online+offline";
00965         offEtOnOff =  dbe->book1D(histoname.c_str(),
00966                            title.c_str(),nBins_, 
00967                            v->getPtMin(),
00968                            v->getPtMax());
00969 
00970         histoname = labelname+"_l1EtaL1On";
00971         title = labelname+" l1#eta L1+online";
00972         l1EtaL1On =  dbe->book1D(histoname.c_str(),
00973                            title.c_str(),nBins_,-2.7,2.7);
00974 
00975         histoname = labelname+"_offEtaL1Off";
00976         title = labelname+" off#eta L1+offline";
00977         offEtaL1Off =  dbe->book1D(histoname.c_str(),
00978                            title.c_str(),nBins_,-2.7,2.7);
00979 
00980         histoname = labelname+"_offEtaOnOff";
00981         title = labelname+" off#eta online+offline";
00982         offEtaOnOff =  dbe->book1D(histoname.c_str(),
00983                            title.c_str(),nBins_,-2.7,2.7);
00984 
00985         histoname = labelname+"_l1PhiL1On";
00986         title = labelname+" l1#phi L1+online";
00987         l1PhiL1On =  dbe->book1D(histoname.c_str(),
00988                            histoname.c_str(),nBins_,-3.14,3.14);
00989 
00990         histoname = labelname+"_offPhiL1Off";
00991         title = labelname+" off#phi L1+offline";
00992         offPhiL1Off =  dbe->book1D(histoname.c_str(),
00993                            histoname.c_str(),nBins_,-3.14,3.14);
00994 
00995         histoname = labelname+"_offPhiOnOff";
00996         title = labelname+" off#phi online+offline";
00997         offPhiOnOff =  dbe->book1D(histoname.c_str(),
00998                            histoname.c_str(),nBins_,-3.14,3.14);
00999  
01000 
01001         histoname = labelname+"_l1Etal1PhiL1On";
01002         title = labelname+" l1#eta vs l1#phi L1+online";
01003         l1Etavsl1PhiL1On =  dbe->book2D(histoname.c_str(),
01004                                 title.c_str(),
01005                                 nBins_,-2.7,2.7,
01006                                 nBins_,-3.14, 3.14);
01007 
01008         histoname = labelname+"_offEtaoffPhiL1Off";
01009         title = labelname+" off#eta vs off#phi L1+offline";
01010         offEtavsoffPhiL1Off =  dbe->book2D(histoname.c_str(),
01011                                 title.c_str(),
01012                                 nBins_,-2.7,2.7,
01013                                 nBins_,-3.14, 3.14);
01014 
01015         histoname = labelname+"_offEtaoffPhiOnOff";
01016         title = labelname+" off#eta vs off#phi online+offline";
01017         offEtavsoffPhiOnOff =  dbe->book2D(histoname.c_str(),
01018                                 title.c_str(),
01019                                 nBins_,-2.7,2.7,
01020                                 nBins_,-3.14, 3.14);
01021 
01022         v->setHistos( NOn, onEtOn, onEtaOn, onPhiOn, onEtavsonPhiOn, offEtOff, offEtaOff, offPhiOff, offEtavsoffPhiOff, l1EtL1, l1EtaL1, l1PhiL1, l1Etavsl1PhiL1, l1EtL1On, l1EtaL1On, l1PhiL1On, l1Etavsl1PhiL1On, offEtL1Off, offEtaL1Off, offPhiL1Off, offEtavsoffPhiL1Off, offEtOnOff, offEtaOnOff, offPhiOnOff, offEtavsoffPhiOnOff);
01023 
01024 
01025     }
01026  }
01027  return;
01028 
01029 
01030 
01031 }
01032 
01034 void FourVectorHLTOffline::endRun(const edm::Run& run, const edm::EventSetup& c)
01035 {
01036   LogDebug("FourVectorHLTOffline") << "endRun, run " << run.id();
01037 }

Generated on Tue Jun 9 17:34:10 2009 for CMSSW by  doxygen 1.5.4