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 Attributes
HFEMClusterProducer Class Reference

#include <HFEMClusterProducer.h>

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

Public Member Functions

virtual void beginRun (edm::Run const &, edm::EventSetup const &) overridefinal
 
 HFEMClusterProducer (edm::ParameterSet const &conf)
 
virtual void produce (edm::Event &e, edm::EventSetup const &iSetup)
 
- 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
 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
 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
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

HFClusterAlgo algo_
 
edm::EDGetToken hfreco_
 

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
 
- 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::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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 15 of file HFEMClusterProducer.h.

Constructor & Destructor Documentation

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

Definition at line 14 of file HFEMClusterProducer.cc.

References algo_, edm::ParameterSet::getParameter(), and HFClusterAlgo::setup().

14  : hfreco_(consumes<HFRecHitCollection>(conf.getParameter<edm::InputTag>("hits"))) {
15  produces<reco::HFEMClusterShapeCollection>();
16  produces<reco::BasicClusterCollection>();
17  produces<reco::SuperClusterCollection>();
18  produces<reco::HFEMClusterShapeAssociationCollection>();
19  algo_.setup(conf.getParameter<double>("minTowerEnergy"),
20  conf.getParameter<double>("seedThresholdET"),
21  conf.getParameter<double>("maximumSL"),
22  conf.getParameter<double>("maximumRenergy"),
23  conf.getParameter<bool>("usePMTFlag"),
24  conf.getParameter<bool>("usePulseFlag"),
25  conf.getParameter<bool>("forcePulseFlagMC"),
26  conf.getParameter<int>("correctionType"));
27 }
tuple conf
Definition: dbtoconf.py:185
edm::EDGetToken hfreco_
void setup(double minTowerEnergy, double seedThreshold, double maximumSL, double m_maximumRenergy, bool usePMTflag, bool usePulseflag, bool forcePulseFlagMC, int correctionSet)

Member Function Documentation

virtual void HFEMClusterProducer::beginRun ( edm::Run const &  ,
edm::EventSetup const &   
)
inlinefinaloverridevirtual

Reimplemented from edm::stream::EDProducerBase.

Definition at line 19 of file HFEMClusterProducer.h.

References algo_, and HFClusterAlgo::resetForRun().

19 { algo_.resetForRun(); }
void HFEMClusterProducer::produce ( edm::Event e,
edm::EventSetup const &  iSetup 
)
virtual

Implements edm::stream::EDProducerBase.

Definition at line 29 of file HFEMClusterProducer.cc.

References algo_, HFClusterAlgo::clusterize(), geometry, edm::EventSetup::get(), edm::Event::getByToken(), hfreco_, i, HFClusterAlgo::isMC(), edm::EventBase::isRealData(), and edm::Event::put().

29  {
30 
32 
33  e.getByToken(hfreco_,hf_hits);
34 
36  iSetup.get<CaloGeometryRecord>().get(geometry);
37 
38  // create return data
39  std::auto_ptr<reco::HFEMClusterShapeCollection> retdata1(new HFEMClusterShapeCollection());
40  std::auto_ptr<reco::SuperClusterCollection> retdata2(new SuperClusterCollection());
41  std::auto_ptr<reco::HFEMClusterShapeAssociationCollection> retdata3(new HFEMClusterShapeAssociationCollection());
42 
43  algo_.isMC(!e.isRealData());
44 
45 
46  algo_.clusterize(*hf_hits, *geometry, *retdata1, *retdata2);
49 
50  // put the results
51  ShapeHandle=e.put(retdata1);
52  SupHandle=e.put(retdata2);
53  for (unsigned int i=0; i < ShapeHandle->size();i++){
55  }
56 
57 
58  e.put(retdata3);
59 
60 }
int i
Definition: DBlmapReader.cc:9
void clusterize(const HFRecHitCollection &hf, const CaloGeometry &geom, reco::HFEMClusterShapeCollection &clusters, reco::SuperClusterCollection &SuperClusters)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
std::vector< HFEMClusterShape > HFEMClusterShapeCollection
bool isRealData() const
Definition: EventBase.h:60
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:116
edm::AssociationMap< edm::OneToOne< SuperClusterCollection, HFEMClusterShapeCollection > > HFEMClusterShapeAssociationCollection
edm::EDGetToken hfreco_
void isMC(bool isMC)
Definition: HFClusterAlgo.h:28
ESHandle< TrackerGeometry > geometry

Member Data Documentation

HFClusterAlgo HFEMClusterProducer::algo_
private

Definition at line 22 of file HFEMClusterProducer.h.

Referenced by beginRun(), HFEMClusterProducer(), and produce().

edm::EDGetToken HFEMClusterProducer::hfreco_
private

Definition at line 21 of file HFEMClusterProducer.h.

Referenced by produce().