33 vector<double> errors = pset.
getParameter<vector<double> >(
"BeamSpotPositionErrors");
34 if (errors.size() != 3)
36 <<
"MuonUpdatorAtVertex::BeamSpotPositionErrors wrong number of parameters!!";
44 mat(0, 0) = errors[0] * errors[0];
45 mat(1, 1) = errors[1] * errors[1];
46 mat(2, 2) = errors[2] * errors[2];
63 const string metname =
"Muon|RecoMuon|MuonUpdatorAtVertex";
66 LogTrace(metname) <<
"Trajectory inside the Tracker";
74 edm::LogWarning(metname) <<
"Propagation to the PCA using TSCPBuilderNoMaterial failed!"
75 <<
" This can cause a severe bug.";
77 LogTrace(metname) <<
"Trajectory inside the muon system";
81 LogTrace(metname) <<
"MuonUpdatorAtVertex::propagate, path: " << result <<
" parameters: " << result.
parameters();
84 return pair<bool, FreeTrajectoryState>(
true, result);
86 edm::LogInfo(metname) <<
"Propagation to the PCA failed!";
106 edm::LogWarning(metname) <<
"cms::Exception caught in MuonUpdatorAtVertex::update\n"
107 <<
"Exception from SingleTrackVertexConstraint\n"
112 if (std::get<0>(constrainedTransientTrack))
113 if (std::get<2>(constrainedTransientTrack) <=
theChi2Cut) {
115 result.second = *std::get<1>(constrainedTransientTrack).impactPointState().freeState();
117 LogTrace(metname) <<
"Constraint at vertex failed: too large chi2";
119 LogTrace(metname) <<
"Constraint at vertex failed";
131 pair<bool, FreeTrajectoryState> propagationResult =
propagate(tsos, beamSpot);
133 if (propagationResult.first) {
134 return update(propagationResult.second, beamSpot);
136 edm::LogInfo(
"Muon|RecoMuon|MuonUpdatorAtVertex") <<
"Constraint at vertex failed";
143 const string metname =
"Muon|RecoMuon|MuonUpdatorAtVertex";
146 LogTrace(metname) <<
"Trajectory inside the Tracker";
152 return pair<bool, FreeTrajectoryState>(
true, tscp.
theState());
154 edm::LogWarning(metname) <<
"Propagation to the PCA using TSCPBuilderNoMaterial failed!"
155 <<
" This can cause a severe bug.";
157 LogTrace(metname) <<
"Trajectory inside the muon system";
163 pair<FreeTrajectoryState, double>
result =
166 LogTrace(metname) <<
"MuonUpdatorAtVertex::propagate, path: " << result.second
167 <<
" parameters: " << result.first.parameters();
169 if (result.first.hasError())
170 return pair<bool, FreeTrajectoryState>(
true, result.first);
172 edm::LogInfo(metname) <<
"Propagation to the PCA failed! Path: " << result.second;
double z0() const
z coordinate
static bool isInside(const GlobalPoint &)
MuonUpdatorAtVertex(const edm::ParameterSet &pset, const MuonServiceProxy *service)
Constructor.
std::tuple< bool, reco::TransientTrack, float > BTFtuple
const GlobalTrajectoryParameters & parameters() const
const std::string metname
virtual std::string explainSelf() const
const FreeTrajectoryState & theState() const
Global3DPoint GlobalPoint
GlobalError thePositionErrors
std::pair< bool, FreeTrajectoryState > propagate(const TrajectoryStateOnSurface &tsos, const reco::BeamSpot &beamSpot) const
Propagate the state to the 2D-PCA.
GlobalPoint globalPosition() const
const MuonServiceProxy * theService
TransientTrackFromFTSFactory theTransientTrackFactory
std::pair< bool, FreeTrajectoryState > update(const reco::TransientTrack &track, const reco::BeamSpot &beamSpot) const
Applies the vertex constraint.
FreeTrajectoryState const * freeState(bool withErrors=true) const
FTS const & trackStateAtPCA() const
Log< level::Info, false > LogInfo
reco::TransientTrack build(const FreeTrajectoryState &fts) const
T getParameter(std::string const &) const
std::pair< bool, FreeTrajectoryState > propagateWithUpdate(const TrajectoryStateOnSurface &tsos, const reco::BeamSpot &beamSpot) const
Propagate to the 2D-PCA and apply the vertex constraint.
BTFtuple constrain(const reco::TransientTrack &track, const GlobalPoint &priorPos, const GlobalError &priorError) const
virtual ~MuonUpdatorAtVertex()
Destructor.
double y0() const
y coordinate
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
SingleTrackVertexConstraint theConstrictor
Log< level::Warning, false > LogWarning
std::string thePropagatorName
double x0() const
x coordinate
std::pair< bool, FreeTrajectoryState > propagateToNominalLine(const TrajectoryStateOnSurface &tsos) const
Propagate the state to the 2D-PCA (nominal CMS axis)
const MuonServiceProxy * theService