340 TVector3 dirZ(0, 0, 1);
354 pts[0].emplace_back(xpos, r0.z(), 0,
energy);
359 TVector3 perp = (r1 - r0).Unit();
360 perp = TVector3(0, -perp.z(), perp.y());
362 if (perp.z() < 0) perp *= -1;
367 if (dirU.Mag2() == 0) { dirU = perp; }
368 else if (dirV.Mag2() == 0 && fabs(dirU.Dot(perp)) < 0.99) {
374 if (fabs(dirU.Dot(perp)) > 0.99) { pts[1].emplace_back(xpos, r0.Dot(dirU), 1,
energy); }
376 pts[2].emplace_back(xpos, r0.Dot(dirV), 2,
energy);
380 dirs = {dirZ, dirU, dirV};
382 std::default_random_engine
gen;
385 for (
int view = 0; view < 3; ++view) {
386 std::shuffle(pts[view].
begin(), pts[view].
end(), gen);
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
Planes which measure Z direction.
View_t View(geo::PlaneID const &pid) const
Returns the view (wire orientation) on the channels of specified TPC plane.
Detector simulation of raw signals on wires.
double ConvertTicksToX(double ticks, int p, int t, int c) const
void WireEndPoints(geo::WireID const &wireid, double *xyzStart, double *xyzEnd) const
Fills two arrays with the coordinates of the wire end points.
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
2D representation of charge deposited in the TDC/wire plane