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 
7 
8 
9 #include <iosfwd>
10 
18 
23 
24 public:
25  // construct
31 
33 
35  Base(rh){}
36 
38  Base(rh){}
39 
40 
42  Base(std::forward<Base>(rh)){}
43 
45  Base::swap(rh);
46  return *this;
47  }
48 
50  Base::operator=(rh);
51  return *this;
52  }
53 
54  template<typename... Args>
55  explicit TrajectoryStateOnSurface(Args && ...args) : Base(BTSOS::churn<BasicSingleTrajectoryState>(std::forward<Args>(args)...)){}
56 
58  Base::swap(rh);
59  }
60 
61 
62  bool isValid() const {
63  return Base::isValid() && data().isValid();
64  }
65 
66  bool hasError() const {
67  return data().hasError();
68  }
69 
70  FreeTrajectoryState const* freeState(bool withErrors = true) const {
71  return data().freeTrajectoryState();
72  }
73 
74  FreeTrajectoryState const* freeTrajectoryState(bool withErrors = true) const {
75  return freeState();
76  }
77 
78  const MagneticField *magneticField() const { return data().magneticField(); }
79 
81  return data().globalParameters();
82  }
84  return data().globalPosition();
85  }
87  return data().globalMomentum();
88  }
90  return data().globalDirection();
91  }
92  TrackCharge charge() const {
93  return data().charge();
94  }
95  double signedInverseMomentum() const {
96  return data().signedInverseMomentum();
97  }
98  double transverseCurvature() const {
99  return data().transverseCurvature();
100  }
102  return data().cartesianError();
103  }
105  return data().curvilinearError();
106  }
108  return data().localParameters();
109  }
111  return data().localPosition();
112  }
114  return data().localMomentum();
115  }
117  return data().localDirection();
118  }
120  return data().localError();
121  }
122  const SurfaceType& surface() const {
123  return data().surface();
124  }
125 
126  double weight() const {return data().weight();}
127 
128  void rescaleError(double factor) {
129  unsharedData().rescaleError(factor);
130  }
131 
132  std::vector<TrajectoryStateOnSurface> components() const {
133  return data().components();
134  }
135 
138  return data().surfaceSide();
139  }
140 
146  void update( const LocalTrajectoryParameters& p,
147  const SurfaceType& aSurface,
148  const MagneticField* field,
150 
152  SurfaceSide side) { unsharedData().update(p, side);}
153 
155  const LocalTrajectoryError& err,
156  SurfaceSide side) {unsharedData().update(p, err, side);}
157 
164  void update(const LocalTrajectoryParameters& p,
165  const LocalTrajectoryError& err,
166  const SurfaceType& aSurface,
167  const MagneticField* field,
169 
171  return sharedData().setCurvilinearError();
172  }
173 
174 
175 
176 };
177 
179  // use base swap
180  rh.swap(lh);
181 }
182 
183 std::ostream& operator<<(std::ostream& os, const TrajectoryStateOnSurface & tsos);
184 #endif
TrajectoryStateOnSurface(TrajectoryStateOnSurface &&rh)
void swap(ora::Record &rh, ora::Record &lh)
Definition: Record.h:70
void update(const LocalTrajectoryParameters &p, SurfaceSide side)
TrajectoryStateOnSurface & operator=(TrajectoryStateOnSurface const &rh)
const LocalTrajectoryParameters & localParameters() const
CurvilinearTrajectoryError & setCurvilinearError()
LocalVector localDirection() const
const CurvilinearTrajectoryError & curvilinearError() const
const CartesianTrajectoryError cartesianError() const
#define noexcept
GlobalPoint globalPosition() const
BasicTrajectoryState::Proxy Base
bool int lh
Definition: SIMDVec.h:21
std::shared_ptr< T > pointer
Definition: ProxyBase11.h:24
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:188
const MagneticField * magneticField() const
ProxyBase11 & operator=(std::shared_ptr< U > p)
Definition: ProxyBase11.h:34
const T & data() const
Definition: ProxyBase11.h:51
LocalVector localMomentum() const
int TrackCharge
Definition: TrackCharge.h:4
TrajectoryStateOnSurface(BasicTrajectoryState *p)
const SurfaceType & surface() const
void swap(TrajectoryStateOnSurface &rh)
FreeTrajectoryState const * freeTrajectoryState(bool withErrors=true) const
BasicTrajectoryState::SurfaceType SurfaceType
SurfaceSide surfaceSide() const
Position relative to material, defined relative to momentum vector.
FreeTrajectoryState const * freeState(bool withErrors=true) const
void update(const LocalTrajectoryParameters &p, const SurfaceType &aSurface, const MagneticField *field, SurfaceSide side=SurfaceSideDefinition::atCenterOfSurface)
TrajectoryStateOnSurface(TrajectoryStateOnSurface const &rh)
TrajectoryStateOnSurface(TrajectoryStateOnSurface &rh)
const LocalTrajectoryError & localError() const
void swap(ProxyBase11 &other)
Definition: ProxyBase11.h:40
T & unsharedData()
Definition: ProxyBase11.h:53
BasicTrajectoryState::SurfaceSide SurfaceSide
const GlobalTrajectoryParameters & globalParameters() const
T & sharedData()
Definition: ProxyBase11.h:61
TrajectoryStateOnSurface(Base::pointer p)
Constructor from one of the basic states.
GlobalVector globalMomentum() const
TrajectoryStateOnSurface & operator=(TrajectoryStateOnSurface &&rh)
void update(const LocalTrajectoryParameters &p, const LocalTrajectoryError &err, SurfaceSide side)
TrajectoryStateOnSurface(BasicSingleTrajectoryState *p)
bool isValid() const
Definition: ProxyBase11.h:63
std::vector< TrajectoryStateOnSurface > components() const
GlobalVector globalDirection() const