#include <Multi5x5SuperClusterProducer.h>
Definition at line 18 of file Multi5x5SuperClusterProducer.h.
Multi5x5SuperClusterProducer::Multi5x5SuperClusterProducer | ( | const edm::ParameterSet & | ps | ) |
Definition at line 24 of file Multi5x5SuperClusterProducer.cc.
References barrelClusterCollection_, barrelClusterProducer_, barrelEtaSearchRoad_, barrelPhiSearchRoad_, barrelSuperclusterCollection_, bremAlgo_p, doBarrel_, doEndcaps_, endcapClusterCollection_, endcapClusterProducer_, endcapEtaSearchRoad_, endcapPhiSearchRoad_, endcapSuperclusterCollection_, edm::ParameterSet::getParameter(), nEvt_, noSuperClusters, seedTransverseEnergyThreshold_, and totalE.
{ endcapClusterProducer_ = ps.getParameter<std::string>("endcapClusterProducer"); barrelClusterProducer_ = ps.getParameter<std::string>("barrelClusterProducer"); endcapClusterCollection_ = ps.getParameter<std::string>("endcapClusterCollection"); barrelClusterCollection_ = ps.getParameter<std::string>("barrelClusterCollection"); endcapSuperclusterCollection_ = ps.getParameter<std::string>("endcapSuperclusterCollection"); barrelSuperclusterCollection_ = ps.getParameter<std::string>("barrelSuperclusterCollection"); doBarrel_ = ps.getParameter<bool>("doBarrel"); doEndcaps_ = ps.getParameter<bool>("doEndcaps"); barrelEtaSearchRoad_ = ps.getParameter<double>("barrelEtaSearchRoad"); barrelPhiSearchRoad_ = ps.getParameter<double>("barrelPhiSearchRoad"); endcapEtaSearchRoad_ = ps.getParameter<double>("endcapEtaSearchRoad"); endcapPhiSearchRoad_ = ps.getParameter<double>("endcapPhiSearchRoad"); seedTransverseEnergyThreshold_ = ps.getParameter<double>("seedTransverseEnergyThreshold"); const edm::ParameterSet bremRecoveryPset = ps.getParameter<edm::ParameterSet>("bremRecoveryPset"); bool dynamicPhiRoad = ps.getParameter<bool>("dynamicPhiRoad"); bremAlgo_p = new Multi5x5BremRecoveryClusterAlgo(bremRecoveryPset, barrelEtaSearchRoad_, barrelPhiSearchRoad_, endcapEtaSearchRoad_, endcapPhiSearchRoad_, dynamicPhiRoad, seedTransverseEnergyThreshold_); produces< reco::SuperClusterCollection >(endcapSuperclusterCollection_); produces< reco::SuperClusterCollection >(barrelSuperclusterCollection_); totalE = 0; noSuperClusters = 0; nEvt_ = 0; }
Multi5x5SuperClusterProducer::~Multi5x5SuperClusterProducer | ( | ) |
Definition at line 61 of file Multi5x5SuperClusterProducer.cc.
References bremAlgo_p.
{ delete bremAlgo_p; }
bool Multi5x5SuperClusterProducer::counterExceeded | ( | ) | const [inline, private] |
Definition at line 68 of file Multi5x5SuperClusterProducer.h.
References nEvt_, and nMaxPrintout_.
{ return ((nEvt_ > nMaxPrintout_) || (nMaxPrintout_ < 0));}
void Multi5x5SuperClusterProducer::endJob | ( | void | ) | [virtual] |
Reimplemented from edm::EDProducer.
Definition at line 67 of file Multi5x5SuperClusterProducer.cc.
References noSuperClusters, and totalE.
{ double averEnergy = 0.; std::ostringstream str; str << "Multi5x5SuperClusterProducer::endJob()\n" << " total # reconstructed super clusters: " << noSuperClusters << "\n" << " total energy of all clusters: " << totalE << "\n"; if(noSuperClusters>0) { averEnergy = totalE / noSuperClusters; str << " average SuperCluster energy = " << averEnergy << "\n"; } edm::LogInfo("Multi5x5SuperClusterProducerInfo") << str.str() << "\n"; }
void Multi5x5SuperClusterProducer::getClusterPtrVector | ( | edm::Event & | evt, |
std::string | clusterProducer_, | ||
std::string | clusterCollection_, | ||
reco::CaloClusterPtrVector * | clusterPtrVector_p | ||
) | [private] |
Definition at line 122 of file Multi5x5SuperClusterProducer.cc.
References edm::Event::getByLabel(), i, edm::HandleBase::isValid(), edm::Handle< T >::product(), and edm::PtrVector< T >::push_back().
Referenced by produceSuperclustersForECALPart().
{ edm::Handle<reco::BasicClusterCollection> bccHandle; try { evt.getByLabel(clusterProducer_, clusterCollection_, bccHandle); if (!(bccHandle.isValid())) { edm::LogError("Multi5x5SuperClusterProducerError") << "could not get a handle on the BasicCluster Collection!"; clusterPtrVector_p = 0; } } catch ( cms::Exception& ex ) { edm::LogError("Multi5x5SuperClusterProducerError") << "Error! can't get the product " << clusterCollection_.c_str(); clusterPtrVector_p = 0; } const reco::BasicClusterCollection *clusterCollection_p = bccHandle.product(); for (unsigned int i = 0; i < clusterCollection_p->size(); i++) { clusterPtrVector_p->push_back(reco::CaloClusterPtr(bccHandle, i)); } }
void Multi5x5SuperClusterProducer::outputValidationInfo | ( | reco::SuperClusterCollection & | superclusterCollection | ) | [private] |
void Multi5x5SuperClusterProducer::produce | ( | edm::Event & | evt, |
const edm::EventSetup & | es | ||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 82 of file Multi5x5SuperClusterProducer.cc.
References barrelClusterCollection_, barrelClusterProducer_, barrelSuperclusterCollection_, doBarrel_, doEndcaps_, endcapClusterCollection_, endcapClusterProducer_, endcapSuperclusterCollection_, nEvt_, and produceSuperclustersForECALPart().
void Multi5x5SuperClusterProducer::produceSuperclustersForECALPart | ( | edm::Event & | evt, |
std::string | clusterProducer, | ||
std::string | clusterCollection, | ||
std::string | superclusterColection | ||
) | [private] |
Definition at line 94 of file Multi5x5SuperClusterProducer.cc.
References bremAlgo_p, getClusterPtrVector(), Multi5x5BremRecoveryClusterAlgo::makeSuperClusters(), noSuperClusters, edm::Event::put(), and totalE.
Referenced by produce().
{ // get the cluster collection out and turn it to a BasicClusterRefVector: reco::CaloClusterPtrVector *clusterPtrVector_p = new reco::CaloClusterPtrVector; getClusterPtrVector(evt, clusterProducer, clusterCollection, clusterPtrVector_p); // run the brem recovery and get the SC collection std::auto_ptr<reco::SuperClusterCollection> superclusters_ap(new reco::SuperClusterCollection(bremAlgo_p->makeSuperClusters(*clusterPtrVector_p))); // count the total energy and the number of superclusters reco::SuperClusterCollection::iterator it; for (it = superclusters_ap->begin(); it != superclusters_ap->end(); it++) { totalE += it->energy(); noSuperClusters++; } // put the SC collection in the event evt.put(superclusters_ap, superclusterCollection); delete clusterPtrVector_p; }
std::string Multi5x5SuperClusterProducer::barrelClusterCollection_ [private] |
Definition at line 36 of file Multi5x5SuperClusterProducer.h.
Referenced by Multi5x5SuperClusterProducer(), and produce().
std::string Multi5x5SuperClusterProducer::barrelClusterProducer_ [private] |
Definition at line 39 of file Multi5x5SuperClusterProducer.h.
Referenced by Multi5x5SuperClusterProducer(), and produce().
float Multi5x5SuperClusterProducer::barrelEtaSearchRoad_ [private] |
Definition at line 44 of file Multi5x5SuperClusterProducer.h.
Referenced by Multi5x5SuperClusterProducer().
float Multi5x5SuperClusterProducer::barrelPhiSearchRoad_ [private] |
Definition at line 45 of file Multi5x5SuperClusterProducer.h.
Referenced by Multi5x5SuperClusterProducer().
std::string Multi5x5SuperClusterProducer::barrelSuperclusterCollection_ [private] |
Definition at line 42 of file Multi5x5SuperClusterProducer.h.
Referenced by Multi5x5SuperClusterProducer(), and produce().
Definition at line 53 of file Multi5x5SuperClusterProducer.h.
Referenced by Multi5x5SuperClusterProducer(), produceSuperclustersForECALPart(), and ~Multi5x5SuperClusterProducer().
bool Multi5x5SuperClusterProducer::doBarrel_ [private] |
Definition at line 50 of file Multi5x5SuperClusterProducer.h.
Referenced by Multi5x5SuperClusterProducer(), and produce().
bool Multi5x5SuperClusterProducer::doEndcaps_ [private] |
Definition at line 51 of file Multi5x5SuperClusterProducer.h.
Referenced by Multi5x5SuperClusterProducer(), and produce().
std::string Multi5x5SuperClusterProducer::endcapClusterCollection_ [private] |
Definition at line 35 of file Multi5x5SuperClusterProducer.h.
Referenced by Multi5x5SuperClusterProducer(), and produce().
std::string Multi5x5SuperClusterProducer::endcapClusterProducer_ [private] |
Definition at line 38 of file Multi5x5SuperClusterProducer.h.
Referenced by Multi5x5SuperClusterProducer(), and produce().
float Multi5x5SuperClusterProducer::endcapEtaSearchRoad_ [private] |
Definition at line 46 of file Multi5x5SuperClusterProducer.h.
Referenced by Multi5x5SuperClusterProducer().
float Multi5x5SuperClusterProducer::endcapPhiSearchRoad_ [private] |
Definition at line 47 of file Multi5x5SuperClusterProducer.h.
Referenced by Multi5x5SuperClusterProducer().
std::string Multi5x5SuperClusterProducer::endcapSuperclusterCollection_ [private] |
Definition at line 41 of file Multi5x5SuperClusterProducer.h.
Referenced by Multi5x5SuperClusterProducer(), and produce().
int Multi5x5SuperClusterProducer::nEvt_ [private] |
Definition at line 33 of file Multi5x5SuperClusterProducer.h.
Referenced by counterExceeded(), Multi5x5SuperClusterProducer(), and produce().
int Multi5x5SuperClusterProducer::nMaxPrintout_ [private] |
Definition at line 32 of file Multi5x5SuperClusterProducer.h.
Referenced by counterExceeded().
int Multi5x5SuperClusterProducer::noSuperClusters [private] |
Definition at line 56 of file Multi5x5SuperClusterProducer.h.
Referenced by endJob(), Multi5x5SuperClusterProducer(), and produceSuperclustersForECALPart().
float Multi5x5SuperClusterProducer::seedTransverseEnergyThreshold_ [private] |
Definition at line 48 of file Multi5x5SuperClusterProducer.h.
Referenced by Multi5x5SuperClusterProducer().
double Multi5x5SuperClusterProducer::totalE [private] |
Definition at line 55 of file Multi5x5SuperClusterProducer.h.
Referenced by endJob(), Multi5x5SuperClusterProducer(), and produceSuperclustersForECALPart().