#include <RecoMuon/StandAloneTrackFinder/interface/StandAloneMuonSmoother.h>
Public Member Functions | |
MeasurementEstimator * | estimator () const |
access at the estimator | |
const Propagator * | propagator () const |
access at the propagator | |
SmoothingResult | smooth (const Trajectory &) |
Smoothes the trajectories. | |
TrajectorySmoother * | smoother () const |
access to the smoother | |
StandAloneMuonSmoother (const edm::ParameterSet &par, const MuonServiceProxy *service) | |
Constructor. | |
TrajectoryStateUpdator * | updator () const |
return the KFUpdator | |
virtual | ~StandAloneMuonSmoother () |
Destructor. | |
Private Types | |
typedef std::pair< bool, Trajectory > | SmoothingResult |
Private Member Functions | |
void | renewTheSmoother () |
Private Attributes | |
double | theErrorRescaling |
MeasurementEstimator * | theEstimator |
The estimator: makes the decision wheter a measure is good or not it isn't used by the updator which does the real fit. | |
double | theMaxChi2 |
The max allowed chi2 to accept a rechit in the fit. | |
double | theNSigma |
The errors of the trajectory state are multiplied by nSigma to define acceptance of BoundPlane and maximalLocalDisplacement. | |
std::string | thePropagatorName |
const MuonServiceProxy * | theService |
TrajectorySmoother * | theSmoother |
TrajectoryStateUpdator * | theUpdator |
This class contains the KFTrajectorySmoother and takes care to update the it whenever the propagator change.
Definition at line 28 of file StandAloneMuonSmoother.h.
typedef std::pair<bool,Trajectory> StandAloneMuonSmoother::SmoothingResult [private] |
Definition at line 30 of file StandAloneMuonSmoother.h.
StandAloneMuonSmoother::StandAloneMuonSmoother | ( | const edm::ParameterSet & | par, | |
const MuonServiceProxy * | service | |||
) |
Constructor.
Definition at line 27 of file StandAloneMuonSmoother.cc.
References Chi2MeasurementEstimatorESProducer_cfi::Chi2MeasurementEstimator, edm::ParameterSet::getParameter(), theErrorRescaling, theEstimator, theMaxChi2, theNSigma, thePropagatorName, theSmoother, and theUpdator.
00028 :theService(service){ 00029 00030 // The max allowed chi2 to accept a rechit in the fit 00031 theMaxChi2 = par.getParameter<double>("MaxChi2"); 00032 00033 // The errors of the trajectory state are multiplied by nSigma 00034 // to define acceptance of BoundPlane and maximalLocalDisplacement 00035 theNSigma = par.getParameter<double>("NumberOfSigma"); // default = 3. 00036 00037 // The estimator: makes the decision wheter a measure is good or not 00038 // it isn't used by the updator which does the real fit. In fact, in principle, 00039 // a looser request onto the measure set can be requested 00040 // (w.r.t. the request on the accept/reject measure in the fit) 00041 theEstimator = new Chi2MeasurementEstimator(theMaxChi2,theNSigma); 00042 00043 theErrorRescaling = par.getParameter<double>("ErrorRescalingFactor"); 00044 00045 thePropagatorName = par.getParameter<string>("Propagator"); 00046 00047 theUpdator = new KFUpdator(); 00048 00049 // The Kalman smoother 00050 theSmoother = 0 ; 00051 00052 }
StandAloneMuonSmoother::~StandAloneMuonSmoother | ( | ) | [virtual] |
Destructor.
Definition at line 54 of file StandAloneMuonSmoother.cc.
References theEstimator, theSmoother, and theUpdator.
00054 { 00055 if (theEstimator) delete theEstimator; 00056 if (theUpdator) delete theUpdator; 00057 if (theSmoother) delete theSmoother; 00058 }
MeasurementEstimator* StandAloneMuonSmoother::estimator | ( | void | ) | const [inline] |
access at the estimator
Definition at line 51 of file StandAloneMuonSmoother.h.
References theEstimator.
Referenced by renewTheSmoother().
00051 {return theEstimator;}
const Propagator * StandAloneMuonSmoother::propagator | ( | void | ) | const |
access at the propagator
Definition at line 60 of file StandAloneMuonSmoother.cc.
References thePropagatorName, and theService.
Referenced by renewTheSmoother().
00060 { 00061 return &*theService->propagator(thePropagatorName); 00062 }
void StandAloneMuonSmoother::renewTheSmoother | ( | ) | [private] |
Definition at line 64 of file StandAloneMuonSmoother.cc.
References estimator(), KFTrajectorySmootherESProducer_cfi::KFTrajectorySmoother, propagator(), theService, theSmoother, and updator().
Referenced by smooth().
00064 { 00065 if (theService->isTrackingComponentsRecordChanged()){ 00066 if (theSmoother) delete theSmoother; 00067 theSmoother = new KFTrajectorySmoother(propagator(), 00068 updator(), 00069 estimator()); 00070 } 00071 if (!theSmoother) 00072 theSmoother = new KFTrajectorySmoother(propagator(), 00073 updator(), 00074 estimator()); 00075 00076 }
StandAloneMuonSmoother::SmoothingResult StandAloneMuonSmoother::smooth | ( | const Trajectory & | inputTrajectory | ) |
Smoothes the trajectories.
Definition at line 78 of file StandAloneMuonSmoother.cc.
References LogTrace, renewTheSmoother(), smoother(), and TrajectorySmoother::trajectories().
00078 { 00079 const string metname = "Muon|RecoMuon|StandAloneMuonSmoother"; 00080 00081 renewTheSmoother(); 00082 00083 vector<Trajectory> trajectoriesSM = smoother()->trajectories(inputTrajectory); 00084 00085 if(!trajectoriesSM.size()){ 00086 LogTrace(metname) << "No Track smoothed!"; 00087 return SmoothingResult(false,inputTrajectory); 00088 } 00089 00090 Trajectory smoothed = trajectoriesSM.front(); 00091 00092 return SmoothingResult(true,smoothed); 00093 }
TrajectorySmoother* StandAloneMuonSmoother::smoother | ( | ) | const [inline] |
access to the smoother
Definition at line 54 of file StandAloneMuonSmoother.h.
References theSmoother.
Referenced by smooth().
00054 {return theSmoother;}
TrajectoryStateUpdator* StandAloneMuonSmoother::updator | ( | ) | const [inline] |
return the KFUpdator
Definition at line 45 of file StandAloneMuonSmoother.h.
References theUpdator.
Referenced by renewTheSmoother().
00045 {return theUpdator;}
double StandAloneMuonSmoother::theErrorRescaling [private] |
The estimator: makes the decision wheter a measure is good or not it isn't used by the updator which does the real fit.
In fact, in principle, a looser request onto the measure set can be requested (w.r.t. the request on the accept/reject measure in the fit)
Definition at line 74 of file StandAloneMuonSmoother.h.
Referenced by estimator(), StandAloneMuonSmoother(), and ~StandAloneMuonSmoother().
double StandAloneMuonSmoother::theMaxChi2 [private] |
The max allowed chi2 to accept a rechit in the fit.
Definition at line 64 of file StandAloneMuonSmoother.h.
Referenced by StandAloneMuonSmoother().
double StandAloneMuonSmoother::theNSigma [private] |
The errors of the trajectory state are multiplied by nSigma to define acceptance of BoundPlane and maximalLocalDisplacement.
Definition at line 68 of file StandAloneMuonSmoother.h.
Referenced by StandAloneMuonSmoother().
std::string StandAloneMuonSmoother::thePropagatorName [private] |
Definition at line 61 of file StandAloneMuonSmoother.h.
Referenced by propagator(), and StandAloneMuonSmoother().
const MuonServiceProxy* StandAloneMuonSmoother::theService [private] |
Definition at line 80 of file StandAloneMuonSmoother.h.
Referenced by propagator(), and renewTheSmoother().
Definition at line 82 of file StandAloneMuonSmoother.h.
Referenced by renewTheSmoother(), smoother(), StandAloneMuonSmoother(), and ~StandAloneMuonSmoother().
Definition at line 78 of file StandAloneMuonSmoother.h.
Referenced by StandAloneMuonSmoother(), updator(), and ~StandAloneMuonSmoother().