CMS 3D CMS Logo

EgammaHLTPhotonTrackIsolationProducersRegional Class Reference

Author:
Monica Vazquez Acosta (CERN)
More...

#include <RecoEgamma/EgammaHLTProducers/interface/EgammaHLTPhotonTrackIsolationProducersRegional.h>

Inheritance diagram for EgammaHLTPhotonTrackIsolationProducersRegional:

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

List of all members.

Public Member Functions

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

Private Attributes

edm::ParameterSet conf_
bool countTracks_
double egTrkIsoConeSize_
double egTrkIsoPtMin_
double egTrkIsoRSpan_
double egTrkIsoVetoConeSize_
double egTrkIsoZSpan_
edm::InputTag recoEcalCandidateProducer_
EgammaHLTTrackIsolationtest_
edm::InputTag trackProducer_


Detailed Description

Author:
Monica Vazquez Acosta (CERN)

$Id:

Definition at line 34 of file EgammaHLTPhotonTrackIsolationProducersRegional.h.


Constructor & Destructor Documentation

EgammaHLTPhotonTrackIsolationProducersRegional::EgammaHLTPhotonTrackIsolationProducersRegional ( const edm::ParameterSet config  )  [explicit]

Definition at line 33 of file EgammaHLTPhotonTrackIsolationProducersRegional.cc.

References conf_, countTracks_, egTrkIsoConeSize_, egTrkIsoPtMin_, egTrkIsoRSpan_, egTrkIsoVetoConeSize_, egTrkIsoZSpan_, edm::ParameterSet::getParameter(), recoEcalCandidateProducer_, test_, and trackProducer_.

00033                                                                                                                             : conf_(config)
00034 {
00035 
00036   recoEcalCandidateProducer_    = conf_.getParameter<edm::InputTag>("recoEcalCandidateProducer");
00037   trackProducer_                = conf_.getParameter<edm::InputTag>("trackProducer");
00038 
00039   countTracks_                  = conf_.getParameter<bool>("countTracks");
00040 
00041   egTrkIsoPtMin_                = conf_.getParameter<double>("egTrkIsoPtMin");
00042   egTrkIsoConeSize_             = conf_.getParameter<double>("egTrkIsoConeSize");
00043   egTrkIsoZSpan_                = conf_.getParameter<double>("egTrkIsoZSpan");
00044   egTrkIsoRSpan_                = conf_.getParameter<double>("egTrkIsoRSpan");
00045   egTrkIsoVetoConeSize_         = conf_.getParameter<double>("egTrkIsoVetoConeSize");
00046 
00047 
00048   test_ = new EgammaHLTTrackIsolation(egTrkIsoPtMin_,egTrkIsoConeSize_,
00049                                       egTrkIsoZSpan_,egTrkIsoRSpan_,egTrkIsoVetoConeSize_);
00050 
00051 
00052   //register your products
00053   produces < reco::RecoEcalCandidateIsolationMap >();
00054 
00055 }

EgammaHLTPhotonTrackIsolationProducersRegional::~EgammaHLTPhotonTrackIsolationProducersRegional (  ) 

Definition at line 58 of file EgammaHLTPhotonTrackIsolationProducersRegional.cc.

References test_.

00058 {delete test_;}


Member Function Documentation

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

Implements edm::EDProducer.

Definition at line 67 of file EgammaHLTPhotonTrackIsolationProducersRegional.cc.

References begin, countTracks_, edm::Event::getByLabel(), edm::AssociationMap< Tag >::insert(), EgammaHLTTrackIsolation::photonPtSum(), EgammaHLTTrackIsolation::photonTrackCount(), edm::Handle< T >::product(), edm::Event::put(), recoEcalCandidateProducer_, test_, and trackProducer_.

00068 {
00069 
00070   // Get the HLT filtered objects
00071   edm::Handle<reco::RecoEcalCandidateCollection> recoecalcandHandle;
00072   iEvent.getByLabel(recoEcalCandidateProducer_,recoecalcandHandle);
00073 
00074  // Get the barrel hcal hits
00075   edm::Handle<reco::TrackCollection> trackHandle;
00076   iEvent.getByLabel(trackProducer_, trackHandle);
00077   const reco::TrackCollection* trackCollection = trackHandle.product();
00078 
00079 
00080   reco::RecoEcalCandidateIsolationMap isoMap;
00081 
00082 
00083 
00084  for(reco::RecoEcalCandidateCollection::const_iterator iRecoEcalCand = recoecalcandHandle->begin(); iRecoEcalCand != recoecalcandHandle->end(); iRecoEcalCand++){
00085     
00086     reco::RecoEcalCandidateRef recoecalcandref(recoecalcandHandle,iRecoEcalCand -recoecalcandHandle ->begin());
00087     const reco::RecoCandidate *tempiRecoEcalCand = &(*recoecalcandref);
00088 
00089     bool usePhotonVertex = false;
00090      
00091     float isol;
00092     if (countTracks_) {
00093       isol = test_->photonTrackCount(tempiRecoEcalCand,trackCollection,usePhotonVertex);
00094     } else {
00095       isol = test_->photonPtSum(tempiRecoEcalCand,trackCollection,usePhotonVertex);
00096     }
00097 
00098     isoMap.insert(recoecalcandref, isol);
00099 
00100   }
00101 
00102   std::auto_ptr<reco::RecoEcalCandidateIsolationMap> isolMap(new reco::RecoEcalCandidateIsolationMap(isoMap));
00103   iEvent.put(isolMap);
00104 
00105 }


Member Data Documentation

edm::ParameterSet EgammaHLTPhotonTrackIsolationProducersRegional::conf_ [private]

Definition at line 47 of file EgammaHLTPhotonTrackIsolationProducersRegional.h.

Referenced by EgammaHLTPhotonTrackIsolationProducersRegional().

bool EgammaHLTPhotonTrackIsolationProducersRegional::countTracks_ [private]

Definition at line 49 of file EgammaHLTPhotonTrackIsolationProducersRegional.h.

Referenced by EgammaHLTPhotonTrackIsolationProducersRegional(), and produce().

double EgammaHLTPhotonTrackIsolationProducersRegional::egTrkIsoConeSize_ [private]

Definition at line 52 of file EgammaHLTPhotonTrackIsolationProducersRegional.h.

Referenced by EgammaHLTPhotonTrackIsolationProducersRegional().

double EgammaHLTPhotonTrackIsolationProducersRegional::egTrkIsoPtMin_ [private]

Definition at line 51 of file EgammaHLTPhotonTrackIsolationProducersRegional.h.

Referenced by EgammaHLTPhotonTrackIsolationProducersRegional().

double EgammaHLTPhotonTrackIsolationProducersRegional::egTrkIsoRSpan_ [private]

Definition at line 54 of file EgammaHLTPhotonTrackIsolationProducersRegional.h.

Referenced by EgammaHLTPhotonTrackIsolationProducersRegional().

double EgammaHLTPhotonTrackIsolationProducersRegional::egTrkIsoVetoConeSize_ [private]

Definition at line 55 of file EgammaHLTPhotonTrackIsolationProducersRegional.h.

Referenced by EgammaHLTPhotonTrackIsolationProducersRegional().

double EgammaHLTPhotonTrackIsolationProducersRegional::egTrkIsoZSpan_ [private]

Definition at line 53 of file EgammaHLTPhotonTrackIsolationProducersRegional.h.

Referenced by EgammaHLTPhotonTrackIsolationProducersRegional().

edm::InputTag EgammaHLTPhotonTrackIsolationProducersRegional::recoEcalCandidateProducer_ [private]

Definition at line 44 of file EgammaHLTPhotonTrackIsolationProducersRegional.h.

Referenced by EgammaHLTPhotonTrackIsolationProducersRegional(), and produce().

EgammaHLTTrackIsolation* EgammaHLTPhotonTrackIsolationProducersRegional::test_ [private]

Definition at line 57 of file EgammaHLTPhotonTrackIsolationProducersRegional.h.

Referenced by EgammaHLTPhotonTrackIsolationProducersRegional(), produce(), and ~EgammaHLTPhotonTrackIsolationProducersRegional().

edm::InputTag EgammaHLTPhotonTrackIsolationProducersRegional::trackProducer_ [private]

Definition at line 45 of file EgammaHLTPhotonTrackIsolationProducersRegional.h.

Referenced by EgammaHLTPhotonTrackIsolationProducersRegional(), and produce().


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