REST version : v2.2.11
Hi:
l am imitating your published article: Topological background discrimination in the PandaX-III neutrinoless double beta decay experiment to get the End-track energies value (or blobs charge) of Xenon excited state’s 0vbb.
I added the TRestFindTrackBlobsProcess in the process.rml,but there is null output.
the value of x1 is nan
2.And x1 belongs to track_XYZ. However, after the track reconstruction.l only have
track_XZ and track_YZ,with none track_XYZ. So we cannot enter the if (tracks[t]->isXYZ())
namely,x1=y1=z1=0;x2=y2=z2=0
If I understand one of the problem is that you have a coordinate, x_1 that contains NaN. And therefore, your track should be the type YZ? However your track is XYZ?
The method TRestTrackEvent::isXYZ() ends up calling TRestHits::areXYZ().
This method was updated recently by @lobis in this commit: ca43bbf8
In the other hand, if you get one of the coordinates NaN, the evaluated distance will be NaN. If areXZ() methods are working as expected, it is recommended to use TRestHits::GetDistance2() or TRestHits::GetDistance(), since they should be protected against NaN.
712 Double_t TRestHits::GetDistance2(int n, int m) {
713 Double_t dx = GetX(n) - GetX(m);
714 Double_t dy = GetY(n) - GetY(m);
715 Double_t dz = GetZ(n) - GetZ(m);
716
717 if (areXY()) return dx * dx + dy * dy;
718 if (areXZ()) return dx * dx + dz * dz;
719 if (areYZ()) return dy * dy + dz * dz;
720
721 return dx * dx + dy * dy + dz * dz;
722 }