LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
LArGeometryHelper.h
Go to the documentation of this file.
1 
8 #ifndef LAR_GEOMETRY_HELPER_H
9 #define LAR_GEOMETRY_HELPER_H 1
10 
11 #include "Pandora/PandoraEnumeratedTypes.h"
12 #include "Pandora/StatusCodes.h"
13 
14 #include <unordered_map>
15 
16 namespace pandora {class CartesianVector; class Pandora;}
17 
18 namespace lar_content
19 {
20 
21 class TwoDSlidingFitResult;
22 
23 //------------------------------------------------------------------------------------------------------------------------------------------
24 
29 {
30 public:
40  static float MergeTwoPositions(const pandora::Pandora &pandora, const pandora::HitType view1, const pandora::HitType view2,
41  const float position1, const float position2);
42 
52  static pandora::CartesianVector MergeTwoDirections(const pandora::Pandora &pandora, const pandora::HitType view1,
53  const pandora::HitType view2, const pandora::CartesianVector &direction1, const pandora::CartesianVector &direction2);
54 
66  static void MergeTwoPositions(const pandora::Pandora &pandora, const pandora::HitType view1, const pandora::HitType view2,
67  const pandora::CartesianVector &position1, const pandora::CartesianVector &position2, pandora::CartesianVector &position3,
68  float &chiSquared);
69 
83  static void MergeTwoPositions(const pandora::Pandora &pandora, const pandora::HitType view1, const pandora::HitType view2,
84  const pandora::CartesianVector &position1, const pandora::CartesianVector &position2, pandora::CartesianVector &outputU,
85  pandora::CartesianVector &outputV, pandora::CartesianVector &outputW, float &chiSquared);
86 
102  static void MergeThreePositions(const pandora::Pandora &pandora, const pandora::HitType view1, const pandora::HitType view2,
103  const pandora::HitType view3, const pandora::CartesianVector &position1, const pandora::CartesianVector &position2,
104  const pandora::CartesianVector &position3, pandora::CartesianVector &outputU, pandora::CartesianVector &outputV,
105  pandora::CartesianVector &outputW, float &chiSquared);
106 
119  static void MergeThreePositions(const pandora::Pandora &pandora, const pandora::CartesianVector &positionU,
120  const pandora::CartesianVector &positionV, const pandora::CartesianVector &positionW, pandora::CartesianVector &outputU,
121  pandora::CartesianVector &outputV, pandora::CartesianVector &outputW, float &chiSquared);
122 
134  static void MergeTwoPositions3D(const pandora::Pandora &pandora, const pandora::HitType view1, const pandora::HitType view2,
135  const pandora::CartesianVector &position1, const pandora::CartesianVector &position2, pandora::CartesianVector &position3D,
136  float &chiSquared);
137 
151  static void MergeThreePositions3D(const pandora::Pandora &pandora, const pandora::HitType view1, const pandora::HitType view2,
152  const pandora::HitType view3, const pandora::CartesianVector &position1, const pandora::CartesianVector &position2,
153  const pandora::CartesianVector &position3, pandora::CartesianVector &position3D, float &chiSquared);
154 
162  static pandora::CartesianVector ProjectPosition(const pandora::Pandora &pandora, const pandora::CartesianVector &position3D,
163  const pandora::HitType view);
164 
172  static pandora::CartesianVector ProjectDirection(const pandora::Pandora &pandora, const pandora::CartesianVector &direction3D,
173  const pandora::HitType view);
174 
181  static float GetWireZPitch(const pandora::Pandora &pandora, const float maxWirePitchDiscrepancy = 0.01);
182 
190  static float GetWirePitch(const pandora::Pandora &pandora, const pandora::HitType view, const float maxWirePitchDiscrepancy = 0.01);
191 
198  static pandora::CartesianVector GetWireAxis(const pandora::Pandora &pandora, const pandora::HitType view);
199 
210  static bool IsInGap(const pandora::Pandora &pandora, const pandora::CartesianVector &testPoint2D, const pandora::HitType hitType,
211  const float gapTolerance = 0.f);
212 
223  static bool IsInGap3D(const pandora::Pandora &pandora, const pandora::CartesianVector &testPoint3D, const pandora::HitType hitType,
224  const float gapTolerance = 0.f);
225 
236  static bool IsXSamplingPointInGap(const pandora::Pandora &pandora, const float xSample, const TwoDSlidingFitResult &slidingFitResult,
237  const float gapTolerance = 0.f);
238 
247  static float CalculateGapDeltaZ(const pandora::Pandora &pandora, const float minZ, const float maxZ, const pandora::HitType hitType);
248 
255  static float GetSigmaUVW(const pandora::Pandora &pandora, const float maxSigmaDiscrepancy = 0.01);
256 };
257 
258 //------------------------------------------------------------------------------------------------------------------------------------------
259 
260 inline float LArGeometryHelper::GetWireZPitch(const pandora::Pandora &pandora, const float maxWirePitchWDiscrepancy)
261 {
262  return LArGeometryHelper::GetWirePitch(pandora, pandora::TPC_VIEW_W, maxWirePitchWDiscrepancy);
263 }
264 
265 } // namespace lar_content
266 
267 #endif // #ifndef LAR_GEOMETRY_HELPER_H
LArGeometryHelper class.
TFile f
Definition: plotHisto.C:6