CMS 3D CMS Logo

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

#include <GsfElectronProducer.h>

Inheritance diagram for GsfElectronProducer:
GsfElectronBaseProducer edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 GsfElectronProducer (const edm::ParameterSet &)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 
virtual ~GsfElectronProducer ()
 
- Public Member Functions inherited from GsfElectronBaseProducer
 GsfElectronBaseProducer (const edm::ParameterSet &)
 
virtual ~GsfElectronBaseProducer ()
 
- 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 ()
 

Protected Member Functions

void beginEvent (edm::Event &, const edm::EventSetup &)
 
- Protected Member Functions inherited from GsfElectronBaseProducer
void beginEvent (edm::Event &, const edm::EventSetup &)
 
void endEvent ()
 
void fillEvent (edm::Event &)
 
reco::GsfElectronnewElectron ()
 
const edm::OrphanHandle
< reco::GsfElectronCollection > & 
orphanHandle () const
 
- 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)
 

Private Member Functions

void checkPfTranslatorParameters (edm::ParameterSet const &)
 

Private Attributes

bool pfTranslatorParametersChecked_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from GsfElectronBaseProducer
static void fillDescription (edm::ParameterSetDescription &)
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Attributes inherited from GsfElectronBaseProducer
GsfElectronAlgoalgo_
 
GsfElectronAlgo::CutsConfiguration cutsCfg_
 
GsfElectronAlgo::CutsConfiguration cutsCfgPflow_
 
ElectronHcalHelper::Configuration hcalCfg_
 
ElectronHcalHelper::Configuration hcalCfgPflow_
 
GsfElectronAlgo::InputTagsConfiguration inputCfg_
 
SoftElectronMVAEstimator::Configuration mvaCfg_
 
GsfElectronAlgo::StrategyConfiguration strategyCfg_
 

Detailed Description

Description: EDProducer of GsfElectron objects

Implementation: <Notes on="" implementation>="">

Definition at line 7 of file GsfElectronProducer.h.

Constructor & Destructor Documentation

GsfElectronProducer::GsfElectronProducer ( const edm::ParameterSet cfg)
explicit

Definition at line 82 of file GsfElectronProducer.cc.

84  {}
GsfElectronBaseProducer(const edm::ParameterSet &)
GsfElectronProducer::~GsfElectronProducer ( )
virtual

Definition at line 86 of file GsfElectronProducer.cc.

87  {}

Member Function Documentation

void GsfElectronProducer::beginEvent ( edm::Event event,
const edm::EventSetup setup 
)
protected

Definition at line 101 of file GsfElectronProducer.cc.

References GsfElectronBaseProducer::beginEvent(), checkPfTranslatorParameters(), GsfElectronBaseProducer::inputCfg_, edm::parameterSet(), GsfElectronAlgo::InputTagsConfiguration::pfMVA, pfTranslatorParametersChecked_, edm::HandleBase::provenance(), and funct::true.

Referenced by produce().

102  {
103  // extra configuration checks
105  {
108  event.getByToken(inputCfg_.pfMVA,pfMva) ;
110  }
111 
112  // call to base class
114  }
void checkPfTranslatorParameters(edm::ParameterSet const &)
GsfElectronAlgo::InputTagsConfiguration inputCfg_
edm::EDGetTokenT< edm::ValueMap< float > > pfMVA
void beginEvent(edm::Event &, const edm::EventSetup &)
ParameterSet const & parameterSet(Provenance const &provenance)
Definition: Provenance.cc:11
Provenance const * provenance() const
Definition: HandleBase.h:85
void GsfElectronProducer::checkPfTranslatorParameters ( edm::ParameterSet const &  pset)
private

Definition at line 116 of file GsfElectronProducer.cc.

References GsfElectronAlgo::StrategyConfiguration::applyPreselection, GsfElectronBaseProducer::cutsCfg_, GsfElectronBaseProducer::cutsCfgPflow_, edm::hlt::Exception, edm::ParameterSet::getParameter(), GsfElectronAlgo::CutsConfiguration::minMVA, and GsfElectronBaseProducer::strategyCfg_.

Referenced by beginEvent().

117  {
118  edm::ParameterSet mvaBlock = pset.getParameter<edm::ParameterSet>("MVACutBlock") ;
119  double pfTranslatorMinMva = mvaBlock.getParameter<double>("MVACut") ;
120  double pfTranslatorUndefined = -99. ;
121  if (strategyCfg_.applyPreselection&&(cutsCfgPflow_.minMVA<pfTranslatorMinMva))
122  {
123  // For pure tracker seeded electrons, if MVA is under translatorMinMva, there is no supercluster
124  // of any kind available, so GsfElectronCoreProducer has already discarded the electron.
125  edm::LogWarning("GsfElectronAlgo|MvaCutTooLow")
126  <<"Parameter minMVAPflow ("<<cutsCfgPflow_.minMVA<<") will have no effect on purely tracker seeded electrons."
127  <<" It is inferior to the cut already applied by PFlow translator ("<<pfTranslatorMinMva<<")." ;
128  }
129  if (strategyCfg_.applyPreselection&&(cutsCfg_.minMVA<pfTranslatorMinMva))
130  {
131  // For ecal seeded electrons, there is a cluster and GsfElectronCoreProducer has kept all electrons,
132  // but when MVA is under translatorMinMva, the translator has not stored the supercluster and
133  // forced the MVA value to translatorUndefined
134  if (cutsCfg_.minMVA>pfTranslatorUndefined)
135  {
136  edm::LogWarning("GsfElectronAlgo|IncompletePflowInformation")
137  <<"Parameter minMVA ("<<cutsCfg_.minMVA<<")is inferior to the cut applied by PFlow translator ("<<pfTranslatorMinMva<<")."
138  <<" Some ecal (and eventually tracker) seeded electrons may lack their MVA value and PFlow supercluster." ;
139  }
140  else
141  {
142  // the MVA value has been forced to translatorUndefined, inferior minMVAPflow
143  // so the cut actually applied is the PFlow one
144  throw cms::Exception("GsfElectronAlgo|BadMvaCut")
145  <<"Parameter minMVA is inferior to the lowest possible value."
146  <<" Every electron will be blessed whatever other criteria." ;
147  }
148  }
149  }
T getParameter(std::string const &) const
GsfElectronAlgo::CutsConfiguration cutsCfg_
GsfElectronAlgo::StrategyConfiguration strategyCfg_
GsfElectronAlgo::CutsConfiguration cutsCfgPflow_
void GsfElectronProducer::produce ( edm::Event event,
const edm::EventSetup setup 
)
virtual

Implements edm::EDProducer.

Definition at line 89 of file GsfElectronProducer.cc.

References GsfElectronAlgo::StrategyConfiguration::addPflowElectrons, GsfElectronAlgo::addPflowInfo(), GsfElectronBaseProducer::algo_, beginEvent(), GsfElectronAlgo::clonePreviousElectrons(), GsfElectronAlgo::completeElectrons(), GsfElectronBaseProducer::endEvent(), GsfElectronBaseProducer::fillEvent(), and GsfElectronBaseProducer::strategyCfg_.

90  {
91  beginEvent(event,setup) ;
93  // don't add pflow only electrons if one so wish
95  { algo_->completeElectrons() ; }
96  algo_->addPflowInfo() ;
97  fillEvent(event) ;
98  endEvent() ;
99  }
void clonePreviousElectrons()
GsfElectronAlgo::StrategyConfiguration strategyCfg_
void beginEvent(edm::Event &, const edm::EventSetup &)

Member Data Documentation

bool GsfElectronProducer::pfTranslatorParametersChecked_
private

Definition at line 24 of file GsfElectronProducer.h.

Referenced by beginEvent().