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
29  const Surface& aSurface,
35  const Surface& aSurface,
41  const CartesianTrajectoryError& err,
42  const Surface& aSurface,
49  const CurvilinearTrajectoryError& err,
50  const Surface& aSurface,
52  double weight = 1.);
58  const CurvilinearTrajectoryError& err,
59  const Surface& aSurface,
60  double weight);
65  const Surface& aSurface,
66  const MagneticField* field,
73  const LocalTrajectoryError& err,
74  const Surface& aSurface,
75  const MagneticField* field,
77  double weight = 1.);
83  const LocalTrajectoryError& err,
84  const Surface& aSurface,
85  const MagneticField* field,
86  double weight);
87 
89 
90 #if defined( __GXX_EXPERIMENTAL_CXX0X__)
91 
93  Base(std::forward<Base>(rh)){}
94 
96  Base::swap(rh);
97  return *this;
98  }
99 
100 #endif
101 
103  Base::swap(rh);
104  }
105 
106 
107  bool isValid() const {
108  return Base::isValid() && data().isValid();
109  }
110 
111  bool hasError() const {
112  return data().hasError();
113  }
114 
115  FreeTrajectoryState* freeState(bool withErrors = true) const {
116  return data().freeTrajectoryState();
117  }
118 
119  FreeTrajectoryState* freeTrajectoryState(bool withErrors = true) const {
120  return freeState();
121  }
122 
123  const MagneticField *magneticField() const { return data().magneticField(); }
124 
126  return data().globalParameters();
127  }
129  return data().globalPosition();
130  }
132  return data().globalMomentum();
133  }
135  return data().globalDirection();
136  }
137  TrackCharge charge() const {
138  return data().charge();
139  }
140  double signedInverseMomentum() const {
141  return data().signedInverseMomentum();
142  }
143  double transverseCurvature() const {
144  return data().transverseCurvature();
145  }
147  return data().cartesianError();
148  }
150  return data().curvilinearError();
151  }
153  return data().localParameters();
154  }
156  return data().localPosition();
157  }
159  return data().localMomentum();
160  }
162  return data().localDirection();
163  }
165  return data().localError();
166  }
167  const Surface& surface() const {
168  return data().surface();
169  }
170 
171  double weight() const {return data().weight();}
172 
173  void rescaleError(double factor) {
174  unsharedData().rescaleError(factor);
175  }
176 
177  std::vector<TrajectoryStateOnSurface> components() const {
178  return data().components();
179  }
180  /*
181  std::vector<TrajectoryStateOnSurface> components() const {
182  std::vector<BasicTrajectoryState::RCPtr> c( data().components());
183  std::vector<TrajectoryStateOnSurface> result;
184  result.reserve(c.size());
185  for (std::vector<BasicTrajectoryState::RCPtr>::iterator i=c.begin();
186  i != c.end(); i++) result.push_back(&(**i));
187  return result;
188  }
189  */
190 
193  return data().surfaceSide();
194  }
195 
201  void update( const LocalTrajectoryParameters& p,
202  const Surface& aSurface,
203  const MagneticField* field,
211  void update( const LocalTrajectoryParameters& p,
212  const LocalTrajectoryError& err,
213  const Surface& aSurface,
214  const MagneticField* field,
216  double weight = 1.);
217 
218 };
219 
221  // use base swap
222  rh.swap(lh);
223 }
224 
225 std::ostream& operator<<(std::ostream& os, const TrajectoryStateOnSurface& tsos);
226 #endif
void swap(ora::Record &rh, ora::Record &lh)
Definition: Record.h:74
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
GlobalPoint globalPosition() const
BasicTrajectoryState::Proxy Base
bool int lh
Definition: SSEVec.h:37
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
const MagneticField * magneticField() const
T & unsharedData()
Definition: ProxyBase.h:66
void swap(ProxyBase &other)
Definition: ProxyBase.h:43
LocalVector localMomentum() const
int TrackCharge
Definition: TrackCharge.h:4
TrajectoryStateOnSurface(BasicTrajectoryState *p)
Constructor from one of the basic states.
void swap(TrajectoryStateOnSurface &rh)
FreeTrajectoryState * freeState(bool withErrors=true) const
const CartesianTrajectoryError & cartesianError() const
SurfaceSide surfaceSide() const
Position relative to material, defined relative to momentum vector.
const LocalTrajectoryError & localError() const
BasicTrajectoryState::SurfaceSide SurfaceSide
const GlobalTrajectoryParameters & globalParameters() const
const T & data() const
Definition: ProxyBase.h:64
bool isValid() const
Definition: ProxyBase.h:78
GlobalVector globalMomentum() const
ProxyBase & operator=(const ProxyBase &other)
Definition: ProxyBase.h:33
const Surface & surface() const
std::vector< TrajectoryStateOnSurface > components() const
GlobalVector globalDirection() const