CMS 3D CMS Logo

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

#include <HLTHFRecoEcalCandidateProducer.h>

Inheritance diagram for HLTHFRecoEcalCandidateProducer:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 HLTHFRecoEcalCandidateProducer (edm::ParameterSet const &conf)
 
virtual void produce (edm::Event &e, edm::EventSetup const &iSetup)
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- 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 ()
 
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, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 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
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

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

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer 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::EDProducer
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 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::Event e,
edm::EventSetup const &  iSetup 
)
virtual

Implements edm::EDProducer.

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:122
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:416
void produce(const edm::Handle< reco::SuperClusterCollection > &SuperClusters, const reco::HFEMClusterShapeAssociationCollection &AssocShapes, reco::RecoEcalCandidateCollection &RecoECand, int nvtx)
def move(src, dest)
Definition: eostools.py:510

Member Data Documentation

HFRecoEcalCandidateAlgo HLTHFRecoEcalCandidateProducer::algo_
private

Definition at line 36 of file HLTHFRecoEcalCandidateProducer.h.

Referenced by HLTHFRecoEcalCandidateProducer(), and produce().

double HLTHFRecoEcalCandidateProducer::Cut2D_
private

Definition at line 33 of file HLTHFRecoEcalCandidateProducer.h.

Referenced by HLTHFRecoEcalCandidateProducer().

double HLTHFRecoEcalCandidateProducer::defaultSlope2D_
private

Definition at line 34 of file HLTHFRecoEcalCandidateProducer.h.

Referenced by HLTHFRecoEcalCandidateProducer().

bool HLTHFRecoEcalCandidateProducer::doPU_
private

Definition at line 32 of file HLTHFRecoEcalCandidateProducer.h.

edm::InputTag HLTHFRecoEcalCandidateProducer::hfclusters_
private

Definition at line 29 of file HLTHFRecoEcalCandidateProducer.h.

Referenced by produce().

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

Definition at line 31 of file HLTHFRecoEcalCandidateProducer.h.

Referenced by HLTHFRecoEcalCandidateProducer().

int HLTHFRecoEcalCandidateProducer::HFDBversion_
private

Definition at line 30 of file HLTHFRecoEcalCandidateProducer.h.

Referenced by HLTHFRecoEcalCandidateProducer().

reco::HFValueStruct HLTHFRecoEcalCandidateProducer::hfvars_
private

Definition at line 35 of file HLTHFRecoEcalCandidateProducer.h.

Referenced by HLTHFRecoEcalCandidateProducer().

edm::InputTag HLTHFRecoEcalCandidateProducer::vertices_
private

Definition at line 29 of file HLTHFRecoEcalCandidateProducer.h.