CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
StandAloneMuonSmoother Class Reference

#include <StandAloneMuonSmoother.h>

Public Member Functions

MeasurementEstimatorestimator () const
 access at the estimator More...
 
const Propagatorpropagator () const
 access at the propagator More...
 
SmoothingResult smooth (const Trajectory &)
 Smoothes the trajectories. More...
 
TrajectorySmoothersmoother () const
 access to the smoother More...
 
 StandAloneMuonSmoother (const edm::ParameterSet &par, const MuonServiceProxy *service)
 Constructor. More...
 
TrajectoryStateUpdatorupdator () const
 return the KFUpdator More...
 
virtual ~StandAloneMuonSmoother ()
 Destructor. More...
 

Private Types

typedef std::pair< bool,
Trajectory
SmoothingResult
 

Private Member Functions

void renewTheSmoother ()
 

Private Attributes

double theErrorRescaling
 
MeasurementEstimatortheEstimator
 
double theMaxChi2
 The max allowed chi2 to accept a rechit in the fit. More...
 
double theNSigma
 
std::string thePropagatorName
 
const MuonServiceProxytheService
 
TrajectorySmoothertheSmoother
 
TrajectoryStateUpdatortheUpdator
 

Detailed Description

Smooth a trajectory using the standard Kalman Filter smoother. This class contains the KFTrajectorySmoother and takes care to update the it whenever the propagator change.

Author
R. Bellan - INFN Torino ricca.nosp@m.rdo..nosp@m.bella.nosp@m.n@ce.nosp@m.rn.ch

Definition at line 29 of file StandAloneMuonSmoother.h.

Member Typedef Documentation

typedef std::pair<bool, Trajectory> StandAloneMuonSmoother::SmoothingResult
private

Definition at line 30 of file StandAloneMuonSmoother.h.

Constructor & Destructor Documentation

StandAloneMuonSmoother::StandAloneMuonSmoother ( const edm::ParameterSet par,
const MuonServiceProxy service 
)

Constructor.

Definition at line 24 of file StandAloneMuonSmoother.cc.

References Chi2MeasurementEstimator_cfi::Chi2MeasurementEstimator, edm::ParameterSet::getParameter(), theErrorRescaling, theEstimator, theMaxChi2, theNSigma, thePropagatorName, theSmoother, and theUpdator.

25  : theService(service) {
26  // The max allowed chi2 to accept a rechit in the fit
27  theMaxChi2 = par.getParameter<double>("MaxChi2");
28 
29  // The errors of the trajectory state are multiplied by nSigma
30  // to define acceptance of BoundPlane and maximalLocalDisplacement
31  theNSigma = par.getParameter<double>("NumberOfSigma"); // default = 3.
32 
33  // The estimator: makes the decision wheter a measure is good or not
34  // it isn't used by the updator which does the real fit. In fact, in principle,
35  // a looser request onto the measure set can be requested
36  // (w.r.t. the request on the accept/reject measure in the fit)
38 
39  theErrorRescaling = par.getParameter<double>("ErrorRescalingFactor");
40 
41  thePropagatorName = par.getParameter<string>("Propagator");
42 
43  theUpdator = new KFUpdator();
44 
45  // The Kalman smoother
46  theSmoother = nullptr;
47 }
const MuonServiceProxy * theService
double theMaxChi2
The max allowed chi2 to accept a rechit in the fit.
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
MeasurementEstimator * theEstimator
TrajectoryStateUpdator * theUpdator
TrajectorySmoother * theSmoother
StandAloneMuonSmoother::~StandAloneMuonSmoother ( )
virtual

Destructor.

Definition at line 49 of file StandAloneMuonSmoother.cc.

References theEstimator, theSmoother, and theUpdator.

49  {
50  if (theEstimator)
51  delete theEstimator;
52  if (theUpdator)
53  delete theUpdator;
54  if (theSmoother)
55  delete theSmoother;
56 }
MeasurementEstimator * theEstimator
TrajectoryStateUpdator * theUpdator
TrajectorySmoother * theSmoother

Member Function Documentation

MeasurementEstimator* StandAloneMuonSmoother::estimator ( void  ) const
inline

access at the estimator

Definition at line 51 of file StandAloneMuonSmoother.h.

References theEstimator.

Referenced by renewTheSmoother().

51 { return theEstimator; }
MeasurementEstimator * theEstimator
const Propagator * StandAloneMuonSmoother::propagator ( ) const

access at the propagator

Definition at line 58 of file StandAloneMuonSmoother.cc.

References thePropagatorName, and theService.

Referenced by renewTheSmoother().

58 { return &*theService->propagator(thePropagatorName); }
const MuonServiceProxy * theService
void StandAloneMuonSmoother::renewTheSmoother ( )
private

Definition at line 60 of file StandAloneMuonSmoother.cc.

References estimator(), propagator(), theService, theSmoother, and updator().

Referenced by smooth().

60  {
61  if (theService->isTrackingComponentsRecordChanged()) {
62  if (theSmoother)
63  delete theSmoother;
65  }
66  if (!theSmoother)
68 }
MeasurementEstimator * estimator() const
access at the estimator
const MuonServiceProxy * theService
TrajectoryStateUpdator * updator() const
return the KFUpdator
const Propagator * propagator() const
access at the propagator
TrajectorySmoother * theSmoother
StandAloneMuonSmoother::SmoothingResult StandAloneMuonSmoother::smooth ( const Trajectory inputTrajectory)

Smoothes the trajectories.

Definition at line 70 of file StandAloneMuonSmoother.cc.

References LogTrace, metname, renewTheSmoother(), smoother(), and TrajectorySmoother::trajectories().

70  {
71  const string metname = "Muon|RecoMuon|StandAloneMuonSmoother";
72 
74 
75  vector<Trajectory> trajectoriesSM = smoother()->trajectories(inputTrajectory);
76 
77  if (trajectoriesSM.empty()) {
78  LogTrace(metname) << "No Track smoothed!";
79  return SmoothingResult(false, inputTrajectory);
80  }
81 
82  Trajectory smoothed = trajectoriesSM.front();
83 
84  return SmoothingResult(true, smoothed);
85 }
std::pair< bool, Trajectory > SmoothingResult
const std::string metname
virtual TrajectoryContainer trajectories(const Trajectory &traj) const
#define LogTrace(id)
TrajectorySmoother * smoother() const
access to the smoother
TrajectorySmoother* StandAloneMuonSmoother::smoother ( ) const
inline

access to the smoother

Definition at line 54 of file StandAloneMuonSmoother.h.

References theSmoother.

Referenced by smooth().

54 { return theSmoother; }
TrajectorySmoother * theSmoother
TrajectoryStateUpdator* StandAloneMuonSmoother::updator ( ) const
inline

return the KFUpdator

Definition at line 45 of file StandAloneMuonSmoother.h.

References theUpdator.

Referenced by renewTheSmoother().

45 { return theUpdator; }
TrajectoryStateUpdator * theUpdator

Member Data Documentation

double StandAloneMuonSmoother::theErrorRescaling
private

Definition at line 75 of file StandAloneMuonSmoother.h.

Referenced by StandAloneMuonSmoother().

MeasurementEstimator* StandAloneMuonSmoother::theEstimator
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 73 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 63 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 67 of file StandAloneMuonSmoother.h.

Referenced by StandAloneMuonSmoother().

std::string StandAloneMuonSmoother::thePropagatorName
private

Definition at line 60 of file StandAloneMuonSmoother.h.

Referenced by propagator(), and StandAloneMuonSmoother().

const MuonServiceProxy* StandAloneMuonSmoother::theService
private

Definition at line 79 of file StandAloneMuonSmoother.h.

Referenced by propagator(), and renewTheSmoother().

TrajectorySmoother* StandAloneMuonSmoother::theSmoother
private
TrajectoryStateUpdator* StandAloneMuonSmoother::theUpdator
private