2 #include <Math/Functions.h> 12 std::vector<double> constr =
cfg.getParameter<std::vector<double> >(
"constraints");
18 std::vector<edm::ParameterSet> functionSets_ =
cfg.getParameter<std::vector<edm::ParameterSet> >(
"functions");
19 for (std::vector<edm::ParameterSet>::const_iterator iSet = functionSets_.begin(); iSet != functionSets_.end();
21 if (iSet->exists(
"bin"))
23 else if (functionSets_.size() == 1)
26 throw cms::Exception(
"WrongConfig") <<
"Parameter 'bin' is needed if more than one PSet is specified\n";
38 for (
unsigned int i = 0;
i <
bins_.size(); ++
i) {
45 std::vector<pat::CandKinResolution::Scalar> covariances(3);
46 if (selectedBin >= 0) {
53 for (
int i = 0;
i < 3; ++
i) {
pat::CandKinResolution::Parametrization parametrization_
~StringResolutionProvider() override
default destructor
pat::CandKinResolution getResolution(const reco::Candidate &cand) const override
get a CandKinResolution object from the service
StringObjectFunction< reco::Candidate > Function
short cut within the common namespace
std::vector< std::string > funcEt_
vectors for the resolution functions
parametrization
specify parametrization (see SWGuidePATKinematicResolutions for more details)
StringResolutionProvider(const edm::ParameterSet &cfg)
default constructor
std::vector< std::string > funcEta_
std::vector< pat::CandKinResolution::Scalar > constraints_
std::vector< std::string > bins_
a vector of strings for the binning
pat::CandKinResolution::Parametrization fromString(const std::string &name)
Convert a name into a parametrization code.
std::vector< std::string > funcPhi_