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 }
reco::MustacheSCParametersHelper::addParabolaParameters
void addParabolaParameters(const EcalMustacheSCParameters::ParabolaParameters &parabolaParams)
Definition: MustacheSCParametersHelper.cc:39
HLT_FULL_cff.sqrtLogClustETuning
sqrtLogClustETuning
Definition: HLT_FULL_cff.py:6617
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
EcalMustacheSCParameters
Definition: EcalMustacheSCParameters.h:13
p2
double p2[4]
Definition: TauolaWrapper.h:90
MustacheSCParametersHelper.h
reco::MustacheSCParametersHelper::parameters_
EcalMustacheSCParameters & parameters_
Definition: MustacheSCParametersHelper.h:20
edm::ParameterSet
Definition: ParameterSet.h:47
EcalMustacheSCParameters::sqrtLogClustETuning_
float sqrtLogClustETuning_
Definition: EcalMustacheSCParameters.h:46
p1
double p1[4]
Definition: TauolaWrapper.h:89
reco::MustacheSCParametersHelper::sortParabolaParametersCollection
void sortParabolaParametersCollection()
Definition: MustacheSCParametersHelper.cc:44
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
reco::MustacheSCParametersHelper::setSqrtLogClustETuning
void setSqrtLogClustETuning(const float sqrtLogClustETuning)
Definition: MustacheSCParametersHelper.cc:35
EcalMustacheSCParameters::parabolaParametersCollection_
std::vector< ParabolaParameters > parabolaParametersCollection_
Definition: EcalMustacheSCParameters.h:49
reco::MustacheSCParametersHelper::MustacheSCParametersHelper
MustacheSCParametersHelper(EcalMustacheSCParameters &params, const edm::ParameterSet &iConfig)
Definition: MustacheSCParametersHelper.cc:10
EcalMustacheSCParameters::ParabolaParameters
Definition: EcalMustacheSCParameters.h:18