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.

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 }

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

◆ ~StandAloneMuonSmoother()

StandAloneMuonSmoother::~StandAloneMuonSmoother ( )
virtual

Destructor.

Definition at line 49 of file StandAloneMuonSmoother.cc.

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

References theEstimator, theSmoother, and theUpdator.

Member Function Documentation

◆ estimator()

MeasurementEstimator* StandAloneMuonSmoother::estimator ( void  ) const
inline

access at the estimator

Definition at line 51 of file StandAloneMuonSmoother.h.

51 { return theEstimator; }

References theEstimator.

Referenced by renewTheSmoother().

◆ propagator()

const Propagator * StandAloneMuonSmoother::propagator ( ) const

access at the propagator

Definition at line 58 of file StandAloneMuonSmoother.cc.

58 { return &*theService->propagator(thePropagatorName); }

References thePropagatorName, and theService.

Referenced by renewTheSmoother().

◆ renewTheSmoother()

void StandAloneMuonSmoother::renewTheSmoother ( )
private

Definition at line 60 of file StandAloneMuonSmoother.cc.

60  {
61  if (theService->isTrackingComponentsRecordChanged()) {
62  if (theSmoother)
63  delete theSmoother;
65  }
66  if (!theSmoother)
68 }

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

Referenced by smooth().

◆ smooth()

StandAloneMuonSmoother::SmoothingResult StandAloneMuonSmoother::smooth ( const Trajectory inputTrajectory)

Smoothes the trajectories.

Definition at line 70 of file StandAloneMuonSmoother.cc.

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 }

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

◆ smoother()

TrajectorySmoother* StandAloneMuonSmoother::smoother ( ) const
inline

access to the smoother

Definition at line 54 of file StandAloneMuonSmoother.h.

54 { return theSmoother; }

References theSmoother.

Referenced by smooth().

◆ updator()

TrajectoryStateUpdator* StandAloneMuonSmoother::updator ( ) const
inline

return the KFUpdator

Definition at line 45 of file StandAloneMuonSmoother.h.

45 { return theUpdator; }

References theUpdator.

Referenced by renewTheSmoother().

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
service
Definition: service.py:1
StandAloneMuonSmoother::theErrorRescaling
double theErrorRescaling
Definition: StandAloneMuonSmoother.h:75
StandAloneMuonSmoother::SmoothingResult
std::pair< bool, Trajectory > SmoothingResult
Definition: StandAloneMuonSmoother.h:30
StandAloneMuonSmoother::updator
TrajectoryStateUpdator * updator() const
return the KFUpdator
Definition: StandAloneMuonSmoother.h:45
StandAloneMuonSmoother::theNSigma
double theNSigma
Definition: StandAloneMuonSmoother.h:67
TrajectorySmoother::trajectories
virtual TrajectoryContainer trajectories(const Trajectory &traj) const
Definition: TrajectorySmoother.h:18
StandAloneMuonSmoother::theService
const MuonServiceProxy * theService
Definition: StandAloneMuonSmoother.h:79
Chi2MeasurementEstimator_cfi.Chi2MeasurementEstimator
Chi2MeasurementEstimator
Definition: Chi2MeasurementEstimator_cfi.py:5
StandAloneMuonSmoother::renewTheSmoother
void renewTheSmoother()
Definition: StandAloneMuonSmoother.cc:60
StandAloneMuonSmoother::thePropagatorName
std::string thePropagatorName
Definition: StandAloneMuonSmoother.h:60
StandAloneMuonSmoother::theEstimator
MeasurementEstimator * theEstimator
Definition: StandAloneMuonSmoother.h:73
StandAloneMuonSmoother::estimator
MeasurementEstimator * estimator() const
access at the estimator
Definition: StandAloneMuonSmoother.h:51
StandAloneMuonSmoother::theMaxChi2
double theMaxChi2
The max allowed chi2 to accept a rechit in the fit.
Definition: StandAloneMuonSmoother.h:63
Trajectory
Definition: Trajectory.h:38
KFTrajectorySmoother
Definition: KFTrajectorySmoother.h:20
StandAloneMuonSmoother::theSmoother
TrajectorySmoother * theSmoother
Definition: StandAloneMuonSmoother.h:81
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
StandAloneMuonSmoother::propagator
const Propagator * propagator() const
access at the propagator
Definition: StandAloneMuonSmoother.cc:58
StandAloneMuonSmoother::smoother
TrajectorySmoother * smoother() const
access to the smoother
Definition: StandAloneMuonSmoother.h:54
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234
KFUpdator
Definition: KFUpdator.h:32
StandAloneMuonSmoother::theUpdator
TrajectoryStateUpdator * theUpdator
Definition: StandAloneMuonSmoother.h:77
metname
const std::string metname
Definition: MuonSeedOrcaPatternRecognition.cc:40