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 }
Chi2MeasurementEstimator.h
service
Definition: service.py:1
MessageLogger.h
edm
HLT enums.
Definition: AlignableModifier.h:19
StandAloneMuonSmoother::smooth
SmoothingResult smooth(const Trajectory &)
Smoothes the trajectories.
Definition: StandAloneMuonSmoother.cc:70
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
KFTrajectorySmoother.h
MuonServiceProxy_cff.MuonServiceProxy
MuonServiceProxy
Definition: MuonServiceProxy_cff.py:14
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
Propagator
Definition: Propagator.h:44
Chi2MeasurementEstimator_cfi.Chi2MeasurementEstimator
Chi2MeasurementEstimator
Definition: Chi2MeasurementEstimator_cfi.py:5
StandAloneMuonSmoother.h
StandAloneMuonSmoother::renewTheSmoother
void renewTheSmoother()
Definition: StandAloneMuonSmoother.cc:60
StandAloneMuonSmoother::thePropagatorName
std::string thePropagatorName
Definition: StandAloneMuonSmoother.h:60
KFUpdator.h
edm::ParameterSet
Definition: ParameterSet.h:47
StandAloneMuonSmoother::~StandAloneMuonSmoother
virtual ~StandAloneMuonSmoother()
Destructor.
Definition: StandAloneMuonSmoother.cc:49
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
StandAloneMuonSmoother::StandAloneMuonSmoother
StandAloneMuonSmoother(const edm::ParameterSet &par, const MuonServiceProxy *service)
Constructor.
Definition: StandAloneMuonSmoother.cc:24
std
Definition: JetResolutionObject.h:76
Trajectory
Definition: Trajectory.h:38
KFTrajectorySmoother
Definition: KFTrajectorySmoother.h:20
StandAloneMuonSmoother::theSmoother
TrajectorySmoother * theSmoother
Definition: StandAloneMuonSmoother.h:81
MuonServiceProxy.h
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:224
ParameterSet.h
KFUpdator
Definition: KFUpdator.h:32
StandAloneMuonSmoother::theUpdator
TrajectoryStateUpdator * theUpdator
Definition: StandAloneMuonSmoother.h:77
metname
const std::string metname
Definition: MuonSeedOrcaPatternRecognition.cc:40