CMS 3D CMS Logo

MultiTrajectoryStateTransform.cc
Go to the documentation of this file.
3 
16 
18 
21 }
22 
25 }
26 
29 }
30 
33 }
34 
36  const TrackingGeometry& geom,
37  const MagneticField* field) {
38  const Surface& surface = geom.idToDet(DetId(tk.extra()->outerDetId()))->surface();
39 
40  const reco::GsfTrackExtraRef& extra(tk.gsfExtra());
41  return stateOnSurface(extra->outerStateWeights(),
42  extra->outerStateLocalParameters(),
43  extra->outerStateCovariances(),
44  extra->outerStateLocalPzSign(),
45  surface,
46  field);
47 }
48 
50  const TrackingGeometry& geom,
51  const MagneticField* field) {
52  const Surface& surface = geom.idToDet(DetId(tk.extra()->innerDetId()))->surface();
53 
54  const reco::GsfTrackExtraRef& extra(tk.gsfExtra());
55  return stateOnSurface(extra->innerStateWeights(),
56  extra->innerStateLocalParameters(),
57  extra->innerStateCovariances(),
58  extra->innerStateLocalPzSign(),
59  surface,
60  field);
61 }
62 
64  const std::vector<ParameterVector>& parameters,
65  const std::vector<CovarianceMatrix>& covariances,
66  const double& pzSign,
67  const Surface& surface,
68  const MagneticField* field) {
69  if (weights.empty())
70  return TrajectoryStateOnSurface();
71 
72  unsigned int nc(weights.size());
73  AlgebraicVector5 pars;
75 
76  std::vector<TrajectoryStateOnSurface> components;
77  components.reserve(nc);
78 
79  // create components TSOSs
80  for (unsigned int i = 0; i < nc; i++) {
81  // convert parameter vector and covariance matrix
82  for (unsigned int j1 = 0; j1 < dimension; j1++) {
83  pars[j1] = parameters[i](j1);
84  for (unsigned int j2 = 0; j2 <= j1; j2++)
85  cov(j1, j2) = covariances[i](j1, j2); //FIXME: SMatrix copy constructor should handle this!!
86  }
87  // create local parameters & errors
88  LocalTrajectoryParameters lp(pars, pzSign);
89  LocalTrajectoryError le(cov);
90  // create component
91  components.push_back(TrajectoryStateOnSurface(weights[i], lp, le, surface, field));
92  }
94 }
95 
97  if (geometry_ && field_)
98  return true;
99 
100  edm::LogError("MultiTrajectoryStateTransform") << "Missing ES components";
101  return false;
102 }
103 
105  const GlobalPoint& point) const {
107 }
108 
110  if (extrapolator_)
111  return true;
112 
113  if (field_ == nullptr) {
114  edm::LogError("MultiTrajectoryStateTransform") << "Missing magnetic field";
115  return false;
116  }
117 
120  return true;
121 }
Vector3DBase
Definition: Vector3DBase.h:8
MultiTrajectoryStateTransform::outerMomentumFromMode
bool outerMomentumFromMode(const reco::GsfTrack &tk, GlobalVector &momentum) const
Definition: MultiTrajectoryStateTransform.cc:27
TrajectoryStateOnSurface.h
LocalTrajectoryParameters.h
HLT_2018_cff.weights
weights
Definition: HLT_2018_cff.py:87167
anyDirection
Definition: PropagationDirection.h:4
mps_fire.i
i
Definition: mps_fire.py:355
MessageLogger.h
TrackExtraFwd.h
TrackingGeometry
Definition: TrackingGeometry.h:26
MultiTrajectoryStateTransform::extrapolatedState
TrajectoryStateOnSurface extrapolatedState(const TrajectoryStateOnSurface tsos, const GlobalPoint &point) const
Definition: MultiTrajectoryStateTransform.cc:104
BasicMultiTrajectoryState
Definition: BasicMultiTrajectoryState.h:17
GsfPropagatorAdapter.h
MultiTrajectoryStateTransform::geometry_
const TrackingGeometry * geometry_
Definition: MultiTrajectoryStateTransform.h:72
TrackingGeometry.h
Surface
Definition: Surface.h:36
multiTrajectoryStateMode::momentumFromModeCartesian
bool momentumFromModeCartesian(TrajectoryStateOnSurface const &tsos, GlobalVector &momentum)
Definition: MultiTrajectoryStateMode.cc:16
TransverseImpactPointExtrapolator
Definition: TransverseImpactPointExtrapolator.h:26
reco::Track::extra
const TrackExtraRef & extra() const
reference to "extra" object
Definition: Track.h:139
edm::Ref< GsfTrackExtraCollection >
MultiTrajectoryStateTransform::outerStateOnSurface
TrajectoryStateOnSurface outerStateOnSurface(const reco::GsfTrack &tk) const
Definition: MultiTrajectoryStateTransform.cc:19
parameters
parameters
Definition: BeamSpot_PayloadInspector.cc:14
LocalTrajectoryParameters
Definition: LocalTrajectoryParameters.h:25
DetId
Definition: DetId.h:17
MultiTrajectoryStateTransform::extrapolator_
TransverseImpactPointExtrapolator * extrapolator_
Definition: MultiTrajectoryStateTransform.h:74
reco::GsfTrack
Definition: GsfTrack.h:12
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
LocalTrajectoryError.h
MultiTrajectoryStateTransform::checkGeometry
bool checkGeometry() const
Definition: MultiTrajectoryStateTransform.cc:96
MultiTrajectoryStateTransform::checkExtrapolator
bool checkExtrapolator() const
Definition: MultiTrajectoryStateTransform.cc:109
MultiTrajectoryStateMode.h
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
Point3DBase< float, GlobalTag >
reco::GsfTrack::gsfExtra
const GsfTrackExtraRef & gsfExtra() const
reference to "extra" object
Definition: GsfTrack.h:31
AnalyticalPropagator_cfi.AnalyticalPropagator
AnalyticalPropagator
Definition: AnalyticalPropagator_cfi.py:3
MultiTrajectoryStateTransform.h
LocalTrajectoryError
Definition: LocalTrajectoryError.h:20
MultiTrajectoryStateTransform::dimension
Definition: MultiTrajectoryStateTransform.h:22
MultiTrajectoryStateTransform::stateOnSurface
static TrajectoryStateOnSurface stateOnSurface(const std::vector< double > &weights, const std::vector< ParameterVector > &parameters, const std::vector< CovarianceMatrix > &covariances, const double &pzSign, const Surface &surface, const MagneticField *field)
Definition: MultiTrajectoryStateTransform.cc:63
edm::LogError
Definition: MessageLogger.h:183
MultiTrajectoryStateTransform::~MultiTrajectoryStateTransform
~MultiTrajectoryStateTransform()
Definition: MultiTrajectoryStateTransform.cc:17
GsfTrackExtraFwd.h
AnalyticalPropagator.h
BasicTrajectoryState
Definition: BasicTrajectoryState.h:66
AlgebraicVector5
ROOT::Math::SVector< double, 5 > AlgebraicVector5
Definition: AlgebraicROOTObjects.h:14
GeomDet.h
makeMuonMisalignmentScenario.components
string components
Definition: makeMuonMisalignmentScenario.py:58
MultiTrajectoryStateTransform::field_
const MagneticField * field_
Definition: MultiTrajectoryStateTransform.h:73
TransverseImpactPointExtrapolator.h
TransverseImpactPointExtrapolator::extrapolate
TrajectoryStateOnSurface extrapolate(const FreeTrajectoryState &fts, const GlobalPoint &vtx) const
extrapolation with default (=geometrical) propagator
Definition: TransverseImpactPointExtrapolator.cc:23
MultiTrajectoryStateTransform::innerStateOnSurface
TrajectoryStateOnSurface innerStateOnSurface(const reco::GsfTrack &tk) const
Definition: MultiTrajectoryStateTransform.cc:23
MultiTrajectoryStateTransform::innerMomentumFromMode
bool innerMomentumFromMode(const reco::GsfTrack &tk, GlobalVector &momentum) const
Definition: MultiTrajectoryStateTransform.cc:31
BasicMultiTrajectoryState.h
point
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
GsfPropagatorAdapter
Definition: GsfPropagatorAdapter.h:14
MagneticField
Definition: MagneticField.h:19
AlgebraicSymMatrix55
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
Definition: AlgebraicROOTObjects.h:23