25 LogDebug(
"Muon|RecoMuon|StandAloneMuonRefitter") <<
"Constructor called." << endl;
35 LogDebug(
"Muon|RecoMuon|StandAloneMuonRefitter") <<
"Destructor called." << endl;
44 vector<Trajectory> refitted;
54 reverse(trajRH.begin(), trajRH.end());
55 refitted =
theFitter->fit(trajectory.
seed(), trajRH, firstTsos);
57 if (!refitted.empty())
64 LogDebug(
"Muon|RecoMuon|StandAloneMuonRefitter") <<
"---------------------------------" << endl;
65 LogDebug(
"Muon|RecoMuon|StandAloneMuonRefitter") <<
"Starting refitting loop:" << endl;
67 unsigned int nSuccess = 0;
68 unsigned int nOrigHits = trajectory.
recHits().size();
75 lastFitted = singleRefitResult.second;
76 unsigned int nLastHits = lastFitted.
recHits().size();
78 if (!singleRefitResult.first) {
80 LogDebug(
"Muon|RecoMuon|StandAloneMuonRefitter") <<
" refit n. " << nSuccess + 1 <<
": failed" << endl;
84 double lostFract = 1 - double(nLastHits) / nOrigHits;
87 LogDebug(
"Muon|RecoMuon|StandAloneMuonRefitter") <<
" refit n. " << nSuccess + 1 <<
": too many RH lost" << endl;
88 LogDebug(
"Muon|RecoMuon|StandAloneMuonRefitter")
89 <<
" Survived RecHits: " << nLastHits <<
"/" << nOrigHits << endl;
94 LogDebug(
"Muon|RecoMuon|StandAloneMuonRefitter") <<
" refit n. " << nSuccess <<
": OK" << endl;
95 LogDebug(
"Muon|RecoMuon|StandAloneMuonRefitter")
96 <<
" Survived RecHits: " << nLastHits <<
"/" << nOrigHits << endl;
100 LogDebug(
"Muon|RecoMuon|StandAloneMuonRefitter") << nSuccess <<
" successful refits!" << endl;
StandAloneMuonRefitter(const edm::ParameterSet &par, edm::ConsumesCollector col, const MuonServiceProxy *service)
Constructor.
const MuonServiceProxy * theService
bool isForceAllIterations
void rescaleError(double factor)
TrajectorySeed const & seed() const
Access to the seed used to reconstruct the Trajectory.
ConstRecHitContainer recHits() const
unsigned int theNumberOfIterations
edm::ESHandle< TrajectoryFitter > theFitter
std::pair< bool, Trajectory > RefitResult
TrajectoryMeasurement const & lastMeasurement() const
RefitResult refit(const Trajectory &)
double theMaxFractionOfLostHits
const edm::ESGetToken< TrajectoryFitter, TrajectoryFitter::Record > theFitterToken
std::vector< ConstRecHitPointer > ConstRecHitContainer
virtual ~StandAloneMuonRefitter()
Destructor.
RefitResult singleRefit(const Trajectory &)
Refit.
T getParameter(std::string const &) const
TrajectoryStateOnSurface const & updatedState() const