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 Member Functions | Private Attributes
reco::EcalHaloDataProducer Class Reference

#include <EcalHaloDataProducer.h>

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

Public Member Functions

 EcalHaloDataProducer (const edm::ParameterSet &)
 
 ~EcalHaloDataProducer ()
 
- 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 (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &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 Member Functions

virtual void produce (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

double AngleCut
 
edm::EDGetTokenT
< EBRecHitCollection
ebrechit_token_
 
float EBRecHitEnergyThreshold
 
edm::EDGetTokenT
< EERecHitCollection
eerechit_token_
 
float EERecHitEnergyThreshold
 
edm::EDGetTokenT
< ESRecHitCollection
esrechit_token_
 
float ESRecHitEnergyThreshold
 
edm::EDGetTokenT
< HBHERecHitCollection
hbherechit_token_
 
edm::InputTag IT_EBRecHit
 
edm::InputTag IT_EERecHit
 
edm::InputTag IT_ESRecHit
 
edm::InputTag IT_HBHERecHit
 
edm::InputTag IT_Photon
 
edm::InputTag IT_SuperCluster
 
int NHitsEcalThreshold
 
edm::EDGetTokenT
< reco::PhotonCollection
photon_token_
 
double RoundnessCut
 
float SumEcalEnergyThreshold
 
edm::EDGetTokenT
< reco::SuperClusterCollection
supercluster_token_
 

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 95 of file EcalHaloDataProducer.h.

Constructor & Destructor Documentation

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

Definition at line 15 of file EcalHaloDataProducer.cc.

References edm::ParameterSet::getParameter().

16 {
17  //RecHit Level
18  IT_EBRecHit = iConfig.getParameter<edm::InputTag>("EBRecHitLabel");
19  IT_EERecHit = iConfig.getParameter<edm::InputTag>("EERecHitLabel");
20  IT_ESRecHit = iConfig.getParameter<edm::InputTag>("ESRecHitLabel");
21  IT_HBHERecHit = iConfig.getParameter<edm::InputTag>("HBHERecHitLabel");
22 
23  //Higher Level Reco
24  IT_SuperCluster = iConfig.getParameter<edm::InputTag>("SuperClusterLabel");
25  IT_Photon = iConfig.getParameter<edm::InputTag>("PhotonLabel") ;
26 
27  // Shower Shape cuts for EcalAlgo
28 
29  RoundnessCut = iConfig.getParameter<double>("RoundnessCutParam");
30  AngleCut = iConfig.getParameter<double>("AngleCutParam");
31 
32  EBRecHitEnergyThreshold = (float) iConfig.getParameter<double> ("EBRecHitEnergyThresholdParam");
33  EERecHitEnergyThreshold = (float) iConfig.getParameter<double> ("EERecHitEnergyThresholdParam");
34  ESRecHitEnergyThreshold = (float) iConfig.getParameter<double> ("ESRecHitEnergyThresholdParam");
35  SumEcalEnergyThreshold = (float)iConfig.getParameter<double> ("SumEcalEnergyThresholdParam");
36  NHitsEcalThreshold = iConfig.getParameter<int> ("NHitsEcalThresholdParam");
37 
38  RoundnessCut = iConfig.getParameter<double>("RoundnessCutParam");
39  AngleCut = iConfig.getParameter<double>("AngleCutParam");
40 
41  ebrechit_token_ = consumes<EBRecHitCollection>(IT_EBRecHit);
42  eerechit_token_ = consumes<EERecHitCollection>(IT_EERecHit);
43  esrechit_token_ = consumes<ESRecHitCollection>(IT_ESRecHit);
44  hbherechit_token_ = consumes<HBHERecHitCollection>(IT_HBHERecHit);
45  supercluster_token_ = consumes<reco::SuperClusterCollection>(IT_SuperCluster);
46  photon_token_ = consumes<reco::PhotonCollection>(IT_Photon);
47 
48  produces<EcalHaloData>();
49 }
T getParameter(std::string const &) const
edm::EDGetTokenT< EBRecHitCollection > ebrechit_token_
edm::EDGetTokenT< EERecHitCollection > eerechit_token_
edm::EDGetTokenT< reco::SuperClusterCollection > supercluster_token_
edm::EDGetTokenT< reco::PhotonCollection > photon_token_
edm::EDGetTokenT< ESRecHitCollection > esrechit_token_
edm::EDGetTokenT< HBHERecHitCollection > hbherechit_token_
EcalHaloDataProducer::~EcalHaloDataProducer ( )

Definition at line 100 of file EcalHaloDataProducer.cc.

100 {}

Member Function Documentation

void EcalHaloDataProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::stream::EDProducerBase.

Definition at line 51 of file EcalHaloDataProducer.cc.

References EcalHaloAlgo::Calculate(), EcalHaloData_cfi::EcalHaloData, edm::EventSetup::get(), edm::Event::getByToken(), edm::Event::put(), EcalHaloAlgo::SetAngleCut(), EcalHaloAlgo::SetPhiWedgeThresholds(), EcalHaloAlgo::SetRecHitEnergyThresholds(), and EcalHaloAlgo::SetRoundnessCut().

52 {
53  //Get CaloGeometry
54  edm::ESHandle<CaloGeometry> TheCaloGeometry;
55  iSetup.get<CaloGeometryRecord>().get(TheCaloGeometry);
56 
57  //Get EB RecHits
59  // iEvent.getByLabel(IT_EBRecHit, TheEBRecHits);
60  iEvent.getByToken(ebrechit_token_, TheEBRecHits);
61 
62  //Get EE RecHits
64  // iEvent.getByLabel(IT_EERecHit, TheEERecHits);
65  iEvent.getByToken(eerechit_token_, TheEERecHits);
66 
67  //Get ES RecHits
69  // iEvent.getByLabel(IT_ESRecHit, TheESRecHits);
70  iEvent.getByToken(esrechit_token_, TheESRecHits);
71 
72  //Get HBHE RecHits
73  edm::Handle<HBHERecHitCollection> TheHBHERecHits;
74  iEvent.getByToken(hbherechit_token_, TheHBHERecHits);
75 
76  //Get ECAL Barrel SuperClusters
78  // iEvent.getByLabel(IT_SuperCluster, TheSuperClusters);
79  iEvent.getByToken(supercluster_token_, TheSuperClusters);
80 
81  //Get Photons
83  // iEvent.getByLabel(IT_Photon, ThePhotons);
84  iEvent.getByToken(photon_token_, ThePhotons);
85 
86  //Run the EcalHaloAlgo to reconstruct the EcalHaloData object
87  EcalHaloAlgo EcalAlgo;
88  EcalAlgo.SetRoundnessCut(RoundnessCut);
89  EcalAlgo.SetAngleCut(AngleCut);
92 
93 
94  std::auto_ptr<EcalHaloData> EcalData( new EcalHaloData( EcalAlgo.Calculate(*TheCaloGeometry, ThePhotons, TheSuperClusters, TheEBRecHits, TheEERecHits, TheESRecHits, TheHBHERecHits,iSetup)));
95  iEvent.put( EcalData ) ;
96 
97  return;
98 }
edm::EDGetTokenT< EBRecHitCollection > ebrechit_token_
void SetAngleCut(float a=4.)
Definition: EcalHaloAlgo.h:57
edm::EDGetTokenT< EERecHitCollection > eerechit_token_
edm::EDGetTokenT< reco::SuperClusterCollection > supercluster_token_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
edm::EDGetTokenT< reco::PhotonCollection > photon_token_
void SetRecHitEnergyThresholds(float EB, float EE, float ES)
Definition: EcalHaloAlgo.h:60
edm::EDGetTokenT< ESRecHitCollection > esrechit_token_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:121
void SetPhiWedgeThresholds(float SumE, int nhits)
Definition: EcalHaloAlgo.h:64
const T & get() const
Definition: EventSetup.h:56
reco::EcalHaloData Calculate(const CaloGeometry &TheCaloGeometry, edm::Handle< reco::PhotonCollection > &ThePhotons, edm::Handle< reco::SuperClusterCollection > &TheSuperClusters, edm::Handle< EBRecHitCollection > &TheEBRecHits, edm::Handle< EERecHitCollection > &TheEERecHits, edm::Handle< ESRecHitCollection > &TheESRecHits, edm::Handle< HBHERecHitCollection > &TheHBHERecHits, const edm::EventSetup &TheSetup)
Definition: EcalHaloAlgo.cc:32
edm::EDGetTokenT< HBHERecHitCollection > hbherechit_token_
void SetRoundnessCut(float r=100.)
Definition: EcalHaloAlgo.h:55

Member Data Documentation

double reco::EcalHaloDataProducer::AngleCut
private

Definition at line 129 of file EcalHaloDataProducer.h.

edm::EDGetTokenT<EBRecHitCollection> reco::EcalHaloDataProducer::ebrechit_token_
private

Definition at line 115 of file EcalHaloDataProducer.h.

float reco::EcalHaloDataProducer::EBRecHitEnergyThreshold
private

Definition at line 122 of file EcalHaloDataProducer.h.

edm::EDGetTokenT<EERecHitCollection> reco::EcalHaloDataProducer::eerechit_token_
private

Definition at line 116 of file EcalHaloDataProducer.h.

float reco::EcalHaloDataProducer::EERecHitEnergyThreshold
private

Definition at line 123 of file EcalHaloDataProducer.h.

edm::EDGetTokenT<ESRecHitCollection> reco::EcalHaloDataProducer::esrechit_token_
private

Definition at line 117 of file EcalHaloDataProducer.h.

float reco::EcalHaloDataProducer::ESRecHitEnergyThreshold
private

Definition at line 124 of file EcalHaloDataProducer.h.

edm::EDGetTokenT<HBHERecHitCollection> reco::EcalHaloDataProducer::hbherechit_token_
private

Definition at line 118 of file EcalHaloDataProducer.h.

edm::InputTag reco::EcalHaloDataProducer::IT_EBRecHit
private

Definition at line 106 of file EcalHaloDataProducer.h.

edm::InputTag reco::EcalHaloDataProducer::IT_EERecHit
private

Definition at line 107 of file EcalHaloDataProducer.h.

edm::InputTag reco::EcalHaloDataProducer::IT_ESRecHit
private

Definition at line 108 of file EcalHaloDataProducer.h.

edm::InputTag reco::EcalHaloDataProducer::IT_HBHERecHit
private

Definition at line 109 of file EcalHaloDataProducer.h.

edm::InputTag reco::EcalHaloDataProducer::IT_Photon
private

Definition at line 113 of file EcalHaloDataProducer.h.

edm::InputTag reco::EcalHaloDataProducer::IT_SuperCluster
private

Definition at line 112 of file EcalHaloDataProducer.h.

int reco::EcalHaloDataProducer::NHitsEcalThreshold
private

Definition at line 126 of file EcalHaloDataProducer.h.

edm::EDGetTokenT<reco::PhotonCollection> reco::EcalHaloDataProducer::photon_token_
private

Definition at line 120 of file EcalHaloDataProducer.h.

double reco::EcalHaloDataProducer::RoundnessCut
private

Definition at line 128 of file EcalHaloDataProducer.h.

float reco::EcalHaloDataProducer::SumEcalEnergyThreshold
private

Definition at line 125 of file EcalHaloDataProducer.h.

edm::EDGetTokenT<reco::SuperClusterCollection> reco::EcalHaloDataProducer::supercluster_token_
private

Definition at line 119 of file EcalHaloDataProducer.h.