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 }
TrajectoryStateOnSurface outerStateOnSurface(const reco::GsfTrack &tk) const
TrajectoryStateOnSurface extrapolate(const FreeTrajectoryState &fts, const GlobalPoint &vtx) const
extrapolation with default (=geometrical) propagator
Log< level::Error, false > LogError
TrajectoryStateOnSurface innerStateOnSurface(const reco::GsfTrack &tk) const
ROOT::Math::SVector< double, 5 > AlgebraicVector5
Definition: DetId.h:17
bool innerMomentumFromMode(const reco::GsfTrack &tk, GlobalVector &momentum) const
const GsfTrackExtraRef & gsfExtra() const
reference to "extra" object
Definition: GsfTrack.h:31
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
TrajectoryStateOnSurface extrapolatedState(const TrajectoryStateOnSurface tsos, const GlobalPoint &point) const
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)
bool momentumFromModeCartesian(TrajectoryStateOnSurface const &tsos, GlobalVector &momentum)
*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
bool outerMomentumFromMode(const reco::GsfTrack &tk, GlobalVector &momentum) const
TransverseImpactPointExtrapolator * extrapolator_
const TrackExtraRef & extra() const
reference to "extra" object
Definition: Track.h:139