CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
EgammaHLTClusterShapeProducer Class Reference

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

Inheritance diagram for EgammaHLTClusterShapeProducer:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

 EgammaHLTClusterShapeProducer (const edm::ParameterSet &)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 
 ~EgammaHLTClusterShapeProducer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Attributes

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

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

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

25  : conf_(config)
26 {
27  // use configuration file to setup input/output collection names
28  recoEcalCandidateProducer_ = conf_.getParameter<edm::InputTag>("recoEcalCandidateProducer");
29 
30  ecalRechitEBTag_ = conf_.getParameter< edm::InputTag > ("ecalRechitEB");
31  ecalRechitEETag_ = conf_.getParameter< edm::InputTag > ("ecalRechitEE");
32  EtaOrIeta_ = conf_.getParameter< bool > ("isIeta");
33 
34  //register your products
35  produces < reco::RecoEcalCandidateIsolationMap >();
36 }
T getParameter(std::string const &) const
EgammaHLTClusterShapeProducer::~EgammaHLTClusterShapeProducer ( )

Definition at line 39 of file EgammaHLTClusterShapeProducer.cc.

39 {}

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().

49 {
50 
51  // Get the HLT filtered objects
53  iEvent.getByLabel(recoEcalCandidateProducer_,recoecalcandHandle);
54 
55  EcalClusterLazyTools lazyTools( iEvent, iSetup, ecalRechitEBTag_, ecalRechitEETag_ );
56 
58 
59  for(reco::RecoEcalCandidateCollection::const_iterator iRecoEcalCand = recoecalcandHandle->begin(); iRecoEcalCand != recoecalcandHandle->end(); iRecoEcalCand++){
60 
61  reco::RecoEcalCandidateRef recoecalcandref(recoecalcandHandle,iRecoEcalCand-recoecalcandHandle->begin());
62 
63  std::vector<float> vCov ;
64  double sigmaee;
65  if (EtaOrIeta_) {
66  vCov = lazyTools.localCovariances( *(recoecalcandref->superCluster()->seed()) );
67  sigmaee = sqrt(vCov[0]);
68  } else {
69  vCov = lazyTools.covariances( *(recoecalcandref->superCluster()->seed()) );
70  sigmaee = sqrt(vCov[0]);
71  double EtaSC = recoecalcandref->eta();
72  if (EtaSC > 1.479) sigmaee = sigmaee - 0.02*(EtaSC - 2.3);
73  }
74 
75  clshMap.insert(recoecalcandref, sigmaee);
76 
77  }
78 
79  std::auto_ptr<reco::RecoEcalCandidateIsolationMap> clushMap(new reco::RecoEcalCandidateIsolationMap(clshMap));
80  iEvent.put(clushMap);
81 
82 }
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
T sqrt(T t)
Definition: SSEVec.h:46
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
void insert(const key_type &k, const data_type &v)
insert an association

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().