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::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 EcalHaloDataProducer (const edm::ParameterSet &)
 
 ~EcalHaloDataProducer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
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 ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) 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
 
float EBRecHitEnergyThreshold
 
float EERecHitEnergyThreshold
 
float ESRecHitEnergyThreshold
 
edm::InputTag IT_EBRecHit
 
edm::InputTag IT_EERecHit
 
edm::InputTag IT_ESRecHit
 
edm::InputTag IT_Photon
 
edm::InputTag IT_SuperCluster
 
int NHitsEcalThreshold
 
double RoundnessCut
 
float SumEcalEnergyThreshold
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- 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)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- 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 93 of file EcalHaloDataProducer.h.

Constructor & Destructor Documentation

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

Definition at line 14 of file EcalHaloDataProducer.cc.

References edm::ParameterSet::getParameter().

15 {
16  //RecHit Level
17  IT_EBRecHit = iConfig.getParameter<edm::InputTag>("EBRecHitLabel");
18  IT_EERecHit = iConfig.getParameter<edm::InputTag>("EERecHitLabel");
19  IT_ESRecHit = iConfig.getParameter<edm::InputTag>("ESRecHitLabel");
20 
21  //Higher Level Reco
22  IT_SuperCluster = iConfig.getParameter<edm::InputTag>("SuperClusterLabel");
23  IT_Photon = iConfig.getParameter<edm::InputTag>("PhotonLabel") ;
24 
25  // Shower Shape cuts for EcalAlgo
26 
27  RoundnessCut = iConfig.getParameter<double>("RoundnessCutParam");
28  AngleCut = iConfig.getParameter<double>("AngleCutParam");
29 
30  EBRecHitEnergyThreshold = (float) iConfig.getParameter<double> ("EBRecHitEnergyThresholdParam");
31  EERecHitEnergyThreshold = (float) iConfig.getParameter<double> ("EERecHitEnergyThresholdParam");
32  ESRecHitEnergyThreshold = (float) iConfig.getParameter<double> ("ESRecHitEnergyThresholdParam");
33  SumEcalEnergyThreshold = (float)iConfig.getParameter<double> ("SumEcalEnergyThresholdParam");
34  NHitsEcalThreshold = iConfig.getParameter<int> ("NHitsEcalThresholdParam");
35 
36  RoundnessCut = iConfig.getParameter<double>("RoundnessCutParam");
37  AngleCut = iConfig.getParameter<double>("AngleCutParam");
38 
39  produces<EcalHaloData>();
40 }
T getParameter(std::string const &) const
EcalHaloDataProducer::~EcalHaloDataProducer ( )

Definition at line 88 of file EcalHaloDataProducer.cc.

88 {}

Member Function Documentation

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

Implements edm::EDProducer.

Definition at line 42 of file EcalHaloDataProducer.cc.

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

43 {
44  //Get CaloGeometry
45  edm::ESHandle<CaloGeometry> TheCaloGeometry;
46  iSetup.get<CaloGeometryRecord>().get(TheCaloGeometry);
47 
48  //Get EB RecHits
50  iEvent.getByLabel(IT_EBRecHit, TheEBRecHits);
51 
52  //Get EE RecHits
54  iEvent.getByLabel(IT_EERecHit, TheEERecHits);
55 
56  //Get ES RecHits
58  iEvent.getByLabel(IT_ESRecHit, TheESRecHits);
59 
60  //Get ECAL Barrel SuperClusters
62  iEvent.getByLabel(IT_SuperCluster, TheSuperClusters);
63 
64  //Get Photons
66  iEvent.getByLabel(IT_Photon, ThePhotons);
67 
68  //Run the EcalHaloAlgo to reconstruct the EcalHaloData object
69  EcalHaloAlgo EcalAlgo;
70  EcalAlgo.SetRoundnessCut(RoundnessCut);
71  EcalAlgo.SetAngleCut(AngleCut);
74 
75  if( TheCaloGeometry.isValid() && ThePhotons.isValid() && TheSuperClusters.isValid() && TheEBRecHits.isValid() && TheEERecHits.isValid() && TheESRecHits.isValid() )
76  {
77  std::auto_ptr<EcalHaloData> EcalData( new EcalHaloData( EcalAlgo.Calculate(*TheCaloGeometry, ThePhotons, TheSuperClusters, TheEBRecHits, TheEERecHits, TheESRecHits)));
78  iEvent.put( EcalData ) ;
79  }
80  else
81  {
82  std::auto_ptr<EcalHaloData> EcalData( new EcalHaloData() ) ;
83  iEvent.put(EcalData);
84  }
85  return;
86 }
void SetAngleCut(float a=4.)
Definition: EcalHaloAlgo.h:55
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)
Definition: EcalHaloAlgo.cc:28
void SetRecHitEnergyThresholds(float EB, float EE, float ES)
Definition: EcalHaloAlgo.h:58
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:94
void SetPhiWedgeThresholds(float SumE, int nhits)
Definition: EcalHaloAlgo.h:62
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
const T & get() const
Definition: EventSetup.h:55
bool isValid() const
Definition: ESHandle.h:37
void SetRoundnessCut(float r=100.)
Definition: EcalHaloAlgo.h:53

Member Data Documentation

double reco::EcalHaloDataProducer::AngleCut
private

Definition at line 119 of file EcalHaloDataProducer.h.

float reco::EcalHaloDataProducer::EBRecHitEnergyThreshold
private

Definition at line 112 of file EcalHaloDataProducer.h.

float reco::EcalHaloDataProducer::EERecHitEnergyThreshold
private

Definition at line 113 of file EcalHaloDataProducer.h.

float reco::EcalHaloDataProducer::ESRecHitEnergyThreshold
private

Definition at line 114 of file EcalHaloDataProducer.h.

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

Definition at line 104 of file EcalHaloDataProducer.h.

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

Definition at line 105 of file EcalHaloDataProducer.h.

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

Definition at line 106 of file EcalHaloDataProducer.h.

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

Definition at line 110 of file EcalHaloDataProducer.h.

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

Definition at line 109 of file EcalHaloDataProducer.h.

int reco::EcalHaloDataProducer::NHitsEcalThreshold
private

Definition at line 116 of file EcalHaloDataProducer.h.

double reco::EcalHaloDataProducer::RoundnessCut
private

Definition at line 118 of file EcalHaloDataProducer.h.

float reco::EcalHaloDataProducer::SumEcalEnergyThreshold
private

Definition at line 115 of file EcalHaloDataProducer.h.