43 : theFitDirection(fitDirection) {
72 :
theMaxChi2(
chi2), theGranularity(granularity), theFitDirection(fitDirection) {
111 sort(recHitsForFit, detLayer);
115 LogTrace(
metname) <<
"Number of rechits for the fit: " << recHitsForFit.size() << endl;
117 TransientTrackingRecHit::ConstRecHitContainer::iterator
recHit;
119 if ((*recHit)->isValid()) {
123 if (propagatedTSOS.
isValid()) {
124 pair<bool, double> thisChi2 =
estimator()->
estimate(propagatedTSOS, *((*recHit).get()));
126 LogTrace(
metname) <<
"Estimation for Kalman Fit. Chi2: " << thisChi2.second;
129 bool wantIncludeThisHit =
true;
132 wantIncludeThisHit =
false;
134 <<
"This is an RPC hit and the present configuration is such that it will be excluded from the fit";
140 if (thisChi2.first) {
142 if (wantIncludeThisHit) {
148 LogTrace(
metname) <<
" Meas. Position : " << (**recHit).globalPosition() <<
"\n"
162 <<
"filter updated" << endl;
173 trajectory.
push(
std::move(updatedMeasurement), thisChi2.second);
175 LogTrace(
metname) <<
" Compatible RecHit with good chi2 but made with RPC when it was decided to not "
176 "include it in the fit"
177 <<
" --> trajectory NOT updated, invalid RecHit added." << endl;
181 invalidRhPtr->invalidateHit();
183 propagatedTSOS, propagatedTSOS, invalidRhPtr, thisChi2.second, detLayer);
184 trajectory.
push(
std::move(invalidRhMeasurement), thisChi2.second);
189 <<
" --> trajectory NOT updated, invalid RecHit added." << endl;
193 invalidRhPtr->invalidateHit();
195 propagatedTSOS, propagatedTSOS, invalidRhPtr, thisChi2.second, detLayer);
196 trajectory.
push(
std::move(invalidRhMeasurement), thisChi2.second);
202 recHitsForFit.clear();
203 return pair<bool, TrajectoryStateOnSurface>(updated, lastUpdatedTSOS);
213 if (current->geographicalId() == mother->geographicalId())
252 LogError(
"Muon|RecoMuon|MuonTrajectoryUpdator") <<
"MuonTrajectoryUpdator::sort: Wrong propagation direction!!";
261 LogError(
"Muon|RecoMuon|MuonTrajectoryUpdator") <<
"MuonTrajectoryUpdator::sort: Wrong propagation direction!!";
270 LogError(
"Muon|RecoMuon|MuonTrajectoryUpdator") <<
"MuonTrajectoryUpdator::sort: Wrong propagation direction!!";
277 LogError(
"Muon|RecoMuon|MuonTrajectoryUpdator") <<
"MuonTrajectoryUpdator::sort: Wrong propagation direction!!";