CMS 3D CMS Logo

TrackingRecHit.cc
Go to the documentation of this file.
4 
6 #include <string>
7 #include <typeinfo>
8 
9 void TrackingRecHit::recHitsV(std::vector<const TrackingRecHit*>& v) const { v = recHits(); }
10 void TrackingRecHit::recHitsV(std::vector<TrackingRecHit*>& v) { v = recHits(); }
11 
13  //
14  // for the time being: don't force implementation in all derived classes
15  // but throw exception to indicate missing implementation
16  //
17  std::string msg("Missing implementation of TrackingRecHit::sharedInput in ");
18  msg += typeid(*this).name();
19  throw cms::Exception(msg);
20  return false;
21 }
22 
23 void TrackingRecHit::getKfComponents(KfComponentsHolder& holder) const { holder.genericFill(*this); }
24 
25 namespace {
26  inline void throwError() { throw cms::Exception("Global coordinates missing from this TrackingRecHit used"); }
27 } // namespace
28 
29 const GeomDetUnit* TrackingRecHit::detUnit() const { return det(); }
30 
32  throwError();
33  return GlobalPoint();
34 }
36  throwError();
37  return GlobalError();
38 }
39 
41  throwError();
42  return 0;
43 }
45  throwError();
46  return 0;
47 }
49  throwError();
50  return 0;
51 }
SharedInputType
definition of equality via shared input
virtual float errorGlobalZ() const
void genericFill(const TrackingRecHit &hit)
Fill in datamembers from a generic TrackingRecHit using the CLHEP matrices.
virtual float errorGlobalRPhi() const
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
Definition: GlobalError.h:13
const GeomDet * det() const
virtual bool sharesInput(const TrackingRecHit *other, SharedInputType what) const
virtual GlobalError globalPositionError() const
virtual std::vector< const TrackingRecHit * > recHits() const =0
Access to component RecHits (if any)
virtual const GeomDetUnit * detUnit() const
virtual float errorGlobalR() const
tuple msg
Definition: mps_check.py:285
virtual void recHitsV(std::vector< const TrackingRecHit *> &) const
virtual GlobalPoint globalPosition() const
virtual void getKfComponents(KfComponentsHolder &holder) const