10 std::unique_ptr<AbsHFPhase1Algo>
13 std::unique_ptr<AbsHFPhase1Algo>
algo;
17 const bool isHFSimpleTimeCheck = className ==
"HFSimpleTimeCheck";
18 if (isHFSimpleTimeCheck || className ==
"HFFlexibleTimeCheck")
20 const std::vector<double>& energyWeightsVec =
40 const unsigned sz =
sizeof(
energyWeights)/
sizeof(energyWeights[0][0]);
42 if (energyWeightsVec.size() == sz)
44 std::pair<float,float>
tlimits[2];
45 if (isHFSimpleTimeCheck)
48 const std::vector<double>& tlimitsVec =
50 if (tlimitsVec.size() == 4)
52 tlimits[0] = std::pair<float,float>(tlimitsVec[0], tlimitsVec[1]);
53 tlimits[1] = std::pair<float,float>(tlimitsVec[2], tlimitsVec[3]);
61 tlimits[0] = std::pair<float,float>(-FLT_MAX, FLT_MAX);
62 tlimits[1] = tlimits[0];
66 float*
to = &energyWeights[0][0];
67 for (
unsigned i=0;
i<sz; ++
i)
68 to[
i] = energyWeightsVec[
i];
71 if (isHFSimpleTimeCheck)
72 algo = std::unique_ptr<AbsHFPhase1Algo>(
74 timeShift, triseIfNoTDC, tfallIfNoTDC,
75 minChargeForUndershoot, minChargeForOvershoot,
76 rejectAllFailures, alwaysCalculateQAsymmetry));
78 algo = std::unique_ptr<AbsHFPhase1Algo>(
80 timeShift, triseIfNoTDC, tfallIfNoTDC,
81 minChargeForUndershoot, minChargeForOvershoot,
82 rejectAllFailures, alwaysCalculateQAsymmetry));
93 std::vector<double> allPass{-10000.0, 10000.0, -10000.0, 10000.0};
94 desc.
add<std::vector<double> >(
"tlimits", allPass);
95 desc.
add<std::vector<double> >(
"energyWeights");
96 desc.
add<
unsigned>(
"soiPhase", 1
U);
97 desc.
add<
double>(
"timeShift", 0.0);
98 desc.
add<
double>(
"triseIfNoTDC", -100.0);
99 desc.
add<
double>(
"tfallIfNoTDC", -101.0);
100 desc.
add<
double>(
"minChargeForUndershoot", 1.0e10);
101 desc.
add<
double>(
"minChargeForOvershoot", 1.0e10);
102 desc.
add<
bool>(
"alwaysCalculateQAsymmetry",
true);
T getParameter(std::string const &) const
ParameterDescriptionNode * ifValue(ParameterDescription< T > const &switchParameter, std::unique_ptr< ParameterDescriptionCases< T >> cases)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
std::unique_ptr< AbsHFPhase1Algo > parseHFPhase1AlgoDescription(const edm::ParameterSet &ps)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
alwaysCalculateQAsymmetry
std::string className(const T &t)
edm::ParameterSetDescription fillDescriptionForParseHFPhase1AlgoDescription()