CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Propagator.cc
Go to the documentation of this file.
7 
10  const Surface& sur) const
11 {
12  // try plane first, most probable case (disk "is a" plane too)
13  const Plane* bp = dynamic_cast<const Plane*>(&sur);
14  if (bp != 0) return propagate( state, *bp);
15 
16  // if not plane try cylinder
17  const Cylinder* bc = dynamic_cast<const Cylinder*>(&sur);
18  if (bc != 0) return propagate( state, *bc);
19 
20  // unknown surface - can't do it!
21  throw PropagationException("The surface is neither Cylinder nor Plane");
22 }
23 
26  const Surface& sur) const
27 {
28  // exactly same code as for FreeTrajectoryState
29 
30  // try plane first, most probable case (disk "is a" plane too)
31  const Plane* bp = dynamic_cast<const Plane*>(&sur);
32  if (bp != 0) return propagate( state, *bp);
33 
34  // if not plane try cylinder
35  const Cylinder* bc = dynamic_cast<const Cylinder*>(&sur);
36  if (bc != 0) return propagate( state, *bc);
37 
38  // unknown surface - can't do it!
39  throw PropagationException("The surface is neither Cylinder nor Plane");
40 }
41 
42 
43 // default impl. avoids the need to redefinition in concrete
44 // propagators that don't benefit from TSOS vs. FTS
47  const Plane& sur) const
48 {
49  // Protect against null propagations
50  if (fabs(sur.toLocal(tsos.globalPosition()).z())<1e-5) {
51  // Still have to tarnsform the r.f.!
52  return TrajectoryStateOnSurface(*tsos.freeState(), sur);
53  }
54  return propagate( *tsos.freeState(), sur);
55 }
56 
57 // default impl. avoids the need to redefinition in concrete
58 // propagators that don't benefit from TSOS vs. FTS
61  const Cylinder& sur) const
62 {
63  return propagate( *tsos.freeState(), sur);
64 }
65 
68  const reco::BeamSpot& beamSpot) const{
69  throw cms::Exception("Propagator::propagate(FTS,beamSpot) not implemented");
70 }
71 
72 
73 std::pair< TrajectoryStateOnSurface, double>
75  const Surface& sur) const
76 {
77  // same code as above, only method name changes
78 
79  // try plane first, most probable case (disk "is a" plane too)
80  const Plane* bp = dynamic_cast<const Plane*>(&sur);
81  if (bp != 0) return propagateWithPath( state, *bp);
82 
83  // if not plane try cylinder
84  const Cylinder* bc = dynamic_cast<const Cylinder*>(&sur);
85  if (bc != 0) return propagateWithPath( state, *bc);
86 
87  // unknown surface - can't do it!
88  throw PropagationException("The surface is neither Cylinder nor Plane");
89 }
90 
91 std::pair< TrajectoryStateOnSurface, double>
93  const Surface& sur) const
94 {
95  // same code as above, only method name changes
96 
97  // try plane first, most probable case (disk "is a" plane too)
98  const Plane* bp = dynamic_cast<const Plane*>(&sur);
99  if (bp != 0) return propagateWithPath( state, *bp);
100 
101  // if not plane try cylinder
102  const Cylinder* bc = dynamic_cast<const Cylinder*>(&sur);
103  if (bc != 0) return propagateWithPath( state, *bc);
104 
105  // unknown surface - can't do it!
106  throw PropagationException("The surface is neither Cylinder nor Plane");
107 }
108 
109 // default impl. avoids the need to redefinition in concrete
110 // propagators that don't benefit from TSOS vs. FTS
111 std::pair< TrajectoryStateOnSurface, double>
113  const Plane& sur) const
114 {
115  return propagateWithPath( *tsos.freeState(), sur);
116 }
117 
118 // default impl. avoids the need to redefinition in concrete
119 // propagators that don't benefit from TSOS vs. FTS
120 std::pair< TrajectoryStateOnSurface, double>
122  const Cylinder& sur) const
123 {
124  return propagateWithPath( *tsos.freeState(), sur);
125 }
126 
127 std::pair<FreeTrajectoryState, double>
129  const GlobalPoint& pDest1, const GlobalPoint& pDest2) const{
130  throw cms::Exception("Propagator::propagate(FTS,GlobalPoint,GlobalPoint) not implemented");
131 }
GlobalPoint globalPosition() const
Definition: Plane.h:17
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:74
Definition: DDAxes.h:10
FreeTrajectoryState * freeState(bool withErrors=true) const
LocalPoint toLocal(const GlobalPoint &gp) const
Common base class.
virtual TrajectoryStateOnSurface propagate(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:9
char state
Definition: procUtils.cc:75