CMS 3D CMS Logo

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::ProductRegistryHelper

List of all members.

Public Member Functions

 GsfElectronProducer (const edm::ParameterSet &)
virtual void produce (edm::Event &, const edm::EventSetup &)
virtual ~GsfElectronProducer ()

Protected Member Functions

void beginEvent (edm::Event &, const edm::EventSetup &)

Private Member Functions

void checkPfTranslatorParameters (edm::ParameterSetID const &)

Private Attributes

bool pfTranslatorParametersChecked_

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]
GsfElectronProducer::~GsfElectronProducer ( ) [virtual]

Definition at line 84 of file GsfElectronProducer.cc.

 {}

Member Function Documentation

void GsfElectronProducer::beginEvent ( edm::Event event,
const edm::EventSetup setup 
) [protected]
void GsfElectronProducer::checkPfTranslatorParameters ( edm::ParameterSetID const &  psetid) [private]

Definition at line 114 of file GsfElectronProducer.cc.

References GsfElectronAlgo::StrategyConfiguration::applyPreselection, GsfElectronBaseProducer::cutsCfg_, GsfElectronBaseProducer::cutsCfgPflow_, Exception, edm::ParameterSet::getParameter(), edm::detail::ThreadSafeRegistry< KEY, T, E >::instance(), GsfElectronAlgo::CutsConfiguration::minMVA, MultipleCompare::pset, and GsfElectronBaseProducer::strategyCfg_.

Referenced by beginEvent().

 {
  edm::ParameterSet pset ;
  edm::pset::Registry::instance()->getMapped(psetid,pset) ;
  edm::ParameterSet mvaBlock = pset.getParameter<edm::ParameterSet>("MVACutBlock") ;
  double pfTranslatorMinMva = mvaBlock.getParameter<double>("MVACut") ;
  double pfTranslatorUndefined = -99. ;
  if (strategyCfg_.applyPreselection&&(cutsCfgPflow_.minMVA<pfTranslatorMinMva))
   {
    // For pure tracker seeded electrons, if MVA is under translatorMinMva, there is no supercluster
    // of any kind available, so GsfElectronCoreProducer has already discarded the electron.
    edm::LogWarning("GsfElectronAlgo|MvaCutTooLow")
      <<"Parameter minMVAPflow ("<<cutsCfgPflow_.minMVA<<") will have no effect on purely tracker seeded electrons."
      <<" It is inferior to the cut already applied by PFlow translator ("<<pfTranslatorMinMva<<")." ;
   }
  if (strategyCfg_.applyPreselection&&(cutsCfg_.minMVA<pfTranslatorMinMva))
   {
    // For ecal seeded electrons, there is a cluster and GsfElectronCoreProducer has kept all electrons,
    // but when MVA is under translatorMinMva, the translator has not stored the supercluster and
    // forced the MVA value to translatorUndefined
    if (cutsCfg_.minMVA>pfTranslatorUndefined)
     {
      edm::LogWarning("GsfElectronAlgo|IncompletePflowInformation")
        <<"Parameter minMVA  ("<<cutsCfg_.minMVA<<")is inferior to the cut applied by PFlow translator ("<<pfTranslatorMinMva<<")."
        <<" Some ecal (and eventually tracker) seeded electrons may lack their MVA value and PFlow supercluster." ;
     }
    else
     {
      // the MVA value has been forced to translatorUndefined, inferior minMVAPflow
      // so the cut actually applied is the PFlow one
      throw cms::Exception("GsfElectronAlgo|BadMvaCut")
        <<"Parameter minMVA is inferior to the lowest possible value."
        <<" Every electron will be blessed whatever other criteria." ;
     }
   }
 }
void GsfElectronProducer::produce ( edm::Event event,
const edm::EventSetup setup 
) [virtual]

Member Data Documentation

Definition at line 24 of file GsfElectronProducer.h.

Referenced by beginEvent().