9 #include "Managers/GeometryManager.h" 10 #include "Managers/PluginManager.h" 12 #include "Geometry/DetectorGap.h" 13 #include "Geometry/LArTPC.h" 15 #include "Objects/CartesianVector.h" 17 #include "Pandora/Pandora.h" 24 #include "Plugins/LArTransformationPlugin.h" 31 float LArGeometryHelper::MergeTwoPositions(
const Pandora &
pandora,
const HitType view1,
const HitType view2,
const float position1,
const float position2)
34 throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
36 if ((view1 == TPC_VIEW_U) && (view2 == TPC_VIEW_V))
38 return pandora.GetPlugins()->GetLArTransformationPlugin()->UVtoW(position1, position2);
41 if ((view1 == TPC_VIEW_V) && (view2 == TPC_VIEW_U))
43 return pandora.GetPlugins()->GetLArTransformationPlugin()->UVtoW(position2, position1);
46 if ((view1 == TPC_VIEW_W) && (view2 == TPC_VIEW_U))
48 return pandora.GetPlugins()->GetLArTransformationPlugin()->WUtoV(position1, position2);
51 if ((view1 == TPC_VIEW_U) && (view2 == TPC_VIEW_W))
53 return pandora.GetPlugins()->GetLArTransformationPlugin()->WUtoV(position2, position1);
56 if ((view1 == TPC_VIEW_V) && (view2 == TPC_VIEW_W))
58 return pandora.GetPlugins()->GetLArTransformationPlugin()->VWtoU(position1, position2);
61 if ((view1 == TPC_VIEW_W) && (view2 == TPC_VIEW_V))
63 return pandora.GetPlugins()->GetLArTransformationPlugin()->VWtoU(position2, position1);
66 throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
71 CartesianVector LArGeometryHelper::MergeTwoDirections(
72 const Pandora &pandora,
const HitType view1,
const HitType view2,
const CartesianVector &direction1,
const CartesianVector &direction2)
75 if (direction1.GetX() * direction2.GetX() < 0.f)
76 throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
79 const float s1((std::fabs(direction1.GetX()) > std::numeric_limits<float>::epsilon()) ? 100.
f * std::fabs(direction2.GetX()) : 1.
f);
80 const float s2((std::fabs(direction2.GetX()) > std::numeric_limits<float>::epsilon()) ? 100.
f * std::fabs(direction1.GetX()) : 1.
f);
82 float pX(s1 * direction1.GetX()), pU(0.
f), pV(0.
f), pW(0.
f);
85 if ((view1 == TPC_VIEW_U) && (view2 == TPC_VIEW_V))
87 pU = s1 * direction1.GetZ();
88 pV = s2 * direction2.GetZ();
92 if ((view1 == TPC_VIEW_V) && (view2 == TPC_VIEW_U))
94 pV = s1 * direction1.GetZ();
95 pU = s2 * direction2.GetZ();
99 if ((view1 == TPC_VIEW_W) && (view2 == TPC_VIEW_U))
101 pW = s1 * direction1.GetZ();
102 pU = s2 * direction2.GetZ();
103 newView = TPC_VIEW_V;
106 if ((view1 == TPC_VIEW_U) && (view2 == TPC_VIEW_W))
108 pU = s1 * direction1.GetZ();
109 pW = s2 * direction2.GetZ();
110 newView = TPC_VIEW_V;
113 if ((view1 == TPC_VIEW_V) && (view2 == TPC_VIEW_W))
115 pV = s1 * direction1.GetZ();
116 pW = s2 * direction2.GetZ();
117 newView = TPC_VIEW_U;
120 if ((view1 == TPC_VIEW_W) && (view2 == TPC_VIEW_V))
122 pW = s1 * direction1.GetZ();
123 pV = s2 * direction2.GetZ();
124 newView = TPC_VIEW_U;
127 if (newView == TPC_VIEW_W)
128 return CartesianVector(pX, 0.
f, pandora.GetPlugins()->GetLArTransformationPlugin()->UVtoW(pU, pV)).GetUnitVector();
130 if (newView == TPC_VIEW_U)
131 return CartesianVector(pX, 0.
f, pandora.GetPlugins()->GetLArTransformationPlugin()->VWtoU(pV, pW)).GetUnitVector();
133 if (newView == TPC_VIEW_V)
134 return CartesianVector(pX, 0.
f, pandora.GetPlugins()->GetLArTransformationPlugin()->WUtoV(pW, pU)).GetUnitVector();
136 throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
141 void LArGeometryHelper::MergeTwoPositions(
const Pandora &pandora,
const HitType view1,
const HitType view2,
142 const CartesianVector &position1,
const CartesianVector &position2, CartesianVector &position3,
float &chiSquared)
145 throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
147 const float X3((position1.GetX() + position2.GetX()) / 2.
f);
148 const float Z1(position1.GetZ());
149 const float Z2(position2.GetZ());
150 const float Z3(LArGeometryHelper::MergeTwoPositions(pandora, view1, view2,
Z1,
Z2));
152 position3.SetValues(X3, 0.
f, Z3);
153 const float sigmaUVW(LArGeometryHelper::GetSigmaUVW(pandora));
154 chiSquared = ((X3 - position1.GetX()) * (X3 - position1.GetX()) + (X3 - position2.GetX()) * (X3 - position2.GetX())) / (sigmaUVW * sigmaUVW);
159 void LArGeometryHelper::MergeTwoPositions(
const Pandora &pandora,
const HitType view1,
const HitType view2,
const CartesianVector &position1,
160 const CartesianVector &position2, CartesianVector &outputU, CartesianVector &outputV, CartesianVector &outputW,
float &chiSquared)
163 throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
165 CartesianVector position3(0.
f, 0.
f, 0.
f);
166 LArGeometryHelper::MergeTwoPositions(pandora, view1, view2, position1, position2, position3, chiSquared);
168 float aveU(0.
f), aveV(0.
f), aveW(0.
f);
169 const float Z1(position1.GetZ()),
Z2(position2.GetZ()), Z3(position3.GetZ()), aveX(position3.GetX());
171 if ((view1 == TPC_VIEW_U) && (view2 == TPC_VIEW_V))
178 if ((view1 == TPC_VIEW_V) && (view2 == TPC_VIEW_W))
185 if ((view1 == TPC_VIEW_W) && (view2 == TPC_VIEW_U))
192 if ((view1 == TPC_VIEW_V) && (view2 == TPC_VIEW_U))
199 if ((view1 == TPC_VIEW_W) && (view2 == TPC_VIEW_V))
206 if ((view1 == TPC_VIEW_U) && (view2 == TPC_VIEW_W))
213 outputU.SetValues(aveX, 0.
f, aveU);
214 outputV.SetValues(aveX, 0.
f, aveV);
215 outputW.SetValues(aveX, 0.
f, aveW);
220 void LArGeometryHelper::MergeThreePositions(
const Pandora &pandora,
const HitType view1,
const HitType view2,
const HitType view3,
221 const CartesianVector &position1,
const CartesianVector &position2,
const CartesianVector &position3, CartesianVector &outputU,
222 CartesianVector &outputV, CartesianVector &outputW,
float &chiSquared)
224 if ((view1 == view2) || (view2 == view3) || (view3 == view1))
225 throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
227 if ((view1 == TPC_VIEW_U) && (view2 == TPC_VIEW_V))
229 return LArGeometryHelper::MergeThreePositions(pandora, position1, position2, position3, outputU, outputV, outputW, chiSquared);
232 if ((view1 == TPC_VIEW_V) && (view2 == TPC_VIEW_W))
234 return LArGeometryHelper::MergeThreePositions(pandora, position3, position1, position2, outputU, outputV, outputW, chiSquared);
237 if ((view1 == TPC_VIEW_W) && (view2 == TPC_VIEW_U))
239 return LArGeometryHelper::MergeThreePositions(pandora, position2, position3, position1, outputU, outputV, outputW, chiSquared);
242 if ((view1 == TPC_VIEW_V) && (view2 == TPC_VIEW_U))
244 return LArGeometryHelper::MergeThreePositions(pandora, position2, position1, position3, outputU, outputV, outputW, chiSquared);
247 if ((view1 == TPC_VIEW_W) && (view2 == TPC_VIEW_V))
249 return LArGeometryHelper::MergeThreePositions(pandora, position3, position2, position1, outputU, outputV, outputW, chiSquared);
252 if ((view1 == TPC_VIEW_U) && (view2 == TPC_VIEW_W))
254 return LArGeometryHelper::MergeThreePositions(pandora, position1, position3, position2, outputU, outputV, outputW, chiSquared);
257 throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
262 void LArGeometryHelper::MergeThreePositions(
const Pandora &pandora,
const CartesianVector &positionU,
const CartesianVector &positionV,
263 const CartesianVector &positionW, CartesianVector &outputU, CartesianVector &outputV, CartesianVector &outputW,
float &chiSquared)
265 const float YfromUV(pandora.GetPlugins()->GetLArTransformationPlugin()->UVtoY(positionU.GetZ(), positionV.GetZ()));
266 const float YfromUW(pandora.GetPlugins()->GetLArTransformationPlugin()->UWtoY(positionU.GetZ(), positionW.GetZ()));
267 const float YfromVW(pandora.GetPlugins()->GetLArTransformationPlugin()->VWtoY(positionV.GetZ(), positionW.GetZ()));
269 const float ZfromUV(pandora.GetPlugins()->GetLArTransformationPlugin()->UVtoZ(positionU.GetZ(), positionV.GetZ()));
270 const float ZfromUW(pandora.GetPlugins()->GetLArTransformationPlugin()->UWtoZ(positionU.GetZ(), positionW.GetZ()));
271 const float ZfromVW(pandora.GetPlugins()->GetLArTransformationPlugin()->VWtoZ(positionV.GetZ(), positionW.GetZ()));
274 const bool useOldWZEquivalentTreatment(std::fabs(ZfromUW - ZfromVW) < std::numeric_limits<float>::epsilon());
275 const float aveX((positionU.GetX() + positionV.GetX() + positionW.GetX()) / 3.
f);
276 const float aveY(useOldWZEquivalentTreatment ? YfromUV : (YfromUV + YfromUW + YfromVW) / 3.
f);
277 const float aveZ(useOldWZEquivalentTreatment ? (positionW.GetZ() + 2.f * ZfromUV) / 3.
f : (ZfromUV + ZfromUW + ZfromVW) / 3.f);
279 const float aveU(pandora.GetPlugins()->GetLArTransformationPlugin()->YZtoU(aveY, aveZ));
280 const float aveV(pandora.GetPlugins()->GetLArTransformationPlugin()->YZtoV(aveY, aveZ));
281 const float aveW(pandora.GetPlugins()->GetLArTransformationPlugin()->YZtoW(aveY, aveZ));
283 outputU.SetValues(aveX, 0.
f, aveU);
284 outputV.SetValues(aveX, 0.
f, aveV);
285 outputW.SetValues(aveX, 0.
f, aveW);
287 const float sigmaUVW(LArGeometryHelper::GetSigmaUVW(pandora));
288 chiSquared = ((outputU.GetX() - positionU.GetX()) * (outputU.GetX() - positionU.GetX()) +
289 (outputV.GetX() - positionV.GetX()) * (outputV.GetX() - positionV.GetX()) +
290 (outputW.GetX() - positionW.GetX()) * (outputW.GetX() - positionW.GetX()) +
291 (outputU.GetZ() - positionU.GetZ()) * (outputU.GetZ() - positionU.GetZ()) +
292 (outputV.GetZ() - positionV.GetZ()) * (outputV.GetZ() - positionV.GetZ()) +
293 (outputW.GetZ() - positionW.GetZ()) * (outputW.GetZ() - positionW.GetZ())) /
294 (sigmaUVW * sigmaUVW);
299 void LArGeometryHelper::MergeTwoPositions3D(
const Pandora &pandora,
const HitType view1,
const HitType view2,
300 const CartesianVector &position1,
const CartesianVector &position2, CartesianVector &position3D,
float &chiSquared)
302 CartesianVector positionU(0.
f, 0.
f, 0.
f), positionV(0.
f, 0.
f, 0.
f), positionW(0.
f, 0.
f, 0.
f);
303 LArGeometryHelper::MergeTwoPositions(pandora, view1, view2, position1, position2, positionU, positionV, positionW, chiSquared);
305 position3D.SetValues(positionW.GetX(), pandora.GetPlugins()->GetLArTransformationPlugin()->UVtoY(positionU.GetZ(), positionV.GetZ()),
306 pandora.GetPlugins()->GetLArTransformationPlugin()->UVtoZ(positionU.GetZ(), positionV.GetZ()));
311 void LArGeometryHelper::MergeThreePositions3D(
const Pandora &pandora,
const HitType view1,
const HitType view2,
const HitType view3,
312 const CartesianVector &position1,
const CartesianVector &position2,
const CartesianVector &position3, CartesianVector &position3D,
float &chiSquared)
314 CartesianVector positionU(0.
f, 0.
f, 0.
f), positionV(0.
f, 0.
f, 0.
f), positionW(0.
f, 0.
f, 0.
f);
315 LArGeometryHelper::MergeThreePositions(pandora, view1, view2, view3, position1, position2, position3, positionU, positionV, positionW, chiSquared);
317 position3D.SetValues(positionW.GetX(), pandora.GetPlugins()->GetLArTransformationPlugin()->UVtoY(positionU.GetZ(), positionV.GetZ()),
318 pandora.GetPlugins()->GetLArTransformationPlugin()->UVtoZ(positionU.GetZ(), positionV.GetZ()));
323 CartesianVector LArGeometryHelper::ProjectPosition(
const Pandora &pandora,
const CartesianVector &position3D,
const HitType view)
325 if (view == TPC_VIEW_U)
327 return CartesianVector(
328 position3D.GetX(), 0.f, pandora.GetPlugins()->GetLArTransformationPlugin()->YZtoU(position3D.GetY(), position3D.GetZ()));
331 else if (view == TPC_VIEW_V)
333 return CartesianVector(
334 position3D.GetX(), 0.f, pandora.GetPlugins()->GetLArTransformationPlugin()->YZtoV(position3D.GetY(), position3D.GetZ()));
337 else if (view == TPC_VIEW_W)
339 return CartesianVector(
340 position3D.GetX(), 0.f, pandora.GetPlugins()->GetLArTransformationPlugin()->YZtoW(position3D.GetY(), position3D.GetZ()));
343 throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
348 CartesianVector LArGeometryHelper::ProjectDirection(
const Pandora &pandora,
const CartesianVector &direction3D,
const HitType view)
350 if (view == TPC_VIEW_U)
352 return CartesianVector(
353 direction3D.GetX(), 0.f, pandora.GetPlugins()->GetLArTransformationPlugin()->YZtoU(direction3D.GetY(), direction3D.GetZ()))
357 else if (view == TPC_VIEW_V)
359 return CartesianVector(
360 direction3D.GetX(), 0.f, pandora.GetPlugins()->GetLArTransformationPlugin()->YZtoV(direction3D.GetY(), direction3D.GetZ()))
364 else if (view == TPC_VIEW_W)
366 return CartesianVector(
367 direction3D.GetX(), 0.f, pandora.GetPlugins()->GetLArTransformationPlugin()->YZtoW(direction3D.GetY(), direction3D.GetZ()))
371 throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
376 float LArGeometryHelper::GetWirePitch(
const Pandora &pandora,
const HitType view,
const float maxWirePitchDiscrepancy)
378 if (view != TPC_VIEW_U && view != TPC_VIEW_V && view != TPC_VIEW_W && view != TPC_3D)
379 throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
383 const float pitchU{LArGeometryHelper::GetWirePitch(pandora, TPC_VIEW_U, maxWirePitchDiscrepancy)};
384 const float pitchV{LArGeometryHelper::GetWirePitch(pandora, TPC_VIEW_V, maxWirePitchDiscrepancy)};
385 const float pitchW{LArGeometryHelper::GetWirePitch(pandora, TPC_VIEW_W, maxWirePitchDiscrepancy)};
386 return std::max({pitchU, pitchV, pitchW});
389 const LArTPCMap &larTPCMap(pandora.GetGeometry()->GetLArTPCMap());
391 if (larTPCMap.empty())
393 std::cout <<
"LArGeometryHelper::GetWirePitch - LArTPC description not registered with Pandora as required " << std::endl;
394 throw StatusCodeException(STATUS_CODE_NOT_INITIALIZED);
397 const LArTPC *
const pFirstLArTPC(larTPCMap.begin()->second);
398 const float wirePitch(view == TPC_VIEW_U ? pFirstLArTPC->GetWirePitchU()
399 : (view == TPC_VIEW_V ? pFirstLArTPC->GetWirePitchV() : pFirstLArTPC->GetWirePitchW()));
401 for (
const LArTPCMap::value_type &mapEntry : larTPCMap)
403 const LArTPC *
const pLArTPC(mapEntry.second);
404 const float alternateWirePitch(
405 view == TPC_VIEW_U ? pLArTPC->GetWirePitchU() : (view == TPC_VIEW_V ? pLArTPC->GetWirePitchV() : pLArTPC->GetWirePitchW()));
407 if (std::fabs(wirePitch - alternateWirePitch) > maxWirePitchDiscrepancy)
409 std::cout <<
"LArGeometryHelper::GetWirePitch - LArTPC configuration not supported" << std::endl;
410 throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
419 float LArGeometryHelper::GetWirePitchRatio(
const Pandora &pandora,
const HitType view)
421 const float pitchU{LArGeometryHelper::GetWirePitch(pandora, TPC_VIEW_U)};
422 const float pitchV{LArGeometryHelper::GetWirePitch(pandora, TPC_VIEW_V)};
423 const float pitchW{LArGeometryHelper::GetWirePitch(pandora, TPC_VIEW_W)};
424 const float pitchMin{std::min({pitchU, pitchV, pitchW})};
425 const float pitchView{LArGeometryHelper::GetWirePitch(pandora, view)};
427 return pitchView / pitchMin;
432 CartesianVector LArGeometryHelper::GetWireAxis(
const Pandora &pandora,
const HitType view)
434 if (view == TPC_VIEW_U)
436 return CartesianVector(0.
f, pandora.GetPlugins()->GetLArTransformationPlugin()->YZtoU(1.
f, 0.
f),
437 pandora.GetPlugins()->GetLArTransformationPlugin()->YZtoU(0.
f, 1.
f));
440 else if (view == TPC_VIEW_V)
442 return CartesianVector(0.
f, pandora.GetPlugins()->GetLArTransformationPlugin()->YZtoV(1.
f, 0.
f),
443 pandora.GetPlugins()->GetLArTransformationPlugin()->YZtoV(0.
f, 1.
f));
446 else if (view == TPC_VIEW_W)
448 return CartesianVector(0.
f, pandora.GetPlugins()->GetLArTransformationPlugin()->YZtoW(1.
f, 0.
f),
449 pandora.GetPlugins()->GetLArTransformationPlugin()->YZtoW(0.
f, 1.
f));
452 throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
457 void LArGeometryHelper::GetCommonDaughterVolumes(
const Cluster *
const pCluster1,
const Cluster *
const pCluster2,
UIntSet &intersect)
459 UIntSet daughterVolumeIds1, daughterVolumeIds2;
461 LArClusterHelper::GetDaughterVolumeIDs(pCluster1, daughterVolumeIds1);
462 LArClusterHelper::GetDaughterVolumeIDs(pCluster2, daughterVolumeIds2);
464 std::set_intersection(daughterVolumeIds1.begin(), daughterVolumeIds1.end(), daughterVolumeIds2.begin(), daughterVolumeIds2.end(),
465 std::inserter(intersect, intersect.begin()));
470 bool LArGeometryHelper::IsInGap(
const Pandora &pandora,
const CartesianVector &testPoint2D,
const HitType hitType,
const float gapTolerance)
473 for (
const DetectorGap *
const pDetectorGap : pandora.GetGeometry()->GetDetectorGapList())
475 if (pDetectorGap->IsInGap(testPoint2D, hitType, gapTolerance))
484 bool LArGeometryHelper::IsInGap3D(
const Pandora &pandora,
const CartesianVector &testPoint3D,
const HitType hitType,
const float gapTolerance)
486 const CartesianVector testPoint2D(LArGeometryHelper::ProjectPosition(pandora, testPoint3D, hitType));
487 return LArGeometryHelper::IsInGap(pandora, testPoint2D, hitType, gapTolerance);
492 bool LArGeometryHelper::IsXSamplingPointInGap(
const Pandora &pandora,
const float xSample,
const TwoDSlidingFitResult &slidingFitResult,
const float gapTolerance)
494 const HitType hitType(LArClusterHelper::GetClusterHitType(slidingFitResult.
GetCluster()));
498 const bool minLayerIsAtLowX(minLayerPosition.GetX() < maxLayerPosition.GetX());
499 const CartesianVector &lowXCoordinate(minLayerIsAtLowX ? minLayerPosition : maxLayerPosition);
500 const CartesianVector &highXCoordinate(minLayerIsAtLowX ? maxLayerPosition : minLayerPosition);
502 if ((xSample > lowXCoordinate.GetX()) && (xSample < highXCoordinate.GetX()))
504 CartesianVector slidingFitPosition(0.
f, 0.
f, 0.
f);
507 return (LArGeometryHelper::IsInGap(pandora, slidingFitPosition, hitType, gapTolerance));
510 const CartesianVector lowXDirection(
512 const CartesianVector highXDirection(
515 const bool sampleIsNearerToLowX(std::fabs(xSample - lowXCoordinate.GetX()) < std::fabs(xSample - highXCoordinate.GetX()));
516 const CartesianVector &startPosition(sampleIsNearerToLowX ? lowXCoordinate : highXCoordinate);
517 const CartesianVector &startDirection(sampleIsNearerToLowX ? lowXDirection : highXDirection);
519 if (std::fabs(startDirection.GetX()) < std::numeric_limits<float>::epsilon())
520 throw StatusCodeException(STATUS_CODE_NOT_FOUND);
522 const float pathLength((xSample - startPosition.GetX()) / startDirection.GetX());
523 const CartesianVector samplingPoint(startPosition + startDirection * pathLength);
525 return (LArGeometryHelper::IsInGap(pandora, samplingPoint, hitType, gapTolerance));
530 float LArGeometryHelper::CalculateGapDeltaZ(
const Pandora &pandora,
const float minZ,
const float maxZ,
const HitType hitType)
532 if (maxZ - minZ < std::numeric_limits<float>::epsilon())
533 throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
535 float gapDeltaZ(0.
f);
537 for (
const DetectorGap *
const pDetectorGap : pandora.GetGeometry()->GetDetectorGapList())
539 const LineGap *
const pLineGap =
dynamic_cast<const LineGap *
>(pDetectorGap);
542 throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
544 const LineGapType lineGapType(pLineGap->GetLineGapType());
546 if (!(((TPC_VIEW_U == hitType) && (TPC_WIRE_GAP_VIEW_U == lineGapType)) || ((TPC_VIEW_V == hitType) && (TPC_WIRE_GAP_VIEW_V == lineGapType)) ||
547 ((TPC_VIEW_W == hitType) && (TPC_WIRE_GAP_VIEW_W == lineGapType))))
552 if ((pLineGap->GetLineStartZ() > maxZ) || (pLineGap->GetLineEndZ() < minZ))
555 const float gapMinZ(std::max(minZ, pLineGap->GetLineStartZ()));
556 const float gapMaxZ(std::min(maxZ, pLineGap->GetLineEndZ()));
558 if ((gapMaxZ - gapMinZ) > std::numeric_limits<float>::epsilon())
559 gapDeltaZ += (gapMaxZ - gapMinZ);
567 float LArGeometryHelper::GetSigmaUVW(
const Pandora &pandora,
const float maxSigmaDiscrepancy)
569 const LArTPCMap &larTPCMap(pandora.GetGeometry()->GetLArTPCMap());
571 if (larTPCMap.empty())
573 std::cout <<
"LArGeometryHelper::GetSigmaUVW - LArTPC description not registered with Pandora as required " << std::endl;
574 throw StatusCodeException(STATUS_CODE_NOT_INITIALIZED);
577 const LArTPC *
const pFirstLArTPC(larTPCMap.begin()->second);
578 const float sigmaUVW(pFirstLArTPC->GetSigmaUVW());
580 for (
const LArTPCMap::value_type &mapEntry : larTPCMap)
582 const LArTPC *
const pLArTPC(mapEntry.second);
584 if (std::fabs(sigmaUVW - pLArTPC->GetSigmaUVW()) > maxSigmaDiscrepancy)
586 std::cout <<
"LArGeometryHelper::GetSigmaUVW - Plugin does not support provided LArTPC configurations " << std::endl;
587 throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
pandora::CartesianVector GetGlobalMinLayerDirection() const
Get global direction corresponding to the fit result in minimum fit layer.
std::set< unsigned int > UIntSet
Header file for the geometry helper class.
Header file for the cluster helper class.
Header file for the lar two dimensional sliding fit result class.
pandora::CartesianVector GetGlobalMinLayerPosition() const
Get global position corresponding to the fit result in minimum fit layer.
const pandora::Cluster * GetCluster() const
Get the address of the cluster, if originally provided.
pandora::StatusCode GetGlobalFitPositionAtX(const float x, pandora::CartesianVector &position) const
Get global fit position for a given input x coordinate.
pandora::CartesianVector GetGlobalMaxLayerDirection() const
Get global direction corresponding to the fit result in maximum fit layer.
pandora::CartesianVector GetGlobalMaxLayerPosition() const
Get global position corresponding to the fit result in maximum fit layer.
TwoDSlidingFitResult class.