CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 }
std::pair< bool, Trajectory > SmoothingResult
SmoothingResult smooth(const Trajectory &)
Smoothes the trajectories.
const std::string metname
MeasurementEstimator * estimator() const
access at the estimator
const MuonServiceProxy * theService
virtual TrajectoryContainer trajectories(const Trajectory &traj) const
#define LogTrace(id)
TrajectoryStateUpdator * updator() const
return the KFUpdator
const Propagator * propagator() const
access at the propagator
TrajectorySmoother * smoother() const
access to the smoother
double theMaxChi2
The max allowed chi2 to accept a rechit in the fit.
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
StandAloneMuonSmoother(const edm::ParameterSet &par, const MuonServiceProxy *service)
Constructor.
MeasurementEstimator * theEstimator
TrajectoryStateUpdator * theUpdator
virtual ~StandAloneMuonSmoother()
Destructor.
TrajectorySmoother * theSmoother