36 if(errors.size() != 3)
38 <<
"MuonUpdatorAtVertex::BeamSpotPositionErrors wrong number of parameters!!";
46 mat(0,0) = errors[0]*errors[0];
47 mat(1,1) = errors[1]*errors[1];
48 mat(2,2) = errors[2]*errors[2];
63 pair<bool,FreeTrajectoryState>
66 const string metname =
"Muon|RecoMuon|MuonUpdatorAtVertex";
69 LogTrace(metname) <<
"Trajectory inside the Tracker";
78 edm::LogWarning(metname) <<
"Propagation to the PCA using TSCPBuilderNoMaterial failed!"
79 <<
" This can cause a severe bug.";
82 LogTrace(metname) <<
"Trajectory inside the muon system";
87 LogTrace(metname) <<
"MuonUpdatorAtVertex::propagate, path: "
88 << result <<
" parameters: " << result.
parameters();
91 return pair<bool,FreeTrajectoryState>(
true,result);
93 edm::LogInfo(metname) <<
"Propagation to the PCA failed!";
99 pair<bool,FreeTrajectoryState>
119 edm::LogWarning(metname) <<
"cms::Exception caught in MuonUpdatorAtVertex::update\n"
120 <<
"Exception from SingleTrackVertexConstraint\n"
126 if(constrainedTransientTrack.get<0>())
127 if(constrainedTransientTrack.get<2>() <=
theChi2Cut) {
129 result.second = *constrainedTransientTrack.get<1>().impactPointState().freeState();
132 LogTrace(metname) <<
"Constraint at vertex failed: too large chi2";
134 LogTrace(metname) <<
"Constraint at vertex failed";
139 pair<bool,FreeTrajectoryState>
146 pair<bool,FreeTrajectoryState>
149 pair<bool,FreeTrajectoryState>
150 propagationResult =
propagate(tsos,beamSpot);
152 if(propagationResult.first){
153 return update(propagationResult.second, beamSpot);
156 edm::LogInfo(
"Muon|RecoMuon|MuonUpdatorAtVertex") <<
"Constraint at vertex failed";
162 std::pair<bool,FreeTrajectoryState>
165 const string metname =
"Muon|RecoMuon|MuonUpdatorAtVertex";
168 LogTrace(metname) <<
"Trajectory inside the Tracker";
175 return pair<bool,FreeTrajectoryState>(
true,tscp.
theState());
177 edm::LogWarning(metname) <<
"Propagation to the PCA using TSCPBuilderNoMaterial failed!"
178 <<
" This can cause a severe bug.";
181 LogTrace(metname) <<
"Trajectory inside the muon system";
187 pair<FreeTrajectoryState,double>
190 LogTrace(metname) <<
"MuonUpdatorAtVertex::propagate, path: "
191 << result.second <<
" parameters: " << result.first.parameters();
193 if(result.first.hasError())
194 return pair<bool,FreeTrajectoryState>(
true,result.first);
196 edm::LogInfo(metname) <<
"Propagation to the PCA failed! Path: "<<result.second;
201 std::pair<bool,FreeTrajectoryState>
T getParameter(std::string const &) const
double z0() const
z coordinate
static bool isInside(const GlobalPoint &)
MuonUpdatorAtVertex(const edm::ParameterSet &pset, const MuonServiceProxy *service)
Constructor.
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
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
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
reco::TransientTrack build(const FreeTrajectoryState &fts) 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
SingleTrackVertexConstraint theConstrictor
boost::tuple< bool, reco::TransientTrack, float > BTFtuple
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