CMS 3D CMS Logo

MustacheSCParametersHelper.cc
Go to the documentation of this file.
1 // Implementation of the mustache parameters interface
2 
4 
5 #include <algorithm>
6 #include <utility>
7 
8 using namespace reco;
9 
11  const edm::ParameterSet &iConfig)
12  : parameters_(params) {
13  setSqrtLogClustETuning(iConfig.getParameter<double>("sqrtLogClustETuning"));
14 
15  // parabola parameters
16  // clear the vector in case the EcalMustacheSCParameters had been initialised before
19  }
20  const auto parabolaPSets = iConfig.getParameter<std::vector<edm::ParameterSet>>("parabolaParameterSets");
21  for (const auto &pSet : parabolaPSets) {
22  EcalMustacheSCParameters::ParabolaParameters parabolaParams = {pSet.getParameter<double>("log10EMin"),
23  pSet.getParameter<double>("etaMin"),
24  pSet.getParameter<std::vector<double>>("pUp"),
25  pSet.getParameter<std::vector<double>>("pLow"),
26  pSet.getParameter<std::vector<double>>("w0Up"),
27  pSet.getParameter<std::vector<double>>("w1Up"),
28  pSet.getParameter<std::vector<double>>("w0Low"),
29  pSet.getParameter<std::vector<double>>("w1Low")};
30  addParabolaParameters(parabolaParams);
32  }
33 }
34 
37 }
38 
40  const EcalMustacheSCParameters::ParabolaParameters &parabolaParams) {
41  parameters_.parabolaParametersCollection_.emplace_back(parabolaParams);
42 }
43 
49  const auto p1Mins = std::make_pair(p1.log10EMin, p1.etaMin);
50  const auto p2Mins = std::make_pair(p2.log10EMin, p2.etaMin);
51  return p1Mins < p2Mins;
52  });
53 }
void setSqrtLogClustETuning(const float sqrtLogClustETuning)
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
void addParabolaParameters(const EcalMustacheSCParameters::ParabolaParameters &parabolaParams)
std::vector< ParabolaParameters > parabolaParametersCollection_
fixed size matrix
MustacheSCParametersHelper(EcalMustacheSCParameters &params, const edm::ParameterSet &iConfig)