CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrajectoryStateOnSurface.h
Go to the documentation of this file.
1 #ifndef TrajectoryStateOnSurface_H
2 #define TrajectoryStateOnSurface_H
3 
6 
7 #include <iosfwd>
8 
16 {
19 
20 public:
21  // construct
24 
25  // invalid state
26  explicit TrajectoryStateOnSurface(const Surface& aSurface);
27 
28 
34  const Surface& aSurface,
40  const Surface& aSurface,
46  const CartesianTrajectoryError& err,
47  const Surface& aSurface,
54  const CurvilinearTrajectoryError& err,
55  const Surface& aSurface,
57  double weight = 1.);
63  const CurvilinearTrajectoryError& err,
64  const Surface& aSurface,
65  double weight);
70  const Surface& aSurface,
71  const MagneticField* field,
78  const LocalTrajectoryError& err,
79  const Surface& aSurface,
80  const MagneticField* field,
82  double weight = 1.);
88  const LocalTrajectoryError& err,
89  const Surface& aSurface,
90  const MagneticField* field,
91  double weight);
92 
94 
95 #if defined( __GXX_EXPERIMENTAL_CXX0X__)
96 
98  Base(rh){}
99 
100 
102  Base(std::forward<Base>(rh)){}
103 
105  Base::swap(rh);
106  return *this;
107  }
108 
110  Base::operator=(rh);
111  return *this;
112  }
113 
114 
115 #endif
116 
118  Base::swap(rh);
119  }
120 
121 
122  bool isValid() const {
123  return Base::isValid() && data().isValid();
124  }
125 
126  bool hasError() const {
127  return data().hasError();
128  }
129 
130  FreeTrajectoryState* freeState(bool withErrors = true) const {
131  return data().freeTrajectoryState();
132  }
133 
134  FreeTrajectoryState* freeTrajectoryState(bool withErrors = true) const {
135  return freeState();
136  }
137 
138  const MagneticField *magneticField() const { return data().magneticField(); }
139 
141  return data().globalParameters();
142  }
144  return data().globalPosition();
145  }
147  return data().globalMomentum();
148  }
150  return data().globalDirection();
151  }
152  TrackCharge charge() const {
153  return data().charge();
154  }
155  double signedInverseMomentum() const {
156  return data().signedInverseMomentum();
157  }
158  double transverseCurvature() const {
159  return data().transverseCurvature();
160  }
162  return data().cartesianError();
163  }
165  return data().curvilinearError();
166  }
168  return data().localParameters();
169  }
171  return data().localPosition();
172  }
174  return data().localMomentum();
175  }
177  return data().localDirection();
178  }
180  return data().localError();
181  }
182  const Surface& surface() const {
183  return data().surface();
184  }
185 
186  double weight() const {return data().weight();}
187 
188  void rescaleError(double factor) {
189  unsharedData().rescaleError(factor);
190  }
191 
192  std::vector<TrajectoryStateOnSurface> components() const {
193  return data().components();
194  }
195  /*
196  std::vector<TrajectoryStateOnSurface> components() const {
197  std::vector<BasicTrajectoryState::RCPtr> c( data().components());
198  std::vector<TrajectoryStateOnSurface> result;
199  result.reserve(c.size());
200  for (std::vector<BasicTrajectoryState::RCPtr>::iterator i=c.begin();
201  i != c.end(); i++) result.push_back(&(**i));
202  return result;
203  }
204  */
205 
208  return data().surfaceSide();
209  }
210 
216  void update( const LocalTrajectoryParameters& p,
217  const Surface& aSurface,
218  const MagneticField* field,
226  void update( const LocalTrajectoryParameters& p,
227  const LocalTrajectoryError& err,
228  const Surface& aSurface,
229  const MagneticField* field,
231  double weight = 1.);
232 
233 };
234 
236  // use base swap
237  rh.swap(lh);
238 }
239 
240 std::ostream& operator<<(std::ostream& os, const TrajectoryStateOnSurface& tsos);
241 #endif
void swap(ora::Record &rh, ora::Record &lh)
Definition: Record.h:70
void update(const LocalTrajectoryParameters &p, const Surface &aSurface, const MagneticField *field, const SurfaceSide side=SurfaceSideDefinition::atCenterOfSurface)
const LocalTrajectoryParameters & localParameters() const
LocalVector localDirection() const
FreeTrajectoryState * freeTrajectoryState(bool withErrors=true) const
const CurvilinearTrajectoryError & curvilinearError() const
const CartesianTrajectoryError cartesianError() const
ProxyBase & operator=(const ProxyBase &other) noexcept
Definition: ProxyBase.h:36
GlobalPoint globalPosition() const
BasicTrajectoryState::Proxy Base
bool int lh
Definition: SSEVec.h:55
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
const MagneticField * magneticField() const
T & unsharedData()
Definition: ProxyBase.h:69
LocalVector localMomentum() const
int TrackCharge
Definition: TrackCharge.h:4
TrajectoryStateOnSurface(BasicTrajectoryState *p)
FreeTrajectoryState * freeState(bool withErrors=true) const
void swap(ProxyBase &other) noexcept
Definition: ProxyBase.h:46
SurfaceSide surfaceSide() const
Position relative to material, defined relative to momentum vector.
const LocalTrajectoryError & localError() const
#define noexcept
BasicTrajectoryState::SurfaceSide SurfaceSide
const GlobalTrajectoryParameters & globalParameters() const
const T & data() const
Definition: ProxyBase.h:67
bool isValid() const
Definition: ProxyBase.h:81
GlobalVector globalMomentum() const
const Surface & surface() const
void swap(TrajectoryStateOnSurface &rh) noexcept
std::vector< TrajectoryStateOnSurface > components() const
GlobalVector globalDirection() const