LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
LArStitchingHelper.h
Go to the documentation of this file.
1 
8 #ifndef LAR_STITCHING_HELPER_H
9 #define LAR_STITCHING_HELPER_H 1
10 
11 #include "Geometry/LArTPC.h"
12 
13 #include "Objects/ParticleFlowObject.h"
14 
16 
17 namespace lar_content
18 {
19 
24 {
25 public:
35  static const pandora::LArTPC &FindClosestTPC(const pandora::Pandora &pandora, const pandora::LArTPC &inputTPC, const bool checkPositive);
36 
45  static bool CanTPCsBeStitched(const pandora::LArTPC &firstTPC, const pandora::LArTPC &secondTPC);
46 
55  static bool AreTPCsAdjacent(const pandora::LArTPC &firstTPC, const pandora::LArTPC &secondTPC);
56 
66  static bool AreTPCsAdjacent(const pandora::Pandora &pandora, const pandora::LArTPC &firstTPC, const pandora::LArTPC &secondTPC);
67 
76  static float GetTPCBoundaryCenterX(const pandora::LArTPC &firstTPC, const pandora::LArTPC &secondTPC);
77 
86  static float GetTPCBoundaryWidthX(const pandora::LArTPC &firstTPC, const pandora::LArTPC &secondTPC);
87 
96  static float GetTPCDisplacement(const pandora::LArTPC &firstTPC, const pandora::LArTPC &secondTPC);
97 
108  static void GetClosestVertices(const pandora::LArTPC &larTPC1, const pandora::LArTPC &larTPC2,
109  const LArPointingCluster &pointingCluster1, const LArPointingCluster &pointingCluster2,
110  LArPointingCluster::Vertex &closestVertex1, LArPointingCluster::Vertex &closestVertex2);
111 
122  static float CalculateX0(const pandora::LArTPC &firstTPC, const pandora::LArTPC &secondTPC,
123  const LArPointingCluster::Vertex &firstVertex, const LArPointingCluster::Vertex &secondVertex);
124 
134  static pandora::CartesianVector GetCorrectedPosition(const pandora::LArTPC &larTPC, const float x0,
135  const pandora::CartesianVector &inputPosition);
136 
143  static bool SortTPCs(const pandora::LArTPC *const pLhs, const pandora::LArTPC *const pRhs);
144 };
145 
146 } // namespace lar_content
147 
148 #endif // #ifndef LAR_STITCHING_HELPER_H
static pandora::CartesianVector GetCorrectedPosition(const pandora::LArTPC &larTPC, const float x0, const pandora::CartesianVector &inputPosition)
Apply the X0 correction to an input position vector.
static float CalculateX0(const pandora::LArTPC &firstTPC, const pandora::LArTPC &secondTPC, const LArPointingCluster::Vertex &firstVertex, const LArPointingCluster::Vertex &secondVertex)
Calculate X0 for a pair of vertices.
Header file for the lar pointing cluster class.
LArPointingCluster class.
static bool CanTPCsBeStitched(const pandora::LArTPC &firstTPC, const pandora::LArTPC &secondTPC)
Whether particles from a given pair of tpcs can be stitched together.
static float GetTPCDisplacement(const pandora::LArTPC &firstTPC, const pandora::LArTPC &secondTPC)
Calculate distance between central positions of a pair of tpcs.
static float GetTPCBoundaryCenterX(const pandora::LArTPC &firstTPC, const pandora::LArTPC &secondTPC)
Determine centre in X at the boundary between a pair of tpcs.
static bool AreTPCsAdjacent(const pandora::LArTPC &firstTPC, const pandora::LArTPC &secondTPC)
Whether a pair of drift volumes are adjacent to each other.
static const pandora::LArTPC & FindClosestTPC(const pandora::Pandora &pandora, const pandora::LArTPC &inputTPC, const bool checkPositive)
Find closest tpc to a specified input tpc.
static float GetTPCBoundaryWidthX(const pandora::LArTPC &firstTPC, const pandora::LArTPC &secondTPC)
Determine width in X at the boundary between a pair of tpcs.
static bool SortTPCs(const pandora::LArTPC *const pLhs, const pandora::LArTPC *const pRhs)
Sort tpcs by central positions.
LArStitchingHelper class.
static void GetClosestVertices(const pandora::LArTPC &larTPC1, const pandora::LArTPC &larTPC2, const LArPointingCluster &pointingCluster1, const LArPointingCluster &pointingCluster2, LArPointingCluster::Vertex &closestVertex1, LArPointingCluster::Vertex &closestVertex2)
Given a pair of pointing clusters, find the pair of vertices with smallest yz-separation.