9#include "tracking/trackFindingVXD/trackQualityEstimators/QualityEstimatorLineFit3D.h"
37 double Wyi = (1. / (aHit->getPositionError().Y() * aHit->getPositionError().Y()));
38 double Wzi = (1. / (aHit->getPositionError().Z() * aHit->getPositionError().Z()));
43 sumWyiXi += Wyi * aHit->getPosition().X();
44 sumWziXi += Wzi * aHit->getPosition().X();
46 sumWyiYi += Wyi * aHit->getPosition().Y();
47 sumWziZi += Wzi * aHit->getPosition().Z();
49 sumWyiXiYi += Wyi * aHit->getPosition().X() * aHit->getPosition().Y();
50 sumWziXiZi += Wzi * aHit->getPosition().X() * aHit->getPosition().Z();
52 sumWyiXi2 += Wyi * aHit->getPosition().X() * aHit->getPosition().X();
53 sumWziXi2 += Wzi * aHit->getPosition().X() * aHit->getPosition().X();
56 detValY = sumWyiXi2 * sumWyi - sumWyiXi * sumWyiXi;
60 detValY = 1. / detValY;
62 detValZ = sumWziXi2 * sumWzi - sumWziXi * sumWziXi;
66 detValZ = 1. / detValZ;
68 slopeY = detValY * (sumWyi * sumWyiXiYi - sumWyiXi * sumWyiYi);
69 slopeZ = detValZ * (sumWzi * sumWziXiZi - sumWziXi * sumWziZi);
71 interceptY = detValY * (- sumWyiXi * sumWyiXiYi + sumWyiXi2 * sumWyiYi);
72 interceptZ = detValZ * (- sumWziXi * sumWziXiZi + sumWziXi2 * sumWziZi);
75 chi2 += pow(((aHit->getPosition().Y() - slopeY * aHit->getPosition().X() - interceptY) / aHit->getPositionError().Y()), 2)
76 + pow(((aHit->getPosition().Z() - slopeZ * aHit->getPosition().X() - interceptZ) / aHit->getPositionError().Z()), 2);
80 return TMath::Prob(chi2, measurements.size() - 1);
QualityEstimationResults m_results
Result of the quality estimation This is stored as a member variable, because some values may be calc...
virtual double estimateQuality(std::vector< SpacePoint const * > const &measurements) final
Minimal implementation of the quality estimation Calculates quality indicator in range [0,...
SpacePoint typically is build from 1 PXDCluster or 1-2 SVDClusters.
Abstract base class for different kinds of events.
std::optional< double > chiSquared
chi squared value obtained by the fit of the QE