CMS 3D CMS Logo

Namespaces | Functions
parseHBHEPhase1AlgoDescription.h File Reference
#include <memory>
#include "RecoLocalCalo/HcalRecAlgos/interface/AbsHBHEPhase1Algo.h"

Go to the source code of this file.

Namespaces

 edm
 HLT enums.
 

Functions

std::unique_ptr< AbsHBHEPhase1AlgoparseHBHEPhase1AlgoDescription (const edm::ParameterSet &ps)
 

Function Documentation

std::unique_ptr<AbsHBHEPhase1Algo> parseHBHEPhase1AlgoDescription ( const edm::ParameterSet ps)

Definition at line 80 of file parseHBHEPhase1AlgoDescription.cc.

References patPFMETCorrections_cff::algo, className(), edm::ParameterSet::getParameter(), eostools::move(), parseHBHEMethod2Description(), parseHBHEMethod3Description(), and AlCaHLTBitMon_QueryRunRegistry::string.

81 {
82  std::unique_ptr<AbsHBHEPhase1Algo> algo;
83 
84  const std::string& className = ps.getParameter<std::string>("Class");
85 
86  if (className == "SimpleHBHEPhase1Algo")
87  {
88  std::unique_ptr<PulseShapeFitOOTPileupCorrection> m2;
89  if (ps.getParameter<bool>("useM2"))
91 
92  std::unique_ptr<HcalDeterministicFit> detFit;
93  if (ps.getParameter<bool>("useM3"))
94  detFit = parseHBHEMethod3Description(ps);
95 
96  algo = std::unique_ptr<AbsHBHEPhase1Algo>(
97  new SimpleHBHEPhase1Algo(ps.getParameter<int> ("firstSampleShift"),
98  ps.getParameter<int> ("samplesToAdd"),
99  ps.getParameter<double>("correctionPhaseNS"),
100  ps.getParameter<double>("tdcTimeShift"),
101  ps.getParameter<bool> ("correctForPhaseContainment"),
102  std::move(m2), std::move(detFit))
103  );
104  }
105 
106  return algo;
107 }
T getParameter(std::string const &) const
static std::unique_ptr< PulseShapeFitOOTPileupCorrection > parseHBHEMethod2Description(const edm::ParameterSet &conf)
static std::unique_ptr< HcalDeterministicFit > parseHBHEMethod3Description(const edm::ParameterSet &conf)
def move(src, dest)
Definition: eostools.py:510
std::string className(const T &t)
Definition: ClassName.h:30