LongitudinalTrackHitsBaseTool.h
Go to the documentation of this file.
1 /**
2  * @file larpandoracontent/LArThreeDReco/LArHitCreation/LongitudinalTrackHitsBaseTool.h
3  *
4  * @brief Header file for the longitudinal track hits base tool.
5  *
6  * $Log: $
7  */
8 #ifndef LONGITUDINAL_TRACK_HITS_BASE_TOOL_H
9 #define LONGITUDINAL_TRACK_HITS_BASE_TOOL_H 1
10 
12 
13 namespace lar_content
14 {
15 
16 /**
17  * @brief LongitudinalTrackHitsBaseTool class
18  */
20 {
21 public:
22  /**
23  * @brief Default constructor
24  */
26 
27 protected:
28  /**
29  * @brief Get the three dimensional position using a provided two dimensional calo hit and sliding linear fits in the other two views
30  *
31  * @param matchedSlidingFitMap map of sliding fit results from each view
32  * @param vtx3D the 3D vertex position
33  * @param end3D the 3D end position
34  * @param protoHit to receive the populated proto hit
35  */
36  virtual void GetLongitudinalTrackHit3D(const MatchedSlidingFitMap &matchedSlidingFitMap, const pandora::CartesianVector &vtx3D,
37  const pandora::CartesianVector &end3D, ProtoHit &protoHit) const = 0;
38 
39  virtual void GetTrackHits3D(
40  const pandora::CaloHitVector &inputTwoDHits, const MatchedSlidingFitMap &matchedSlidingFitMap, ProtoHitVector &protoHitVector) const;
41 
42  virtual pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
43 
44 private:
45  /**
46  * @brief Get reconstructed vertex and end positions for this 3D track
47  *
48  * @param inputSlidingFitMap input map of sliding fit results from each view
49  * @param outputSlidingFitMap output map of clean sliding fit results from each view
50  * @param outputVtx3D reconstructed start position of 3D track
51  * @param outputEnd3D reconstructed end position of 3D track
52  */
53  void GetVertexAndEndPositions(const MatchedSlidingFitMap &inputSlidingFitMap, MatchedSlidingFitMap &outputSlidingFitMap,
54  pandora::CartesianVector &outputVtx3D, pandora::CartesianVector &outputEnd3D) const;
55 
56  /**
57  * @brief Combine two 2D coordinates to give a 3D coordinate
58  *
59  * @param hitType1 the view corresponding to the first position
60  * @param hitType2 the view corresponding to the second position
61  * @param vtx1 the first position
62  * @param vtx2 the second position
63  * @param bestVtx the combined vertex position
64  * @param bestChi2 the chi-squared from the combination
65  */
66  void UpdateBestPosition(const pandora::HitType hitType1, const pandora::HitType hitType2, const pandora::CartesianVector &vtx1,
67  const pandora::CartesianVector &vtx2, pandora::CartesianVector &bestVtx, float &bestChi2) const;
68 
71 };
72 
73 } // namespace lar_content
74 
75 #endif // #ifndef LONGITUDINAL_TRACK_HITS_BASE_TOOL_H
Proto hits are temporary constructs to be used during iterative 3D hit procedure. ...
std::map< pandora::HitType, TwoDSlidingFitResult > MatchedSlidingFitMap
enum cvn::HType HitType
virtual void GetLongitudinalTrackHit3D(const MatchedSlidingFitMap &matchedSlidingFitMap, const pandora::CartesianVector &vtx3D, const pandora::CartesianVector &end3D, ProtoHit &protoHit) const =0
Get the three dimensional position using a provided two dimensional calo hit and sliding linear fits ...
virtual void GetTrackHits3D(const pandora::CaloHitVector &inputTwoDHits, const MatchedSlidingFitMap &matchedSlidingFitMap, ProtoHitVector &protoHitVector) const
Calculate 3D hits from an input list of 2D hits.
ThreeDHitCreationAlgorithm::ProtoHitVector ProtoHitVector
virtual pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
void UpdateBestPosition(const pandora::HitType hitType1, const pandora::HitType hitType2, const pandora::CartesianVector &vtx1, const pandora::CartesianVector &vtx2, pandora::CartesianVector &bestVtx, float &bestChi2) const
Combine two 2D coordinates to give a 3D coordinate.
TrackHitsBaseTool class.
Header file for the track hits base tool.
void GetVertexAndEndPositions(const MatchedSlidingFitMap &inputSlidingFitMap, MatchedSlidingFitMap &outputSlidingFitMap, pandora::CartesianVector &outputVtx3D, pandora::CartesianVector &outputEnd3D) const
Get reconstructed vertex and end positions for this 3D track.