CMS 3D CMS Logo

EgammaHLTClusterShapeProducer Class Reference

Author:
Roberto Covarelli (CERN)
More...

#include <RecoEgamma/EgammaHLTProducers/interface/EgammaHLTClusterShapeProducer.h>

Inheritance diagram for EgammaHLTClusterShapeProducer:

edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

 EgammaHLTClusterShapeProducer (const edm::ParameterSet &)
virtual void produce (edm::Event &, const edm::EventSetup &)
 ~EgammaHLTClusterShapeProducer ()

Private Attributes

edm::ParameterSet conf_
edm::InputTag ecalRechitEBTag_
edm::InputTag ecalRechitEETag_
bool EtaOrIeta_
edm::InputTag recoEcalCandidateProducer_


Detailed Description

Author:
Roberto Covarelli (CERN)

$Id:

Definition at line 32 of file EgammaHLTClusterShapeProducer.h.


Constructor & Destructor Documentation

EgammaHLTClusterShapeProducer::EgammaHLTClusterShapeProducer ( const edm::ParameterSet config  )  [explicit]

Definition at line 25 of file EgammaHLTClusterShapeProducer.cc.

References conf_, ecalRechitEBTag_, ecalRechitEETag_, EtaOrIeta_, edm::ParameterSet::getParameter(), and recoEcalCandidateProducer_.

00025                                                                                           : conf_(config)
00026 {
00027  // use configuration file to setup input/output collection names
00028   recoEcalCandidateProducer_ = conf_.getParameter<edm::InputTag>("recoEcalCandidateProducer");
00029 
00030   ecalRechitEBTag_ = conf_.getParameter< edm::InputTag > ("ecalRechitEB");
00031   ecalRechitEETag_ = conf_.getParameter< edm::InputTag > ("ecalRechitEE");
00032   EtaOrIeta_ = conf_.getParameter< bool > ("isIeta");
00033 
00034   //register your products
00035   produces < reco::RecoEcalCandidateIsolationMap >();
00036 }

EgammaHLTClusterShapeProducer::~EgammaHLTClusterShapeProducer (  ) 

Definition at line 39 of file EgammaHLTClusterShapeProducer.cc.

00039 {}


Member Function Documentation

void EgammaHLTClusterShapeProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
) [virtual]

Implements edm::EDProducer.

Definition at line 48 of file EgammaHLTClusterShapeProducer.cc.

References EcalClusterLazyTools::covariances(), ecalRechitEBTag_, ecalRechitEETag_, EtaOrIeta_, edm::Event::getByLabel(), edm::AssociationMap< Tag >::insert(), EcalClusterLazyTools::localCovariances(), edm::Event::put(), recoEcalCandidateProducer_, and funct::sqrt().

00049 {
00050   
00051   // Get the HLT filtered objects
00052   edm::Handle<reco::RecoEcalCandidateCollection> recoecalcandHandle;
00053   iEvent.getByLabel(recoEcalCandidateProducer_,recoecalcandHandle);
00054 
00055   EcalClusterLazyTools lazyTools( iEvent, iSetup, ecalRechitEBTag_, ecalRechitEETag_ );
00056   
00057   reco::RecoEcalCandidateIsolationMap clshMap;
00058    
00059   for(reco::RecoEcalCandidateCollection::const_iterator iRecoEcalCand = recoecalcandHandle->begin(); iRecoEcalCand != recoecalcandHandle->end(); iRecoEcalCand++){
00060     
00061     reco::RecoEcalCandidateRef recoecalcandref(recoecalcandHandle,iRecoEcalCand-recoecalcandHandle->begin());
00062     
00063     std::vector<float> vCov ; 
00064     double sigmaee;
00065     if (EtaOrIeta_) {
00066       vCov = lazyTools.localCovariances( *(recoecalcandref->superCluster()->seed()) );
00067       sigmaee = sqrt(vCov[0]);
00068     } else {
00069       vCov = lazyTools.covariances( *(recoecalcandref->superCluster()->seed()) );
00070       sigmaee = sqrt(vCov[0]);
00071       double EtaSC = recoecalcandref->eta();
00072       if (EtaSC > 1.479) sigmaee = sigmaee - 0.02*(EtaSC - 2.3); 
00073     }
00074 
00075     clshMap.insert(recoecalcandref, sigmaee);
00076     
00077   }
00078 
00079   std::auto_ptr<reco::RecoEcalCandidateIsolationMap> clushMap(new reco::RecoEcalCandidateIsolationMap(clshMap));
00080   iEvent.put(clushMap);
00081 
00082 }


Member Data Documentation

edm::ParameterSet EgammaHLTClusterShapeProducer::conf_ [private]

Definition at line 47 of file EgammaHLTClusterShapeProducer.h.

Referenced by EgammaHLTClusterShapeProducer().

edm::InputTag EgammaHLTClusterShapeProducer::ecalRechitEBTag_ [private]

Definition at line 43 of file EgammaHLTClusterShapeProducer.h.

Referenced by EgammaHLTClusterShapeProducer(), and produce().

edm::InputTag EgammaHLTClusterShapeProducer::ecalRechitEETag_ [private]

Definition at line 44 of file EgammaHLTClusterShapeProducer.h.

Referenced by EgammaHLTClusterShapeProducer(), and produce().

bool EgammaHLTClusterShapeProducer::EtaOrIeta_ [private]

Definition at line 45 of file EgammaHLTClusterShapeProducer.h.

Referenced by EgammaHLTClusterShapeProducer(), and produce().

edm::InputTag EgammaHLTClusterShapeProducer::recoEcalCandidateProducer_ [private]

Definition at line 42 of file EgammaHLTClusterShapeProducer.h.

Referenced by EgammaHLTClusterShapeProducer(), and produce().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:20:10 2009 for CMSSW by  doxygen 1.5.4