![]() |
![]() |
Producer for particle flow superclusters (PFSuperCluster). More...
#include <PFHCALSuperClusterProducer.h>
Public Member Functions | |
virtual void | endJob () |
PFHCALSuperClusterProducer (const edm::ParameterSet &) | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
~PFHCALSuperClusterProducer () | |
Private Attributes | |
PFHcalSuperClusterAlgo | hcalSuperClusterAlgo_ |
clustering algorithm | |
edm::InputTag | inputTagPFClusters_ |
edm::InputTag | inputTagPFClustersHO_ |
bool | verbose_ |
verbose ? |
Producer for particle flow superclusters (PFSuperCluster).
This producer makes use of PFHcalSuperClusterAlgo, the clustering algorithm for particle flow superclusters.
Definition at line 42 of file PFHCALSuperClusterProducer.h.
PFHCALSuperClusterProducer::PFHCALSuperClusterProducer | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 18 of file PFHCALSuperClusterProducer.cc.
References edm::ParameterSet::getParameter(), and edm::ParameterSet::getUntrackedParameter().
{ verbose_ = iConfig.getUntrackedParameter<bool>("verbose",false); // parameters for clustering // access to the collections of clusters: inputTagPFClusters_ = iConfig.getParameter<InputTag>("PFClusters"); inputTagPFClustersHO_ = iConfig.getParameter<InputTag>("PFClustersHO"); produces<reco::PFClusterCollection>(); produces<reco::PFSuperClusterCollection>(); }
PFHCALSuperClusterProducer::~PFHCALSuperClusterProducer | ( | ) |
Definition at line 39 of file PFHCALSuperClusterProducer.cc.
{}
void PFHCALSuperClusterProducer::endJob | ( | void | ) | [virtual] |
Reimplemented from edm::EDProducer.
Definition at line 91 of file PFHCALSuperClusterProducer.cc.
{ hcalSuperClusterAlgo_.write(); }
void PFHCALSuperClusterProducer::produce | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 44 of file PFHCALSuperClusterProducer.cc.
References Exception, newFWLiteAna::found, edm::Event::getByLabel(), and edm::Event::put().
{ edm::Handle< reco::PFClusterCollection > clustersHandle; edm::Handle< reco::PFClusterCollection > clustersHOHandle; // access the clusters in the event bool found = iEvent.getByLabel( inputTagPFClusters_, clustersHandle ); bool foundHO = iEvent.getByLabel( inputTagPFClustersHO_, clustersHOHandle ); if(!found ) { ostringstream err; err<<"cannot find clusters: "<<inputTagPFClusters_; LogError("PFHCALSuperClusterProducer")<<err.str()<<endl; throw cms::Exception( "MissingProduct", err.str()); } if(!foundHO ) { ostringstream err; err<<"cannot find HO clusters: "<<inputTagPFClustersHO_; LogError("PFHCALSuperClusterProducer")<<err.str()<<endl; throw cms::Exception( "MissingProduct", err.str()); } // do clustering hcalSuperClusterAlgo_.doClustering( clustersHandle, clustersHOHandle ); if( verbose_ ) { LogInfo("PFHCALSuperClusterProducer") <<" superclusters --------------------------------- "<<endl <<hcalSuperClusterAlgo_<<endl; } // get clusters out of the clustering algorithm // and put them in the event. There is no copy. auto_ptr< vector<reco::PFCluster> > outClusters( hcalSuperClusterAlgo_.clusters() ); auto_ptr< vector<reco::PFSuperCluster> > outSuperClusters( hcalSuperClusterAlgo_.superClusters() ); iEvent.put( outClusters ); iEvent.put( outSuperClusters ); }
clustering algorithm
Definition at line 58 of file PFHCALSuperClusterProducer.h.
Definition at line 65 of file PFHCALSuperClusterProducer.h.
Definition at line 66 of file PFHCALSuperClusterProducer.h.
bool PFHCALSuperClusterProducer::verbose_ [private] |
verbose ?
Definition at line 62 of file PFHCALSuperClusterProducer.h.