Skip to content

Commit

Permalink
Updating the default cluster collections to PF
Browse files Browse the repository at this point in the history
  • Loading branch information
yiiyama committed Dec 18, 2013
1 parent 323efe4 commit 1ca9856
Show file tree
Hide file tree
Showing 17 changed files with 89 additions and 91 deletions.
6 changes: 4 additions & 2 deletions DQM/EcalBarrelMonitorTasks/interface/EBClusterTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -69,7 +71,7 @@ bool enableCleanup_;
bool mergeRuns_;

edm::EDGetTokenT<EcalRawDataCollection> EcalRawDataCollection_;
edm::EDGetTokenT<reco::BasicClusterCollection> BasicClusterCollection_;
edm::EDGetTokenT<edm::View<reco::CaloCluster> > BasicClusterCollection_;
edm::EDGetTokenT<reco::SuperClusterCollection> SuperClusterCollection_;
edm::EDGetTokenT<EcalRecHitCollection> EcalRecHitCollection_;

Expand Down
4 changes: 2 additions & 2 deletions DQM/EcalBarrelMonitorTasks/python/EBClusterTask_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
)

26 changes: 13 additions & 13 deletions DQM/EcalBarrelMonitorTasks/src/EBClusterTask.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ EBClusterTask::EBClusterTask(const edm::ParameterSet& ps){

// parameters...
EcalRawDataCollection_ = consumes<EcalRawDataCollection>(ps.getParameter<edm::InputTag>("EcalRawDataCollection"));
BasicClusterCollection_ = consumes<reco::BasicClusterCollection>(ps.getParameter<edm::InputTag>("BasicClusterCollection"));
BasicClusterCollection_ = consumes<edm::View<reco::CaloCluster> >(ps.getParameter<edm::InputTag>("BasicClusterCollection"));
SuperClusterCollection_ = consumes<reco::SuperClusterCollection>(ps.getParameter<edm::InputTag>("SuperClusterCollection"));
EcalRecHitCollection_ = consumes<EcalRecHitCollection>(ps.getParameter<edm::InputTag>("EcalRecHitCollection"));

Expand Down Expand Up @@ -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<reco::CaloCluster const*> bcSel;

// --- Barrel Basic Clusters ---
edm::Handle<reco::BasicClusterCollection> pBasicClusters;
edm::Handle<edm::View<reco::CaloCluster> > 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<reco::CaloCluster>::const_iterator bCluster = pBasicClusters->begin(); bCluster != pBasicClusters->end(); ++bCluster ) {

meBCEne_->Fill(bCluster->energy());
meBCSiz_->Fill(float(bCluster->size()));
Expand Down Expand Up @@ -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<reco::CaloCluster const*>::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<reco::CaloCluster const*>::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;

Expand Down Expand Up @@ -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";

}

Expand Down
6 changes: 4 additions & 2 deletions DQM/EcalEndcapMonitorTasks/interface/EEClusterTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -69,7 +71,7 @@ bool enableCleanup_;
bool mergeRuns_;

edm::EDGetTokenT<EcalRawDataCollection> EcalRawDataCollection_;
edm::EDGetTokenT<reco::BasicClusterCollection> BasicClusterCollection_;
edm::EDGetTokenT<edm::View<reco::CaloCluster> > BasicClusterCollection_;
edm::EDGetTokenT<reco::SuperClusterCollection> SuperClusterCollection_;
edm::EDGetTokenT<EcalRecHitCollection> EcalRecHitCollection_;

Expand Down
4 changes: 2 additions & 2 deletions DQM/EcalEndcapMonitorTasks/python/EEClusterTask_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
)

26 changes: 13 additions & 13 deletions DQM/EcalEndcapMonitorTasks/src/EEClusterTask.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ EEClusterTask::EEClusterTask(const edm::ParameterSet& ps){

// parameters...
EcalRawDataCollection_ = consumes<EcalRawDataCollection>(ps.getParameter<edm::InputTag>("EcalRawDataCollection"));
BasicClusterCollection_ = consumes<reco::BasicClusterCollection>(ps.getParameter<edm::InputTag>("BasicClusterCollection"));
BasicClusterCollection_ = consumes<edm::View<reco::CaloCluster> >(ps.getParameter<edm::InputTag>("BasicClusterCollection"));
SuperClusterCollection_ = consumes<reco::SuperClusterCollection>(ps.getParameter<edm::InputTag>("SuperClusterCollection"));
EcalRecHitCollection_ = consumes<EcalRecHitCollection>(ps.getParameter<edm::InputTag>("EcalRecHitCollection"));

Expand Down Expand Up @@ -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<reco::CaloCluster const*> bcSel;

// --- Endcap Basic Clusters ---
edm::Handle<reco::BasicClusterCollection> pBasicClusters;
edm::Handle<edm::View<reco::CaloCluster> > 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<reco::CaloCluster>::const_iterator bCluster = pBasicClusters->begin(); bCluster != pBasicClusters->end(); ++bCluster ) {

meBCEne_->Fill(bCluster->energy());
meBCSiz_->Fill(float(bCluster->size()));
Expand Down Expand Up @@ -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<reco::CaloCluster const*>::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<reco::CaloCluster const*>::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;

Expand Down Expand Up @@ -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";

}

Expand Down
6 changes: 4 additions & 2 deletions DQMOffline/Ecal/interface/EBRecoSummary.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -88,7 +90,7 @@ class EBRecoSummary : public edm::EDAnalyzer {
// ----------member data ---------------------------
edm::EDGetTokenT<EcalRecHitCollection> recHitCollection_EB_;
edm::EDGetTokenT<EcalRecHitCollection> redRecHitCollection_EB_;
edm::EDGetTokenT<reco::BasicClusterCollection> basicClusterCollection_EB_;
edm::EDGetTokenT<edm::View<reco::CaloCluster> > basicClusterCollection_EB_;
edm::EDGetTokenT<reco::SuperClusterCollection> superClusterCollection_EB_;

double ethrEB_;
Expand Down
6 changes: 4 additions & 2 deletions DQMOffline/Ecal/interface/EERecoSummary.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<EcalRecHit, EcalRecHit, bool>
Expand Down Expand Up @@ -87,7 +89,7 @@ class EERecoSummary : public edm::EDAnalyzer {
// ----------member data ---------------------------
edm::EDGetTokenT<EcalRecHitCollection> recHitCollection_EE_;
edm::EDGetTokenT<EcalRecHitCollection> redRecHitCollection_EE_;
edm::EDGetTokenT<reco::BasicClusterCollection> basicClusterCollection_EE_;
edm::EDGetTokenT<edm::View<reco::CaloCluster> > basicClusterCollection_EE_;
edm::EDGetTokenT<reco::SuperClusterCollection> superClusterCollection_EE_;

double ethrEE_;
Expand Down
4 changes: 1 addition & 3 deletions DQMOffline/Ecal/python/EBClusterTaskExtras_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions DQMOffline/Ecal/python/EBRecoSummary_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),

Expand Down
3 changes: 1 addition & 2 deletions DQMOffline/Ecal/python/EEClusterTaskExtras_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions DQMOffline/Ecal/python/EERecoSummary_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),

Expand Down
11 changes: 0 additions & 11 deletions DQMOffline/Ecal/python/ecal_dqm_source_offline_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/Ecal/src/EBClusterTaskExtras.cc
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ void EBClusterTaskExtras::analyze(const Event& e, const EventSetup& c) {
}
} else {

LogWarning("EBClusterTaskExtras") << "SuperClusterCollection not available";
// LogWarning("EBClusterTaskExtras") << "SuperClusterCollection not available";

}

Expand Down
Loading

0 comments on commit 1ca9856

Please sign in to comment.