CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
PFRecHitProducer Class Referenceabstract

Base producer for particle flow rechits (PFRecHit) More...

#include <PFRecHitProducer.h>

Inheritance diagram for PFRecHitProducer:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper PFHCALDualTimeRecHitProducer PFRecHitProducerECAL PFRecHitProducerHCAL PFRecHitProducerHO PFRecHitProducerPS

Public Member Functions

virtual void beginRun (const edm::Run &run, const edm::EventSetup &es) override
 
 PFRecHitProducer (const edm::ParameterSet &)
 
void produce (edm::Event &iEvent, const edm::EventSetup &iSetup) override
 
 ~PFRecHitProducer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- 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
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Types

typedef std::map< unsigned,
unsigned >::const_iterator 
IDH
 

Protected Member Functions

virtual void createRecHits (std::vector< reco::PFRecHit > &rechits, std::vector< reco::PFRecHit > &rechitsCleaned, edm::Event &, const edm::EventSetup &)=0
 
- 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)
 

Protected Attributes

const HcalPFCorrsmyPFCorr
 
const EcalChannelStatustheEcalChStatus
 
const HcalChannelQualitytheHcalChStatus
 
const CaloTowerConstituentsMaptheTowerConstituentsMap
 
double thresh_Barrel_
 rechits with E < threshold will not give rise to a PFRecHit More...
 
double thresh_Endcap_
 
bool verbose_
 verbose ? More...
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Detailed Description

Base producer for particle flow rechits (PFRecHit)

Author
Colin Bernet
Date
february 2008

Definition at line 33 of file PFRecHitProducer.h.

Member Typedef Documentation

typedef std::map<unsigned, unsigned >::const_iterator PFRecHitProducer::IDH
protected

Definition at line 47 of file PFRecHitProducer.h.

Constructor & Destructor Documentation

PFRecHitProducer::PFRecHitProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 21 of file PFRecHitProducer.cc.

References edm::ParameterSet::getParameter(), and edm::ParameterSet::getUntrackedParameter().

22 {
23 
24 
25  verbose_ =
26  iConfig.getUntrackedParameter<bool>("verbose",false);
27 
29  iConfig.getParameter<double>("thresh_Barrel");
31  iConfig.getParameter<double>("thresh_Endcap");
32 
33 
34 
35  //register products
36  produces<reco::PFRecHitCollection>();
37  produces<reco::PFRecHitCollection>("Cleaned");
38 
39 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
bool verbose_
verbose ?
double thresh_Barrel_
rechits with E &lt; threshold will not give rise to a PFRecHit
PFRecHitProducer::~PFRecHitProducer ( )

Definition at line 58 of file PFRecHitProducer.cc.

58 {}

Member Function Documentation

void PFRecHitProducer::beginRun ( const edm::Run run,
const edm::EventSetup es 
)
overridevirtual

Reimplemented from edm::EDProducer.

Definition at line 62 of file PFRecHitProducer.cc.

References edm::EventSetup::get(), and edm::ESHandle< class >::product().

63  {
64 
65  // get the HCAL RecHits correction factors
66  // edm::ESHandle<HcalRespCorrs> rchandle;
67  // es.get<HcalRespCorrsRcd>().get(rchandle);
68  // myRespCorr= rchandle.product();
69  // And the PF-specific ones
70  edm::ESHandle<HcalPFCorrs> pfrchandle;
71  es.get<HcalPFCorrsRcd>().get(pfrchandle);
72  myPFCorr= pfrchandle.product();
73 
74  // Get cleaned channels in the HCAL and HF
75  // HCAL channel status map ****************************************
77  es.get<HcalChannelQualityRcd>().get( hcalChStatus );
78  theHcalChStatus = hcalChStatus.product();
79 
80  // Retrieve the good/bad ECAL channels from the DB
82  es.get<EcalChannelStatusRcd>().get(ecalChStatus);
83  theEcalChStatus = ecalChStatus.product();
84 
86  es.get<IdealGeometryRecord>().get(cttopo);
88 }
const HcalPFCorrs * myPFCorr
const EcalChannelStatus * theEcalChStatus
const HcalChannelQuality * theHcalChStatus
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
const CaloTowerConstituentsMap * theTowerConstituentsMap
virtual void PFRecHitProducer::createRecHits ( std::vector< reco::PFRecHit > &  rechits,
std::vector< reco::PFRecHit > &  rechitsCleaned,
edm::Event ,
const edm::EventSetup  
)
protectedpure virtual

translate the standard rechits ( or calotowers) them to PFRecHits, which are stored in the rechits vector

Implemented in PFRecHitProducerECAL, PFRecHitProducerHO, PFRecHitProducerHCAL, PFHCALDualTimeRecHitProducer, and PFRecHitProducerPS.

void PFRecHitProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Implements edm::EDProducer.

Definition at line 42 of file PFRecHitProducer.cc.

References edm::Event::put().

43  {
44 
45 
46  auto_ptr< vector<reco::PFRecHit> > recHits( new vector<reco::PFRecHit> );
47  auto_ptr< vector<reco::PFRecHit> > recHitsCleaned( new vector<reco::PFRecHit> );
48 
49  // fill the collection of rechits (see child classes)
50  createRecHits( *recHits, *recHitsCleaned, iEvent, iSetup);
51 
52  iEvent.put( recHits );
53  iEvent.put( recHitsCleaned, "Cleaned" );
54 
55 }
virtual void createRecHits(std::vector< reco::PFRecHit > &rechits, std::vector< reco::PFRecHit > &rechitsCleaned, edm::Event &, const edm::EventSetup &)=0
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:116

Member Data Documentation

const HcalPFCorrs* PFRecHitProducer::myPFCorr
protected

Definition at line 68 of file PFRecHitProducer.h.

const EcalChannelStatus* PFRecHitProducer::theEcalChStatus
protected
const HcalChannelQuality* PFRecHitProducer::theHcalChStatus
protected
const CaloTowerConstituentsMap* PFRecHitProducer::theTowerConstituentsMap
protected
double PFRecHitProducer::thresh_Barrel_
protected

rechits with E < threshold will not give rise to a PFRecHit

Definition at line 63 of file PFRecHitProducer.h.

Referenced by PFHCALDualTimeRecHitProducer::createRecHits(), PFRecHitProducerHCAL::createRecHits(), PFRecHitProducerHO::createRecHits(), and PFRecHitProducerECAL::createRecHits().

double PFRecHitProducer::thresh_Endcap_
protected
bool PFRecHitProducer::verbose_
protected

verbose ?

Definition at line 60 of file PFRecHitProducer.h.