1 #ifndef __Basic2DGenericPFlowPositionCalc_H__
2 #define __Basic2DGenericPFlowPositionCalc_H__
21 std::vector<double> logWeightDenom;
22 std::vector<float> logWeightDenomInv;
24 if (conf.
exists(
"logWeightDenominatorByDetector")) {
25 const std::vector<edm::ParameterSet>& logWeightDenominatorByDetectorPSet =
28 for (
const auto&
pset : logWeightDenominatorByDetectorPSet) {
29 if (!
pset.exists(
"detector")) {
30 throw cms::Exception(
"logWeightDenominatorByDetectorPSet") <<
"logWeightDenominator : detector not specified";
36 std::vector<int> depthsT =
pset.getParameter<std::vector<int> >(
"depths");
37 std::vector<double> logWeightDenomT =
pset.getParameter<std::vector<double> >(
"logWeightDenominator");
38 if (logWeightDenomT.size() != depthsT.size()) {
39 throw cms::Exception(
"logWeightDenominator") <<
"logWeightDenominator mismatch with the numbers of depths";
41 for (
unsigned int i = 0;
i < depthsT.size(); ++
i) {
47 logWeightDenom.push_back(logWeightDenomT[
i]);
54 logWeightDenom.push_back(conf.
getParameter<
double>(
"logWeightDenominator"));
57 for (
unsigned int i = 0;
i <
depths.size(); ++
i) {
58 logWeightDenomInv.push_back(1. / logWeightDenom[
i]);
65 if (conf.
exists(
"timeResolutionCalcBarrel")) {
70 if (conf.
exists(
"timeResolutionCalcEndcap")) {
81 edm::LogError(
"Basic2DGenericPFlowPositionCalc") <<
"posCalcNCrystals not valid";
94 std::tuple<std::vector<int>, std::vector<int>, std::vector<float> >
_logWeightDenom;