CMS 3D CMS Logo

StandAloneMuonSmoother.cc
Go to the documentation of this file.
1 
11 
13 
17 
20 
21 using namespace edm;
22 using namespace std;
23 
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 }
48 
50  if (theEstimator)
51  delete theEstimator;
52  if (theUpdator)
53  delete theUpdator;
54  if (theSmoother)
55  delete theSmoother;
56 }
57 
59 
61  if (theService->isTrackingComponentsRecordChanged()) {
62  if (theSmoother)
63  delete theSmoother;
65  }
66  if (!theSmoother)
68 }
69 
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 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::pair< bool, Trajectory > SmoothingResult
SmoothingResult smooth(const Trajectory &)
Smoothes the trajectories.
virtual TrajectoryContainer trajectories(const Trajectory &traj) const
const std::string metname
const MuonServiceProxy * theService
#define LogTrace(id)
double theMaxChi2
The max allowed chi2 to accept a rechit in the fit.
const Propagator * propagator() const
access at the propagator
StandAloneMuonSmoother(const edm::ParameterSet &par, const MuonServiceProxy *service)
Constructor.
HLT enums.
MeasurementEstimator * theEstimator
TrajectoryStateUpdator * theUpdator
MeasurementEstimator * estimator() const
access at the estimator
TrajectorySmoother * smoother() const
access to the smoother
virtual ~StandAloneMuonSmoother()
Destructor.
TrajectorySmoother * theSmoother
TrajectoryStateUpdator * updator() const
return the KFUpdator