CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
StandAloneMuonSmoother.cc
Go to the documentation of this file.
1 
11 
13 
17 
20 
21 using namespace edm;
22 using namespace std;
23 
24 
26  const MuonServiceProxy* service):theService(service){
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
48  theSmoother = 0 ;
49 
50 }
51 
53  if (theEstimator) delete theEstimator;
54  if (theUpdator) delete theUpdator;
55  if (theSmoother) delete theSmoother;
56 }
57 
59  return &*theService->propagator(thePropagatorName);
60 }
61 
63  if (theService->isTrackingComponentsRecordChanged()){
64  if (theSmoother) delete theSmoother;
66  updator(),
67  estimator());
68  }
69  if (!theSmoother)
71  updator(),
72  estimator());
73 
74 }
75 
77  const string metname = "Muon|RecoMuon|StandAloneMuonSmoother";
78 
80 
81  vector<Trajectory> trajectoriesSM = smoother()->trajectories(inputTrajectory);
82 
83  if(!trajectoriesSM.size()){
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 }
T getParameter(std::string const &) const
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
TrajectoryStateUpdator * updator() const
return the KFUpdator
const Propagator * propagator() const
access at the propagator
TrajectorySmoother * smoother() const
access to the smoother
#define LogTrace(id)
double theMaxChi2
The max allowed chi2 to accept a rechit in the fit.
StandAloneMuonSmoother(const edm::ParameterSet &par, const MuonServiceProxy *service)
Constructor.
std::pair< bool, Trajectory > SmoothingResult
MeasurementEstimator * theEstimator
TrajectoryStateUpdator * theUpdator
virtual ~StandAloneMuonSmoother()
Destructor.
TrajectorySmoother * theSmoother