CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
EgammaEcalPFClusterIsolationProducer< T1 > Class Template Reference

#include <EgammaEcalPFClusterIsolationProducer.h>

Inheritance diagram for EgammaEcalPFClusterIsolationProducer< T1 >:
edm::stream::EDProducer<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Types

typedef std::vector< T1 > T1Collection
 
typedef edm::Ref< T1CollectionT1Ref
 
- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase 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
 

Public Member Functions

 EgammaEcalPFClusterIsolationProducer (const edm::ParameterSet &)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~EgammaEcalPFClusterIsolationProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::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)
 
virtual ~ProducerBase () noexcept(false)
 
- 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
 
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)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

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

Private Attributes

const double drMax_
 
const double drVetoBarrel_
 
const double drVetoEndcap_
 
const edm::EDGetTokenT< T1CollectionemObjectProducer_
 
const double energyBarrel_
 
const double energyEndcap_
 
const double etaStripBarrel_
 
const double etaStripEndcap_
 
const edm::EDGetTokenT< reco::PFClusterCollectionpfClusterProducer_
 

Additional Inherited Members

- 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

template<typename T1>
class EgammaEcalPFClusterIsolationProducer< T1 >

Definition at line 21 of file EgammaEcalPFClusterIsolationProducer.h.

Member Typedef Documentation

template<typename T1 >
typedef std::vector<T1> EgammaEcalPFClusterIsolationProducer< T1 >::T1Collection

Definition at line 24 of file EgammaEcalPFClusterIsolationProducer.h.

template<typename T1 >
typedef edm::Ref<T1Collection> EgammaEcalPFClusterIsolationProducer< T1 >::T1Ref

Definition at line 25 of file EgammaEcalPFClusterIsolationProducer.h.

Constructor & Destructor Documentation

template<typename T1 >
EgammaEcalPFClusterIsolationProducer< T1 >::EgammaEcalPFClusterIsolationProducer ( const edm::ParameterSet config)
explicit

Definition at line 19 of file EgammaEcalPFClusterIsolationProducer.cc.

19  :
20 
21  emObjectProducer_ (consumes<T1Collection>(config.getParameter<edm::InputTag>("candidateProducer"))),
22  pfClusterProducer_ (consumes<reco::PFClusterCollection>(config.getParameter<edm::InputTag>("pfClusterProducer"))),
23  drMax_ (config.getParameter<double>("drMax")),
24  drVetoBarrel_ (config.getParameter<double>("drVetoBarrel")),
25  drVetoEndcap_ (config.getParameter<double>("drVetoEndcap")),
26  etaStripBarrel_ (config.getParameter<double>("etaStripBarrel")),
27  etaStripEndcap_ (config.getParameter<double>("etaStripEndcap")),
28  energyBarrel_ (config.getParameter<double>("energyBarrel")),
29  energyEndcap_ (config.getParameter<double>("energyEndcap")) {
30 
31  produces <edm::ValueMap<float>>();
32 }
T getParameter(std::string const &) const
const edm::EDGetTokenT< reco::PFClusterCollection > pfClusterProducer_
const edm::EDGetTokenT< T1Collection > emObjectProducer_

Definition at line 35 of file EgammaEcalPFClusterIsolationProducer.cc.

36 {}

Member Function Documentation

template<typename T1 >
void EgammaEcalPFClusterIsolationProducer< T1 >::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 39 of file EgammaEcalPFClusterIsolationProducer.cc.

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

39  {
40 
42  desc.add<edm::InputTag>("candidateProducer", edm::InputTag("gedGsfElectrons"));
43  desc.add<edm::InputTag>("pfClusterProducer", edm::InputTag("particleFlowClusterECAL"));
44  desc.add<double>("drMax", 0.3);
45  desc.add<double>("drVetoBarrel", 0.0);
46  desc.add<double>("drVetoEndcap", 0.0);
47  desc.add<double>("etaStripBarrel", 0.0);
48  desc.add<double>("etaStripEndcap", 0.0);
49  desc.add<double>("energyBarrel", 0.0);
50  desc.add<double>("energyEndcap", 0.0);
52 }
std::string defaultModuleLabel()
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
template<typename T1 >
void EgammaEcalPFClusterIsolationProducer< T1 >::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 55 of file EgammaEcalPFClusterIsolationProducer.cc.

References EgammaEcalPFClusterIsolationProducer< T1 >::drMax_, EgammaEcalPFClusterIsolationProducer< T1 >::drVetoBarrel_, EgammaEcalPFClusterIsolationProducer< T1 >::drVetoEndcap_, EgammaEcalPFClusterIsolationProducer< T1 >::emObjectProducer_, EgammaEcalPFClusterIsolationProducer< T1 >::energyBarrel_, EgammaEcalPFClusterIsolationProducer< T1 >::energyEndcap_, EgammaEcalPFClusterIsolationProducer< T1 >::etaStripBarrel_, EgammaEcalPFClusterIsolationProducer< T1 >::etaStripEndcap_, objects.autophobj::filler, edm::Event::getByToken(), EcalPFClusterIsolation< T1 >::getSum(), eostools::move(), EgammaEcalPFClusterIsolationProducer< T1 >::pfClusterProducer_, and edm::Event::put().

55  {
56 
57  edm::Handle<T1Collection> emObjectHandle;
58  iEvent.getByToken(emObjectProducer_, emObjectHandle);
59 
60  auto isoMap = std::make_unique<edm::ValueMap<float>>();
62  std::vector<float> retV(emObjectHandle->size(),0);
63 
65  iEvent.getByToken(pfClusterProducer_, clusterHandle);
66 
68 
69  for (unsigned int iReco = 0; iReco < emObjectHandle->size(); iReco++) {
70  T1Ref candRef(emObjectHandle, iReco);
71  retV[iReco] = isoAlgo.getSum(candRef, clusterHandle);
72  }
73 
74  filler.insert(emObjectHandle,retV.begin(),retV.end());
75  filler.fill();
76 
77  iEvent.put(std::move(isoMap));
78 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:136
const edm::EDGetTokenT< reco::PFClusterCollection > pfClusterProducer_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:519
const edm::EDGetTokenT< T1Collection > emObjectProducer_
def move(src, dest)
Definition: eostools.py:510

Member Data Documentation

template<typename T1 >
const double EgammaEcalPFClusterIsolationProducer< T1 >::drMax_
private
template<typename T1 >
const double EgammaEcalPFClusterIsolationProducer< T1 >::drVetoBarrel_
private
template<typename T1 >
const double EgammaEcalPFClusterIsolationProducer< T1 >::drVetoEndcap_
private
template<typename T1 >
const edm::EDGetTokenT<T1Collection> EgammaEcalPFClusterIsolationProducer< T1 >::emObjectProducer_
private
template<typename T1 >
const double EgammaEcalPFClusterIsolationProducer< T1 >::energyBarrel_
private
template<typename T1 >
const double EgammaEcalPFClusterIsolationProducer< T1 >::energyEndcap_
private
template<typename T1 >
const double EgammaEcalPFClusterIsolationProducer< T1 >::etaStripBarrel_
private
template<typename T1 >
const double EgammaEcalPFClusterIsolationProducer< T1 >::etaStripEndcap_
private
template<typename T1 >
const edm::EDGetTokenT<reco::PFClusterCollection> EgammaEcalPFClusterIsolationProducer< T1 >::pfClusterProducer_
private