CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
EgammaHLTPhotonTrackIsolationProducersRegional Class Reference

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

Inheritance diagram for EgammaHLTPhotonTrackIsolationProducersRegional:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 EgammaHLTPhotonTrackIsolationProducersRegional (const edm::ParameterSet &)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 
 ~EgammaHLTPhotonTrackIsolationProducersRegional ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
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 ()
 
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
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Attributes

edm::ParameterSet conf_
 
bool countTracks_
 
double egTrkIsoConeSize_
 
double egTrkIsoPtMin_
 
double egTrkIsoRSpan_
 
double egTrkIsoVetoConeSize_
 
double egTrkIsoZSpan_
 
edm::EDGetTokenT
< reco::RecoEcalCandidateCollection
recoEcalCandidateProducer_
 
EgammaHLTTrackIsolationtest_
 
edm::EDGetTokenT
< reco::TrackCollection
trackProducer_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- 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

Author
Monica Vazquez Acosta (CERN)

$Id:

Definition at line 39 of file EgammaHLTPhotonTrackIsolationProducersRegional.h.

Constructor & Destructor Documentation

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

Definition at line 16 of file EgammaHLTPhotonTrackIsolationProducersRegional.cc.

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

16  : conf_(config)
17 {
18 
19  recoEcalCandidateProducer_ = consumes<reco::RecoEcalCandidateCollection> (conf_.getParameter<edm::InputTag>("recoEcalCandidateProducer"));
20  trackProducer_ = consumes<reco::TrackCollection>(conf_.getParameter<edm::InputTag>("trackProducer"));
21 
22  countTracks_ = conf_.getParameter<bool>("countTracks");
23 
24  egTrkIsoPtMin_ = conf_.getParameter<double>("egTrkIsoPtMin");
25  egTrkIsoConeSize_ = conf_.getParameter<double>("egTrkIsoConeSize");
26  egTrkIsoZSpan_ = conf_.getParameter<double>("egTrkIsoZSpan");
27  egTrkIsoRSpan_ = conf_.getParameter<double>("egTrkIsoRSpan");
28  egTrkIsoVetoConeSize_ = conf_.getParameter<double>("egTrkIsoVetoConeSize");
29  double egTrkIsoStripBarrel = conf_.getParameter<double>("egTrkIsoStripBarrel");
30  double egTrkIsoStripEndcap = conf_.getParameter<double>("egTrkIsoStripEndcap");
31 
34  egTrkIsoStripBarrel,egTrkIsoStripEndcap);
35 
36 
37  //register your products
38  produces < reco::RecoEcalCandidateIsolationMap >();
39 
40 }
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::RecoEcalCandidateCollection > recoEcalCandidateProducer_
EgammaHLTPhotonTrackIsolationProducersRegional::~EgammaHLTPhotonTrackIsolationProducersRegional ( )

Member Function Documentation

void EgammaHLTPhotonTrackIsolationProducersRegional::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 44 of file EgammaHLTPhotonTrackIsolationProducersRegional.cc.

References edm::ConfigurationDescriptions::add(), and edm::ParameterSetDescription::add().

44  {
46  desc.add<edm::InputTag>(("recoEcalCandidateProducer"), edm::InputTag("hltL1SeededRecoEcalCandidate"));
47  desc.add<edm::InputTag>(("trackProducer"), edm::InputTag("hltL1SeededEgammaRegionalCTFFinalFitWithMaterial"));
48  desc.add<bool>(("countTracks"), false);
49  desc.add<double>(("egTrkIsoPtMin"), 1.0);
50  desc.add<double>(("egTrkIsoConeSize"), 0.29);
51  desc.add<double>(("egTrkIsoZSpan"), 999999.0);
52  desc.add<double>(("egTrkIsoRSpan"), 999999.0);
53  desc.add<double>(("egTrkIsoVetoConeSize"), 0.06);
54  desc.add<double>(("egTrkIsoStripBarrel"), 0.03);
55  desc.add<double>(("egTrkIsoStripEndcap"), 0.03);
56  descriptions.add(("hltEgammaHLTPhotonTrackIsolationProducersRegional"), desc);
57 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void EgammaHLTPhotonTrackIsolationProducersRegional::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

Implements edm::EDProducer.

Definition at line 62 of file EgammaHLTPhotonTrackIsolationProducersRegional.cc.

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

63 {
64 
65  // Get the HLT filtered objects
67  iEvent.getByToken(recoEcalCandidateProducer_,recoecalcandHandle);
68 
69  // Get the barrel hcal hits
71  iEvent.getByToken(trackProducer_, trackHandle);
72  const reco::TrackCollection* trackCollection = trackHandle.product();
73 
75 
76  for(unsigned int iRecoEcalCand=0; iRecoEcalCand<recoecalcandHandle->size(); iRecoEcalCand++) {
77 
78  reco::RecoEcalCandidateRef recoecalcandref(recoecalcandHandle, iRecoEcalCand);
79 
80  bool usePhotonVertex = false;
81 
82  float isol;
83  if (countTracks_) {
84  isol = test_->photonTrackCount(&(*recoecalcandref), trackCollection, usePhotonVertex);
85  } else {
86  isol = test_->photonPtSum(&(*recoecalcandref), trackCollection, usePhotonVertex);
87  }
88 
89  isoMap.insert(recoecalcandref, isol);
90 
91  }
92 
93  std::auto_ptr<reco::RecoEcalCandidateIsolationMap> isolMap(new reco::RecoEcalCandidateIsolationMap(isoMap));
94  iEvent.put(isolMap);
95 
96 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:10
edm::EDGetTokenT< reco::RecoEcalCandidateCollection > recoEcalCandidateProducer_
int photonTrackCount(const reco::RecoCandidate *const recocand, const reco::TrackCollection *isoTracks, bool useVertex)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:116
void insert(const key_type &k, const data_type &v)
insert an association
T const * product() const
Definition: Handle.h:81
float photonPtSum(const reco::RecoCandidate *const recocand, const reco::TrackCollection *isoTracks, bool useVertex)

Member Data Documentation

edm::ParameterSet EgammaHLTPhotonTrackIsolationProducersRegional::conf_
private
bool EgammaHLTPhotonTrackIsolationProducersRegional::countTracks_
private
double EgammaHLTPhotonTrackIsolationProducersRegional::egTrkIsoConeSize_
private
double EgammaHLTPhotonTrackIsolationProducersRegional::egTrkIsoPtMin_
private
double EgammaHLTPhotonTrackIsolationProducersRegional::egTrkIsoRSpan_
private
double EgammaHLTPhotonTrackIsolationProducersRegional::egTrkIsoVetoConeSize_
private
double EgammaHLTPhotonTrackIsolationProducersRegional::egTrkIsoZSpan_
private
edm::EDGetTokenT<reco::RecoEcalCandidateCollection> EgammaHLTPhotonTrackIsolationProducersRegional::recoEcalCandidateProducer_
private
EgammaHLTTrackIsolation* EgammaHLTPhotonTrackIsolationProducersRegional::test_
private
edm::EDGetTokenT<reco::TrackCollection> EgammaHLTPhotonTrackIsolationProducersRegional::trackProducer_
private