TransverseTrackHitsBaseTool class.
More...
#include <TransverseTrackHitsBaseTool.h>
|
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 in the other two views. More...
|
|
virtual void | GetTrackHits3D (const pandora::CaloHitVector &inputTwoDHits, const MatchedSlidingFitMap &matchedSlidingFitMap, ProtoHitVector &protoHitVector) const |
| Calculate 3D hits from an input list of 2D hits. More...
|
|
virtual void | AddTransverseChi2 (const MatchedSlidingFitMap &matchedSlidingFitMap, ProtoHit &protoHit) const |
| Calculate an additional contribution to the chi-squared based on the steepness of the track. More...
|
|
virtual void | BuildSlidingFitMap (const pandora::ParticleFlowObject *const pPfo, MatchedSlidingFitMap &matchedSlidingFitMap) const |
| Calculate sliding fit results for clusters from each view. More...
|
|
virtual pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
|
virtual void | GetBestPosition3D (const pandora::HitType hitType1, const pandora::HitType hitType2, const pandora::CartesianPointVector &fitPositionList1, const pandora::CartesianPointVector &fitPositionList2, ProtoHit &protoHit) const |
| Get the three dimensional position using a provided two dimensional calo hit and candidate fit positions from the other two views. More...
|
|
virtual void | GetBestPosition3D (const pandora::HitType hitType1, const pandora::HitType hitType2, const pandora::CartesianVector &fitPosition1, const pandora::CartesianVector &fitPosition2, ProtoHit &protoHit) const |
| Get the three dimensional position using a provided two dimensional calo hit and candidate fit positions from the other two views. More...
|
|
virtual void | GetBestPosition3D (const pandora::HitType hitType, const pandora::CartesianVector &fitPosition, ProtoHit &protoHit) const |
| Get the three dimensional position using a provided two dimensional calo hit and a candidate fit position from another view. More...
|
|
void lar_content::TransverseTrackHitsBaseTool::AddTransverseChi2 |
( |
const MatchedSlidingFitMap & |
matchedSlidingFitMap, |
|
|
ProtoHit & |
protoHit |
|
) |
| const |
|
protectedvirtual |
Calculate an additional contribution to the chi-squared based on the steepness of the track.
- Parameters
-
matchedSlidingFitMap | map of sliding fit results from each view |
protoHit | to receive the modified proto hit |
Definition at line 43 of file TransverseTrackHitsBaseTool.cc.
46 double chiSquared(protoHit.GetChi2());
47 const HitType inputHitType(protoHit.GetParentCaloHit2D()->GetHitType());
48 const CartesianVector &inputPosition3D(protoHit.GetPosition3D());
50 for (
const MatchedSlidingFitMap::value_type &mapEntry : matchedSlidingFitMap)
52 if (mapEntry.first == inputHitType)
59 protoHit.SetPosition3D(inputPosition3D, chiSquared);
static pandora::CartesianVector ProjectPosition(const pandora::Pandora &pandora, const pandora::CartesianVector &position3D, const pandora::HitType view)
Project 3D position into a given 2D view.
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...
void lar_content::TransverseTrackHitsBaseTool::GetTrackHits3D |
( |
const pandora::CaloHitVector & |
inputTwoDHits, |
|
|
const MatchedSlidingFitMap & |
matchedSlidingFitMap, |
|
|
ProtoHitVector & |
protoHitVector |
|
) |
| const |
|
protectedvirtual |
Calculate 3D hits from an input list of 2D hits.
- Parameters
-
pAlgorithm | the hit creation algorithm |
inputTwoDHits | the input vector of 2D hits |
matchedSlidingFitMap | the group of sliding fit results |
protoHitVector | to receive the new three dimensional proto hits |
Implements lar_content::TrackHitsBaseTool.
Definition at line 21 of file TransverseTrackHitsBaseTool.cc.
24 for (
const CaloHit *
const pCaloHit2D : inputTwoDHits)
33 protoHitVector.push_back(protoHit);
35 catch (StatusCodeException &)
ThreeDHitCreationAlgorithm::ProtoHit ProtoHit
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 ...
double m_chiSquaredCut
The chi squared cut (accept only values below the cut value)
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 lar_content::TransverseTrackHitsBaseTool::GetTransverseChi2 |
( |
const pandora::CartesianVector & |
position2D, |
|
|
const TwoDSlidingFitResult & |
fitResult |
|
) |
| const |
|
private |
Calculate an additional contribution to the chi-squared based on the steepness of the track.
- Parameters
-
position2D | the calculated two dimensional position |
fitResult | the sliding fit to the track |
Definition at line 64 of file TransverseTrackHitsBaseTool.cc.
66 const float minLayerX(fitResult.GetGlobalMinLayerPosition().GetX());
67 const float maxLayerX(fitResult.GetGlobalMaxLayerPosition().GetX());
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()))
75 const float minLayerDistanceSquared((position2D - fitResult.GetGlobalMinLayerPosition()).GetMagnitudeSquared());
76 const float maxLayerDistanceSquared((position2D - fitResult.GetGlobalMaxLayerPosition()).GetMagnitudeSquared());
78 double px(0.),
pz(0.);
80 if (minLayerDistanceSquared < maxLayerDistanceSquared)
82 px = fitResult.GetGlobalMinLayerDirection().GetX();
83 pz = fitResult.GetGlobalMinLayerDirection().GetZ();
85 else if (maxLayerDistanceSquared < minLayerDistanceSquared)
87 px = fitResult.GetGlobalMaxLayerDirection().GetX();
88 pz = fitResult.GetGlobalMaxLayerDirection().GetZ();
91 if (std::fabs(
px) > std::numeric_limits<double>::epsilon())
93 return (0.5 * (
pz *
pz) / (
px *
px));
96 throw StatusCodeException(STATUS_CODE_NOT_FOUND);
static int max(int a, int b)
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
virtual void lar_content::TransverseTrackHitsBaseTool::GetTransverseTrackHit3D |
( |
const MatchedSlidingFitMap & |
matchedSlidingFitMap, |
|
|
ProtoHit & |
protoHit |
|
) |
| const |
|
protectedpure virtual |
The documentation for this class was generated from the following files: