Vector2.hh
Go to the documentation of this file.
45 using OnlyIfNotOrSameQuantity = typename std::enable_if < !IsQuantity<Value_2>::value || std::is_same<Value_, Value_2>::value >::type;
380 constexpr friend ValueProduct<Value_2> operator^(Vector2 const &vector_1, Vector2<Value_2> const &vector_2)
constexpr Vector2(TVector2 const &vector)
Constructor accepting a root::TVector2.
Definition: Vector2.hh:91
constexpr ValueProduct< Value_2 > SignedArea(Vector2< Value_2 > const &vector) const
Signed area.
Definition: Vector2.hh:310
Angle atan2(Value const &value_1, Value const &value_2)
Arctangent2 .
Definition: Units.hh:185
typename std::enable_if< !IsVector2< Value_ >::value >::type OnlyIfNotVector2
Definition: Vector2.hh:507
Boost provides free peer-reviewed portable C++ source libraries.
Definition: LorentzVectorBase.hh:726
constexpr ValueProduct< Value_2 > Dot(Vector2< Value_2 > const &vector) const
Dot product between two vectors.
Definition: Vector2.hh:292
Vector2 & operator=(Vector2< Value_2 > const &vector)
Assignment operator including casting.
Definition: Vector2.hh:325
Vector2< ValueProduct< Value_2 > > Scale(Value_2 const &scalar) const
Scale this vector with a scalar.
Definition: Vector2.hh:301
boost::units::quantity< boost::units::si::plane_angle > Angle
Angle measured in radian.
Definition: Si.hh:35
constexpr ConstIterator< boca::Vector2, Value_ > end() const
Const end.
Definition: Vector2.hh:471
void SetUniform(Value_ value)
Set both both entries according to the value.
Definition: Vector2.hh:106
std::string Stream(Value const &message, int width=20, bool right=false)
Definition: Debug.hh:48
constexpr auto operator*(LorentzVectorBase< Value > const &lorentz_vector_1, LorentzVectorBase< Value_2 > const &lorentz_vector_2)
Scalar product of lorentzvectors.
Definition: LorentzVectorBase.hh:701
void SetPhi(boca::Angle const &phi)
Set azimuth keeping the magnitue constant.
Definition: Vector2.hh:135
void SetMag(Value_ mag)
Set the magnitude keeping constant.
Definition: Vector2.hh:125
boca::ConstIterator< boca::Vector2, Value_ > type
Definition: Vector2.hh:542
constexpr ConstIterator< boca::Vector2, Value_ > begin() const
Const begin.
Definition: Vector2.hh:463
constexpr bool operator==(Vector2 const &vector) const
Equal comparison.
Definition: Vector2.hh:413
Value_ const & operator[](Dim2 dim_2) const
Components by index.
Definition: Vector2.hh:421
constexpr friend auto operator/(Vector2 const &vector, Value_2 const &scalar)
Division by scalar.
Definition: Vector2.hh:389
Vector2 & operator+=(Vector2< Value_2 > const &vector)
Sum of two vectors.
Definition: Vector2.hh:336
Vector2 Rotate(Angle const &phi) const
Rotate this vector by .
Definition: Vector2.hh:275
constexpr auto Project(Vector2< Value_2 > const &vector) const
Projection onto the direction of vector.
Definition: Vector2.hh:246
typename boost::units::multiply_typeof_helper< Value, Value_2 >::type ValueProduct
Definition: Units.hh:134
constexpr Vector2(Value_ x, Value_ y)
Constructor from two scalars.
Definition: Vector2.hh:65
constexpr Vector2(Vector2< Value_2 > const &vector)
Constructor from a two-vector.
Definition: Vector2.hh:83
Vector2 & operator/=(Value_2 scalar)
Division by scalar.
Definition: Vector2.hh:369
Angle Restrict(Angle phi)
Restrict an angle to the interval .
Definition: Si.cpp:26
Angle DeltaPhiTo(Vector2< Value_2 > const &vector) const
Difference of azimuth defined in .
Definition: Vector2.hh:221
constexpr bool operator<(Vector2 const &vector) const
Less than comparison.
Definition: Vector2.hh:405
Vector2 & operator-=(Vector2< Value_2 > const &vector)
Difference of two vectors.
Definition: Vector2.hh:347
boca::Iterator< boca::Vector2, Value_ > type
Definition: Vector2.hh:547
Vector2 & operator*=(Value_2 scalar)
Product with scalar.
Definition: Vector2.hh:358
Value_ & operator[](Dim2 dim_2)
Components by index.
Definition: Vector2.hh:437
constexpr auto Unit() const
Unit vector in the direction of this vector.
Definition: Vector2.hh:236
Vector2 & Rotate(Angle const &phi)
Rotate this vector by .
Definition: Vector2.hh:264
constexpr Vector2 Norm(Vector2< Value_2 > const &vector) const
Component normal to the vector.
Definition: Vector2.hh:256
Definition: Vector2.hh:501
Vector2(Value_ value, Dim2 dim)
Constructor one scalar and its direction.
Definition: Vector2.hh:73
constexpr friend ValueProduct< Value_2 > operator^(Vector2 const &vector_1, Vector2< Value_2 > const &vector_2)
Coefficient of wedge product.
Definition: Vector2.hh:380
void SetMagPhi(Value_ magnitude, Angle const &phi)
Setter for the magnitude and angle.
Definition: Vector2.hh:115