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 26 of file StandAloneMuonSmoother.h.

Member Typedef Documentation

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

Definition at line 28 of file StandAloneMuonSmoother.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 25 of file StandAloneMuonSmoother.cc.

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

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

Destructor.

Definition at line 52 of file StandAloneMuonSmoother.cc.

References theEstimator, theSmoother, and theUpdator.

52  {
53  if (theEstimator) delete theEstimator;
54  if (theUpdator) delete theUpdator;
55  if (theSmoother) 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 49 of file StandAloneMuonSmoother.h.

Referenced by renewTheSmoother().

49 {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  {
59  return &*theService->propagator(thePropagatorName);
60 }
const MuonServiceProxy * theService
void StandAloneMuonSmoother::renewTheSmoother ( )
private

Definition at line 62 of file StandAloneMuonSmoother.cc.

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

Referenced by smooth().

62  {
63  if (theService->isTrackingComponentsRecordChanged()){
64  if (theSmoother) delete theSmoother;
66  updator(),
67  estimator());
68  }
69  if (!theSmoother)
71  updator(),
72  estimator());
73 
74 }
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 76 of file StandAloneMuonSmoother.cc.

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

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

access to the smoother

Definition at line 52 of file StandAloneMuonSmoother.h.

Referenced by smooth().

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

return the KFUpdator

Definition at line 43 of file StandAloneMuonSmoother.h.

References PhotonConversionTrajectorySeedProducerFromQuadruplets_cfi::propagator.

Referenced by renewTheSmoother().

43 {return theUpdator;}
TrajectoryStateUpdator * theUpdator

Member Data Documentation

double StandAloneMuonSmoother::theErrorRescaling
private

Definition at line 74 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 72 of file StandAloneMuonSmoother.h.

Referenced by StandAloneMuonSmoother(), and ~StandAloneMuonSmoother().

double StandAloneMuonSmoother::theMaxChi2
private

The max allowed chi2 to accept a rechit in the fit.

Definition at line 62 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 66 of file StandAloneMuonSmoother.h.

Referenced by StandAloneMuonSmoother().

std::string StandAloneMuonSmoother::thePropagatorName
private

Definition at line 59 of file StandAloneMuonSmoother.h.

Referenced by propagator(), and StandAloneMuonSmoother().

const MuonServiceProxy* StandAloneMuonSmoother::theService
private

Definition at line 78 of file StandAloneMuonSmoother.h.

Referenced by propagator(), and renewTheSmoother().

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

Definition at line 76 of file StandAloneMuonSmoother.h.

Referenced by StandAloneMuonSmoother(), and ~StandAloneMuonSmoother().