12 switch (
recHit.dimension()) {
27 template <
unsigned int D>
33 using ROOT::Math::SMatrixNoInit;
37 edm::LogError(
"EmptyPredictedComponents") <<
"a multi state is empty. cannot compute any weight.";
42 std::vector<double> detRs;
44 std::vector<double> chi2s;
48 SMatDD
V(SMatrixNoInit{}),
R(SMatrixNoInit{});
59 recHit.getKfComponents(holder);
66 edm::LogError(
"PosteriorWeightsCalculator") <<
"PosteriorWeightsCalculator: determinant failed";
67 return std::vector<double>();
69 detRs.push_back(detR);
73 edm::LogError(
"PosteriorWeightsCalculator") <<
"PosteriorWeightsCalculator: inversion failed";
74 return std::vector<double>();
76 double chi2 = ROOT::Math::Similarity(
r,
R);
77 chi2s.push_back(
chi2);
83 edm::LogError(
"PosteriorWeightsCalculator") <<
"Problem in vector sizes";
84 return std::vector<double>();
92 double sumWeights(0.);
98 double tempWeight(0.);
99 if (detRs[
i] > FLT_MIN) {
106 LogDebug(
"GsfTrackFitters") <<
"PosteriorWeightsCalculator: detR < FLT_MIN !!";
109 sumWeights += tempWeight;
112 if (sumWeights < DBL_MIN) {
113 LogDebug(
"GsfTrackFitters") <<
"PosteriorWeightsCalculator: sumWeight < DBL_MIN";
114 edm::LogError(
"PosteriorWeightsCalculator") <<
"PosteriorWeightsCalculator: sumWeight < DBL_MIN";
115 return std::vector<double>();
119 edm::LogError(
"PosteriorWeightsCalculator") <<
"Problem in vector sizes (2)";
120 return std::vector<double>();
122 sumWeights = 1. / sumWeights;
ROOT::Math::SMatrix< double, D1, D1, ROOT::Math::MatRepSym< double, D1 > > SymMatrix
Log< level::Error, false > LogError
ROOT::Math::SMatrix< double, D1, D2, ROOT::Math::MatRepStd< double, D1, D2 > > Matrix
std::vector< TSOS > predictedComponents
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t V
std::vector< double > weights(const TrackingRecHit &tsos) const
Create random state.
bool invertPosDefMatrix(ROOT::Math::SMatrix< T, N, N, ROOT::Math::MatRepSym< T, N > > &m)
ROOT::Math::SVector< double, D1 > Vector