CMS 3D CMS Logo

AlCaPhiSymRecHitsProducer Class Reference

Description: Producer for EcalRecHits to be used for phi-symmetry ECAL calibration. More...

#include <Calibration/EcalAlCaRecoProducers/src/AlCaPhiSymRecHitsProducer.cc>

Inheritance diagram for AlCaPhiSymRecHitsProducer:

edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

 AlCaPhiSymRecHitsProducer (const edm::ParameterSet &)
virtual void produce (edm::Event &, const edm::EventSetup &)
 ~AlCaPhiSymRecHitsProducer ()

Private Attributes

std::string barrelHits_
std::string ecalHitsProducer_
double eCut_barl_
double eCut_endc_
std::string endcapHits_
std::string phiSymBarrelHits_
std::string phiSymEndcapHits_


Detailed Description

Description: Producer for EcalRecHits to be used for phi-symmetry ECAL calibration.

Implementation: <Notes on="" implementation>="">

Definition at line 40 of file AlCaPhiSymRecHitsProducer.h.


Constructor & Destructor Documentation

AlCaPhiSymRecHitsProducer::AlCaPhiSymRecHitsProducer ( const edm::ParameterSet iConfig  )  [explicit]

Definition at line 5 of file AlCaPhiSymRecHitsProducer.cc.

References barrelHits_, ecalHitsProducer_, eCut_barl_, eCut_endc_, endcapHits_, edm::ParameterSet::getParameter(), phiSymBarrelHits_, and phiSymEndcapHits_.

00006 {
00007   ecalHitsProducer_ = iConfig.getParameter< std::string > ("ecalRecHitsProducer");
00008   barrelHits_ = iConfig.getParameter< std::string > ("barrelHitCollection");
00009   endcapHits_ = iConfig.getParameter< std::string > ("endcapHitCollection");
00010   phiSymBarrelHits_ = iConfig.getParameter< std::string > ("phiSymBarrelHitCollection");
00011   phiSymEndcapHits_ = iConfig.getParameter< std::string > ("phiSymEndcapHitCollection");
00012   eCut_barl_ = iConfig.getParameter< double > ("eCut_barrel");
00013   eCut_endc_ = iConfig.getParameter< double > ("eCut_endcap");
00014 
00015   //register your products
00016   produces< EBRecHitCollection >(phiSymBarrelHits_);
00017   produces< EERecHitCollection >(phiSymEndcapHits_);
00018 }

AlCaPhiSymRecHitsProducer::~AlCaPhiSymRecHitsProducer (  ) 

Definition at line 21 of file AlCaPhiSymRecHitsProducer.cc.

00022 {
00023  
00024 
00025 }


Member Function Documentation

void AlCaPhiSymRecHitsProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
) [virtual]

Implements edm::EDProducer.

Definition at line 30 of file AlCaPhiSymRecHitsProducer.cc.

References barrelHits_, ecalHitsProducer_, eCut_barl_, eCut_endc_, endcapHits_, lat::endl(), edm::Event::getByLabel(), LogDebug, phiSymBarrelHits_, phiSymEndcapHits_, edm::Event::put(), and std.

00031 {
00032   using namespace edm;
00033   using namespace std;
00034 
00035   Handle<EBRecHitCollection> barrelRecHitsHandle;
00036   Handle<EERecHitCollection> endcapRecHitsHandle;
00037 
00038   iEvent.getByLabel(ecalHitsProducer_,barrelHits_,barrelRecHitsHandle);
00039   if (!barrelRecHitsHandle.isValid()) {
00040     LogDebug("") << "AlCaPhiSymRecHitsProducer: Error! can't get product!" << std::endl;
00041   }
00042 
00043   iEvent.getByLabel(ecalHitsProducer_,endcapHits_,endcapRecHitsHandle);
00044   if (!endcapRecHitsHandle.isValid()) {
00045     LogDebug("") << "AlCaPhiSymRecHitsProducer: Error! can't get product!" << std::endl;
00046   }
00047 
00048   //Create empty output collections
00049   std::auto_ptr< EBRecHitCollection > phiSymEBRecHitCollection( new EBRecHitCollection );
00050   std::auto_ptr< EERecHitCollection > phiSymEERecHitCollection( new EERecHitCollection );
00051 
00052   //Select interesting EcalRecHits (barrel)
00053   EBRecHitCollection::const_iterator itb;
00054   for (itb=barrelRecHitsHandle->begin(); itb!=barrelRecHitsHandle->end(); itb++) {
00055     if (itb->energy() >= eCut_barl_) {
00056       phiSymEBRecHitCollection->push_back(*itb);
00057     }
00058   }
00059 
00060   //Select interesting EcalRecHits (endcaps)
00061   EERecHitCollection::const_iterator ite;
00062   for (ite=endcapRecHitsHandle->begin(); ite!=endcapRecHitsHandle->end(); ite++) {
00063     if (ite->energy() >= eCut_endc_) {
00064       phiSymEERecHitCollection->push_back(*ite);
00065     }
00066   }
00067 
00068   //Put selected information in the event
00069   iEvent.put( phiSymEBRecHitCollection, phiSymBarrelHits_);
00070   iEvent.put( phiSymEERecHitCollection, phiSymEndcapHits_);
00071   
00072 }


Member Data Documentation

std::string AlCaPhiSymRecHitsProducer::barrelHits_ [private]

Definition at line 51 of file AlCaPhiSymRecHitsProducer.h.

Referenced by AlCaPhiSymRecHitsProducer(), and produce().

std::string AlCaPhiSymRecHitsProducer::ecalHitsProducer_ [private]

Definition at line 50 of file AlCaPhiSymRecHitsProducer.h.

Referenced by AlCaPhiSymRecHitsProducer(), and produce().

double AlCaPhiSymRecHitsProducer::eCut_barl_ [private]

Definition at line 55 of file AlCaPhiSymRecHitsProducer.h.

Referenced by AlCaPhiSymRecHitsProducer(), and produce().

double AlCaPhiSymRecHitsProducer::eCut_endc_ [private]

Definition at line 56 of file AlCaPhiSymRecHitsProducer.h.

Referenced by AlCaPhiSymRecHitsProducer(), and produce().

std::string AlCaPhiSymRecHitsProducer::endcapHits_ [private]

Definition at line 52 of file AlCaPhiSymRecHitsProducer.h.

Referenced by AlCaPhiSymRecHitsProducer(), and produce().

std::string AlCaPhiSymRecHitsProducer::phiSymBarrelHits_ [private]

Definition at line 53 of file AlCaPhiSymRecHitsProducer.h.

Referenced by AlCaPhiSymRecHitsProducer(), and produce().

std::string AlCaPhiSymRecHitsProducer::phiSymEndcapHits_ [private]

Definition at line 54 of file AlCaPhiSymRecHitsProducer.h.

Referenced by AlCaPhiSymRecHitsProducer(), and produce().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:14:11 2009 for CMSSW by  doxygen 1.5.4