1 #include <trg/cdc/dataobjects/CDCTriggerMLP.h>
7 nNodes{27, 27, 2}, trained(
false), targetVars(3), outputScale{ -1., 1., -1., 1.},
8 phiRange{0., 2. * M_PI}, invptRange{ -5., 5.}, thetaRange{0., M_PI},
9 maxHitsPerSL(1), SLpattern(0), SLpatternMask(0), tMax(256),
19 et_option(
"etf_or_fastestpriority"),
22 weights.assign(nWeightsCal(), 0.);
26 unsigned short targets,
27 std::vector<float>& outputscale,
28 std::vector<float>& phirange,
29 std::vector<float>& invptrange,
30 std::vector<float>& thetarange,
31 unsigned short maxHits,
32 unsigned long pattern,
33 unsigned long patternMask,
36 std::string etoption):
37 nNodes(nodes), trained(false), targetVars(targets), outputScale(outputscale),
38 phiRange(phirange), invptRange(invptrange), thetaRange(thetarange),
39 maxHitsPerSL(maxHits), SLpattern(pattern), SLpatternMask(patternMask),
53 weights.assign(nWeightsCal(), 0.);
62 for (
unsigned il = 1; il <
nLayers() - 1; ++il) {
72 return ((
phiRange[0] <= (phi - 2. * M_PI) && (phi - 2. * M_PI) <=
phiRange[1]) ||
106 scale = pow(2, floor(log2(scale)));
108 return scale * (relId - offset);
114 std::vector<float> scaled;
115 scaled.assign(target.size(), 0.);
116 for (
unsigned i = 0; i < target.size(); ++i) {
125 std::vector<float> unscaled;
126 unscaled.assign(target.size(), 0.);
127 for (
unsigned i = 0; i < target.size(); ++i) {