|
|
Go to the documentation of this file.
49 y = scRef->clustersSize();
52 return x >=
absEtaMin && x < absEtaMax && y >= nrClusMin &&
y <= nrClusMax;
63 y = scRef->clustersSize();
79 y = scRef->clustersSize();
80 z = scRef->energy() *
sin(scRef->position().Theta());
83 return x >=
absEtaMin && x < absEtaMax && y >= nrClusMin && y <= nrClusMax && z >=
etMin &&
z <
etMax;
91 template <
typename ParamType,
bool = true>
98 for (
size_t paraNr = 0; paraNr <
params.size(); paraNr++) {
104 template <
typename ParamType>
111 template <
typename ParamType,
bool = true>
118 for (
size_t paraNr = 0; paraNr <
params.size(); paraNr++) {
124 template <
typename ParamType>
131 template <
typename ParamType,
bool = true>
138 for (
size_t paraNr = 0; paraNr <
params.size(); paraNr++) {
144 template <
typename ParamType>
153 template <
typename T>
168 template <
typename T>
172 template <
typename T>
176 template <
typename T>
180 template <
typename T>
184 template <
typename T>
188 template <
typename T>
193 template <
typename InputType>
204 size_t pos = inStr.find(
":=");
205 if (
pos != std::string::npos)
206 return std::make_pair(inStr.substr(0,
pos), inStr.substr(
pos + 2));
210 template <
typename ParamType>
214 if (
funcType.first ==
"TF1" && has1D<ParamType>(0))
216 else if (
funcType.first ==
"TF2" && has2D<ParamType>(0))
218 else if (
funcType.first ==
"TF3" && has3D<ParamType>(0))
222 <<
" is not recognised or is imcompatable with the ParamType, "
223 "configuration is invalid and needs to be fixed"
228 template <
typename InputType,
typename ParamType>
249 template <
typename InputType,
typename ParamType>
275 template <
typename InputType,
typename ParamType>
307 template <
typename InputType>
309 std::vector<std::unique_ptr<ParamBin<InputType>>>
bins_;
313 std::vector<edm::ParameterSet> binConfigs =
config.getParameter<std::vector<edm::ParameterSet>>(
"bins");
314 for (
auto& binConfig : binConfigs)
328 if (
type ==
"AbsEtaClus")
329 return std::make_unique<ParamBin2D<InputType, AbsEtaNrClus>>(
config);
330 else if (
type ==
"AbsEtaClusPhi")
331 return std::make_unique<ParamBin3D<InputType, AbsEtaNrClusPhi>>(
config);
332 else if (
type ==
"AbsEtaClusEt")
333 return std::make_unique<ParamBin3D<InputType, AbsEtaNrClusEt>>(
config);
336 <<
" type " <<
type <<
" is not recognised, configuration is invalid and needs to be fixed" << std::endl;
bool pass(const InputType &input) const override
bool pass(float absEtaMin, float absEtaMax, size_t nrClusMin, size_t nrClusMax, float phiMin, float phiMax) const
static const std::string input
std::function< float(const ParamType &)> func_
static std::function< float(const ParamType &)> makeFunc(const edm::ParameterSet &config)
constexpr auto has1D(int) -> decltype(T::x, bool())
float operator()(const InputType &input) const override
TF1Wrap(const std::string &funcExpr, const std::vector< double > ¶ms)
float operator()(const ParamType &obj)
constexpr auto has2D(int) -> decltype(T::y, bool())
std::function< float(const ParamType &)> func_
TF2Wrap(const std::string &funcExpr, const std::vector< double > ¶ms)
bool pass(const InputType &input) const override
TF3Wrap(const std::string &funcExpr, const std::vector< double > ¶ms)
ParamBin2D(const edm::ParameterSet &config)
Sin< T >::type sin(const T &t)
float operator()(const InputType &input) const override
constexpr auto has3D(int) -> decltype(T::z, bool())
virtual float operator()(const InputType &) const =0
ParamBin3D(const edm::ParameterSet &config)
decltype(ParamType::y) YType
decltype(ParamType::x) XType
std::function< float(const ParamType &)> func_
static std::pair< std::string, std::string > readFuncStr(const std::string &inStr)
config
parse the configuration file
decltype(ParamType::x) XType
decltype(ParamType::y) YType
bool pass(float absEtaMin, float absEtaMax, size_t nrClusMin, size_t nrClusMax, float etMin, float etMax) const
TF1Wrap(const std::string &funcExpr, const std::vector< double > ¶ms)
float operator()(const InputType &input) const override
std::unique_ptr< ParamBin< InputType > > createParamBin_(const edm::ParameterSet &config)
float operator()(const ParamType &obj)
bool pass(float absEtaMin, float absEtaMax, size_t nrClusMin, size_t nrClusMax) const
float operator()(const InputType &input) const
float operator()(const ParamType &obj)
AbsEtaNrClus(const reco::ElectronSeed &seed)
AbsEtaNrClusEt(const reco::ElectronSeed &seed)
Param(const edm::ParameterSet &config)
def template(fileName, svg, replaceme="REPLACEME")
bool pass(const InputType &input) const override
decltype(ParamType::x) XType
TF2Wrap(const std::string &funcExpr, const std::vector< double > ¶ms)
float operator()(const ParamType &obj)
virtual bool pass(const InputType &) const =0
TF3Wrap(const std::string &funcExpr, const std::vector< double > ¶ms)
std::vector< std::unique_ptr< ParamBin< InputType > > > bins_
ParamBin1D(const edm::ParameterSet &config)
Abs< T >::type abs(const T &t)
float operator()(const ParamType &obj)
AbsEtaNrClusPhi(const reco::ElectronSeed &seed)
decltype(ParamType::z) ZType
float operator()(const ParamType &obj)