CMS 3D CMS Logo

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, TrajectorySmoothingResult
 

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

◆ SmoothingResult

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

Definition at line 30 of file StandAloneMuonSmoother.h.

Constructor & Destructor Documentation

◆ StandAloneMuonSmoother()

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 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
const MuonServiceProxy * theService
double theMaxChi2
The max allowed chi2 to accept a rechit in the fit.
MeasurementEstimator * theEstimator
TrajectoryStateUpdator * theUpdator
TrajectorySmoother * theSmoother

◆ ~StandAloneMuonSmoother()

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

◆ estimator()

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

◆ propagator()

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

◆ renewTheSmoother()

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 }
const MuonServiceProxy * theService
const Propagator * propagator() const
access at the propagator
MeasurementEstimator * estimator() const
access at the estimator
TrajectorySmoother * theSmoother
TrajectoryStateUpdator * updator() const
return the KFUpdator

◆ smooth()

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
virtual TrajectoryContainer trajectories(const Trajectory &traj) const
const std::string metname
#define LogTrace(id)
TrajectorySmoother * smoother() const
access to the smoother

◆ 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

◆ updator()

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

◆ theErrorRescaling

double StandAloneMuonSmoother::theErrorRescaling
private

Definition at line 75 of file StandAloneMuonSmoother.h.

Referenced by StandAloneMuonSmoother().

◆ theEstimator

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().

◆ theMaxChi2

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().

◆ theNSigma

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().

◆ thePropagatorName

std::string StandAloneMuonSmoother::thePropagatorName
private

Definition at line 60 of file StandAloneMuonSmoother.h.

Referenced by propagator(), and StandAloneMuonSmoother().

◆ theService

const MuonServiceProxy* StandAloneMuonSmoother::theService
private

Definition at line 79 of file StandAloneMuonSmoother.h.

Referenced by propagator(), and renewTheSmoother().

◆ theSmoother

TrajectorySmoother* StandAloneMuonSmoother::theSmoother
private

◆ theUpdator

TrajectoryStateUpdator* StandAloneMuonSmoother::theUpdator
private