CMS 3D CMS Logo

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

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

Inheritance diagram for EgammaHLTClusterShapeProducer:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase 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 ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Attributes

edm::ParameterSet conf_
 
edm::InputTag ecalRechitEBTag_
 
edm::InputTag ecalRechitEETag_
 
bool EtaOrIeta_
 
edm::EDGetTokenT
< reco::RecoEcalCandidateCollection
recoEcalCandidateProducer_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Author
Roberto Covarelli (CERN)

$Id:

Definition at line 29 of file EgammaHLTClusterShapeProducer.h.

Constructor & Destructor Documentation

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

Definition at line 18 of file EgammaHLTClusterShapeProducer.cc.

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

18  : conf_(config) {
19 
20  // use configuration file to setup input/output collection names
21  recoEcalCandidateProducer_ = consumes<reco::RecoEcalCandidateCollection>(conf_.getParameter<edm::InputTag>("recoEcalCandidateProducer"));
22 
23  ecalRechitEBTag_ = conf_.getParameter< edm::InputTag > ("ecalRechitEB");
24  ecalRechitEETag_ = conf_.getParameter< edm::InputTag > ("ecalRechitEE");
25  EtaOrIeta_ = conf_.getParameter< bool > ("isIeta");
26 
27  //register your products
28  produces < reco::RecoEcalCandidateIsolationMap >();
29 }
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::RecoEcalCandidateCollection > recoEcalCandidateProducer_
EgammaHLTClusterShapeProducer::~EgammaHLTClusterShapeProducer ( )

Definition at line 31 of file EgammaHLTClusterShapeProducer.cc.

32 {}

Member Function Documentation

void EgammaHLTClusterShapeProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 34 of file EgammaHLTClusterShapeProducer.cc.

References edm::ConfigurationDescriptions::add(), and edm::ParameterSetDescription::add().

34  {
35 
37  desc.add<edm::InputTag>(("recoEcalCandidateProducer"), edm::InputTag("hltL1SeededRecoEcalCandidate"));
38  desc.add< edm::InputTag >(("ecalRechitEB"), edm::InputTag("hltEcalRegionalEgammaRecHit","EcalRecHitsEB"));
39  desc.add< edm::InputTag >(("ecalRechitEE"), edm::InputTag("hltEcalRegionalEgammaRecHit","EcalRecHitsEE"));
40  desc.add< bool >(("isIeta"), true);
41  descriptions.add(("hltEgammaHLTClusterShapeProducer"), desc);
42 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void EgammaHLTClusterShapeProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

Implements edm::EDProducer.

Definition at line 44 of file EgammaHLTClusterShapeProducer.cc.

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

44  {
45 
46  // Get the HLT filtered objects
48  iEvent.getByToken(recoEcalCandidateProducer_,recoecalcandHandle);
49 
50  EcalClusterLazyTools lazyTools( iEvent, iSetup, ecalRechitEBTag_, ecalRechitEETag_ );
51 
53 
54  for(unsigned int iRecoEcalCand = 0; iRecoEcalCand<recoecalcandHandle->size(); iRecoEcalCand++) {
55 
56  reco::RecoEcalCandidateRef recoecalcandref(recoecalcandHandle, iRecoEcalCand);
57 
58  std::vector<float> vCov ;
59  double sigmaee;
60  if (EtaOrIeta_) {
61  vCov = lazyTools.localCovariances( *(recoecalcandref->superCluster()->seed()) );
62  sigmaee = sqrt(vCov[0]);
63  } else {
64  vCov = lazyTools.covariances( *(recoecalcandref->superCluster()->seed()) );
65  sigmaee = sqrt(vCov[0]);
66  double EtaSC = recoecalcandref->eta();
67  if (EtaSC > 1.479) sigmaee = sigmaee - 0.02*(EtaSC - 2.3);
68  }
69 
70  clshMap.insert(recoecalcandref, sigmaee);
71 
72  }
73 
74  std::auto_ptr<reco::RecoEcalCandidateIsolationMap> clushMap(new reco::RecoEcalCandidateIsolationMap(clshMap));
75  iEvent.put(clushMap);
76 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
edm::EDGetTokenT< reco::RecoEcalCandidateCollection > recoEcalCandidateProducer_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:116
T sqrt(T t)
Definition: SSEVec.h:48
void insert(const key_type &k, const data_type &v)
insert an association

Member Data Documentation

edm::ParameterSet EgammaHLTClusterShapeProducer::conf_
private

Definition at line 44 of file EgammaHLTClusterShapeProducer.h.

Referenced by EgammaHLTClusterShapeProducer().

edm::InputTag EgammaHLTClusterShapeProducer::ecalRechitEBTag_
private

Definition at line 40 of file EgammaHLTClusterShapeProducer.h.

Referenced by EgammaHLTClusterShapeProducer(), and produce().

edm::InputTag EgammaHLTClusterShapeProducer::ecalRechitEETag_
private

Definition at line 41 of file EgammaHLTClusterShapeProducer.h.

Referenced by EgammaHLTClusterShapeProducer(), and produce().

bool EgammaHLTClusterShapeProducer::EtaOrIeta_
private

Definition at line 42 of file EgammaHLTClusterShapeProducer.h.

Referenced by EgammaHLTClusterShapeProducer(), and produce().

edm::EDGetTokenT<reco::RecoEcalCandidateCollection> EgammaHLTClusterShapeProducer::recoEcalCandidateProducer_
private

Definition at line 39 of file EgammaHLTClusterShapeProducer.h.

Referenced by EgammaHLTClusterShapeProducer(), and produce().