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 Types | Private Attributes
PFMultiDepthClusterProducer Class Reference

#include <PFMultiDepthClusterProducer.h>

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

Public Member Functions

virtual void beginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &)
 
 PFMultiDepthClusterProducer (const edm::ParameterSet &)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 
 ~PFMultiDepthClusterProducer ()
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 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
std::vector< ConsumesInfoconsumesInfo () const
 
 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
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Types

typedef InitialClusteringStepBase ICSB
 
typedef PFClusterBuilderBase PFCBB
 
typedef PFCPositionCalculatorBase PosCalc
 

Private Attributes

edm::EDGetTokenT
< reco::PFClusterCollection
_clustersLabel
 
std::unique_ptr
< PFClusterEnergyCorrectorBase
_energyCorrector
 
std::unique_ptr
< PFClusterBuilderBase
_pfClusterBuilder
 

Additional Inherited Members

- 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, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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

Definition at line 21 of file PFMultiDepthClusterProducer.h.

Member Typedef Documentation

Definition at line 22 of file PFMultiDepthClusterProducer.h.

Definition at line 23 of file PFMultiDepthClusterProducer.h.

Definition at line 24 of file PFMultiDepthClusterProducer.h.

Constructor & Destructor Documentation

PFMultiDepthClusterProducer::PFMultiDepthClusterProducer ( const edm::ParameterSet conf)

Definition at line 15 of file PFMultiDepthClusterProducer.cc.

References _clustersLabel, _energyCorrector, _pfClusterBuilder, eCorr(), edm::ParameterSet::empty(), reco::get(), edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterSet(), NULL, and AlCaHLTBitMon_QueryRunRegistry::string.

16 {
17  _clustersLabel = consumes<reco::PFClusterCollection>(conf.getParameter<edm::InputTag>("clustersSource"));
18  _pfClusterBuilder.reset(NULL);
19  const edm::ParameterSet& pfcConf = conf.getParameterSet("pfClusterBuilder");
20  if( !pfcConf.empty() ) {
21  const std::string& pfcName = pfcConf.getParameter<std::string>("algoName");
22  PFCBB* pfcb = PFClusterBuilderFactory::get()->create(pfcName,pfcConf);
23  _pfClusterBuilder.reset(pfcb);
24  }
25  // see if new need to apply corrections, setup if there.
26  const edm::ParameterSet& cConf = conf.getParameterSet("energyCorrector");
27  if( !cConf.empty() ) {
28  const std::string& cName = cConf.getParameter<std::string>("algoName");
30  PFClusterEnergyCorrectorFactory::get()->create(cName,cConf);
31  _energyCorrector.reset(eCorr);
32  }
33 
34  produces<reco::PFClusterCollection>();
35 }
T getParameter(std::string const &) const
bool empty() const
Definition: ParameterSet.h:218
#define NULL
Definition: scimark2.h:8
std::unique_ptr< PFClusterBuilderBase > _pfClusterBuilder
std::unique_ptr< PFClusterEnergyCorrectorBase > _energyCorrector
ParameterSet const & getParameterSet(std::string const &) const
edm::EDGetTokenT< reco::PFClusterCollection > _clustersLabel
static float eCorr(int ieta, int iphi, double ampl, int runnum)
Ugly hack to apply energy corrections to some HB- cells.
T get(const Candidate &c)
Definition: component.h:55
PFMultiDepthClusterProducer::~PFMultiDepthClusterProducer ( )
inline

Definition at line 27 of file PFMultiDepthClusterProducer.h.

27 { }

Member Function Documentation

void PFMultiDepthClusterProducer::beginLuminosityBlock ( const edm::LuminosityBlock lumi,
const edm::EventSetup es 
)
virtual

Reimplemented from edm::stream::EDProducerBase.

Definition at line 37 of file PFMultiDepthClusterProducer.cc.

References _pfClusterBuilder.

38  {
39  _pfClusterBuilder->update(es);
40 
41 }
std::unique_ptr< PFClusterBuilderBase > _pfClusterBuilder
void PFMultiDepthClusterProducer::produce ( edm::Event e,
const edm::EventSetup es 
)
virtual

Implements edm::stream::EDProducerBase.

Definition at line 43 of file PFMultiDepthClusterProducer.cc.

References _clustersLabel, _energyCorrector, _pfClusterBuilder, edm::Event::getByToken(), LOGVERB, and edm::Event::put().

43  {
44  _pfClusterBuilder->reset();
45 
47  e.getByToken(_clustersLabel,inputClusters);
48 
49  std::vector<bool> seedable;
50 
51  std::auto_ptr<reco::PFClusterCollection> pfClusters;
52  pfClusters.reset(new reco::PFClusterCollection);
53  _pfClusterBuilder->buildClusters(*inputClusters, seedable, *pfClusters);
54  LOGVERB("PFMultiDepthClusterProducer::produce()") << *_pfClusterBuilder;
55 
56  if( _energyCorrector ) {
57  _energyCorrector->correctEnergies(*pfClusters);
58  }
59  e.put(pfClusters);
60 
61 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:464
std::unique_ptr< PFClusterBuilderBase > _pfClusterBuilder
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:120
std::unique_ptr< PFClusterEnergyCorrectorBase > _energyCorrector
edm::EDGetTokenT< reco::PFClusterCollection > _clustersLabel
#define LOGVERB(x)
std::vector< PFCluster > PFClusterCollection
collection of PFCluster objects
Definition: PFClusterFwd.h:9

Member Data Documentation

edm::EDGetTokenT<reco::PFClusterCollection> PFMultiDepthClusterProducer::_clustersLabel
private

Definition at line 35 of file PFMultiDepthClusterProducer.h.

Referenced by PFMultiDepthClusterProducer(), and produce().

std::unique_ptr<PFClusterEnergyCorrectorBase> PFMultiDepthClusterProducer::_energyCorrector
private

Definition at line 39 of file PFMultiDepthClusterProducer.h.

Referenced by PFMultiDepthClusterProducer(), and produce().

std::unique_ptr<PFClusterBuilderBase> PFMultiDepthClusterProducer::_pfClusterBuilder
private