43 : 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!!";
void rescaleError(double factor)
Ordering along decreasing radius (for DT rechits)
T getParameter(std::string const &) const
TrajectoryStateOnSurface const & predictedState() const
std::string dumpTSOS(const TrajectoryStateOnSurface &tsos) const
const std::string metname
void makeFirstTime()
reset the theFirstTSOSFlag
Ordering along increasing zed (for CSC rechits)
NavigationDirection fitDirection()
get the fit direction
virtual SubDetector subDetector() const =0
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap)
virtual ~MuonTrajectoryUpdator()
Destructor.
Log< level::Error, false > LogError
MuonTrajectoryUpdator(const edm::ParameterSet &par, NavigationDirection fitDirection)
Constructor from Propagator and Parameter set.
static TransientTrackingRecHit::ConstRecHitContainer breakInSubRecHits(TransientTrackingRecHit::ConstRecHitPointer, int granularity)
takes a muon rechit and returns its sub-rechits given a certain granularity
void sort(TransientTrackingRecHit::ConstRecHitContainer &, const DetLayer *)
virtual TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const =0
GlobalPoint globalPosition() const
std::shared_ptr< MuonTransientTrackingRecHit > MuonRecHitPointer
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
const TrajectoryStateUpdator * measurementUpdator() const
TrajectoryMeasurement updateMeasurement(const TrajectoryStateOnSurface &propagatedTSOS, const TrajectoryStateOnSurface &lastUpdatedTSOS, const TransientTrackingRecHit::ConstRecHitPointer &recHit, const double &chi2, const DetLayer *detLayer, const TrajectoryMeasurement *initialMeasurement)
Return the trajectory measurement. It handles both the fw and the bw propagation. ...
double theMaxChi2
the max chi2 allowed
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const =0
std::vector< ConstRecHitPointer > ConstRecHitContainer
Ordering along increasing radius (for DT rechits)
GlobalVector globalDirection() const
TrajectoryStateUpdator * theUpdator
const MeasurementEstimator * estimator() const
accasso at the propagator
virtual std::pair< bool, TrajectoryStateOnSurface > update(const TrajectoryMeasurement *measurement, Trajectory &trajectory, const Propagator *propagator)
update the Trajectory with the TrajectoryMeasurement
TrajectoryStateOnSurface propagateState(const TrajectoryStateOnSurface &state, const TrajectoryMeasurement *measurement, const TransientTrackingRecHit::ConstRecHitPointer ¤t, const Propagator *propagator) const
static MuonRecHitPointer specificBuild(const GeomDet *geom, const TrackingRecHit *rh)
Ordering along decreasing zed (for CSC rechits)
void push(const TrajectoryMeasurement &tm)
const DetLayer * layer() const
ConstRecHitPointer const & recHit() const
MeasurementEstimator * theEstimator