CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ElectronLikelihoodESSource.cc
Go to the documentation of this file.
2 
4  m_signalWeightSplitting (cfg.getParameter<std::string> ("signalWeightSplitting")) ,
5  m_backgroundWeightSplitting (cfg.getParameter<std::string> ("backgroundWeightSplitting")) ,
6  m_splitSignalPdfs (cfg.getParameter<bool> ("splitSignalPdfs")) ,
7  m_splitBackgroundPdfs (cfg.getParameter<bool> ("splitBackgroundPdfs"))
8 {
9  setWhatProduced (this) ;
10  findingRecord<ElectronLikelihoodRcd> () ;
11 
12  m_eleIDSwitches.m_useDeltaEta = cfg.getParameter<bool> ("useDeltaEta") ;
13  m_eleIDSwitches.m_useDeltaPhi = cfg.getParameter<bool> ("useDeltaPhi") ;
14  m_eleIDSwitches.m_useHoverE = cfg.getParameter<bool> ("useHoverE") ;
15  m_eleIDSwitches.m_useEoverP = cfg.getParameter<bool> ("useEoverP") ;
16  m_eleIDSwitches.m_useSigmaEtaEta = cfg.getParameter<bool> ("useSigmaEtaEta") ;
17  m_eleIDSwitches.m_useSigmaPhiPhi = cfg.getParameter<bool> ("useSigmaPhiPhi") ;
18  m_eleIDSwitches.m_useFBrem = cfg.getParameter<bool> ("useFBrem") ;
19 
20 }
21 
22 
23 // ----------------------------------------------------
24 
25 
27 }
28 
29 
30 // ----------------------------------------------------
31 
32 
35 {
36 
37  const ElectronLikelihoodCalibration *calibration = readPdfFromDB (iRecord) ;
38 
39  ReturnType LHAlgo (new ElectronLikelihood (&(*calibration),
43  ) );
44 
45  return LHAlgo;
46 }
47 
48 
49 // ----------------------------------------------------
50 
51 
52 void
54  const edm::IOVSyncValue&,
55  edm::ValidityInterval& oInterval ) {
56  // the same PDF's is valid for any time
59 }
60 
61 
62 // ----------------------------------------------------
63 
66 
67  // setup the PDF's from DB
68  const ElectronLikelihoodCalibration *calibration = 0;
70  iRecord.getRecord<ElectronLikelihoodPdfsRcd>().get(calibHandle);
71  calibration = calibHandle.product();
72 
73  return calibration;
74 }
T getParameter(std::string const &) const
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:97
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)
set validity interval
std::pair< Time_t, Time_t > ValidityInterval
Definition: Time.h:19
std::string m_signalWeightSplitting
signal pdf splitting
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
static const IOVSyncValue & beginOfTime()
const ElectronLikelihoodCalibration * readPdfFromDB(const ElectronLikelihoodRcd &)
read PDF&#39;s from CondDB
LikelihoodSwitches m_eleIDSwitches
general parameters of the id algorithm
T const * product() const
Definition: ESHandle.h:62
std::auto_ptr< ElectronLikelihood > ReturnType
define the return type
ReturnType produce(const ElectronLikelihoodRcd &)
return the particle table
ElectronLikelihoodESSource(const edm::ParameterSet &)
constructor from parameter set