CMS 3D CMS Logo

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

#include <HLTHFRecoEcalCandidateProducer.h>

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

Public Member Functions

 HLTHFRecoEcalCandidateProducer (edm::ParameterSet const &conf)
 
void produce (edm::StreamID, edm::Event &, edm::EventSetup const &) const 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
 
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)
 

Private Attributes

const HFRecoEcalCandidateAlgo algo_
 
const double Cut2D_
 
const double defaultSlope2D_
 
const edm::InputTag hfclusters_
 
const std::vector< double > HFDBvector_
 
const int HFDBversion_
 
const reco::HFValueStruct hfvars_
 
const edm::InputTag vertices_
 

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
 
- Static Public Member Functions inherited from edm::global::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 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 ESProduct , Transition Tr = Transition::Event>
auto esConsumes (eventsetup::EventSetupRecordKey const &, 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 24 of file HLTHFRecoEcalCandidateProducer.h.

Constructor & Destructor Documentation

HLTHFRecoEcalCandidateProducer::HLTHFRecoEcalCandidateProducer ( edm::ParameterSet const &  conf)
explicit

Definition at line 31 of file HLTHFRecoEcalCandidateProducer.cc.

References algo_, Cut2D_, defaultSlope2D_, HFDBvector_, HFDBversion_, and hfvars_.

31  :
32  hfclusters_(conf.getParameter<edm::InputTag>("hfclusters")),
33  HFDBversion_(conf.existsAs<bool>("HFDBversion") ? conf.getParameter<int>("HFDBversion"):99),//do nothing
34  HFDBvector_(conf.existsAs<bool>("HFDBvector") ? conf.getParameter<std::vector<double> >("HFDBvector"):std::vector<double>{}),
35  Cut2D_(conf.getParameter<double>("intercept2DCut")),
36  defaultSlope2D_((Cut2D_<=0.83)?(0.475):((Cut2D_>0.83 && Cut2D_<=0.9)?(0.275):(0.2))),//fix for hlt unable to add slope variable now
38  algo_(conf.existsAs<bool>("Correct") ? conf.getParameter<bool>("Correct") :true,
39  conf.getParameter<double>("e9e25Cut"),
40  conf.getParameter<double>("intercept2DCut"),
41  conf.existsAs<bool>("intercept2DSlope") ? conf.getParameter<double>("intercept2DSlope") : defaultSlope2D_,
42  conf.getParameter<std::vector<double> >("e1e9Cut"),
43  conf.getParameter<std::vector<double> >("eCOREe9Cut"),
44  conf.getParameter<std::vector<double> >("eSeLCut"),
45  hfvars_
46 ) {
47 
48  produces<reco::RecoEcalCandidateCollection>();
49 
50 }

Member Function Documentation

void HLTHFRecoEcalCandidateProducer::produce ( edm::StreamID  sid,
edm::Event e,
edm::EventSetup const &  iSetup 
) const
overridevirtual

Implements edm::global::EDProducerBase.

Definition at line 52 of file HLTHFRecoEcalCandidateProducer.cc.

References algo_, edm::Event::getByLabel(), hfclusters_, eostools::move(), HFRecoEcalCandidateAlgo::produce(), and edm::Event::put().

52  {
53 
54 
57 
58  e.getByLabel(hfclusters_,super_clus);
59  e.getByLabel(hfclusters_,hf_assoc);
60 
61  int nvertex = 1;
62 
63  // create return data
64  auto retdata1 = std::make_unique<reco::RecoEcalCandidateCollection>();
65 
66 
67  algo_.produce(super_clus,*hf_assoc,*retdata1,nvertex);
68 
69  e.put(std::move(retdata1));
70 
71 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:137
void produce(const edm::Handle< reco::SuperClusterCollection > &SuperClusters, const reco::HFEMClusterShapeAssociationCollection &AssocShapes, reco::RecoEcalCandidateCollection &RecoECand, int nvtx) const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:535
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

const HFRecoEcalCandidateAlgo HLTHFRecoEcalCandidateProducer::algo_
private

Definition at line 35 of file HLTHFRecoEcalCandidateProducer.h.

Referenced by HLTHFRecoEcalCandidateProducer(), and produce().

const double HLTHFRecoEcalCandidateProducer::Cut2D_
private

Definition at line 32 of file HLTHFRecoEcalCandidateProducer.h.

Referenced by HLTHFRecoEcalCandidateProducer().

const double HLTHFRecoEcalCandidateProducer::defaultSlope2D_
private

Definition at line 33 of file HLTHFRecoEcalCandidateProducer.h.

Referenced by HLTHFRecoEcalCandidateProducer().

const edm::InputTag HLTHFRecoEcalCandidateProducer::hfclusters_
private

Definition at line 29 of file HLTHFRecoEcalCandidateProducer.h.

Referenced by produce().

const std::vector<double> HLTHFRecoEcalCandidateProducer::HFDBvector_
private

Definition at line 31 of file HLTHFRecoEcalCandidateProducer.h.

Referenced by HLTHFRecoEcalCandidateProducer().

const int HLTHFRecoEcalCandidateProducer::HFDBversion_
private

Definition at line 30 of file HLTHFRecoEcalCandidateProducer.h.

Referenced by HLTHFRecoEcalCandidateProducer().

const reco::HFValueStruct HLTHFRecoEcalCandidateProducer::hfvars_
private

Definition at line 34 of file HLTHFRecoEcalCandidateProducer.h.

Referenced by HLTHFRecoEcalCandidateProducer().

const edm::InputTag HLTHFRecoEcalCandidateProducer::vertices_
private

Definition at line 29 of file HLTHFRecoEcalCandidateProducer.h.