CMS 3D CMS Logo

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::ProductRegistryHelper

List of all members.

Public Member Functions

 EcalHaloDataProducer (const edm::ParameterSet &)
 ~EcalHaloDataProducer ()

Private Member Functions

virtual void beginJob ()
virtual void beginRun (edm::Run &, const edm::EventSetup &)
virtual void endJob ()
virtual void endRun (edm::Run &, const edm::EventSetup &)
virtual void produce (edm::Event &, const edm::EventSetup &)

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

Detailed Description

Definition at line 94 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().

{
  //RecHit Level
  IT_EBRecHit    = iConfig.getParameter<edm::InputTag>("EBRecHitLabel");
  IT_EERecHit    = iConfig.getParameter<edm::InputTag>("EERecHitLabel");
  IT_ESRecHit    = iConfig.getParameter<edm::InputTag>("ESRecHitLabel");

  //Higher Level Reco 
  IT_SuperCluster = iConfig.getParameter<edm::InputTag>("SuperClusterLabel");
  IT_Photon = iConfig.getParameter<edm::InputTag>("PhotonLabel") ;

  // Shower Shape cuts for EcalAlgo

  RoundnessCut = iConfig.getParameter<double>("RoundnessCutParam");
  AngleCut = iConfig.getParameter<double>("AngleCutParam");

  EBRecHitEnergyThreshold = (float) iConfig.getParameter<double> ("EBRecHitEnergyThresholdParam");
  EERecHitEnergyThreshold = (float) iConfig.getParameter<double> ("EERecHitEnergyThresholdParam");
  ESRecHitEnergyThreshold = (float) iConfig.getParameter<double> ("ESRecHitEnergyThresholdParam");
  SumEcalEnergyThreshold = (float)iConfig.getParameter<double> ("SumEcalEnergyThresholdParam");
  NHitsEcalThreshold = iConfig.getParameter<int> ("NHitsEcalThresholdParam");
  
  RoundnessCut = iConfig.getParameter<double>("RoundnessCutParam");
  AngleCut = iConfig.getParameter<double>("AngleCutParam");

  produces<EcalHaloData>();
}
EcalHaloDataProducer::~EcalHaloDataProducer ( )

Definition at line 92 of file EcalHaloDataProducer.cc.

{}

Member Function Documentation

void EcalHaloDataProducer::beginJob ( void  ) [private, virtual]

Reimplemented from edm::EDProducer.

Definition at line 88 of file EcalHaloDataProducer.cc.

{return;}
void EcalHaloDataProducer::beginRun ( edm::Run ,
const edm::EventSetup  
) [private, virtual]

Reimplemented from edm::EDProducer.

Definition at line 90 of file EcalHaloDataProducer.cc.

{return;}
void EcalHaloDataProducer::endJob ( void  ) [private, virtual]

Reimplemented from edm::EDProducer.

Definition at line 89 of file EcalHaloDataProducer.cc.

{return;}
void EcalHaloDataProducer::endRun ( edm::Run ,
const edm::EventSetup  
) [private, virtual]

Reimplemented from edm::EDProducer.

Definition at line 91 of file EcalHaloDataProducer.cc.

{return;}
void EcalHaloDataProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
) [private, virtual]

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().

{
  //Get CaloGeometry
  edm::ESHandle<CaloGeometry> TheCaloGeometry;
  iSetup.get<CaloGeometryRecord>().get(TheCaloGeometry);

  //Get  EB RecHits
  edm::Handle<EBRecHitCollection> TheEBRecHits;
  iEvent.getByLabel(IT_EBRecHit, TheEBRecHits);

  //Get EE RecHits
  edm::Handle<EERecHitCollection> TheEERecHits;
  iEvent.getByLabel(IT_EERecHit, TheEERecHits);

  //Get ES RecHits
  edm::Handle<ESRecHitCollection> TheESRecHits;
  iEvent.getByLabel(IT_ESRecHit, TheESRecHits);

  //Get ECAL Barrel SuperClusters                  
  edm::Handle<reco::SuperClusterCollection> TheSuperClusters;
  iEvent.getByLabel(IT_SuperCluster, TheSuperClusters);

  //Get Photons
  edm::Handle<reco::PhotonCollection> ThePhotons;
  iEvent.getByLabel(IT_Photon, ThePhotons);

  //Run the EcalHaloAlgo to reconstruct the EcalHaloData object 
  EcalHaloAlgo EcalAlgo;
  EcalAlgo.SetRoundnessCut(RoundnessCut);
  EcalAlgo.SetAngleCut(AngleCut);
  EcalAlgo.SetRecHitEnergyThresholds(EBRecHitEnergyThreshold, EERecHitEnergyThreshold, ESRecHitEnergyThreshold);
  EcalAlgo.SetPhiWedgeThresholds(SumEcalEnergyThreshold, NHitsEcalThreshold);
  
  if( TheCaloGeometry.isValid() && ThePhotons.isValid() && TheSuperClusters.isValid()  &&  TheEBRecHits.isValid() && TheEERecHits.isValid() && TheESRecHits.isValid() )
    {
      std::auto_ptr<EcalHaloData> EcalData( new EcalHaloData( EcalAlgo.Calculate(*TheCaloGeometry, ThePhotons, TheSuperClusters, TheEBRecHits, TheEERecHits, TheESRecHits)));
      iEvent.put( EcalData ) ; 
    }
  else 
    {
      std::auto_ptr<EcalHaloData> EcalData( new EcalHaloData() ) ;
      iEvent.put(EcalData); 
    }
  return;
}

Member Data Documentation

Definition at line 124 of file EcalHaloDataProducer.h.

Definition at line 117 of file EcalHaloDataProducer.h.

Definition at line 118 of file EcalHaloDataProducer.h.

Definition at line 119 of file EcalHaloDataProducer.h.

Definition at line 109 of file EcalHaloDataProducer.h.

Definition at line 110 of file EcalHaloDataProducer.h.

Definition at line 111 of file EcalHaloDataProducer.h.

Definition at line 115 of file EcalHaloDataProducer.h.

Definition at line 114 of file EcalHaloDataProducer.h.

Definition at line 121 of file EcalHaloDataProducer.h.

Definition at line 123 of file EcalHaloDataProducer.h.

Definition at line 120 of file EcalHaloDataProducer.h.