23 LogDebug(
"Muon|RecoMuon|StandAloneMuonRefitter") <<
"Constructor called." << endl;
34 LogDebug(
"Muon|RecoMuon|StandAloneMuonRefitter") <<
"Destructor called." << endl;
44 vector<Trajectory> refitted;
54 reverse(trajRH.begin(),trajRH.end());
57 if(!refitted.empty())
return RefitResult(
true,refitted.front());
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();
76 lastFitted = singleRefitResult.second;
77 unsigned int nLastHits=lastFitted.
recHits().size();
79 if(!singleRefitResult.first) {
81 LogDebug(
"Muon|RecoMuon|StandAloneMuonRefitter") <<
" refit n. " << nSuccess+1 <<
": failed" << endl;
85 double lostFract= 1 - double(nLastHits)/nOrigHits;
88 LogDebug(
"Muon|RecoMuon|StandAloneMuonRefitter") <<
" refit n. " << nSuccess+1 <<
": too many RH lost" << endl;
89 LogDebug(
"Muon|RecoMuon|StandAloneMuonRefitter") <<
" Survived RecHits: " << nLastHits <<
"/" << nOrigHits << endl;
94 LogDebug(
"Muon|RecoMuon|StandAloneMuonRefitter") <<
" refit n. " << nSuccess <<
": OK" << endl;
95 LogDebug(
"Muon|RecoMuon|StandAloneMuonRefitter") <<
" Survived RecHits: " << nLastHits <<
"/" << nOrigHits << endl;
99 LogDebug(
"Muon|RecoMuon|StandAloneMuonRefitter") << nSuccess <<
" successful refits!" << endl;
const MuonServiceProxy * theService
bool isForceAllIterations
void rescaleError(double factor)
T getParameter(std::string const &) const
TrajectorySeed const & seed() const
Access to the seed used to reconstruct the Trajectory.
StandAloneMuonRefitter(const edm::ParameterSet &par, const MuonServiceProxy *service)
Constructor.
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
std::vector< ConstRecHitPointer > ConstRecHitContainer
virtual ~StandAloneMuonRefitter()
Destructor.
RefitResult singleRefit(const Trajectory &)
Refit.
std::string theFitterName
TrajectoryStateOnSurface const & updatedState() const
std::vector< Trajectory > fit(const Trajectory &traj, fitType type=standard) const