CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
reco::MustacheSCParametersHelper Class Reference

#include <MustacheSCParametersHelper.h>

Public Member Functions

void addParabolaParameters (const EcalMustacheSCParameters::ParabolaParameters &parabolaParams)
 
 MustacheSCParametersHelper (EcalMustacheSCParameters &params, const edm::ParameterSet &iConfig)
 
void setSqrtLogClustETuning (const float sqrtLogClustETuning)
 
void sortParabolaParametersCollection ()
 
 ~MustacheSCParametersHelper ()=default
 

Private Attributes

EcalMustacheSCParametersparameters_
 

Detailed Description

Definition at line 9 of file MustacheSCParametersHelper.h.

Constructor & Destructor Documentation

◆ MustacheSCParametersHelper()

MustacheSCParametersHelper::MustacheSCParametersHelper ( EcalMustacheSCParameters params,
const edm::ParameterSet iConfig 
)

Definition at line 10 of file MustacheSCParametersHelper.cc.

References addParabolaParameters(), edm::ParameterSet::getParameter(), EcalMustacheSCParameters::parabolaParametersCollection_, parameters_, setSqrtLogClustETuning(), and sortParabolaParametersCollection().

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 }
void setSqrtLogClustETuning(const float sqrtLogClustETuning)
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
void addParabolaParameters(const EcalMustacheSCParameters::ParabolaParameters &parabolaParams)
std::vector< ParabolaParameters > parabolaParametersCollection_

◆ ~MustacheSCParametersHelper()

reco::MustacheSCParametersHelper::~MustacheSCParametersHelper ( )
default

Member Function Documentation

◆ addParabolaParameters()

void MustacheSCParametersHelper::addParabolaParameters ( const EcalMustacheSCParameters::ParabolaParameters parabolaParams)

Definition at line 39 of file MustacheSCParametersHelper.cc.

References EcalMustacheSCParameters::parabolaParametersCollection_, and parameters_.

Referenced by MustacheSCParametersHelper().

40  {
41  parameters_.parabolaParametersCollection_.emplace_back(parabolaParams);
42 }
std::vector< ParabolaParameters > parabolaParametersCollection_

◆ setSqrtLogClustETuning()

void MustacheSCParametersHelper::setSqrtLogClustETuning ( const float  sqrtLogClustETuning)

◆ sortParabolaParametersCollection()

void MustacheSCParametersHelper::sortParabolaParametersCollection ( )

Definition at line 44 of file MustacheSCParametersHelper.cc.

References LaserDQM_cfg::p1, SiStripOfflineCRack_cfg::p2, EcalMustacheSCParameters::parabolaParametersCollection_, parameters_, and jetsAK4_CHS_cff::sort.

Referenced by MustacheSCParametersHelper().

44  {
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 }
std::vector< ParabolaParameters > parabolaParametersCollection_

Member Data Documentation

◆ parameters_

EcalMustacheSCParameters& reco::MustacheSCParametersHelper::parameters_
private