CMS 3D CMS Logo

Public Member Functions | Private Attributes

EgammaHLTClusterShapeProducer Class Reference

#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_.

                                                                                          : conf_(config)
{
 // use configuration file to setup input/output collection names
  recoEcalCandidateProducer_ = conf_.getParameter<edm::InputTag>("recoEcalCandidateProducer");

  ecalRechitEBTag_ = conf_.getParameter< edm::InputTag > ("ecalRechitEB");
  ecalRechitEETag_ = conf_.getParameter< edm::InputTag > ("ecalRechitEE");
  EtaOrIeta_ = conf_.getParameter< bool > ("isIeta");

  //register your products
  produces < reco::RecoEcalCandidateIsolationMap >();
}
EgammaHLTClusterShapeProducer::~EgammaHLTClusterShapeProducer ( )

Definition at line 39 of file EgammaHLTClusterShapeProducer.cc.

{}

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 mathSSE::sqrt().

{
  
  // Get the HLT filtered objects
  edm::Handle<reco::RecoEcalCandidateCollection> recoecalcandHandle;
  iEvent.getByLabel(recoEcalCandidateProducer_,recoecalcandHandle);

  EcalClusterLazyTools lazyTools( iEvent, iSetup, ecalRechitEBTag_, ecalRechitEETag_ );
  
  reco::RecoEcalCandidateIsolationMap clshMap;
   
  for(reco::RecoEcalCandidateCollection::const_iterator iRecoEcalCand = recoecalcandHandle->begin(); iRecoEcalCand != recoecalcandHandle->end(); iRecoEcalCand++){
    
    reco::RecoEcalCandidateRef recoecalcandref(recoecalcandHandle,iRecoEcalCand-recoecalcandHandle->begin());
    
    std::vector<float> vCov ; 
    double sigmaee;
    if (EtaOrIeta_) {
      vCov = lazyTools.localCovariances( *(recoecalcandref->superCluster()->seed()) );
      sigmaee = sqrt(vCov[0]);
    } else {
      vCov = lazyTools.covariances( *(recoecalcandref->superCluster()->seed()) );
      sigmaee = sqrt(vCov[0]);
      double EtaSC = recoecalcandref->eta();
      if (EtaSC > 1.479) sigmaee = sigmaee - 0.02*(EtaSC - 2.3); 
    }

    clshMap.insert(recoecalcandref, sigmaee);
    
  }

  std::auto_ptr<reco::RecoEcalCandidateIsolationMap> clushMap(new reco::RecoEcalCandidateIsolationMap(clshMap));
  iEvent.put(clushMap);

}

Member Data Documentation

Definition at line 47 of file EgammaHLTClusterShapeProducer.h.

Referenced by EgammaHLTClusterShapeProducer().

Definition at line 43 of file EgammaHLTClusterShapeProducer.h.

Referenced by EgammaHLTClusterShapeProducer(), and produce().

Definition at line 44 of file EgammaHLTClusterShapeProducer.h.

Referenced by EgammaHLTClusterShapeProducer(), and produce().

Definition at line 45 of file EgammaHLTClusterShapeProducer.h.

Referenced by EgammaHLTClusterShapeProducer(), and produce().

Definition at line 42 of file EgammaHLTClusterShapeProducer.h.

Referenced by EgammaHLTClusterShapeProducer(), and produce().