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
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) 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::EDGetTokenT
< EcalRecHitCollection
ecalRechitEBToken_
 
edm::EDGetTokenT
< EcalRecHitCollection
ecalRechitEEToken_
 
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 31 of file EgammaHLTClusterShapeProducer.h.

Constructor & Destructor Documentation

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

Definition at line 18 of file EgammaHLTClusterShapeProducer.cc.

References conf_, ecalRechitEBToken_, ecalRechitEEToken_, 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  ecalRechitEBToken_ = consumes<EcalRecHitCollection>(conf_.getParameter< edm::InputTag > ("ecalRechitEB"));
24  ecalRechitEEToken_ = consumes<EcalRecHitCollection>(conf_.getParameter< edm::InputTag > ("ecalRechitEE"));
25 
26  EtaOrIeta_ = conf_.getParameter< bool > ("isIeta");
27 
28  //register your products
29  produces < reco::RecoEcalCandidateIsolationMap >();
30  produces < reco::RecoEcalCandidateIsolationMap >("sigmaIEtaIEta5x5");
31 }
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::RecoEcalCandidateCollection > recoEcalCandidateProducer_
edm::EDGetTokenT< EcalRecHitCollection > ecalRechitEEToken_
edm::EDGetTokenT< EcalRecHitCollection > ecalRechitEBToken_
EgammaHLTClusterShapeProducer::~EgammaHLTClusterShapeProducer ( )

Definition at line 33 of file EgammaHLTClusterShapeProducer.cc.

34 {}

Member Function Documentation

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

Definition at line 36 of file EgammaHLTClusterShapeProducer.cc.

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

36  {
37 
39  desc.add<edm::InputTag>(("recoEcalCandidateProducer"), edm::InputTag("hltL1SeededRecoEcalCandidate"));
40  desc.add< edm::InputTag >(("ecalRechitEB"), edm::InputTag("hltEcalRegionalEgammaRecHit","EcalRecHitsEB"));
41  desc.add< edm::InputTag >(("ecalRechitEE"), edm::InputTag("hltEcalRegionalEgammaRecHit","EcalRecHitsEE"));
42  desc.add< bool >(("isIeta"), true);
43  descriptions.add(("hltEgammaHLTClusterShapeProducer"), desc);
44 }
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 46 of file EgammaHLTClusterShapeProducer.cc.

References ecalRechitEBToken_, ecalRechitEEToken_, EtaOrIeta_, edm::Event::getByToken(), edm::AssociationMap< Tag >::insert(), EcalClusterLazyToolsT< EcalClusterToolsImpl >::localCovariances(), edm::Event::put(), recoEcalCandidateProducer_, and mathSSE::sqrt().

46  {
47 
48  // Get the HLT filtered objects
50  iEvent.getByToken(recoEcalCandidateProducer_,recoecalcandHandle);
51 
52  EcalClusterLazyTools lazyTools( iEvent, iSetup, ecalRechitEBToken_, ecalRechitEEToken_ );
54 
57 
58 
59  for(unsigned int iRecoEcalCand = 0; iRecoEcalCand<recoecalcandHandle->size(); iRecoEcalCand++) {
60 
61  reco::RecoEcalCandidateRef recoecalcandref(recoecalcandHandle, iRecoEcalCand);
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  double sigmaee5x5 = sqrt(lazyTools5x5.localCovariances(*(recoecalcandref->superCluster()->seed()) )[0]);
76  clshMap.insert(recoecalcandref, sigmaee);
77  clsh5x5Map.insert(recoecalcandref,sigmaee5x5);
78 
79 
80  }
81 
82 
83 
84  std::auto_ptr<reco::RecoEcalCandidateIsolationMap> clushMap(new reco::RecoEcalCandidateIsolationMap(clshMap));
85  std::auto_ptr<reco::RecoEcalCandidateIsolationMap> clush5x5Map(new reco::RecoEcalCandidateIsolationMap(clsh5x5Map));
86  iEvent.put(clushMap);
87  iEvent.put(clush5x5Map,"sigmaIEtaIEta5x5");
88 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:446
edm::EDGetTokenT< reco::RecoEcalCandidateCollection > recoEcalCandidateProducer_
edm::EDGetTokenT< EcalRecHitCollection > ecalRechitEEToken_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:113
T sqrt(T t)
Definition: SSEVec.h:48
void insert(const key_type &k, const data_type &v)
insert an association
edm::EDGetTokenT< EcalRecHitCollection > ecalRechitEBToken_

Member Data Documentation

edm::ParameterSet EgammaHLTClusterShapeProducer::conf_
private

Definition at line 46 of file EgammaHLTClusterShapeProducer.h.

Referenced by EgammaHLTClusterShapeProducer().

edm::EDGetTokenT<EcalRecHitCollection> EgammaHLTClusterShapeProducer::ecalRechitEBToken_
private

Definition at line 42 of file EgammaHLTClusterShapeProducer.h.

Referenced by EgammaHLTClusterShapeProducer(), and produce().

edm::EDGetTokenT<EcalRecHitCollection> EgammaHLTClusterShapeProducer::ecalRechitEEToken_
private

Definition at line 43 of file EgammaHLTClusterShapeProducer.h.

Referenced by EgammaHLTClusterShapeProducer(), and produce().

bool EgammaHLTClusterShapeProducer::EtaOrIeta_
private

Definition at line 44 of file EgammaHLTClusterShapeProducer.h.

Referenced by EgammaHLTClusterShapeProducer(), and produce().

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

Definition at line 41 of file EgammaHLTClusterShapeProducer.h.

Referenced by EgammaHLTClusterShapeProducer(), and produce().