CMS 3D CMS Logo

MultiTrajectoryStateTransform.cc
Go to the documentation of this file.
3 
16 
18 
21 {
23 }
24 
27 {
29 }
30 
31 bool
33  GlobalVector& momentum) const
34 {
36 }
37 
38 bool
40  GlobalVector& momentum) const
41 {
43 }
44 
47  const TrackingGeometry& geom,
48  const MagneticField* field) const
49 {
50  const Surface& surface = geom.idToDet( DetId( tk.extra()->outerDetId()))->surface();
51 
52  const reco::GsfTrackExtraRef& extra(tk.gsfExtra());
53  return stateOnSurface(extra->outerStateWeights(),
54  extra->outerStateLocalParameters(),
55  extra->outerStateCovariances(),
56  extra->outerStateLocalPzSign(),
57  surface,field);
58 }
59 
62  const TrackingGeometry& geom,
63  const MagneticField* field) const
64 {
65  const Surface& surface = geom.idToDet( DetId( tk.extra()->innerDetId()))->surface();
66 
67  const reco::GsfTrackExtraRef& extra(tk.gsfExtra());
68  return stateOnSurface(extra->innerStateWeights(),
69  extra->innerStateLocalParameters(),
70  extra->innerStateCovariances(),
71  extra->innerStateLocalPzSign(),
72  surface,field);
73 }
74 
77  const std::vector<ParameterVector>& parameters,
78  const std::vector<CovarianceMatrix>& covariances,
79  const double& pzSign,
80  const Surface& surface,
81  const MagneticField* field) const
82 {
83  if ( weights.empty() ) return TrajectoryStateOnSurface();
84 
85  unsigned int nc(weights.size());
86  AlgebraicVector5 pars;
88 
89  std::vector<TrajectoryStateOnSurface> components;
90  components.reserve(nc);
91 
92  // create components TSOSs
93  for ( unsigned int i=0; i<nc; i++ ) {
94  // convert parameter vector and covariance matrix
95  for ( unsigned int j1=0; j1<dimension; j1++ ) {
96  pars[j1] = parameters[i](j1);
97  for ( unsigned int j2=0; j2<=j1; j2++ )
98  cov(j1,j2) = covariances[i](j1,j2); //FIXME: SMatrix copy constructor should handle this!!
99  }
100  // create local parameters & errors
101  LocalTrajectoryParameters lp(pars,pzSign);
102  LocalTrajectoryError le(cov);
103  // create component
104  components.push_back(TrajectoryStateOnSurface(weights[i], lp,le,surface,field));
105  }
106  return
108 }
109 
110 bool
112 {
113  if ( geometry_ && field_ ) return true;
114 
115  edm::LogError("MultiTrajectoryStateTransform") << "Missing ES components";
116  return false;
117 }
118 
121  const GlobalPoint& point) const
122 {
124 }
125 
126 bool
128 {
129  if ( extrapolator_ ) return true;
130 
131  if ( field_==0 ) {
132  edm::LogError("MultiTrajectoryStateTransform") << "Missing magnetic field";
133  return false;
134  }
135 
138  return true;
139 }
const TrackExtraRef & extra() const
reference to "extra" object
Definition: Track.h:189
virtual const GeomDet * idToDet(DetId) const =0
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
bool momentumFromModeCartesian(const TrajectoryStateOnSurface tsos, GlobalVector &momentum) const
bool innerMomentumFromMode(const reco::GsfTrack &tk, GlobalVector &momentum) const
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:42
TrajectoryStateOnSurface outerStateOnSurface(const reco::GsfTrack &tk) const
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) const
TrajectoryStateOnSurface extrapolatedState(const TrajectoryStateOnSurface tsos, const GlobalPoint &point) const
bool outerMomentumFromMode(const reco::GsfTrack &tk, GlobalVector &momentum) const
Definition: DetId.h:18
const GsfTrackExtraRef & gsfExtra() const
reference to "extra" object
Definition: GsfTrack.h:32
ROOT::Math::SVector< double, 5 > AlgebraicVector5
TrajectoryStateOnSurface extrapolate(const FreeTrajectoryState &fts, const GlobalPoint &vtx) const
extrapolation with default (=geometrical) propagator
TrajectoryStateOnSurface innerStateOnSurface(const reco::GsfTrack &tk) const
*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
TransverseImpactPointExtrapolator * extrapolator_