CMS 3D CMS Logo

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