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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
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
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
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<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
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)
 
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 ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 

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.

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

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 }
Definition: config.py:1
const edm::EDGetTokenT< reco::RecoEcalCandidateCollection > recoEcalCandidateProducer_

◆ ~EgammaHLTPhotonTrackIsolationProducersRegional()

EgammaHLTPhotonTrackIsolationProducersRegional::~EgammaHLTPhotonTrackIsolationProducersRegional ( )
override

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 96 of file EgammaHLTPhotonTrackIsolationProducersRegional.cc.

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

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 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ 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.

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

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 }
T const * product() const
Definition: Handle.h:70
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
int photonTrackCount(const reco::RecoCandidate *const recocand, const reco::TrackCollection *isoTracks, bool useVertex)
int iEvent
Definition: GenABIO.cc:224
trackCollection
Definition: JetHT_cfg.py:50
const edm::EDGetTokenT< reco::RecoEcalCandidateCollection > recoEcalCandidateProducer_
float photonPtSum(const reco::RecoCandidate *const recocand, const reco::TrackCollection *isoTracks, bool useVertex)

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