From 1ca9856d532000f59d27c96fd23ec0d1d89e77c0 Mon Sep 17 00:00:00 2001 From: Yutaro Date: Wed, 18 Dec 2013 01:51:39 +0100 Subject: [PATCH 1/2] Updating the default cluster collections to PF --- .../interface/EBClusterTask.h | 6 ++- .../python/EBClusterTask_cfi.py | 4 +- .../src/EBClusterTask.cc | 26 ++++++------- .../interface/EEClusterTask.h | 6 ++- .../python/EEClusterTask_cfi.py | 4 +- .../src/EEClusterTask.cc | 26 ++++++------- DQMOffline/Ecal/interface/EBRecoSummary.h | 6 ++- DQMOffline/Ecal/interface/EERecoSummary.h | 6 ++- .../Ecal/python/EBClusterTaskExtras_cfi.py | 4 +- DQMOffline/Ecal/python/EBRecoSummary_cfi.py | 4 +- .../Ecal/python/EEClusterTaskExtras_cfi.py | 3 +- DQMOffline/Ecal/python/EERecoSummary_cfi.py | 4 +- .../python/ecal_dqm_source_offline_cff.py | 11 ------ DQMOffline/Ecal/src/EBClusterTaskExtras.cc | 2 +- DQMOffline/Ecal/src/EBRecoSummary.cc | 37 ++++++++++--------- DQMOffline/Ecal/src/EEClusterTaskExtras.cc | 2 +- DQMOffline/Ecal/src/EERecoSummary.cc | 29 ++++++++------- 17 files changed, 89 insertions(+), 91 deletions(-) diff --git a/DQM/EcalBarrelMonitorTasks/interface/EBClusterTask.h b/DQM/EcalBarrelMonitorTasks/interface/EBClusterTask.h index 575bb6bdd0913..9f2eb0fee5eb2 100644 --- a/DQM/EcalBarrelMonitorTasks/interface/EBClusterTask.h +++ b/DQM/EcalBarrelMonitorTasks/interface/EBClusterTask.h @@ -13,10 +13,12 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "DataFormats/EcalRawData/interface/EcalRawDataCollections.h" -#include "DataFormats/EgammaReco/interface/BasicClusterFwd.h" +#include "DataFormats/CaloRecHit/interface/CaloCluster.h" #include "DataFormats/EgammaReco/interface/SuperClusterFwd.h" #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h" +#include "DataFormats/Common/interface/View.h" + class MonitorElement; class DQMStore; @@ -69,7 +71,7 @@ bool enableCleanup_; bool mergeRuns_; edm::EDGetTokenT EcalRawDataCollection_; -edm::EDGetTokenT BasicClusterCollection_; + edm::EDGetTokenT > BasicClusterCollection_; edm::EDGetTokenT SuperClusterCollection_; edm::EDGetTokenT EcalRecHitCollection_; diff --git a/DQM/EcalBarrelMonitorTasks/python/EBClusterTask_cfi.py b/DQM/EcalBarrelMonitorTasks/python/EBClusterTask_cfi.py index c9f7c6aca59ac..9a6affb4ebb4d 100644 --- a/DQM/EcalBarrelMonitorTasks/python/EBClusterTask_cfi.py +++ b/DQM/EcalBarrelMonitorTasks/python/EBClusterTask_cfi.py @@ -5,8 +5,8 @@ enableCleanup = cms.untracked.bool(False), mergeRuns = cms.untracked.bool(False), EcalRawDataCollection = cms.InputTag("ecalEBunpacker"), - BasicClusterCollection = cms.InputTag("hybridSuperClusters","hybridBarrelBasicClusters"), - SuperClusterCollection = cms.InputTag("correctedHybridSuperClusters"), + BasicClusterCollection = cms.InputTag("particleFlowClusterECAL"), + SuperClusterCollection = cms.InputTag("particleFlowSuperClusterECAL", "particleFlowSuperClusterECALBarrel"), EcalRecHitCollection = cms.InputTag("ecalRecHit","EcalRecHitsEB") ) diff --git a/DQM/EcalBarrelMonitorTasks/src/EBClusterTask.cc b/DQM/EcalBarrelMonitorTasks/src/EBClusterTask.cc index 1b2a0b8ea6254..e7c138a2fba66 100644 --- a/DQM/EcalBarrelMonitorTasks/src/EBClusterTask.cc +++ b/DQM/EcalBarrelMonitorTasks/src/EBClusterTask.cc @@ -50,7 +50,7 @@ EBClusterTask::EBClusterTask(const edm::ParameterSet& ps){ // parameters... EcalRawDataCollection_ = consumes(ps.getParameter("EcalRawDataCollection")); - BasicClusterCollection_ = consumes(ps.getParameter("BasicClusterCollection")); + BasicClusterCollection_ = consumes >(ps.getParameter("BasicClusterCollection")); SuperClusterCollection_ = consumes(ps.getParameter("SuperClusterCollection")); EcalRecHitCollection_ = consumes(ps.getParameter("EcalRecHitCollection")); @@ -567,16 +567,16 @@ void EBClusterTask::analyze(const edm::Event& e, const edm::EventSetup& c){ } const EcalRecHitCollection* ebRecHits = pEBRecHits.product(); - reco::BasicClusterCollection bcSel; + std::vector bcSel; // --- Barrel Basic Clusters --- - edm::Handle pBasicClusters; + edm::Handle > pBasicClusters; if ( e.getByToken(BasicClusterCollection_, pBasicClusters) ) { int nbcc = pBasicClusters->size(); if ( nbcc > 0 ) meBCNum_->Fill(float(nbcc)); - for ( reco::BasicClusterCollection::const_iterator bCluster = pBasicClusters->begin(); bCluster != pBasicClusters->end(); ++bCluster ) { + for ( edm::View::const_iterator bCluster = pBasicClusters->begin(); bCluster != pBasicClusters->end(); ++bCluster ) { meBCEne_->Fill(bCluster->energy()); meBCSiz_->Fill(float(bCluster->size())); @@ -605,21 +605,21 @@ void EBClusterTask::analyze(const edm::Event& e, const edm::EventSetup& c){ // fill the selected cluster collection float pt = std::abs( bCluster->energy()*sin(bCluster->position().theta()) ); - if ( pt > thrClusEt_ && e2x2/e3x3 > thrS4S9_ ) bcSel.push_back(*bCluster); + if ( pt > thrClusEt_ && e2x2/e3x3 > thrS4S9_ ) bcSel.push_back(&*bCluster); } } else { - edm::LogWarning("EBClusterTask") << "BasicClusterCollection not available"; + // edm::LogWarning("EBClusterTask") << "BasicClusterCollection not available"; } - for ( reco::BasicClusterCollection::const_iterator bc1 = bcSel.begin(); bc1 != bcSel.end(); ++bc1 ) { + for ( std::vector::const_iterator bc1 = bcSel.begin(); bc1 != bcSel.end(); ++bc1 ) { TLorentzVector bc1P; - bc1P.SetPtEtaPhiE(std::abs(bc1->energy()*sin(bc1->position().theta())), - bc1->eta(), bc1->phi(), bc1->energy()); - for ( reco::BasicClusterCollection::const_iterator bc2 = bc1+1; bc2 != bcSel.end(); ++bc2 ) { + bc1P.SetPtEtaPhiE(std::abs((*bc1)->energy()*sin((*bc1)->position().theta())), + (*bc1)->eta(), (*bc1)->phi(), (*bc1)->energy()); + for ( std::vector::const_iterator bc2 = bc1+1; bc2 != bcSel.end(); ++bc2 ) { TLorentzVector bc2P; - bc2P.SetPtEtaPhiE(std::abs(bc2->energy()*sin(bc2->position().theta())), - bc2->eta(), bc2->phi(), bc2->energy()); + bc2P.SetPtEtaPhiE(std::abs((*bc2)->energy()*sin((*bc2)->position().theta())), + (*bc2)->eta(), (*bc2)->phi(), (*bc2)->energy()); TLorentzVector candP = bc1P + bc2P; @@ -731,7 +731,7 @@ void EBClusterTask::analyze(const edm::Event& e, const edm::EventSetup& c){ } else { - edm::LogWarning("EBClusterTask") << "SuperClusterCollection not available"; + // edm::LogWarning("EBClusterTask") << "SuperClusterCollection not available"; } diff --git a/DQM/EcalEndcapMonitorTasks/interface/EEClusterTask.h b/DQM/EcalEndcapMonitorTasks/interface/EEClusterTask.h index 7e4e13ed0a15a..cd3de65625ed3 100644 --- a/DQM/EcalEndcapMonitorTasks/interface/EEClusterTask.h +++ b/DQM/EcalEndcapMonitorTasks/interface/EEClusterTask.h @@ -14,9 +14,11 @@ #include "DataFormats/EcalRawData/interface/EcalRawDataCollections.h" #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h" -#include "DataFormats/EgammaReco/interface/BasicClusterFwd.h" +#include "DataFormats/CaloRecHit/interface/CaloCluster.h" #include "DataFormats/EgammaReco/interface/SuperClusterFwd.h" +#include "DataFormats/Common/interface/View.h" + class MonitorElement; class DQMStore; @@ -69,7 +71,7 @@ bool enableCleanup_; bool mergeRuns_; edm::EDGetTokenT EcalRawDataCollection_; -edm::EDGetTokenT BasicClusterCollection_; + edm::EDGetTokenT > BasicClusterCollection_; edm::EDGetTokenT SuperClusterCollection_; edm::EDGetTokenT EcalRecHitCollection_; diff --git a/DQM/EcalEndcapMonitorTasks/python/EEClusterTask_cfi.py b/DQM/EcalEndcapMonitorTasks/python/EEClusterTask_cfi.py index 07bc3cbd918ca..7d3c19cef68a2 100644 --- a/DQM/EcalEndcapMonitorTasks/python/EEClusterTask_cfi.py +++ b/DQM/EcalEndcapMonitorTasks/python/EEClusterTask_cfi.py @@ -5,8 +5,8 @@ enableCleanup = cms.untracked.bool(False), mergeRuns = cms.untracked.bool(False), EcalRawDataCollection = cms.InputTag("ecalEBunpacker"), - BasicClusterCollection = cms.InputTag("multi5x5SuperClusters","multi5x5EndcapBasicClusters"), - SuperClusterCollection = cms.InputTag("multi5x5SuperClusters","multi5x5EndcapSuperClusters"), + BasicClusterCollection = cms.InputTag("particleFlowClusterECAL"), + SuperClusterCollection = cms.InputTag("particleFlowSuperClusterECAL", "particleFlowSuperClusterECALEndcapWithPreshower"), EcalRecHitCollection = cms.InputTag("ecalRecHit","EcalRecHitsEE") ) diff --git a/DQM/EcalEndcapMonitorTasks/src/EEClusterTask.cc b/DQM/EcalEndcapMonitorTasks/src/EEClusterTask.cc index 30efbf7028af5..276f7ae000d97 100644 --- a/DQM/EcalEndcapMonitorTasks/src/EEClusterTask.cc +++ b/DQM/EcalEndcapMonitorTasks/src/EEClusterTask.cc @@ -49,7 +49,7 @@ EEClusterTask::EEClusterTask(const edm::ParameterSet& ps){ // parameters... EcalRawDataCollection_ = consumes(ps.getParameter("EcalRawDataCollection")); - BasicClusterCollection_ = consumes(ps.getParameter("BasicClusterCollection")); + BasicClusterCollection_ = consumes >(ps.getParameter("BasicClusterCollection")); SuperClusterCollection_ = consumes(ps.getParameter("SuperClusterCollection")); EcalRecHitCollection_ = consumes(ps.getParameter("EcalRecHitCollection")); @@ -721,16 +721,16 @@ void EEClusterTask::analyze(const edm::Event& e, const edm::EventSetup& c){ } const EcalRecHitCollection* eeRecHits = pEERecHits.product(); - reco::BasicClusterCollection bcSel; + std::vector bcSel; // --- Endcap Basic Clusters --- - edm::Handle pBasicClusters; + edm::Handle > pBasicClusters; if ( e.getByToken(BasicClusterCollection_, pBasicClusters) ) { int nbcc = pBasicClusters->size(); if (nbcc>0) meBCNum_->Fill(float(nbcc)); - for ( reco::BasicClusterCollection::const_iterator bCluster = pBasicClusters->begin(); bCluster != pBasicClusters->end(); ++bCluster ) { + for ( edm::View::const_iterator bCluster = pBasicClusters->begin(); bCluster != pBasicClusters->end(); ++bCluster ) { meBCEne_->Fill(bCluster->energy()); meBCSiz_->Fill(float(bCluster->size())); @@ -773,25 +773,25 @@ void EEClusterTask::analyze(const edm::Event& e, const edm::EventSetup& c){ // fill the selected cluster collection float pt = std::abs( bCluster->energy()*sin(bCluster->position().theta()) ); - if ( pt > thrClusEt_ && e2x2/e3x3 > thrS4S9_ ) bcSel.push_back(*bCluster); + if ( pt > thrClusEt_ && e2x2/e3x3 > thrS4S9_ ) bcSel.push_back(&*bCluster); } } } else { - edm::LogWarning("EEClusterTask") << "BasicClusterCollection not available"; + // edm::LogWarning("EEClusterTask") << "BasicClusterCollection not available"; } - for ( reco::BasicClusterCollection::const_iterator bc1 = bcSel.begin(); bc1 != bcSel.end(); ++bc1 ) { + for ( std::vector::const_iterator bc1 = bcSel.begin(); bc1 != bcSel.end(); ++bc1 ) { TLorentzVector bc1P; - bc1P.SetPtEtaPhiE(std::abs(bc1->energy()*sin(bc1->position().theta())), - bc1->eta(), bc1->phi(), bc1->energy()); - for ( reco::BasicClusterCollection::const_iterator bc2 = bc1+1; bc2 != bcSel.end(); ++bc2 ) { + bc1P.SetPtEtaPhiE(std::abs((*bc1)->energy()*sin((*bc1)->position().theta())), + (*bc1)->eta(), (*bc1)->phi(), (*bc1)->energy()); + for ( std::vector::const_iterator bc2 = bc1+1; bc2 != bcSel.end(); ++bc2 ) { TLorentzVector bc2P; - bc2P.SetPtEtaPhiE(std::abs(bc2->energy()*sin(bc2->position().theta())), - bc2->eta(), bc2->phi(), bc2->energy()); + bc2P.SetPtEtaPhiE(std::abs((*bc2)->energy()*sin((*bc2)->position().theta())), + (*bc2)->eta(), (*bc2)->phi(), (*bc2)->energy()); TLorentzVector candP = bc1P + bc2P; @@ -909,7 +909,7 @@ void EEClusterTask::analyze(const edm::Event& e, const edm::EventSetup& c){ } else { - edm::LogWarning("EEClusterTask") << "SuperClusterCollection not available"; + // edm::LogWarning("EEClusterTask") << "SuperClusterCollection not available"; } diff --git a/DQMOffline/Ecal/interface/EBRecoSummary.h b/DQMOffline/Ecal/interface/EBRecoSummary.h index 20bca952ed08e..95dc5d90b4b96 100644 --- a/DQMOffline/Ecal/interface/EBRecoSummary.h +++ b/DQMOffline/Ecal/interface/EBRecoSummary.h @@ -16,12 +16,14 @@ #include "FWCore/ServiceRegistry/interface/Service.h" #include "CommonTools/UtilAlgos/interface/TFileService.h" +#include "DataFormats/Common/interface/View.h" + // DQM includes #include "DQMServices/Core/interface/DQMStore.h" #include "DQMServices/Core/interface/MonitorElement.h" #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h" -#include "DataFormats/EgammaReco/interface/BasicClusterFwd.h" +#include "DataFormats/CaloRecHit/interface/CaloCluster.h" #include "DataFormats/EgammaReco/interface/SuperClusterFwd.h" // Less than operator for sorting EcalRecHits according to energy. @@ -88,7 +90,7 @@ class EBRecoSummary : public edm::EDAnalyzer { // ----------member data --------------------------- edm::EDGetTokenT recHitCollection_EB_; edm::EDGetTokenT redRecHitCollection_EB_; - edm::EDGetTokenT basicClusterCollection_EB_; + edm::EDGetTokenT > basicClusterCollection_EB_; edm::EDGetTokenT superClusterCollection_EB_; double ethrEB_; diff --git a/DQMOffline/Ecal/interface/EERecoSummary.h b/DQMOffline/Ecal/interface/EERecoSummary.h index e31535c25d225..6cc6cfebcdddd 100644 --- a/DQMOffline/Ecal/interface/EERecoSummary.h +++ b/DQMOffline/Ecal/interface/EERecoSummary.h @@ -16,13 +16,15 @@ #include "FWCore/ServiceRegistry/interface/Service.h" #include "CommonTools/UtilAlgos/interface/TFileService.h" +#include "DataFormats/Common/interface/View.h" + // DQM includes #include "DQMServices/Core/interface/DQMStore.h" #include "DQMServices/Core/interface/MonitorElement.h" #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h" +#include "DataFormats/CaloRecHit/interface/CaloCluster.h" #include "DataFormats/EgammaReco/interface/SuperClusterFwd.h" -#include "DataFormats/EgammaReco/interface/BasicClusterFwd.h" // Less than operator for sorting EcalRecHits according to energy. class ecalRecHitLess : public std::binary_function @@ -87,7 +89,7 @@ class EERecoSummary : public edm::EDAnalyzer { // ----------member data --------------------------- edm::EDGetTokenT recHitCollection_EE_; edm::EDGetTokenT redRecHitCollection_EE_; - edm::EDGetTokenT basicClusterCollection_EE_; + edm::EDGetTokenT > basicClusterCollection_EE_; edm::EDGetTokenT superClusterCollection_EE_; double ethrEE_; diff --git a/DQMOffline/Ecal/python/EBClusterTaskExtras_cfi.py b/DQMOffline/Ecal/python/EBClusterTaskExtras_cfi.py index 4f62b28801428..e53194f9434cb 100644 --- a/DQMOffline/Ecal/python/EBClusterTaskExtras_cfi.py +++ b/DQMOffline/Ecal/python/EBClusterTaskExtras_cfi.py @@ -4,9 +4,7 @@ prefixME = cms.untracked.string('EcalBarrel'), enableCleanup = cms.untracked.bool(False), mergeRuns = cms.untracked.bool(False), - EcalRawDataCollection = cms.InputTag("ecalEBunpacker"), - BasicClusterCollection = cms.InputTag("hybridSuperClusters","hybridBarrelBasicClusters"), - SuperClusterCollection = cms.InputTag("correctedHybridSuperClusters"), + SuperClusterCollection = cms.InputTag("particleFlowSuperClusterECAL", "particleFlowSuperClusterECALBarrel"), EcalRecHitCollection = cms.InputTag("ecalRecHit","EcalRecHitsEB"), l1GlobalReadoutRecord = cms.InputTag('gtDigis'), l1GlobalMuonReadoutRecord = cms.InputTag("gtDigis") diff --git a/DQMOffline/Ecal/python/EBRecoSummary_cfi.py b/DQMOffline/Ecal/python/EBRecoSummary_cfi.py index e61acec249f58..c6e7ef3a3059c 100644 --- a/DQMOffline/Ecal/python/EBRecoSummary_cfi.py +++ b/DQMOffline/Ecal/python/EBRecoSummary_cfi.py @@ -2,10 +2,10 @@ ecalBarrelRecoSummary = cms.EDAnalyzer("EBRecoSummary", prefixME = cms.untracked.string('EcalBarrel'), - superClusterCollection_EB = cms.InputTag("correctedHybridSuperClusters"), + superClusterCollection_EB = cms.InputTag("particleFlowSuperClusterECAL", "particleFlowSuperClusterECALBarrel"), recHitCollection_EB = cms.InputTag("ecalRecHit","EcalRecHitsEB"), redRecHitCollection_EB = cms.InputTag("reducedEcalRecHitsEB"), - basicClusterCollection_EB = cms.InputTag("hybridSuperClusters","hybridBarrelBasicClusters"), + basicClusterCollection_EB = cms.InputTag("particleFlowClusterECAL"), ethrEB = cms.double(0.8), diff --git a/DQMOffline/Ecal/python/EEClusterTaskExtras_cfi.py b/DQMOffline/Ecal/python/EEClusterTaskExtras_cfi.py index 078c580b4dff6..cfcf84d60c21c 100644 --- a/DQMOffline/Ecal/python/EEClusterTaskExtras_cfi.py +++ b/DQMOffline/Ecal/python/EEClusterTaskExtras_cfi.py @@ -4,8 +4,7 @@ prefixME = cms.untracked.string('EcalEndcap'), enableCleanup = cms.untracked.bool(False), mergeRuns = cms.untracked.bool(False), - BasicClusterCollection = cms.InputTag("multi5x5SuperClusters","multi5x5EndcapBasicClusters"), - SuperClusterCollection = cms.InputTag("multi5x5SuperClusters","multi5x5EndcapSuperClusters"), + SuperClusterCollection = cms.InputTag("particleFlowSuperClusterECAL", "particleFlowSuperClusterECALEndcapWithPreshower"), EcalRecHitCollection = cms.InputTag("ecalRecHit","EcalRecHitsEE"), l1GlobalReadoutRecord = cms.InputTag('gtDigis'), l1GlobalMuonReadoutRecord = cms.InputTag("gtDigis") diff --git a/DQMOffline/Ecal/python/EERecoSummary_cfi.py b/DQMOffline/Ecal/python/EERecoSummary_cfi.py index fc1a00ff22177..45cc075f83f85 100644 --- a/DQMOffline/Ecal/python/EERecoSummary_cfi.py +++ b/DQMOffline/Ecal/python/EERecoSummary_cfi.py @@ -2,8 +2,8 @@ ecalEndcapRecoSummary = cms.EDAnalyzer("EERecoSummary", prefixME = cms.untracked.string('EcalEndcap'), - superClusterCollection_EE = cms.InputTag("correctedMulti5x5SuperClustersWithPreshower"), - basicClusterCollection_EE = cms.InputTag("multi5x5SuperClusters","multi5x5EndcapBasicClusters"), + superClusterCollection_EE = cms.InputTag("particleFlowSuperClusterECAL", "particleFlowSuperClusterECALEndcapWithPreshower"), + basicClusterCollection_EE = cms.InputTag("particleFlowClusterECAL"), recHitCollection_EE = cms.InputTag("ecalRecHit","EcalRecHitsEE"), redRecHitCollection_EE = cms.InputTag("reducedEcalRecHitsEE"), diff --git a/DQMOffline/Ecal/python/ecal_dqm_source_offline_cff.py b/DQMOffline/Ecal/python/ecal_dqm_source_offline_cff.py index 4bbb383a5986d..d61779d4b5d1d 100644 --- a/DQMOffline/Ecal/python/ecal_dqm_source_offline_cff.py +++ b/DQMOffline/Ecal/python/ecal_dqm_source_offline_cff.py @@ -290,18 +290,7 @@ ecalEndcapTriggerTowerTask.EcalTrigPrimDigiCollectionEmul = 'valEcalTriggerPrimitiveDigis' ecalBarrelClusterTask.EcalRawDataCollection = 'ecalDigis:' -ecalBarrelClusterTask.BasicClusterCollection = 'hybridSuperClusters:hybridBarrelBasicClusters' -ecalBarrelClusterTask.SuperClusterCollection = 'correctedHybridSuperClusters:' - ecalEndcapClusterTask.EcalRawDataCollection = 'ecalDigis:' -ecalEndcapClusterTask.BasicClusterCollection = 'multi5x5SuperClusters:multi5x5EndcapBasicClusters' -ecalEndcapClusterTask.SuperClusterCollection = 'multi5x5SuperClusters:multi5x5EndcapSuperClusters' - -ecalBarrelClusterTaskExtras.BasicClusterCollection = 'hybridSuperClusters:hybridBarrelBasicClusters' -ecalBarrelClusterTaskExtras.SuperClusterCollection = 'correctedHybridSuperClusters:' - -ecalEndcapClusterTaskExtras.BasicClusterCollection = 'multi5x5SuperClusters:multi5x5EndcapBasicClusters' -ecalEndcapClusterTaskExtras.SuperClusterCollection = 'multi5x5SuperClusters:multi5x5EndcapSuperClusters' ecalBarrelHltTask.EBDetIdCollection0 = 'ecalDigis:EcalIntegrityDCCSizeErrors' ecalBarrelHltTask.EBDetIdCollection1 = 'ecalDigis:EcalIntegrityGainErrors' diff --git a/DQMOffline/Ecal/src/EBClusterTaskExtras.cc b/DQMOffline/Ecal/src/EBClusterTaskExtras.cc index 04cd7e1efb449..5114f33eb47a0 100644 --- a/DQMOffline/Ecal/src/EBClusterTaskExtras.cc +++ b/DQMOffline/Ecal/src/EBClusterTaskExtras.cc @@ -811,7 +811,7 @@ void EBClusterTaskExtras::analyze(const Event& e, const EventSetup& c) { } } else { - LogWarning("EBClusterTaskExtras") << "SuperClusterCollection not available"; + // LogWarning("EBClusterTaskExtras") << "SuperClusterCollection not available"; } diff --git a/DQMOffline/Ecal/src/EBRecoSummary.cc b/DQMOffline/Ecal/src/EBRecoSummary.cc index 2ccc9d798e782..8bb8c78986204 100644 --- a/DQMOffline/Ecal/src/EBRecoSummary.cc +++ b/DQMOffline/Ecal/src/EBRecoSummary.cc @@ -20,7 +20,6 @@ #include "FWCore/ServiceRegistry/interface/Service.h" #include "CommonTools/UtilAlgos/interface/TFileService.h" - #include "Geometry/CaloTopology/interface/CaloTopology.h" #include "Geometry/CaloGeometry/interface/CaloGeometry.h" #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h" @@ -70,9 +69,11 @@ EBRecoSummary::EBRecoSummary(const edm::ParameterSet& ps) //now do what ever initialization is needed recHitCollection_EB_ = consumes(ps.getParameter("recHitCollection_EB")); redRecHitCollection_EB_ = consumes(ps.getParameter("redRecHitCollection_EB")); - basicClusterCollection_EB_ = consumes(ps.getParameter("basicClusterCollection_EB")); + basicClusterCollection_EB_ = consumes >(ps.getParameter("basicClusterCollection_EB")); superClusterCollection_EB_ = consumes(ps.getParameter("superClusterCollection_EB")); + std::cout << "EBRecoSummary " << ps.getParameter("basicClusterCollection_EB") << std::endl; + ethrEB_ = ps.getParameter("ethrEB"); scEtThrEB_ = ps.getParameter("scEtThrEB"); @@ -194,26 +195,28 @@ void EBRecoSummary::analyze(const edm::Event& ev, const edm::EventSetup& iSetup) //--- BASIC CLUSTERS -------------------------------------------------------------- // ... barrel - edm::Handle basicClusters_EB_h; - ev.getByToken( basicClusterCollection_EB_, basicClusters_EB_h ); - const reco::BasicClusterCollection* theBarrelBasicClusters = basicClusters_EB_h.product () ; - if ( ! basicClusters_EB_h.isValid() ) { - edm::LogWarning("EBRecoSummary") << "basicClusters_EB_h not found"; - } + edm::Handle > basicClusters_EB_h; + if(ev.getByToken( basicClusterCollection_EB_, basicClusters_EB_h )){ + + const edm::View* theBarrelBasicClusters = basicClusters_EB_h.product () ; - for (reco::BasicClusterCollection::const_iterator itBC = theBarrelBasicClusters->begin(); - itBC != theBarrelBasicClusters->end(); ++itBC ) { + for (edm::View::const_iterator itBC = theBarrelBasicClusters->begin(); + itBC != theBarrelBasicClusters->end(); ++itBC ) { - //Get the associated RecHits - const std::vector > & hits= itBC->hitsAndFractions(); - for (std::vector > ::const_iterator rh = hits.begin(); rh!=hits.end(); ++rh){ + //Get the associated RecHits + const std::vector > & hits= itBC->hitsAndFractions(); + for (std::vector > ::const_iterator rh = hits.begin(); rh!=hits.end(); ++rh){ - EBRecHitCollection::const_iterator itrechit = theBarrelEcalRecHits->find((*rh).first); - if (itrechit==theBarrelEcalRecHits->end()) continue; - h_basicClusters_recHits_EB_recoFlag -> Fill ( itrechit -> recoFlag() ); + EBRecHitCollection::const_iterator itrechit = theBarrelEcalRecHits->find((*rh).first); + if (itrechit==theBarrelEcalRecHits->end()) continue; + h_basicClusters_recHits_EB_recoFlag -> Fill ( itrechit -> recoFlag() ); - } + } + } + } + else{ + // edm::LogWarning("EBRecoSummary") << "basicClusters_EB_h not found"; } // Super Clusters diff --git a/DQMOffline/Ecal/src/EEClusterTaskExtras.cc b/DQMOffline/Ecal/src/EEClusterTaskExtras.cc index 4f51d6cdbcf91..e41e36519eef3 100644 --- a/DQMOffline/Ecal/src/EEClusterTaskExtras.cc +++ b/DQMOffline/Ecal/src/EEClusterTaskExtras.cc @@ -824,7 +824,7 @@ void EEClusterTaskExtras::analyze(const Event& e, const EventSetup& c) { } else { - LogWarning("EEClusterTaskExtras") << "SuperClusterCollection not available"; + // LogWarning("EEClusterTaskExtras") << "SuperClusterCollection not available"; } diff --git a/DQMOffline/Ecal/src/EERecoSummary.cc b/DQMOffline/Ecal/src/EERecoSummary.cc index 20f94291db4c3..2750f2d543de5 100644 --- a/DQMOffline/Ecal/src/EERecoSummary.cc +++ b/DQMOffline/Ecal/src/EERecoSummary.cc @@ -69,7 +69,7 @@ EERecoSummary::EERecoSummary(const edm::ParameterSet& ps) //now do what ever initialization is needed recHitCollection_EE_ = consumes(ps.getParameter("recHitCollection_EE")); redRecHitCollection_EE_ = consumes(ps.getParameter("redRecHitCollection_EE")); - basicClusterCollection_EE_ = consumes(ps.getParameter("basicClusterCollection_EE")); + basicClusterCollection_EE_ = consumes >(ps.getParameter("basicClusterCollection_EE")); superClusterCollection_EE_ = consumes(ps.getParameter("superClusterCollection_EE")); ethrEE_ = ps.getParameter("ethrEE"); @@ -221,23 +221,24 @@ void EERecoSummary::analyze(const edm::Event& ev, const edm::EventSetup& iSetup) //--- BASIC CLUSTERS -------------------------------------------------------------- // ... endcap - edm::Handle basicClusters_EE_h; - ev.getByToken( basicClusterCollection_EE_, basicClusters_EE_h ); - if ( ! basicClusters_EE_h.isValid() ) { - edm::LogWarning("EERecoSummary") << "basicClusters_EE_h not found"; - } + edm::Handle > basicClusters_EE_h; + if(ev.getByToken( basicClusterCollection_EE_, basicClusters_EE_h )){ - for (unsigned int icl = 0; icl < basicClusters_EE_h->size(); ++icl) { + for (unsigned int icl = 0; icl < basicClusters_EE_h->size(); ++icl) { - //Get the associated RecHits - const std::vector > & hits= (*basicClusters_EE_h)[icl].hitsAndFractions(); - for (std::vector > ::const_iterator rh = hits.begin(); rh!=hits.end(); ++rh){ + //Get the associated RecHits + const std::vector > & hits= (*basicClusters_EE_h)[icl].hitsAndFractions(); + for (std::vector > ::const_iterator rh = hits.begin(); rh!=hits.end(); ++rh){ - EBRecHitCollection::const_iterator itrechit = theEndcapEcalRecHits->find((*rh).first); - if (itrechit==theEndcapEcalRecHits->end()) continue; - h_basicClusters_recHits_EE_recoFlag -> Fill ( itrechit -> recoFlag() ); - } + EBRecHitCollection::const_iterator itrechit = theEndcapEcalRecHits->find((*rh).first); + if (itrechit==theEndcapEcalRecHits->end()) continue; + h_basicClusters_recHits_EE_recoFlag -> Fill ( itrechit -> recoFlag() ); + } + } + } + else{ + // edm::LogWarning("EERecoSummary") << "basicClusters_EE_h not found"; } // Super Clusters From da1dc8746be2e0e72f712dcae5e78289bcd24003 Mon Sep 17 00:00:00 2001 From: Yutaro Date: Wed, 18 Dec 2013 02:33:15 +0100 Subject: [PATCH 2/2] Bugfix for HI and cosmic configurations --- DQMOffline/Ecal/python/ecal_dqm_source_offline_HI_cff.py | 2 -- DQMOffline/Ecal/python/ecal_dqm_source_offline_cosmic_cff.py | 2 -- 2 files changed, 4 deletions(-) diff --git a/DQMOffline/Ecal/python/ecal_dqm_source_offline_HI_cff.py b/DQMOffline/Ecal/python/ecal_dqm_source_offline_HI_cff.py index 5eef5edaee9a3..b3e1b906cea9a 100644 --- a/DQMOffline/Ecal/python/ecal_dqm_source_offline_HI_cff.py +++ b/DQMOffline/Ecal/python/ecal_dqm_source_offline_HI_cff.py @@ -277,10 +277,8 @@ ecalEndcapClusterTask.BasicClusterCollection = 'multi5x5SuperClusters:multi5x5EndcapBasicClusters' ecalEndcapClusterTask.SuperClusterCollection = 'multi5x5SuperClusters:multi5x5EndcapSuperClusters' -ecalBarrelClusterTaskExtras.BasicClusterCollection = 'hybridSuperClusters:hybridBarrelBasicClusters' ecalBarrelClusterTaskExtras.SuperClusterCollection = 'correctedHybridSuperClusters:' -ecalEndcapClusterTaskExtras.BasicClusterCollection = 'multi5x5SuperClusters:multi5x5EndcapBasicClusters' ecalEndcapClusterTaskExtras.SuperClusterCollection = 'multi5x5SuperClusters:multi5x5EndcapSuperClusters' ecalBarrelHltTask.EBDetIdCollection0 = 'ecalDigis:EcalIntegrityDCCSizeErrors' diff --git a/DQMOffline/Ecal/python/ecal_dqm_source_offline_cosmic_cff.py b/DQMOffline/Ecal/python/ecal_dqm_source_offline_cosmic_cff.py index a6be9d2f99de4..bac4c40f25607 100644 --- a/DQMOffline/Ecal/python/ecal_dqm_source_offline_cosmic_cff.py +++ b/DQMOffline/Ecal/python/ecal_dqm_source_offline_cosmic_cff.py @@ -285,10 +285,8 @@ ecalEndcapClusterTask.BasicClusterCollection = 'cosmicBasicClusters:CosmicEndcapBasicClusters' ecalEndcapClusterTask.SuperClusterCollection = 'cosmicSuperClusters:CosmicEndcapSuperClusters' -ecalBarrelClusterTaskExtras.BasicClusterCollection = 'cosmicBasicClusters:CosmicBarrelBasicClusters' ecalBarrelClusterTaskExtras.SuperClusterCollection = 'cosmicSuperClusters:CosmicBarrelSuperClusters' -ecalEndcapClusterTaskExtras.BasicClusterCollection = 'cosmicBasicClusters:CosmicEndcapBasicClusters' ecalEndcapClusterTaskExtras.SuperClusterCollection = 'cosmicSuperClusters:CosmicEndcapSuperClusters' ecalBarrelHltTask.EBDetIdCollection0 = 'ecalDigis:EcalIntegrityDCCSizeErrors'