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 79 of file parseHBHEPhase1AlgoDescription.cc.

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

80 {
81  std::unique_ptr<AbsHBHEPhase1Algo> algo;
82 
83  const std::string& className = ps.getParameter<std::string>("Class");
84 
85  if (className == "SimpleHBHEPhase1Algo")
86  {
87  std::unique_ptr<PulseShapeFitOOTPileupCorrection> m2;
88  if (ps.getParameter<bool>("useM2"))
90 
91  std::unique_ptr<HcalDeterministicFit> detFit;
92  if (ps.getParameter<bool>("useM3"))
93  detFit = parseHBHEMethod3Description(ps);
94 
95  algo = std::unique_ptr<AbsHBHEPhase1Algo>(
96  new SimpleHBHEPhase1Algo(ps.getParameter<int> ("firstSampleShift"),
97  ps.getParameter<int> ("samplesToAdd"),
98  ps.getParameter<double>("correctionPhaseNS"),
99  ps.getParameter<double>("tdcTimeShift"),
100  ps.getParameter<bool> ("correctForPhaseContainment"),
101  std::move(m2), std::move(detFit))
102  );
103  }
104 
105  return algo;
106 }
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