20 using namespace PhysicsTools;
29 ProcOptional(
const char *
name,
32 virtual ~ProcOptional() {}
34 virtual void configure(ConfIterator iter,
unsigned int n);
35 virtual void eval(ValueIterator iter,
unsigned int n)
const;
36 virtual std::vector<double> deriv(
37 ValueIterator iter,
unsigned int n)
const;
40 std::vector<double> neutralPos;
45 ProcOptional::ProcOptional(
const char *
name,
49 neutralPos(calib->neutralPos)
53 void ProcOptional::configure(ConfIterator iter,
unsigned int n)
55 if (n != neutralPos.size())
59 iter++(Variable::FLAG_OPTIONAL) << Variable::FLAG_NONE;
62 void ProcOptional::eval(ValueIterator iter,
unsigned int n)
const
64 for(std::vector<double>::const_iterator
pos = neutralPos.begin();
65 pos != neutralPos.end();
pos++, ++iter) {
75 <<
"Multiple input variables encountered."
81 std::vector<double> ProcOptional::deriv(
82 ValueIterator iter,
unsigned int n)
const
84 unsigned int size = 0;
85 for(ValueIterator iter2 = iter; iter2; ++iter2)
88 std::vector<double>
result;
90 unsigned int column = 0;
91 for(std::vector<double>::const_iterator
pos = neutralPos.begin();
92 pos != neutralPos.end();
pos++, ++iter) {
93 unsigned int row = result.size();
94 result.resize(row + size);
99 result[row + column++] = 1.0;
103 <<
"Multiple input variables encountered."
detail::ThreadSafeRegistry< ParameterSetID, ParameterSet, ProcessParameterSetIDCache > Registry
MVATrainerComputer * calib
tuple size
Write out results.