CMS 3D CMS Logo

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

Public Member Functions

 EgammaHLTPhotonTrackIsolationProducersRegional (const edm::ParameterSet &)
 
void produce (edm::StreamID sid, edm::Event &, const edm::EventSetup &) const override
 
 ~EgammaHLTPhotonTrackIsolationProducersRegional () override
 
- Public Member Functions inherited from edm::global::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

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

Private Attributes

const bool countTracks_
 
const double egTrkIsoConeSize_
 
const double egTrkIsoPtMin_
 
const double egTrkIsoRSpan_
 
const double egTrkIsoStripBarrel_
 
const double egTrkIsoStripEndcap_
 
const double egTrkIsoVetoConeSize_
 
const double egTrkIsoZSpan_
 
const edm::EDGetTokenT< reco::RecoEcalCandidateCollectionrecoEcalCandidateProducer_
 
EgammaHLTTrackIsolationtest_
 
const edm::EDGetTokenT< reco::TrackCollectiontrackProducer_
 

Additional Inherited Members

- Public Types inherited from edm::global::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 40 of file EgammaHLTPhotonTrackIsolationProducersRegional.cc.

Constructor & Destructor Documentation

◆ EgammaHLTPhotonTrackIsolationProducersRegional()

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

Definition at line 69 of file EgammaHLTPhotonTrackIsolationProducersRegional.cc.

72  consumes<reco::RecoEcalCandidateCollection>(config.getParameter<edm::InputTag>("recoEcalCandidateProducer"))),
73  trackProducer_(consumes<reco::TrackCollection>(config.getParameter<edm::InputTag>("trackProducer"))),
74  countTracks_(config.getParameter<bool>("countTracks")),
75  egTrkIsoPtMin_(config.getParameter<double>("egTrkIsoPtMin")),
76  egTrkIsoConeSize_(config.getParameter<double>("egTrkIsoConeSize")),
77  egTrkIsoZSpan_(config.getParameter<double>("egTrkIsoZSpan")),
78  egTrkIsoRSpan_(config.getParameter<double>("egTrkIsoRSpan")),
79  egTrkIsoVetoConeSize_(config.getParameter<double>("egTrkIsoVetoConeSize")),
80  egTrkIsoStripBarrel_(config.getParameter<double>("egTrkIsoStripBarrel")),
81  egTrkIsoStripEndcap_(config.getParameter<double>("egTrkIsoStripEndcap")) {
89 
90  //register your products
91  produces<reco::RecoEcalCandidateIsolationMap>();
92 }

References egTrkIsoConeSize_, egTrkIsoPtMin_, egTrkIsoRSpan_, egTrkIsoStripBarrel_, egTrkIsoStripEndcap_, egTrkIsoVetoConeSize_, egTrkIsoZSpan_, and test_.

◆ ~EgammaHLTPhotonTrackIsolationProducersRegional()

EgammaHLTPhotonTrackIsolationProducersRegional::~EgammaHLTPhotonTrackIsolationProducersRegional ( )
override

Definition at line 94 of file EgammaHLTPhotonTrackIsolationProducersRegional.cc.

94 { delete test_; }

References test_.

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 96 of file EgammaHLTPhotonTrackIsolationProducersRegional.cc.

96  {
98  desc.add<edm::InputTag>(("recoEcalCandidateProducer"), edm::InputTag("hltL1SeededRecoEcalCandidate"));
99  desc.add<edm::InputTag>(("trackProducer"), edm::InputTag("hltL1SeededEgammaRegionalCTFFinalFitWithMaterial"));
100  desc.add<bool>(("countTracks"), false);
101  desc.add<double>(("egTrkIsoPtMin"), 1.0);
102  desc.add<double>(("egTrkIsoConeSize"), 0.29);
103  desc.add<double>(("egTrkIsoZSpan"), 999999.0);
104  desc.add<double>(("egTrkIsoRSpan"), 999999.0);
105  desc.add<double>(("egTrkIsoVetoConeSize"), 0.06);
106  desc.add<double>(("egTrkIsoStripBarrel"), 0.03);
107  desc.add<double>(("egTrkIsoStripEndcap"), 0.03);
108  descriptions.add(("hltEgammaHLTPhotonTrackIsolationProducersRegional"), desc);
109 }

References edm::ConfigurationDescriptions::add(), and submitPVResolutionJobs::desc.

◆ produce()

void EgammaHLTPhotonTrackIsolationProducersRegional::produce ( edm::StreamID  sid,
edm::Event iEvent,
const edm::EventSetup  
) const
overridevirtual

Implements edm::global::EDProducerBase.

Definition at line 112 of file EgammaHLTPhotonTrackIsolationProducersRegional.cc.

114  {
115  // Get the HLT filtered objects
117  iEvent.getByToken(recoEcalCandidateProducer_, recoecalcandHandle);
118 
119  // Get the barrel hcal hits
121  iEvent.getByToken(trackProducer_, trackHandle);
122  const reco::TrackCollection* trackCollection = trackHandle.product();
123 
124  reco::RecoEcalCandidateIsolationMap isoMap(recoecalcandHandle);
125 
126  for (unsigned int iRecoEcalCand = 0; iRecoEcalCand < recoecalcandHandle->size(); iRecoEcalCand++) {
127  reco::RecoEcalCandidateRef recoecalcandref(recoecalcandHandle, iRecoEcalCand);
128 
129  bool usePhotonVertex = false;
130 
131  float isol;
132  if (countTracks_) {
133  isol = test_->photonTrackCount(&(*recoecalcandref), trackCollection, usePhotonVertex);
134  } else {
135  isol = test_->photonPtSum(&(*recoecalcandref), trackCollection, usePhotonVertex);
136  }
137 
138  isoMap.insert(recoecalcandref, isol);
139  }
140 
141  iEvent.put(std::make_unique<reco::RecoEcalCandidateIsolationMap>(isoMap));
142 }

References countTracks_, iEvent, edm::AssociationMap< Tag >::insert(), EgammaHLTTrackIsolation::photonPtSum(), EgammaHLTTrackIsolation::photonTrackCount(), edm::Handle< T >::product(), recoEcalCandidateProducer_, test_, duplicaterechits_cfi::trackCollection, and trackProducer_.

Member Data Documentation

◆ countTracks_

const bool EgammaHLTPhotonTrackIsolationProducersRegional::countTracks_
private

Definition at line 56 of file EgammaHLTPhotonTrackIsolationProducersRegional.cc.

Referenced by produce().

◆ egTrkIsoConeSize_

const double EgammaHLTPhotonTrackIsolationProducersRegional::egTrkIsoConeSize_
private

◆ egTrkIsoPtMin_

const double EgammaHLTPhotonTrackIsolationProducersRegional::egTrkIsoPtMin_
private

◆ egTrkIsoRSpan_

const double EgammaHLTPhotonTrackIsolationProducersRegional::egTrkIsoRSpan_
private

◆ egTrkIsoStripBarrel_

const double EgammaHLTPhotonTrackIsolationProducersRegional::egTrkIsoStripBarrel_
private

◆ egTrkIsoStripEndcap_

const double EgammaHLTPhotonTrackIsolationProducersRegional::egTrkIsoStripEndcap_
private

◆ egTrkIsoVetoConeSize_

const double EgammaHLTPhotonTrackIsolationProducersRegional::egTrkIsoVetoConeSize_
private

◆ egTrkIsoZSpan_

const double EgammaHLTPhotonTrackIsolationProducersRegional::egTrkIsoZSpan_
private

◆ recoEcalCandidateProducer_

const edm::EDGetTokenT<reco::RecoEcalCandidateCollection> EgammaHLTPhotonTrackIsolationProducersRegional::recoEcalCandidateProducer_
private

Definition at line 51 of file EgammaHLTPhotonTrackIsolationProducersRegional.cc.

Referenced by produce().

◆ test_

EgammaHLTTrackIsolation* EgammaHLTPhotonTrackIsolationProducersRegional::test_
private

◆ trackProducer_

const edm::EDGetTokenT<reco::TrackCollection> EgammaHLTPhotonTrackIsolationProducersRegional::trackProducer_
private

Definition at line 52 of file EgammaHLTPhotonTrackIsolationProducersRegional.cc.

Referenced by produce().

EgammaHLTPhotonTrackIsolationProducersRegional::egTrkIsoStripBarrel_
const double egTrkIsoStripBarrel_
Definition: EgammaHLTPhotonTrackIsolationProducersRegional.cc:63
edm::Handle::product
T const * product() const
Definition: Handle.h:70
EgammaHLTPhotonTrackIsolationProducersRegional::egTrkIsoRSpan_
const double egTrkIsoRSpan_
Definition: EgammaHLTPhotonTrackIsolationProducersRegional.cc:61
EgammaHLTTrackIsolation
Definition: EgammaHLTTrackIsolation.h:42
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::Handle
Definition: AssociativeIterator.h:50
edm::Ref
Definition: AssociativeIterator.h:58
config
Definition: config.py:1
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
EgammaHLTPhotonTrackIsolationProducersRegional::egTrkIsoPtMin_
const double egTrkIsoPtMin_
Definition: EgammaHLTPhotonTrackIsolationProducersRegional.cc:58
EgammaHLTTrackIsolation::photonTrackCount
int photonTrackCount(const reco::RecoCandidate *const recocand, const reco::TrackCollection *isoTracks, bool useVertex)
Definition: EgammaHLTTrackIsolation.h:102
EgammaHLTPhotonTrackIsolationProducersRegional::trackProducer_
const edm::EDGetTokenT< reco::TrackCollection > trackProducer_
Definition: EgammaHLTPhotonTrackIsolationProducersRegional.cc:52
EgammaHLTPhotonTrackIsolationProducersRegional::test_
EgammaHLTTrackIsolation * test_
Definition: EgammaHLTPhotonTrackIsolationProducersRegional.cc:66
EgammaHLTPhotonTrackIsolationProducersRegional::egTrkIsoZSpan_
const double egTrkIsoZSpan_
Definition: EgammaHLTPhotonTrackIsolationProducersRegional.cc:60
duplicaterechits_cfi.trackCollection
trackCollection
Definition: duplicaterechits_cfi.py:4
EgammaHLTPhotonTrackIsolationProducersRegional::egTrkIsoConeSize_
const double egTrkIsoConeSize_
Definition: EgammaHLTPhotonTrackIsolationProducersRegional.cc:59
edm::AssociationMap
Definition: AssociationMap.h:48
iEvent
int iEvent
Definition: GenABIO.cc:224
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
EgammaHLTPhotonTrackIsolationProducersRegional::countTracks_
const bool countTracks_
Definition: EgammaHLTPhotonTrackIsolationProducersRegional.cc:56
EgammaHLTPhotonTrackIsolationProducersRegional::egTrkIsoStripEndcap_
const double egTrkIsoStripEndcap_
Definition: EgammaHLTPhotonTrackIsolationProducersRegional.cc:64
EgammaHLTTrackIsolation::photonPtSum
float photonPtSum(const reco::RecoCandidate *const recocand, const reco::TrackCollection *isoTracks, bool useVertex)
Definition: EgammaHLTTrackIsolation.h:134
EgammaHLTPhotonTrackIsolationProducersRegional::recoEcalCandidateProducer_
const edm::EDGetTokenT< reco::RecoEcalCandidateCollection > recoEcalCandidateProducer_
Definition: EgammaHLTPhotonTrackIsolationProducersRegional.cc:51
edm::InputTag
Definition: InputTag.h:15
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
EgammaHLTPhotonTrackIsolationProducersRegional::egTrkIsoVetoConeSize_
const double egTrkIsoVetoConeSize_
Definition: EgammaHLTPhotonTrackIsolationProducersRegional.cc:62