261 assert(hs.size() == 3);
262 assert(dirs.size() == 3);
264 const int Nx = hs[0].Nx;
267 M(0, 0) = dirs[0].Y();
268 M(0, 1) = dirs[0].Z();
269 M(1, 0) = dirs[1].Y();
270 M(1, 1) = dirs[1].Z();
273 if (M(0, 0) * M(1, 1) - M(1, 0) * M(0, 1) == 0)
return TVector3(0, 0, 0);
277 float bestscore = -1;
281 std::vector<float> colMax[3];
282 for (
int view = 0; view < 3; ++view) {
283 colMax[view].resize(hs[view].Nz);
284 for (
int iz = 0; iz < hs[view].Nz; ++iz) {
285 colMax[view][iz] = *std::max_element(&hs[view].map[Nx * iz], &hs[view].map[Nx * (iz + 1)]);
289 for (
int iz = 0; iz < hs[0].Nz; ++iz) {
290 const float z = hs[0].ZBinCenter(iz);
291 const float bonus = 1;
293 for (
int iu = 0; iu < hs[1].Nz; ++iu) {
294 const float u = hs[1].ZBinCenter(iu);
299 const TVectorD
r = M *
p;
300 const float v = r[0] * dirs[2].Y() + r[1] * dirs[2].Z();
301 const int iv = hs[2].ZToBin(v);
302 if (iv < 0 || iv >= hs[2].Nz)
continue;
303 const double y =
r(0);
306 if (colMax[0][iz] + colMax[1][iu] + colMax[2][iv] < bestscore)
continue;
309 const float* __restrict__ h0 = &hs[0].map[Nx * iz];
310 const float* __restrict__ h1 = &hs[1].map[Nx * iu];
311 const float* __restrict__ h2 = &hs[2].map[Nx * iv];
314 for (
int ix = 1; ix < Nx - 1; ++ix) {
315 const float score = bonus * (h0[ix] + h1[ix] + h2[ix]);
317 if (score > bestscore) {
323 if (bestix != -1) { bestr = TVector3(hs[0].XBinCenter(bestix), y, z); }
process_name opflash particleana ie ie ie z
BEGIN_PROLOG or score(default)}sbnd_crttrackmatchingalg_crID
process_name opflash particleana ie ie y