LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
LArConnectionPathwayHelper.h
Go to the documentation of this file.
1 
8 #ifndef LAR_CONNECTION_PATHWAY_HELPER_H
9 #define LAR_CONNECTION_PATHWAY_HELPER_H 1
10 
11 #include "Pandora/PandoraInternal.h"
12 
14 
15 namespace lar_content
16 {
17 
22 {
23 public:
28  {
29  public:
35  SortByDistanceToPoint(const pandora::CartesianVector referencePoint) :
36  m_referencePoint(referencePoint)
37  {
38  }
39 
48  bool operator()(const pandora::CartesianVector &lhs, const pandora::CartesianVector &rhs);
49  bool operator()(const pandora::CaloHit *const lhs, const pandora::CaloHit *const rhs);
50 
51  private:
52  const pandora::CartesianVector m_referencePoint;
53  };
54 
69  static bool FindShowerStarts3D(const pandora::Algorithm *const pAlgorithm, const pandora::ParticleFlowObject *const pShowerPfo,
70  const ProtoShowerMatch &protoShowerMatch, const pandora::CartesianVector &nuVertexPosition, const float maxSeparationFromHit,
71  const float maxProjectionSeparation, const float maxXSeparation, pandora::CartesianPointVector &showerStarts3D);
72 
82  static void FindShowerStartFromPosition(const pandora::Algorithm *const pAlgorithm, const ProtoShower &protoShowerU,
83  const ProtoShower &protoShowerV, const ProtoShower &protoShowerW, pandora::CartesianVector &showerStart3D);
84 
98  static bool FindShowerStartFromDirection(const pandora::Algorithm *const pAlgorithm, const ProtoShower &protoShowerU,
99  const ProtoShower &protoShowerV, const ProtoShower &protoShowerW, pandora::CartesianVector &uShowerStart3D,
100  pandora::CartesianVector &vShowerStart3D, pandora::CartesianVector &wShowerStart3D);
101 
113  static bool FindShowerStartFromDirection(const pandora::Algorithm *const pAlgorithm, const ProtoShower &protoShower,
114  const ProtoShower &protoShowerA, const ProtoShower &protoShowerB, pandora::CartesianVector &showerStart3D);
115 
125  static bool ProjectShowerStartByDirection(const ProtoShower &protoShower, const float x, pandora::CartesianVector &showerStart2D);
126 
140  static bool FindShowerStartFromXProjection(const pandora::Algorithm *const pAlgorithm, const ProtoShower &protoShower, const ProtoShower &protoShower1,
141  const ProtoShower &protoShower2, const float maxSeparation, const float maxXSeparation, pandora::CartesianVector &showerStart3D);
142 
153  static bool FindClosestSpinePosition(const ProtoShower &protoShower, const pandora::CartesianVector &showerStart3D,
154  const float maxXSeparation, pandora::CartesianVector &foundShowerStart);
155 
169  static bool FindShowerStartFromXProjectionRelaxed(const pandora::Algorithm *const pAlgorithm, const ProtoShower &protoShower,
170  const ProtoShower &protoShower1, const ProtoShower &protoShower2, const float maxSeparation, const float maxXSeparation,
171  pandora::CartesianVector &showerStart3D);
172 
183  static void GetMinMiddleMax(const float value1, const float value2, const float value3, float &minValue, float &middleValue, float &maxValue);
184 };
185 
186 } // namespace lar_content
187 
188 #endif // #ifndef LAR_CONNECTION_PATHWAY_HELPER_H
Float_t x
Definition: compare.C:6
const pandora::CartesianVector m_referencePoint
The point relative to which constituent hits are ordered.
Header file for the ProtoShower class.
static bool FindShowerStarts3D(const pandora::Algorithm *const pAlgorithm, const pandora::ParticleFlowObject *const pShowerPfo, const ProtoShowerMatch &protoShowerMatch, const pandora::CartesianVector &nuVertexPosition, const float maxSeparationFromHit, const float maxProjectionSeparation, const float maxXSeparation, pandora::CartesianPointVector &showerStarts3D)
Create 3D shower start position(s) from three input 2D positions.
static bool FindShowerStartFromXProjection(const pandora::Algorithm *const pAlgorithm, const ProtoShower &protoShower, const ProtoShower &protoShower1, const ProtoShower &protoShower2, const float maxSeparation, const float maxXSeparation, pandora::CartesianVector &showerStart3D)
Create a 3D shower start position from an input 2D position, assuming consistency of the drift coordi...
static bool FindClosestSpinePosition(const ProtoShower &protoShower, const pandora::CartesianVector &showerStart3D, const float maxXSeparation, pandora::CartesianVector &foundShowerStart)
Find the 2D spine hit that is closest to the neutrino vertex and shares a drift coordinate with an in...
ProtoShowerMatch class.
static void FindShowerStartFromPosition(const pandora::Algorithm *const pAlgorithm, const ProtoShower &protoShowerU, const ProtoShower &protoShowerV, const ProtoShower &protoShowerW, pandora::CartesianVector &showerStart3D)
Create 3D shower start position from three input 2D positions, assuming consistency of position...
static bool ProjectShowerStartByDirection(const ProtoShower &protoShower, const float x, pandora::CartesianVector &showerStart2D)
Find a 2D shower start, from a drift coordinate by assuming consistency of initial direction...
ProtoShower class.
SortByDistanceToPoint(const pandora::CartesianVector referencePoint)
Constructor.
static void GetMinMiddleMax(const float value1, const float value2, const float value3, float &minValue, float &middleValue, float &maxValue)
Determine the lowest, median and highest value from an input of three numbers.
static bool FindShowerStartFromDirection(const pandora::Algorithm *const pAlgorithm, const ProtoShower &protoShowerU, const ProtoShower &protoShowerV, const ProtoShower &protoShowerW, pandora::CartesianVector &uShowerStart3D, pandora::CartesianVector &vShowerStart3D, pandora::CartesianVector &wShowerStart3D)
Create a 3D shower start position from each input 2D position, assuming consistency of initial direct...
bool operator()(const pandora::CartesianVector &lhs, const pandora::CartesianVector &rhs)
Sort constituent hits by their position relative to a referencePoint.
static bool FindShowerStartFromXProjectionRelaxed(const pandora::Algorithm *const pAlgorithm, const ProtoShower &protoShower, const ProtoShower &protoShower1, const ProtoShower &protoShower2, const float maxSeparation, const float maxXSeparation, pandora::CartesianVector &showerStart3D)
A relaxed approach to create a 3D shower start position from an input 2D position, assuming consistency of the drift coordinate.