24 for (
const CaloHit *
const pCaloHit2D : inputTwoDHits)
33 protoHitVector.push_back(protoHit);
46 double chiSquared(protoHit.
GetChi2());
50 for (
const MatchedSlidingFitMap::value_type &mapEntry : matchedSlidingFitMap)
52 if (mapEntry.first == inputHitType)
69 const float minX(std::min(minLayerX, maxLayerX));
70 const float maxX(std::max(minLayerX, maxLayerX));
72 if (((position2D.
GetX() - minX) > -std::numeric_limits<float>::epsilon()) && ((position2D.
GetX() - maxX) < +std::numeric_limits<float>::epsilon()))
78 double px(0.), pz(0.);
80 if (minLayerDistanceSquared < maxLayerDistanceSquared)
85 else if (maxLayerDistanceSquared < minLayerDistanceSquared)
91 if (std::fabs(px) > std::numeric_limits<double>::epsilon())
93 return (0.5 * (pz * pz) / (px * px));
Header file for the geometry helper class.
Header file for the three dimensional hit creation algorithm class.
ThreeDHitCreationAlgorithm::ProtoHitVector ProtoHitVector
double m_chiSquaredCut
The chi squared cut (accept only values below the cut value)
static pandora::CartesianVector ProjectPosition(const pandora::Pandora &pandora, const pandora::CartesianVector &position3D, const pandora::HitType view)
Project 3D position into a given 2D view.
Proto hits are temporary constructs to be used during iterative 3D hit procedure.
void SetPosition3D(const pandora::CartesianVector &position3D, const double chi2)
Set position 3D.
double GetChi2() const
Get the chi squared value.
bool IsPositionSet() const
Whether the proto hit position is set.
const pandora::CaloHit * GetParentCaloHit2D() const
Get the address of the parent 2D calo hit.
const pandora::CartesianVector & GetPosition3D() const
Get the output 3D position.
std::map< pandora::HitType, TwoDSlidingFitResult > MatchedSlidingFitMap
virtual void GetTransverseTrackHit3D(const MatchedSlidingFitMap &matchedSlidingFitMap, ProtoHit &protoHit) const =0
Get the three dimensional position using a provided two dimensional calo hit and sliding linear fits ...
virtual void AddTransverseChi2(const MatchedSlidingFitMap &matchedSlidingFitMap, ProtoHit &protoHit) const
Calculate an additional contribution to the chi-squared based on the steepness of the track.
double GetTransverseChi2(const pandora::CartesianVector &position2D, const TwoDSlidingFitResult &fitResult) const
Calculate an additional contribution to the chi-squared based on the steepness of the track.
virtual void GetTrackHits3D(const pandora::CaloHitVector &inputTwoDHits, const MatchedSlidingFitMap &matchedSlidingFitMap, ProtoHitVector &protoHitVector) const
Calculate 3D hits from an input list of 2D hits.
TwoDSlidingFitResult class.
pandora::CartesianVector GetGlobalMinLayerPosition() const
Get global position corresponding to the fit result in minimum fit layer.
pandora::CartesianVector GetGlobalMinLayerDirection() const
Get global direction corresponding to the fit result in minimum fit layer.
pandora::CartesianVector GetGlobalMaxLayerPosition() const
Get global position corresponding to the fit result in maximum fit layer.
pandora::CartesianVector GetGlobalMaxLayerDirection() const
Get global direction corresponding to the fit result in maximum fit layer.
HitType GetHitType() const
Get the calorimeter hit type.
float GetX() const
Get the cartesian x coordinate.
float GetZ() const
Get the cartesian z coordinate.
const Pandora & GetPandora() const
Get the associated pandora instance.
StatusCodeException class.
HitType
Calorimeter hit type enum.
std::vector< const CaloHit * > CaloHitVector