CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
IsoValueMapProducer< T > Class Template Reference

#include <PhysicsTools/NanoAOD/plugins/IsoValueMapProducer.cc>

Inheritance diagram for IsoValueMapProducer< T >:
edm::global::EDProducer<> edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 IsoValueMapProducer (const edm::ParameterSet &iConfig)
 
 ~IsoValueMapProducer () 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::vector< ModuleDescription const * > &modules, 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
 
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 Member Functions

void doMiniIso (edm::Event &) const
 
template<>
void doMiniIso (edm::Event &iEvent) const
 
void doPFIsoEle (edm::Event &) const
 
template<>
void doPFIsoEle (edm::Event &iEvent) const
 
void doPFIsoPho (edm::Event &) const
 
template<>
void doPFIsoPho (edm::Event &iEvent) const
 
template<>
float getEtaForEA (const pat::Electron *el) const
 
template<>
float getEtaForEA (const pat::Photon *ph) const
 
float getEtaForEA (const T *) const
 
void produce (edm::StreamID, edm::Event &, const edm::EventSetup &) const override
 

Private Attributes

std::unique_ptr< EffectiveAreasea_miniiso_
 
std::unique_ptr< EffectiveAreasea_pfiso_
 
std::unique_ptr< EffectiveAreasea_pfiso_chg_
 
std::unique_ptr< EffectiveAreasea_pfiso_neu_
 
std::unique_ptr< EffectiveAreasea_pfiso_pho_
 
bool relative_
 
edm::EDGetTokenT< double > rho_miniiso_
 
edm::EDGetTokenT< double > rho_pfiso_
 
edm::EDGetTokenT< edm::View< T > > src_
 

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

template<typename T>
class IsoValueMapProducer< T >

Description: [one line class summary]

Implementation: [Notes on implementation]

Definition at line 44 of file IsoValueMapProducer.cc.

Constructor & Destructor Documentation

◆ IsoValueMapProducer()

template<typename T >
IsoValueMapProducer< T >::IsoValueMapProducer ( const edm::ParameterSet iConfig)
inlineexplicit

Definition at line 46 of file IsoValueMapProducer.cc.

48  relative_(iConfig.getParameter<bool>("relative")) {
49  if ((typeid(T) == typeid(pat::Muon)) || (typeid(T) == typeid(pat::Electron)) ||
50  typeid(T) == typeid(pat::IsolatedTrack)) {
51  produces<edm::ValueMap<float>>("miniIsoChg");
52  produces<edm::ValueMap<float>>("miniIsoAll");
53  ea_miniiso_ =
54  std::make_unique<EffectiveAreas>((iConfig.getParameter<edm::FileInPath>("EAFile_MiniIso")).fullPath());
55  rho_miniiso_ = consumes<double>(iConfig.getParameter<edm::InputTag>("rho_MiniIso"));
56  }
57  if ((typeid(T) == typeid(pat::Electron))) {
58  produces<edm::ValueMap<float>>("PFIsoChg");
59  produces<edm::ValueMap<float>>("PFIsoAll");
60  produces<edm::ValueMap<float>>("PFIsoAll04");
61  ea_pfiso_ = std::make_unique<EffectiveAreas>((iConfig.getParameter<edm::FileInPath>("EAFile_PFIso")).fullPath());
62  rho_pfiso_ = consumes<double>(iConfig.getParameter<edm::InputTag>("rho_PFIso"));
63  } else if ((typeid(T) == typeid(pat::Photon))) {
64  produces<edm::ValueMap<float>>("PFIsoChg");
65  produces<edm::ValueMap<float>>("PFIsoAll");
67  std::make_unique<EffectiveAreas>((iConfig.getParameter<edm::FileInPath>("EAFile_PFIso_Chg")).fullPath());
69  std::make_unique<EffectiveAreas>((iConfig.getParameter<edm::FileInPath>("EAFile_PFIso_Neu")).fullPath());
71  std::make_unique<EffectiveAreas>((iConfig.getParameter<edm::FileInPath>("EAFile_PFIso_Pho")).fullPath());
72  rho_pfiso_ = consumes<double>(iConfig.getParameter<edm::InputTag>("rho_PFIso"));
73  }
74  }

References IsoValueMapProducer< T >::ea_miniiso_, IsoValueMapProducer< T >::ea_pfiso_, IsoValueMapProducer< T >::ea_pfiso_chg_, IsoValueMapProducer< T >::ea_pfiso_neu_, IsoValueMapProducer< T >::ea_pfiso_pho_, edm::ParameterSet::getParameter(), IsoValueMapProducer< T >::rho_miniiso_, and IsoValueMapProducer< T >::rho_pfiso_.

◆ ~IsoValueMapProducer()

template<typename T >
IsoValueMapProducer< T >::~IsoValueMapProducer ( )
inlineoverride

Definition at line 75 of file IsoValueMapProducer.cc.

75 {}

Member Function Documentation

◆ doMiniIso() [1/2]

template<typename T >
void IsoValueMapProducer< T >::doMiniIso ( edm::Event iEvent) const
private

Definition at line 135 of file IsoValueMapProducer.cc.

135  {
137  iEvent.getByToken(src_, src);
139  iEvent.getByToken(rho_miniiso_, rho);
140 
141  unsigned int nInput = src->size();
142 
143  std::vector<float> miniIsoChg, miniIsoAll;
144  miniIsoChg.reserve(nInput);
145  miniIsoAll.reserve(nInput);
146 
147  for (const auto& obj : *src) {
148  auto iso = obj.miniPFIsolation();
149  auto chg = iso.chargedHadronIso();
150  auto neu = iso.neutralHadronIso();
151  auto pho = iso.photonIso();
152  auto ea = ea_miniiso_->getEffectiveArea(fabs(getEtaForEA(&obj)));
153  float R = 10.0 / std::min(std::max(obj.pt(), 50.0), 200.0);
154  ea *= std::pow(R / 0.3, 2);
155  float scale = relative_ ? 1.0 / obj.pt() : 1;
156  miniIsoChg.push_back(scale * chg);
157  miniIsoAll.push_back(scale * (chg + std::max(0.0, neu + pho - (*rho) * ea)));
158  }
159 
160  std::unique_ptr<edm::ValueMap<float>> miniIsoChgV(new edm::ValueMap<float>());
161  edm::ValueMap<float>::Filler fillerChg(*miniIsoChgV);
162  fillerChg.insert(src, miniIsoChg.begin(), miniIsoChg.end());
163  fillerChg.fill();
164  std::unique_ptr<edm::ValueMap<float>> miniIsoAllV(new edm::ValueMap<float>());
165  edm::ValueMap<float>::Filler fillerAll(*miniIsoAllV);
166  fillerAll.insert(src, miniIsoAll.begin(), miniIsoAll.end());
167  fillerAll.fill();
168 
169  iEvent.put(std::move(miniIsoChgV), "miniIsoChg");
170  iEvent.put(std::move(miniIsoAllV), "miniIsoAll");
171 }

References chg, edm::helper::Filler< Map >::fill(), iEvent, edm::helper::Filler< Map >::insert(), SiStripPI::max, min(), electrons_cff::miniIsoAll, electrons_cff::miniIsoChg, eostools::move(), getGTfromDQMFile::obj, funct::pow(), dttmaxenums::R, ZElectronSkim_cff::rho, L1EGammaCrystalsEmulatorProducer_cfi::scale, and TrackRefitter_38T_cff::src.

◆ doMiniIso() [2/2]

template<>
void IsoValueMapProducer< pat::Photon >::doMiniIso ( edm::Event iEvent) const
private

Definition at line 174 of file IsoValueMapProducer.cc.

174 {}

◆ doPFIsoEle() [1/2]

template<typename T >
void IsoValueMapProducer< T >::doPFIsoEle ( edm::Event iEvent) const
private

Definition at line 177 of file IsoValueMapProducer.cc.

177 {}

◆ doPFIsoEle() [2/2]

template<>
void IsoValueMapProducer< pat::Electron >::doPFIsoEle ( edm::Event iEvent) const
private

Definition at line 180 of file IsoValueMapProducer.cc.

180  {
182  iEvent.getByToken(src_, src);
184  iEvent.getByToken(rho_pfiso_, rho);
185 
186  unsigned int nInput = src->size();
187 
188  std::vector<float> PFIsoChg, PFIsoAll, PFIsoAll04;
189  PFIsoChg.reserve(nInput);
190  PFIsoAll.reserve(nInput);
191  PFIsoAll04.reserve(nInput);
192 
193  for (const auto& obj : *src) {
194  auto iso = obj.pfIsolationVariables();
195  auto chg = iso.sumChargedHadronPt;
196  auto neu = iso.sumNeutralHadronEt;
197  auto pho = iso.sumPhotonEt;
198  auto ea = ea_pfiso_->getEffectiveArea(fabs(getEtaForEA(&obj)));
199  float scale = relative_ ? 1.0 / obj.pt() : 1;
200  PFIsoChg.push_back(scale * chg);
201  PFIsoAll.push_back(scale * (chg + std::max(0.0, neu + pho - (*rho) * ea)));
202  PFIsoAll04.push_back(scale * (obj.chargedHadronIso() +
203  std::max(0.0, obj.neutralHadronIso() + obj.photonIso() - (*rho) * ea * 16. / 9.)));
204  }
205 
206  std::unique_ptr<edm::ValueMap<float>> PFIsoChgV(new edm::ValueMap<float>());
207  edm::ValueMap<float>::Filler fillerChg(*PFIsoChgV);
208  fillerChg.insert(src, PFIsoChg.begin(), PFIsoChg.end());
209  fillerChg.fill();
210  std::unique_ptr<edm::ValueMap<float>> PFIsoAllV(new edm::ValueMap<float>());
211  edm::ValueMap<float>::Filler fillerAll(*PFIsoAllV);
212  fillerAll.insert(src, PFIsoAll.begin(), PFIsoAll.end());
213  fillerAll.fill();
214  std::unique_ptr<edm::ValueMap<float>> PFIsoAll04V(new edm::ValueMap<float>());
215  edm::ValueMap<float>::Filler fillerAll04(*PFIsoAll04V);
216  fillerAll04.insert(src, PFIsoAll04.begin(), PFIsoAll04.end());
217  fillerAll04.fill();
218 
219  iEvent.put(std::move(PFIsoChgV), "PFIsoChg");
220  iEvent.put(std::move(PFIsoAllV), "PFIsoAll");
221  iEvent.put(std::move(PFIsoAll04V), "PFIsoAll04");
222 }

References chg, edm::helper::Filler< Map >::fill(), iEvent, edm::helper::Filler< Map >::insert(), SiStripPI::max, eostools::move(), getGTfromDQMFile::obj, electrons_cff::PFIsoAll, electrons_cff::PFIsoAll04, electrons_cff::PFIsoChg, ZElectronSkim_cff::rho, L1EGammaCrystalsEmulatorProducer_cfi::scale, and TrackRefitter_38T_cff::src.

◆ doPFIsoPho() [1/2]

template<typename T >
void IsoValueMapProducer< T >::doPFIsoPho ( edm::Event iEvent) const
private

Definition at line 225 of file IsoValueMapProducer.cc.

225 {}

◆ doPFIsoPho() [2/2]

template<>
void IsoValueMapProducer< pat::Photon >::doPFIsoPho ( edm::Event iEvent) const
private

Definition at line 228 of file IsoValueMapProducer.cc.

228  {
230  iEvent.getByToken(src_, src);
232  iEvent.getByToken(rho_pfiso_, rho);
233 
234  unsigned int nInput = src->size();
235 
236  std::vector<float> PFIsoChg, PFIsoAll;
237  PFIsoChg.reserve(nInput);
238  PFIsoAll.reserve(nInput);
239 
240  for (const auto& obj : *src) {
241  auto chg = obj.chargedHadronIso();
242  auto neu = obj.neutralHadronIso();
243  auto pho = obj.photonIso();
244  auto ea_chg = ea_pfiso_chg_->getEffectiveArea(fabs(getEtaForEA(&obj)));
245  auto ea_neu = ea_pfiso_neu_->getEffectiveArea(fabs(getEtaForEA(&obj)));
246  auto ea_pho = ea_pfiso_pho_->getEffectiveArea(fabs(getEtaForEA(&obj)));
247  float scale = relative_ ? 1.0 / obj.pt() : 1;
248  PFIsoChg.push_back(scale * std::max(0.0, chg - (*rho) * ea_chg));
249  PFIsoAll.push_back(PFIsoChg.back() +
250  scale * (std::max(0.0, neu - (*rho) * ea_neu) + std::max(0.0, pho - (*rho) * ea_pho)));
251  }
252 
253  std::unique_ptr<edm::ValueMap<float>> PFIsoChgV(new edm::ValueMap<float>());
254  edm::ValueMap<float>::Filler fillerChg(*PFIsoChgV);
255  fillerChg.insert(src, PFIsoChg.begin(), PFIsoChg.end());
256  fillerChg.fill();
257  std::unique_ptr<edm::ValueMap<float>> PFIsoAllV(new edm::ValueMap<float>());
258  edm::ValueMap<float>::Filler fillerAll(*PFIsoAllV);
259  fillerAll.insert(src, PFIsoAll.begin(), PFIsoAll.end());
260  fillerAll.fill();
261 
262  iEvent.put(std::move(PFIsoChgV), "PFIsoChg");
263  iEvent.put(std::move(PFIsoAllV), "PFIsoAll");
264 }

References chg, edm::helper::Filler< Map >::fill(), iEvent, edm::helper::Filler< Map >::insert(), SiStripPI::max, eostools::move(), getGTfromDQMFile::obj, electrons_cff::PFIsoAll, electrons_cff::PFIsoChg, ZElectronSkim_cff::rho, L1EGammaCrystalsEmulatorProducer_cfi::scale, and TrackRefitter_38T_cff::src.

◆ fillDescriptions()

template<typename T >
void IsoValueMapProducer< T >::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 268 of file IsoValueMapProducer.cc.

268  {
270  desc.add<edm::InputTag>("src")->setComment("input physics object collection");
271  desc.add<bool>("relative")->setComment("compute relative isolation instead of absolute one");
272  if ((typeid(T) == typeid(pat::Muon)) || (typeid(T) == typeid(pat::Electron)) ||
273  typeid(T) == typeid(pat::IsolatedTrack)) {
274  desc.add<edm::FileInPath>("EAFile_MiniIso")
275  ->setComment("txt file containing effective areas to be used for mini-isolation pileup subtraction");
276  desc.add<edm::InputTag>("rho_MiniIso")
277  ->setComment("rho to be used for effective-area based mini-isolation pileup subtraction");
278  }
279  if ((typeid(T) == typeid(pat::Electron))) {
280  desc.add<edm::FileInPath>("EAFile_PFIso")
281  ->setComment(
282  "txt file containing effective areas to be used for PF-isolation pileup subtraction for electrons");
283  desc.add<edm::InputTag>("rho_PFIso")
284  ->setComment("rho to be used for effective-area based PF-isolation pileup subtraction for electrons");
285  }
286  if ((typeid(T) == typeid(pat::Photon))) {
287  desc.add<edm::InputTag>("mapIsoChg")->setComment("input charged PF isolation calculated in VID for photons");
288  desc.add<edm::InputTag>("mapIsoNeu")->setComment("input neutral PF isolation calculated in VID for photons");
289  desc.add<edm::InputTag>("mapIsoPho")->setComment("input photon PF isolation calculated in VID for photons");
290  desc.add<edm::FileInPath>("EAFile_PFIso_Chg")
291  ->setComment(
292  "txt file containing effective areas to be used for charged PF-isolation pileup subtraction for photons");
293  desc.add<edm::FileInPath>("EAFile_PFIso_Neu")
294  ->setComment(
295  "txt file containing effective areas to be used for neutral PF-isolation pileup subtraction for photons");
296  desc.add<edm::FileInPath>("EAFile_PFIso_Pho")
297  ->setComment(
298  "txt file containing effective areas to be used for photon PF-isolation pileup subtraction for photons");
299  desc.add<edm::InputTag>("rho_PFIso")
300  ->setComment("rho to be used for effective-area based PF-isolation pileup subtraction for photons");
301  }
303  if (typeid(T) == typeid(pat::Muon))
304  modname += "Muon";
305  else if (typeid(T) == typeid(pat::Electron))
306  modname += "Ele";
307  else if (typeid(T) == typeid(pat::Photon))
308  modname += "Pho";
309  else if (typeid(T) == typeid(pat::IsolatedTrack))
310  modname += "IsoTrack";
311  modname += "IsoValueMapProducer";
312  descriptions.add(modname, desc);
313 }

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, timingPdfMaker::modname, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ getEtaForEA() [1/3]

template<>
float IsoValueMapProducer< pat::Electron >::getEtaForEA ( const pat::Electron el) const
private

Definition at line 112 of file IsoValueMapProducer.cc.

112  {
113  return el->superCluster()->eta();
114 }

References pat::Electron::superCluster().

◆ getEtaForEA() [2/3]

template<>
float IsoValueMapProducer< pat::Photon >::getEtaForEA ( const pat::Photon ph) const
private

Definition at line 116 of file IsoValueMapProducer.cc.

116  {
117  return ph->superCluster()->eta();
118 }

References pat::Photon::superCluster().

◆ getEtaForEA() [3/3]

template<typename T >
float IsoValueMapProducer< T >::getEtaForEA ( const T obj) const
private

Definition at line 108 of file IsoValueMapProducer.cc.

108  {
109  return obj->eta();
110 }

References getGTfromDQMFile::obj.

◆ produce()

template<typename T >
void IsoValueMapProducer< T >::produce ( edm::StreamID  streamID,
edm::Event iEvent,
const edm::EventSetup iSetup 
) const
overrideprivatevirtual

Implements edm::global::EDProducerBase.

Definition at line 121 of file IsoValueMapProducer.cc.

121  {
122  if ((typeid(T) == typeid(pat::Muon)) || (typeid(T) == typeid(pat::Electron)) ||
123  typeid(T) == typeid(pat::IsolatedTrack)) {
124  doMiniIso(iEvent);
125  };
126  if ((typeid(T) == typeid(pat::Electron))) {
128  }
129  if ((typeid(T) == typeid(pat::Photon))) {
131  }
132 }

References iEvent.

Member Data Documentation

◆ ea_miniiso_

template<typename T >
std::unique_ptr<EffectiveAreas> IsoValueMapProducer< T >::ea_miniiso_
private

◆ ea_pfiso_

template<typename T >
std::unique_ptr<EffectiveAreas> IsoValueMapProducer< T >::ea_pfiso_
private

◆ ea_pfiso_chg_

template<typename T >
std::unique_ptr<EffectiveAreas> IsoValueMapProducer< T >::ea_pfiso_chg_
private

◆ ea_pfiso_neu_

template<typename T >
std::unique_ptr<EffectiveAreas> IsoValueMapProducer< T >::ea_pfiso_neu_
private

◆ ea_pfiso_pho_

template<typename T >
std::unique_ptr<EffectiveAreas> IsoValueMapProducer< T >::ea_pfiso_pho_
private

◆ relative_

template<typename T >
bool IsoValueMapProducer< T >::relative_
private

Definition at line 85 of file IsoValueMapProducer.cc.

◆ rho_miniiso_

template<typename T >
edm::EDGetTokenT<double> IsoValueMapProducer< T >::rho_miniiso_
private

◆ rho_pfiso_

template<typename T >
edm::EDGetTokenT<double> IsoValueMapProducer< T >::rho_pfiso_
private

◆ src_

template<typename T >
edm::EDGetTokenT<edm::View<T> > IsoValueMapProducer< T >::src_
private

Definition at line 84 of file IsoValueMapProducer.cc.

IsoValueMapProducer::ea_miniiso_
std::unique_ptr< EffectiveAreas > ea_miniiso_
Definition: IsoValueMapProducer.cc:88
electrons_cff.PFIsoChg
PFIsoChg
Definition: electrons_cff.py:211
L1EGammaCrystalsEmulatorProducer_cfi.scale
scale
Definition: L1EGammaCrystalsEmulatorProducer_cfi.py:10
min
T min(T a, T b)
Definition: MathUtil.h:58
pat::Photon
Analysis-level Photon class.
Definition: Photon.h:46
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
IsoValueMapProducer::getEtaForEA
float getEtaForEA(const T *) const
Definition: IsoValueMapProducer.cc:108
pat::Muon
Analysis-level muon class.
Definition: Muon.h:51
edm::Handle
Definition: AssociativeIterator.h:50
chg
const float chg[109]
Definition: CoreSimTrack.cc:5
edm::FileInPath
Definition: FileInPath.h:64
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
IsoValueMapProducer::ea_pfiso_
std::unique_ptr< EffectiveAreas > ea_pfiso_
Definition: IsoValueMapProducer.cc:89
getGTfromDQMFile.obj
obj
Definition: getGTfromDQMFile.py:32
DDAxes::rho
electrons_cff.PFIsoAll
PFIsoAll
Definition: electrons_cff.py:212
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
IsoValueMapProducer::ea_pfiso_pho_
std::unique_ptr< EffectiveAreas > ea_pfiso_pho_
Definition: IsoValueMapProducer.cc:92
IsoValueMapProducer::doMiniIso
void doMiniIso(edm::Event &) const
Definition: IsoValueMapProducer.cc:135
edm::View
Definition: CaloClusterFwd.h:14
IsoValueMapProducer::ea_pfiso_chg_
std::unique_ptr< EffectiveAreas > ea_pfiso_chg_
Definition: IsoValueMapProducer.cc:90
IsoValueMapProducer::relative_
bool relative_
Definition: IsoValueMapProducer.cc:85
electrons_cff.PFIsoAll04
PFIsoAll04
Definition: electrons_cff.py:213
TrackRefitter_38T_cff.src
src
Definition: TrackRefitter_38T_cff.py:24
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
IsoValueMapProducer::ea_pfiso_neu_
std::unique_ptr< EffectiveAreas > ea_pfiso_neu_
Definition: IsoValueMapProducer.cc:91
iEvent
int iEvent
Definition: GenABIO.cc:224
electrons_cff.miniIsoAll
miniIsoAll
Definition: electrons_cff.py:210
pat::IsolatedTrack
Definition: IsolatedTrack.h:21
IsoValueMapProducer::src_
edm::EDGetTokenT< edm::View< T > > src_
Definition: IsoValueMapProducer.cc:84
electrons_cff.miniIsoChg
miniIsoChg
Definition: electrons_cff.py:209
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
pat::Electron::superCluster
reco::SuperClusterRef superCluster() const override
override the reco::GsfElectron::superCluster method, to access the internal storage of the superclust...
T
long double T
Definition: Basic3DVectorLD.h:48
edm::ValueMap< float >
IsoValueMapProducer::rho_miniiso_
edm::EDGetTokenT< double > rho_miniiso_
Definition: IsoValueMapProducer.cc:86
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
edm::helper::Filler
Definition: ValueMap.h:22
pat::Electron
Analysis-level electron class.
Definition: Electron.h:51
IsoValueMapProducer::doPFIsoEle
void doPFIsoEle(edm::Event &) const
Definition: IsoValueMapProducer.cc:177
edm::EDConsumerBase::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: EDConsumerBase.h:153
IsoValueMapProducer::rho_pfiso_
edm::EDGetTokenT< double > rho_pfiso_
Definition: IsoValueMapProducer.cc:87
IsoValueMapProducer::doPFIsoPho
void doPFIsoPho(edm::Event &) const
Definition: IsoValueMapProducer.cc:225
dttmaxenums::R
Definition: DTTMax.h:29
timingPdfMaker.modname
modname
Definition: timingPdfMaker.py:218
edm::InputTag
Definition: InputTag.h:15
pat::Photon::superCluster
reco::SuperClusterRef superCluster() const override
override the superCluster method from CaloJet, to access the internal storage of the supercluster