CMS 3D CMS Logo

TrajectoryStateOnSurface.h
Go to the documentation of this file.
1 #ifndef TrajectoryStateOnSurface_H
2 #define TrajectoryStateOnSurface_H
3 
7 
8 #include <iosfwd>
9 
21 
22 public:
23  // construct
29 
31 
33 
35 
36  TrajectoryStateOnSurface(TrajectoryStateOnSurface&& rh) noexcept : Base(std::forward<Base>(rh)) {}
37 
39  Base::swap(rh);
40  return *this;
41  }
42 
44  Base::operator=(rh);
45  return *this;
46  }
47 
48  template <typename... Args>
49  explicit TrajectoryStateOnSurface(Args&&... args)
50  : Base(BTSOS::churn<BasicSingleTrajectoryState>(std::forward<Args>(args)...)) {}
51 
52  void swap(TrajectoryStateOnSurface& rh) noexcept { Base::swap(rh); }
53 
54  bool isValid() const { return Base::isValid() && data().isValid(); }
55 
56  bool hasError() const { return data().hasError(); }
57 
58  FreeTrajectoryState const* freeState(bool withErrors = true) const { return data().freeTrajectoryState(); }
59 
60  FreeTrajectoryState const* freeTrajectoryState(bool withErrors = true) const { return freeState(); }
61 
62  const MagneticField* magneticField() const { return data().magneticField(); }
63 
64  const GlobalTrajectoryParameters& globalParameters() const { return data().globalParameters(); }
65  GlobalPoint globalPosition() const { return data().globalPosition(); }
66  GlobalVector globalMomentum() const { return data().globalMomentum(); }
67  GlobalVector globalDirection() const { return data().globalDirection(); }
68  TrackCharge charge() const { return data().charge(); }
69  double signedInverseMomentum() const { return data().signedInverseMomentum(); }
70  double transverseCurvature() const { return data().transverseCurvature(); }
71  const CartesianTrajectoryError cartesianError() const { return data().cartesianError(); }
72  const CurvilinearTrajectoryError& curvilinearError() const { return data().curvilinearError(); }
73  const LocalTrajectoryParameters& localParameters() const { return data().localParameters(); }
74  LocalPoint localPosition() const { return data().localPosition(); }
75  LocalVector localMomentum() const { return data().localMomentum(); }
76  LocalVector localDirection() const { return data().localDirection(); }
77  const LocalTrajectoryError& localError() const { return data().localError(); }
78  const SurfaceType& surface() const { return data().surface(); }
79 
80  double weight() const { return data().weight(); }
81 
82  void rescaleError(double factor) { unsharedData().rescaleError(factor); }
83 
85  Components const& components() const { return data().components(); }
86  bool singleState() const { return data().singleState(); }
87 
89  SurfaceSide surfaceSide() const { return data().surfaceSide(); }
90 
97  const SurfaceType& aSurface,
98  const MagneticField* field,
100 
101  void update(const LocalTrajectoryParameters& p, SurfaceSide side) { unsharedData().update(p, side); }
102 
104  unsharedData().update(p, err, side);
105  }
106 
113  void update(const LocalTrajectoryParameters& p,
114  const LocalTrajectoryError& err,
115  const SurfaceType& aSurface,
116  const MagneticField* field,
118 
119  CurvilinearTrajectoryError& setCurvilinearError() { return sharedData().setCurvilinearError(); }
120 };
121 
123  // use base swap
124  rh.swap(lh);
125 }
126 
127 std::ostream& operator<<(std::ostream& os, const TrajectoryStateOnSurface& tsos);
128 #endif
Vector3DBase
Definition: Vector3DBase.h:8
TrajectoryStateOnSurface::TrajectoryStateOnSurface
TrajectoryStateOnSurface(TrajectoryStateOnSurface const &rh) noexcept
Definition: TrajectoryStateOnSurface.h:34
TrajectoryStateOnSurface::globalDirection
GlobalVector globalDirection() const
Definition: TrajectoryStateOnSurface.h:67
writedatasetfile.args
args
Definition: writedatasetfile.py:18
TrajectoryStateOnSurface::TrajectoryStateOnSurface
TrajectoryStateOnSurface(TrajectoryStateOnSurface &rh) noexcept
Definition: TrajectoryStateOnSurface.h:32
TrajectoryStateOnSurface::SurfaceType
BasicTrajectoryState::SurfaceType SurfaceType
Definition: TrajectoryStateOnSurface.h:18
swap
void swap(TrajectoryStateOnSurface &rh, TrajectoryStateOnSurface &lh)
Definition: TrajectoryStateOnSurface.h:122
TrajectoryStateOnSurface::freeTrajectoryState
FreeTrajectoryState const * freeTrajectoryState(bool withErrors=true) const
Definition: TrajectoryStateOnSurface.h:60
TrajectoryStateOnSurface::localMomentum
LocalVector localMomentum() const
Definition: TrajectoryStateOnSurface.h:75
TrackCharge
int TrackCharge
Definition: TrackCharge.h:4
TrajectoryStateOnSurface::cartesianError
const CartesianTrajectoryError cartesianError() const
Definition: TrajectoryStateOnSurface.h:71
TrajectoryStateOnSurface::BTSOS
BasicTrajectoryState BTSOS
Definition: TrajectoryStateOnSurface.h:17
TrajectoryStateOnSurface::TrajectoryStateOnSurface
TrajectoryStateOnSurface(Base::pointer p)
Constructor from one of the basic states.
Definition: TrajectoryStateOnSurface.h:26
TrajectoryStateOnSurface::Components
BasicTrajectoryState::Components Components
Definition: TrajectoryStateOnSurface.h:84
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition: TrajectoryStateOnSurface.h:65
TrajectoryStateOnSurface::TrajectoryStateOnSurface
TrajectoryStateOnSurface(BasicTrajectoryState *p)
Definition: TrajectoryStateOnSurface.h:27
TrajectoryStateOnSurface::charge
TrackCharge charge() const
Definition: TrajectoryStateOnSurface.h:68
TrajectoryStateOnSurface::Base
BasicTrajectoryState::Proxy Base
Definition: TrajectoryStateOnSurface.h:20
TrajectoryStateOnSurface::operator=
TrajectoryStateOnSurface & operator=(TrajectoryStateOnSurface const &rh) noexcept
Definition: TrajectoryStateOnSurface.h:43
Surface
Definition: Surface.h:36
SurfaceSideDefinition::SurfaceSide
SurfaceSide
Definition: SurfaceSideDefinition.h:8
TrajectoryStateOnSurface::TrajectoryStateOnSurface
TrajectoryStateOnSurface(TrajectoryStateOnSurface &&rh) noexcept
Definition: TrajectoryStateOnSurface.h:36
mathSSE::lh
bool int lh
Definition: SIMDVec.h:20
TrajectoryStateOnSurface::~TrajectoryStateOnSurface
~TrajectoryStateOnSurface()
Definition: TrajectoryStateOnSurface.h:30
TrajectoryStateOnSurface::transverseCurvature
double transverseCurvature() const
Definition: TrajectoryStateOnSurface.h:70
TrajectoryStateOnSurface::update
void update(const LocalTrajectoryParameters &p, SurfaceSide side)
Definition: TrajectoryStateOnSurface.h:101
SurfaceSideDefinition::atCenterOfSurface
Definition: SurfaceSideDefinition.h:8
LocalTrajectoryParameters
Definition: LocalTrajectoryParameters.h:25
TrajectoryStateOnSurface::setCurvilinearError
CurvilinearTrajectoryError & setCurvilinearError()
Definition: TrajectoryStateOnSurface.h:119
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
ProxyBase11::operator=
ProxyBase11 & operator=(std::shared_ptr< U > p)
Definition: ProxyBase11.h:35
TrajectoryStateOnSurface::operator=
TrajectoryStateOnSurface & operator=(TrajectoryStateOnSurface &&rh) noexcept
Definition: TrajectoryStateOnSurface.h:38
TrajectoryStateOnSurface::TrajectoryStateOnSurface
TrajectoryStateOnSurface()
Definition: TrajectoryStateOnSurface.h:24
TrajectoryStateOnSurface::freeState
FreeTrajectoryState const * freeState(bool withErrors=true) const
Definition: TrajectoryStateOnSurface.h:58
CurvilinearTrajectoryError
Definition: CurvilinearTrajectoryError.h:27
TrajectoryStateOnSurface::SurfaceSide
BasicTrajectoryState::SurfaceSide SurfaceSide
Definition: TrajectoryStateOnSurface.h:19
TrajectoryStateOnSurface::localDirection
LocalVector localDirection() const
Definition: TrajectoryStateOnSurface.h:76
TrajectoryStateOnSurface::hasError
bool hasError() const
Definition: TrajectoryStateOnSurface.h:56
ProxyBase11::pointer
std::shared_ptr< T > pointer
Definition: ProxyBase11.h:25
TrajectoryStateOnSurface::weight
double weight() const
Definition: TrajectoryStateOnSurface.h:80
DQMScaleToClient_cfi.factor
factor
Definition: DQMScaleToClient_cfi.py:8
GlobalTrajectoryParameters
Definition: GlobalTrajectoryParameters.h:15
Point3DBase< float, GlobalTag >
BasicSingleTrajectoryState
Definition: BasicSingleTrajectoryState.h:10
TrajectoryStateOnSurface::swap
void swap(TrajectoryStateOnSurface &rh) noexcept
Definition: TrajectoryStateOnSurface.h:52
ProxyBase11::swap
void swap(ProxyBase11 &other) noexcept
Definition: ProxyBase11.h:42
TrajectoryStateOnSurface::localParameters
const LocalTrajectoryParameters & localParameters() const
Definition: TrajectoryStateOnSurface.h:73
SurfaceSideDefinition.h
LocalTrajectoryError
Definition: LocalTrajectoryError.h:20
TrajectoryStateOnSurface::components
Components const & components() const
Definition: TrajectoryStateOnSurface.h:85
TrajectoryStateOnSurface::localPosition
LocalPoint localPosition() const
Definition: TrajectoryStateOnSurface.h:74
ProxyBase11::sharedData
T & sharedData()
Definition: ProxyBase11.h:64
operator<<
std::ostream & operator<<(std::ostream &os, const TrajectoryStateOnSurface &tsos)
Definition: TrajectoryStateOnSurfacePrint.cc:6
ProxyBase11::unsharedData
T & unsharedData()
Definition: ProxyBase11.h:56
TrajectoryStateOnSurface::update
void update(const LocalTrajectoryParameters &p, const SurfaceType &aSurface, const MagneticField *field, SurfaceSide side=SurfaceSideDefinition::atCenterOfSurface)
Definition: TrajectoryStateOnSurface.cc:6
TrajectoryStateOnSurface::TrajectoryStateOnSurface
TrajectoryStateOnSurface(Args &&... args)
Definition: TrajectoryStateOnSurface.h:49
ProxyBase11::isValid
bool isValid() const
Definition: ProxyBase11.h:69
BasicTrajectoryState
Definition: BasicTrajectoryState.h:66
submitPVResolutionJobs.err
err
Definition: submitPVResolutionJobs.py:85
BasicTrajectoryState::Components
std::vector< TrajectoryStateOnSurface > Components
Definition: BasicTrajectoryState.h:286
BasicSingleTrajectoryState.h
TrajectoryStateOnSurface::rescaleError
void rescaleError(double factor)
Definition: TrajectoryStateOnSurface.h:82
CartesianTrajectoryError
Definition: CartesianTrajectoryError.h:15
TrajectoryStateOnSurface::globalMomentum
GlobalVector globalMomentum() const
Definition: TrajectoryStateOnSurface.h:66
BasicTrajectoryState.h
std
Definition: JetResolutionObject.h:76
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
ProxyBase11
Definition: ProxyBase11.h:23
TrajectoryStateOnSurface::curvilinearError
const CurvilinearTrajectoryError & curvilinearError() const
Definition: TrajectoryStateOnSurface.h:72
TrajectoryStateOnSurface::singleState
bool singleState() const
Definition: TrajectoryStateOnSurface.h:86
ProxyBase11::data
const T & data() const
Definition: ProxyBase11.h:51
TrajectoryStateOnSurface::TrajectoryStateOnSurface
TrajectoryStateOnSurface(BasicSingleTrajectoryState *p)
Definition: TrajectoryStateOnSurface.h:28
TrajectoryStateOnSurface::surface
const SurfaceType & surface() const
Definition: TrajectoryStateOnSurface.h:78
TrajectoryStateOnSurface::signedInverseMomentum
double signedInverseMomentum() const
Definition: TrajectoryStateOnSurface.h:69
TrajectoryStateOnSurface::update
void update(const LocalTrajectoryParameters &p, const LocalTrajectoryError &err, SurfaceSide side)
Definition: TrajectoryStateOnSurface.h:103
TrajectoryStateOnSurface::globalParameters
const GlobalTrajectoryParameters & globalParameters() const
Definition: TrajectoryStateOnSurface.h:64
TrajectoryStateOnSurface::localError
const LocalTrajectoryError & localError() const
Definition: TrajectoryStateOnSurface.h:77
MagneticField
Definition: MagneticField.h:19
TrajectoryStateOnSurface::surfaceSide
SurfaceSide surfaceSide() const
Position relative to material, defined relative to momentum vector.
Definition: TrajectoryStateOnSurface.h:89
TrajectoryStateOnSurface::magneticField
const MagneticField * magneticField() const
Definition: TrajectoryStateOnSurface.h:62
TrajectoryStateOnSurface::isValid
bool isValid() const
Definition: TrajectoryStateOnSurface.h:54