8 #ifndef LAR_GEOMETRY_HELPER_H 9 #define LAR_GEOMETRY_HELPER_H 1 11 #include "Objects/Cluster.h" 12 #include "Pandora/PandoraEnumeratedTypes.h" 13 #include "Pandora/StatusCodes.h" 15 #include <unordered_map> 19 class CartesianVector;
26 class TwoDSlidingFitResult;
43 std::pair<float, float> m_xBoundaries = {std::numeric_limits<float>::max(), std::numeric_limits<float>::lowest()};
44 std::pair<float, float> m_yBoundaries = {std::numeric_limits<float>::max(), std::numeric_limits<float>::lowest()};
45 std::pair<float, float> m_zBoundaries = {std::numeric_limits<float>::max(), std::numeric_limits<float>::lowest()};
58 const float position1,
const float position2);
69 static pandora::CartesianVector MergeTwoDirections(
const pandora::Pandora &pandora,
const pandora::HitType view1,
70 const pandora::HitType view2,
const pandora::CartesianVector &direction1,
const pandora::CartesianVector &direction2);
84 const pandora::CartesianVector &position1,
const pandora::CartesianVector &position2, pandora::CartesianVector &position3,
float &chiSquared);
100 const pandora::CartesianVector &position1,
const pandora::CartesianVector &position2, pandora::CartesianVector &outputU,
101 pandora::CartesianVector &outputV, pandora::CartesianVector &outputW,
float &chiSquared);
119 const pandora::HitType view3,
const pandora::CartesianVector &position1,
const pandora::CartesianVector &position2,
120 const pandora::CartesianVector &position3, pandora::CartesianVector &outputU, pandora::CartesianVector &outputV,
121 pandora::CartesianVector &outputW,
float &chiSquared);
135 static void MergeThreePositions(
const pandora::Pandora &pandora,
const pandora::CartesianVector &positionU,
136 const pandora::CartesianVector &positionV,
const pandora::CartesianVector &positionW, pandora::CartesianVector &outputU,
137 pandora::CartesianVector &outputV, pandora::CartesianVector &outputW,
float &chiSquared);
151 const pandora::CartesianVector &position1,
const pandora::CartesianVector &position2, pandora::CartesianVector &position3D,
float &chiSquared);
167 const pandora::HitType view3,
const pandora::CartesianVector &position1,
const pandora::CartesianVector &position2,
168 const pandora::CartesianVector &position3, pandora::CartesianVector &position3D,
float &chiSquared);
177 static pandora::CartesianVector ProjectPosition(
178 const pandora::Pandora &pandora,
const pandora::CartesianVector &position3D,
const pandora::HitType view);
187 static pandora::CartesianVector ProjectDirection(
188 const pandora::Pandora &pandora,
const pandora::CartesianVector &direction3D,
const pandora::HitType view);
196 static float GetWireZPitch(
const pandora::Pandora &pandora,
const float maxWirePitchDiscrepancy = 0.01);
205 static float GetWirePitch(
const pandora::Pandora &pandora,
const pandora::HitType view,
const float maxWirePitchDiscrepancy = 0.01);
215 static float GetWirePitchRatio(
const pandora::Pandora &pandora,
const pandora::HitType view);
223 static pandora::CartesianVector GetWireAxis(
const pandora::Pandora &pandora,
const pandora::HitType view);
235 static bool IsInGap(
const pandora::Pandora &pandora,
const pandora::CartesianVector &testPoint2D,
const pandora::HitType hitType,
236 const float gapTolerance = 0.
f);
248 static bool IsInGap3D(
const pandora::Pandora &pandora,
const pandora::CartesianVector &testPoint3D,
const pandora::HitType hitType,
249 const float gapTolerance = 0.
f);
261 static bool IsXSamplingPointInGap(
262 const pandora::Pandora &pandora,
const float xSample,
const TwoDSlidingFitResult &slidingFitResult,
const float gapTolerance = 0.
f);
272 static float CalculateGapDeltaZ(
const pandora::Pandora &pandora,
const float minZ,
const float maxZ,
const pandora::HitType hitType);
280 static float GetSigmaUVW(
const pandora::Pandora &pandora,
const float maxSigmaDiscrepancy = 0.01);
289 static void GetCommonDaughterVolumes(
const pandora::Cluster *
const pCluster1,
const pandora::Cluster *
const pCluster2, UIntSet &intersect);
306 static bool IsInDetector(
const DetectorBoundaries &detectorBoundaries,
const pandora::CartesianVector &position);
311 inline float LArGeometryHelper::GetWireZPitch(
const pandora::Pandora &
pandora,
const float maxWirePitchWDiscrepancy)
313 return LArGeometryHelper::GetWirePitch(pandora, pandora::TPC_VIEW_W, maxWirePitchWDiscrepancy);
318 #endif // #ifndef LAR_GEOMETRY_HELPER_H
std::set< unsigned int > UIntSet
Struct to hold detector boundaries.
TwoDSlidingFitResult class.