CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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.

Date:
2006/10/18 16:33:03
Revision:
1.9
Author
R. Bellan - INFN Torino ricca.nosp@m.rdo..nosp@m.bella.nosp@m.n@ce.nosp@m.rn.ch

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.

Date:
2007/02/16 13:31:23
Revision:
1.8
Author
R. Bellan - INFN Torino ricca.nosp@m.rdo..nosp@m.bella.nosp@m.n@ce.nosp@m.rn.ch

Definition at line 28 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 27 of file StandAloneMuonSmoother.cc.

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

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

References theEstimator, theSmoother, and theUpdator.

54  {
55  if (theEstimator) delete theEstimator;
56  if (theUpdator) delete theUpdator;
57  if (theSmoother) delete theSmoother;
58 }
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 ( void  ) const

access at the propagator

Definition at line 60 of file StandAloneMuonSmoother.cc.

References thePropagatorName, and theService.

Referenced by renewTheSmoother().

60  {
61  return &*theService->propagator(thePropagatorName);
62 }
const MuonServiceProxy * theService
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().

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

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

78  {
79  const string metname = "Muon|RecoMuon|StandAloneMuonSmoother";
80 
82 
83  vector<Trajectory> trajectoriesSM = smoother()->trajectories(inputTrajectory);
84 
85  if(!trajectoriesSM.size()){
86  LogTrace(metname) << "No Track smoothed!";
87  return SmoothingResult(false,inputTrajectory);
88  }
89 
90  Trajectory smoothed = trajectoriesSM.front();
91 
92  return SmoothingResult(true,smoothed);
93 }
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 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 76 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 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().

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