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 
13 
15 
19 
22 
23 using namespace edm;
24 using namespace std;
25 
26 
28  const MuonServiceProxy* service):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 }
53 
55  if (theEstimator) delete theEstimator;
56  if (theUpdator) delete theUpdator;
57  if (theSmoother) delete theSmoother;
58 }
59 
61  return &*theService->propagator(thePropagatorName);
62 }
63 
65  if (theService->isTrackingComponentsRecordChanged()){
66  if (theSmoother) delete theSmoother;
68  updator(),
69  estimator());
70  }
71  if (!theSmoother)
73  updator(),
74  estimator());
75 
76 }
77 
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 }
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