CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
EgammaHLTHcalIsolationDoubleConeProducers Class Reference

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

Inheritance diagram for EgammaHLTHcalIsolationDoubleConeProducers:
edm::global::EDProducer<> edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 EgammaHLTHcalIsolationDoubleConeProducers (const edm::ParameterSet &)
 
void produce (edm::StreamID sid, edm::Event &, const edm::EventSetup &) const override
 
 ~EgammaHLTHcalIsolationDoubleConeProducers () override
 
- Public Member Functions inherited from edm::global::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

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

Private Attributes

const edm::ParameterSet conf_
 
const double egHcalExclusion_
 
const double egHcalIsoConeSize_
 
const double egHcalIsoPtMin_
 
const edm::EDGetTokenT< HBHERecHitCollectionhbRecHitProducer_
 
const edm::EDGetTokenT< HFRecHitCollectionhfRecHitProducer_
 
const edm::EDGetTokenT< reco::RecoEcalCandidateCollectionrecoEcalCandidateProducer_
 
EgammaHLTHcalIsolationDoubleCone const *const test_
 

Additional Inherited Members

- Public Types inherited from edm::global::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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

Definition at line 37 of file EgammaHLTHcalIsolationDoubleConeProducers.h.

Constructor & Destructor Documentation

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

Definition at line 23 of file EgammaHLTHcalIsolationDoubleConeProducers.cc.

24  : conf_(config)
25  , recoEcalCandidateProducer_ (consumes<reco::RecoEcalCandidateCollection>(conf_.getParameter<edm::InputTag>("recoEcalCandidateProducer")))
26  , hbRecHitProducer_ (consumes<HBHERecHitCollection>(conf_.getParameter<edm::InputTag>("hbRecHitProducer")))
27  , hfRecHitProducer_ (consumes<HFRecHitCollection>(conf_.getParameter<edm::InputTag>("hfRecHitProducer")))
28  , egHcalIsoPtMin_ (conf_.getParameter<double>("egHcalIsoPtMin"))
29  , egHcalIsoConeSize_ (conf_.getParameter<double>("egHcalIsoConeSize"))
30  , egHcalExclusion_ (conf_.getParameter<double>("egHcalExclusion"))
32 {
33 
34  //register your products
35  produces < reco::RecoEcalCandidateIsolationMap >();
36 }
T getParameter(std::string const &) const
const edm::EDGetTokenT< HBHERecHitCollection > hbRecHitProducer_
const edm::EDGetTokenT< reco::RecoEcalCandidateCollection > recoEcalCandidateProducer_
EgammaHLTHcalIsolationDoubleCone const *const test_
const edm::EDGetTokenT< HFRecHitCollection > hfRecHitProducer_
EgammaHLTHcalIsolationDoubleConeProducers::~EgammaHLTHcalIsolationDoubleConeProducers ( )
override

Definition at line 39 of file EgammaHLTHcalIsolationDoubleConeProducers.cc.

References test_.

39 {delete test_;}
EgammaHLTHcalIsolationDoubleCone const *const test_

Member Function Documentation

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

Definition at line 41 of file EgammaHLTHcalIsolationDoubleConeProducers.cc.

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

41  {
43  desc.add<edm::InputTag>(("recoEcalCandidateProducer"), edm::InputTag("hltL1SeededRecoEcalCandidate"));
44  desc.add<edm::InputTag>(("hbRecHitProducer"), edm::InputTag("hltHbhereco"));
45  desc.add<edm::InputTag>(("hfRecHitProducer"), edm::InputTag("hltHfreco"));
46  desc.add<double>(("egHcalIsoPtMin"), 0.);
47  desc.add<double>(("egHcalIsoConeSize"), 0.3);
48  desc.add<double>(("egHcalExclusion"), 0.15);
49  descriptions.add(("hltEgammaHLTHcalIsolationDoubleConeProducers"), desc);
50 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void EgammaHLTHcalIsolationDoubleConeProducers::produce ( edm::StreamID  sid,
edm::Event iEvent,
const edm::EventSetup iSetup 
) const
override

Definition at line 52 of file EgammaHLTHcalIsolationDoubleConeProducers.cc.

References edm::EventSetup::get(), edm::Event::getByToken(), hbRecHitProducer_, hfRecHitProducer_, edm::AssociationMap< Tag >::insert(), EgammaHLTHcalIsolationDoubleCone::isolPtSum(), edm::Handle< T >::product(), edm::ESHandle< T >::product(), edm::Event::put(), recoEcalCandidateProducer_, and test_.

52  {
53  // Get the HLT filtered objects
55  iEvent.getByToken(recoEcalCandidateProducer_,recoecalcandHandle);
56 
57  // Get the barrel hcal hits
58  edm::Handle<HBHERecHitCollection> hhitBarrelHandle;
59  iEvent.getByToken(hbRecHitProducer_, hhitBarrelHandle);
60  const HBHERecHitCollection* hcalhitBarrelCollection = hhitBarrelHandle.product();
61  // Get the forward hcal hits
62  edm::Handle<HFRecHitCollection> hhitEndcapHandle;
63  iEvent.getByToken(hfRecHitProducer_, hhitEndcapHandle);
64  const HFRecHitCollection* hcalhitEndcapCollection = hhitEndcapHandle.product();
65  //Get Calo Geometry
67  iSetup.get<CaloGeometryRecord>().get(pG);
68  const CaloGeometry* caloGeom = pG.product();
69 
71 
72  for(unsigned int iRecoEcalCand=0; iRecoEcalCand<recoecalcandHandle->size(); iRecoEcalCand++) {
73 
74  reco::RecoEcalCandidateRef recoecalcandref(recoecalcandHandle, iRecoEcalCand);
75  float isol = test_->isolPtSum(&(*recoecalcandref), hcalhitBarrelCollection, hcalhitEndcapCollection, caloGeom);
76 
77  isoMap.insert(recoecalcandref, isol);
78  }
79 
80  iEvent.put(std::make_unique<reco::RecoEcalCandidateIsolationMap>(isoMap));
81 
82 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
const edm::EDGetTokenT< HBHERecHitCollection > hbRecHitProducer_
const edm::EDGetTokenT< reco::RecoEcalCandidateCollection > recoEcalCandidateProducer_
float isolPtSum(const reco::RecoCandidate *recocandidate, const HBHERecHitCollection *hbhe, const HFRecHitCollection *hf, const CaloGeometry *geometry) const
T const * product() const
Definition: Handle.h:74
void insert(const key_type &k, const data_type &v)
insert an association
EgammaHLTHcalIsolationDoubleCone const *const test_
const edm::EDGetTokenT< HFRecHitCollection > hfRecHitProducer_
T get() const
Definition: EventSetup.h:71
T const * product() const
Definition: ESHandle.h:86

Member Data Documentation

const edm::ParameterSet EgammaHLTHcalIsolationDoubleConeProducers::conf_
private

Definition at line 46 of file EgammaHLTHcalIsolationDoubleConeProducers.h.

const double EgammaHLTHcalIsolationDoubleConeProducers::egHcalExclusion_
private

Definition at line 54 of file EgammaHLTHcalIsolationDoubleConeProducers.h.

const double EgammaHLTHcalIsolationDoubleConeProducers::egHcalIsoConeSize_
private

Definition at line 53 of file EgammaHLTHcalIsolationDoubleConeProducers.h.

const double EgammaHLTHcalIsolationDoubleConeProducers::egHcalIsoPtMin_
private

Definition at line 52 of file EgammaHLTHcalIsolationDoubleConeProducers.h.

const edm::EDGetTokenT<HBHERecHitCollection> EgammaHLTHcalIsolationDoubleConeProducers::hbRecHitProducer_
private

Definition at line 49 of file EgammaHLTHcalIsolationDoubleConeProducers.h.

Referenced by produce().

const edm::EDGetTokenT<HFRecHitCollection> EgammaHLTHcalIsolationDoubleConeProducers::hfRecHitProducer_
private

Definition at line 50 of file EgammaHLTHcalIsolationDoubleConeProducers.h.

Referenced by produce().

const edm::EDGetTokenT<reco::RecoEcalCandidateCollection> EgammaHLTHcalIsolationDoubleConeProducers::recoEcalCandidateProducer_
private

Definition at line 48 of file EgammaHLTHcalIsolationDoubleConeProducers.h.

Referenced by produce().

EgammaHLTHcalIsolationDoubleCone const* const EgammaHLTHcalIsolationDoubleConeProducers::test_
private