38 if(errors.size() != 3)
40 <<
"MuonUpdatorAtVertex::BeamSpotPositionErrors wrong number of parameters!!";
48 mat(0,0) = errors[0]*errors[0];
49 mat(1,1) = errors[1]*errors[1];
50 mat(2,2) = errors[2]*errors[2];
65 pair<bool,FreeTrajectoryState>
68 const string metname =
"Muon|RecoMuon|MuonUpdatorAtVertex";
71 LogTrace(metname) <<
"Trajectory inside the Tracker";
80 edm::LogWarning(metname) <<
"Propagation to the PCA using TSCPBuilderNoMaterial failed!"
81 <<
" This can cause a severe bug.";
84 LogTrace(metname) <<
"Trajectory inside the muon system";
89 LogTrace(metname) <<
"MuonUpdatorAtVertex::propagate, path: "
90 << result <<
" parameters: " << result.
parameters();
93 return pair<bool,FreeTrajectoryState>(
true,result);
95 edm::LogInfo(metname) <<
"Propagation to the PCA failed!";
101 pair<bool,FreeTrajectoryState>
104 const std::string
metname =
"Muon|RecoMuon|MuonUpdatorAtVertex";
121 edm::LogWarning(metname) <<
"cms::Exception caught in MuonUpdatorAtVertex::update\n"
122 <<
"Exception from SingleTrackVertexConstraint\n"
128 if(constrainedTransientTrack.get<0>())
129 if(constrainedTransientTrack.get<2>() <=
theChi2Cut) {
131 result.second = *constrainedTransientTrack.get<1>().impactPointState().freeState();
134 LogTrace(metname) <<
"Constraint at vertex failed: too large chi2";
136 LogTrace(metname) <<
"Constraint at vertex failed";
141 pair<bool,FreeTrajectoryState>
148 pair<bool,FreeTrajectoryState>
151 pair<bool,FreeTrajectoryState>
152 propagationResult =
propagate(tsos,beamSpot);
154 if(propagationResult.first){
155 return update(propagationResult.second, beamSpot);
158 edm::LogInfo(
"Muon|RecoMuon|MuonUpdatorAtVertex") <<
"Constraint at vertex failed";
164 std::pair<bool,FreeTrajectoryState>
167 const string metname =
"Muon|RecoMuon|MuonUpdatorAtVertex";
170 LogTrace(metname) <<
"Trajectory inside the Tracker";
177 return pair<bool,FreeTrajectoryState>(
true,tscp.
theState());
179 edm::LogWarning(metname) <<
"Propagation to the PCA using TSCPBuilderNoMaterial failed!"
180 <<
" This can cause a severe bug.";
183 LogTrace(metname) <<
"Trajectory inside the muon system";
189 pair<FreeTrajectoryState,double>
192 LogTrace(metname) <<
"MuonUpdatorAtVertex::propagate, path: "
193 << result.second <<
" parameters: " << result.first.parameters();
195 if(result.first.hasError())
196 return pair<bool,FreeTrajectoryState>(
true,result.first);
198 edm::LogInfo(metname) <<
"Propagation to the PCA failed! Path: "<<result.second;
203 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
FreeTrajectoryState * freeState(bool withErrors=true) const
std::pair< bool, FreeTrajectoryState > update(const reco::TransientTrack &track, const reco::BeamSpot &beamSpot) const
Applies the vertex constraint.
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