3 #include <boost/regex.hpp>
6 #include "StarClassLibrary/StThreeVector.hh"
7 #include "Sti/StiPlacement.h"
15 fStiTrackNode(
nullptr),
16 fTrack(
nullptr), fValid(false), fIsInsideVolume(-1),
22 fTrackP(), fEnergyLosses(-1), fNodeRadius(0), fNodeCenterRefAngle(0), fNodeMaterialDensity(0),
24 fNodeRelRadLength(0), fVolumeName(""), fAcceptedStiHit(
nullptr), fClosestStiHit(
nullptr),
31 fStiTrackNode(&stiKTN),
32 fTrack(parent), fValid(stiKTN.isValid()), fIsInsideVolume(stiKTN.inside(1+2+4)),
33 fPosition(stiKTN.x_g(), stiKTN.y_g(), stiKTN.z_g()),
34 fError(stiKTN.fitErrs()._cXX, stiKTN.fitErrs()._cYY, stiKTN.fitErrs()._cZZ),
35 fPositionLocal(stiKTN.x(), stiKTN.y(), stiKTN.z()),
38 fTrackP(stiKTN.getGlobalMomentum().x(), stiKTN.getGlobalMomentum().y(), stiKTN.getGlobalMomentum().z()),
39 fEnergyLosses(-1), fNodeRadius(0), fNodeCenterRefAngle(0), fNodeMaterialDensity(0),
40 fNodeTrackLength(stiKTN.getTrackLength()),
41 fNodeRelRadLength(0), fVolumeName(
""), fAcceptedStiHit(nullptr), fClosestStiHit(nullptr),
47 const StiDetector* stiKTNDet = stiKTN.getDetector();
52 StiPlacement* stiPlacement = stiKTNDet->getPlacement();
57 StiMaterial* stiMaterial = stiKTNDet->getMaterial();
72 const StiNodeInf* prefitKTNParams = stiKTN.getInfo();
74 if (prefitKTNParams) {
75 fProjPositionLocal.SetXYZ(prefitKTNParams->mPP.x(), prefitKTNParams->mPP.y(), prefitKTNParams->mPP.z());
76 fProjError.SetXYZ(sqrt(prefitKTNParams->mPE._cXX), sqrt(prefitKTNParams->mPE._cYY), sqrt(prefitKTNParams->mPE._cZZ));
87 return TVector3(pullX, pullY, pullZ);
119 boost::regex r(pattern);
134 std::set<std::string>::const_iterator iPattern = patterns.begin();
136 for( ; iPattern != patterns.end(); ++iPattern )
165 std::set<const TStiHit*> candidateHits;
170 return candidateHits;
181 double min_dist = DBL_MAX;
183 for (
const auto& hit : stiHits)
187 double dist = distVec.Mag();
188 if (dist < min_dist) {
212 double min_dist = DBL_MAX;
214 for (
const auto& hit : stiHits)
228 double dist = distVec.Mag();
229 if (dist < min_dist) {
240 for (
const auto& hit : stiHits)
virtual void Print(Option_t *opt="") const
TVector3 fProjError
The projection error to the node before the re-fit.
static const TStiHit * GetBareStiHit(const TStiHitProxy &hitProxy)
float fNodeRadius
The nominal radius of the Sti volume associated with this node.
const TVector3 & GetPositionLocal() const
TVector3 fPosition
Global coordinates of the final (post re-fit) track node position.
void FindCandidateHitsByChi2(const std::set< TStiHit > &stiHits) const
float fNodeCenterRefAngle
Angle to the center of the Sti volume associated with this node.
std::string fVolumeName
Name of Sti volume.
const TVector3 & GetPosition() const
const StiHit * GetStiHit() const
TVector3 CalcPullToHit(const TStiHit &hit) const
TVector3 CalcPullClosestHit() const
Calculates and returns uncorrelated three components which can be used in the pull distribution...
const StiKalmanTrackNode * fStiTrackNode
Transient pointer to original StiKalmanTrackNode to access non-persistent info.
const TStiHit * fAcceptedStiHit
Pointer to the hit associated with this node by the reconstruction algorithm, if any.
void FindClosestHit(const std::set< TStiHit > &stiHits) const
Traverses the provided collection of hits and sets the internal pointer to the hit closest to this tr...
bool operator<(const TStiKalmanTrackNode &lhs, const TStiKalmanTrackNode &rhs)
bool MatchedVolName(const std::string &pattern) const
std::set< TStiHitProxy > fCandidateStiHits
Collection of hits in some proximity of mean track projection.
const TStiHit * fClosestStiHit
Pointer to the hit closest to this node if any.
void FindCandidateHits(const std::set< TStiHit > &stiHits) const
In the provided collection of hits this class method finds all hits within a 5-sigma vicinity around ...
TVector3 fProjPositionLocal
Local coordinates of the projected (pre re-fit) track node position.
ClassImp(TStiKalmanTrackNode) TStiKalmanTrackNode
float fNodeRelRadLength
Relative radiation length.
const TVector3 & GetPositionLocal() const
float fEnergyLosses
Energy lost in the volume.
float fNodeMaterialDensity
Density of the material of this node/volume.
std::pair< std::set< TStiHit >::iterator, bool > AddToParentEvent(const TStiHit &stiHit)
double CalcChi2(const TStiHit &hit) const
Calculate chi2 for a user provided hit using the original Sti methods.
TStiKalmanTrack * fTrack
transient member
TVector3 fTrackP
Track momentum vector in global CS.
std::set< const TStiHit * > GetCandidateHits() const