Find the intercepts of a line with the protoDUNE detector.
573 CartesianPointVector intercepts;
574 CartesianVector lineUnitVector(0.f, 0.f, 0.f);
578 lineUnitVector = lineDirection.GetUnitVector();
580 catch (
const StatusCodeException &statusCodeException)
582 std::cout <<
"BdtBeamParticleIdTool::SliceFeatures::GetLArTPCIntercepts - normal vector to plane has a magnitude of zero" << std::endl;
583 throw statusCodeException;
588 const CartesianVector intercept(plane.GetLineIntersection(
a0, lineUnitVector));
591 intercepts.push_back(intercept);
594 if (intercepts.size() > 1)
596 float maximumSeparationSquared(0.f);
597 bool interceptsSet(
false);
599 for (
unsigned int i = 0; i < intercepts.size(); i++)
601 for (
unsigned int j = i + 1; j < intercepts.size(); j++)
603 const CartesianVector &candidateInterceptOne(intercepts.at(i));
604 const CartesianVector &candidateInterceptTwo(intercepts.at(j));
605 const float separationSquared((candidateInterceptOne - candidateInterceptTwo).GetMagnitudeSquared());
607 if (separationSquared > maximumSeparationSquared)
609 maximumSeparationSquared = separationSquared;
610 interceptOne = candidateInterceptOne;
611 interceptTwo = candidateInterceptTwo;
612 interceptsSet =
true;
619 std::cout <<
"BdtBeamParticleIdTool::SliceFeatures::GetLArTPCIntercepts - unable to set the intercepts between a line and the LArTPC"
621 throw StatusCodeException(STATUS_CODE_NOT_ALLOWED);
626 std::cout <<
"BdtBeamParticleIdTool::SliceFeatures::GetLArTPCIntercepts - inconsistent number of intercepts between a line and the LArTPC"
628 throw StatusCodeException(STATUS_CODE_NOT_ALLOWED);
BEGIN_PROLOG true icarus_rawdigitfilter FilterTools FilterPlane1 Plane
const SliceFeatureParameters m_sliceFeatureParameters
Geometry information block.
bool IsContained(const pandora::CartesianVector &spacePoint, const float limit) const
Check if a given 3D spacepoint is inside the global LArTPC volume.
float GetContainmentLimit() const
Get m_containmentLimit.
const PlaneVector & GetPlanes() const
Get vector of planes.
BEGIN_PROLOG could also be cout