Vector3.hh
Go to the documentation of this file.
55 using OnlyIfNotOrSameQuantity = typename std::enable_if < !IsQuantity<Value_2_>::value || std::is_same<Value_, Value_2_>::value >::type;
520 return mag2 == ValueSquare(0) ? Vector3<double>() : static_cast<Vector3<double>>(*this / sqrt(mag2));
573 return {Y() *vector.Z() - vector.Y() *Z(), Z() *vector.X() - vector.Z() *X(), X() *vector.Y() - vector.X() *Y()};
580 constexpr ValueCubed<Value_2_, Value_3> Triple(Vector3<Value_2_> const &vector_1, Vector3<Value_3> const &vector_2) const
661 constexpr friend Vector3<ValueProduct<Value_2_>> operator^(Vector3 const &vector_1, Vector3<Value_2_> const &vector_2)
670 constexpr friend Vector3 <ValueQuotient<Value_2_>> operator/(Vector3 const &vector, Value_2_ const &scalar)
778 template < class Value_, class Value_2_, typename = OnlyIfVector3<Value_>, typename = OnlyIfVector3<Value_2_> >
785 template < class Value_, class Value_2_, typename = OnlyIfVector3<Value_>, typename = OnlyIfNotVector3<Value_2_> >
791 template < class Value_, class Value_2_, typename = OnlyIfVector3<Value_>, typename = OnlyIfNotVector3<Value_2_> >
798 constexpr auto Triple(Vector3<Value_1> const &vector_1, Vector3<Value_2_> const &vector_2, Vector3<Value_3> const &vector_3)
constexpr Value_ Perp() const
The transverse component .
Definition: Vector3.hh:409
constexpr Vector3(Value_ x, Value_ y, Value_ z)
Constructor accepting three scalars.
Definition: Vector3.hh:75
constexpr ValueSquare Perp2() const
The transverse component squared .
Definition: Vector3.hh:401
boca::Iterator< boca::Vector3, Value_ > type
Definition: Vector3.hh:814
Angle atan2(Value const &value_1, Value const &value_2)
Arctangent2 .
Definition: Units.hh:185
constexpr ValueCubed< Value_2_, Value_3 > Triple(Vector3< Value_2_ > const &vector_1, Vector3< Value_3 > const &vector_2) const
Triple product between three vectors.
Definition: Vector3.hh:580
constexpr Vector3(Vector3< Value_2_ > const &vector)
Constructor accepting a vector.
Definition: Vector3.hh:102
boca::Angle DeltaEtaTo(Vector3< Value_2_ > const &vector) const
Difference to vector in PseudoRapidity .
Definition: Vector3.hh:324
void SetPerpEtaPhi(Value_ const &perp, boca::Angle const &eta, boca::Angle const &phi)
Set Perpendicular, Eta and Phi.
Definition: Vector3.hh:185
constexpr Value_ Perp(Vector3< Value_2_ > const &vector) const
The transverse component to a vector.
Definition: Vector3.hh:431
typename boost::units::multiply_typeof_helper< ValueSquare< Value >, Value >::type ValueCubed
Definition: Units.hh:149
Boost provides free peer-reviewed portable C++ source libraries.
Definition: LorentzVectorBase.hh:726
boca::Angle Phi() const
The azimuth angle restricted to .
Definition: Vector3.hh:270
typename std::enable_if< IsVector3< Value_ >::value >::type OnlyIfVector3
Definition: Vector3.hh:775
Vector3 & operator/=(Value_2_ scalar)
division by scalar
Definition: Vector3.hh:650
constexpr ConstIterator< boca::Vector3, Value_ > begin() const
Const begin.
Definition: Vector3.hh:727
void SetTheta(boca::Angle const &theta)
Set theta keeping mag and phi constant.
Definition: Vector3.hh:167
constexpr Vector3(TVector3 const &vector)
Constructor accepting a root::TVector3.
Definition: Vector3.hh:110
constexpr friend Vector3< ValueQuotient< Value_2_ > > operator/(Vector3 const &vector, Value_2_ const &scalar)
division by scalar
Definition: Vector3.hh:670
Vector2< Value_ > & Transversal()
Transversal vector .
Definition: Vector3.hh:256
boost::units::quantity< boost::units::si::plane_angle > Angle
Angle measured in radian.
Definition: Si.hh:35
boost::units::quantity< boost::units::si::plane_angle, Y >::type log(const boost::units::dimensionless_quantity< boost::units::si::system, Y > &number)
log returning Angle
Definition: Units.hh:86
void SetPerp(Value_ perp)
Set the transverse component keeping phi and z constant.
Definition: Vector3.hh:142
boca::ConstIterator< boca::Vector3, Value_ > type
Definition: Vector3.hh:809
constexpr Vector3< ValueProduct< Value_2_ > > Scale(Value_2_ const &scalar) const
Scale vector with a scalar.
Definition: Vector3.hh:553
constexpr bool operator<(Vector3 const &vector) const
Less than comparison.
Definition: Vector3.hh:594
constexpr auto Triple(Vector3< Value_1 > const &vector_1, Vector3< Value_2_ > const &vector_2, Vector3< Value_3 > const &vector_3)
Definition: Vector3.hh:798
void SetPhi(boca::Angle const &phi)
Set phi keeping the magnitue and theta constant.
Definition: Vector3.hh:150
Vector3(Value_ value, Dim3 dim_3)
Constructor accepting one scalar and its direction.
Definition: Vector3.hh:83
void SetPerpThetaPhi(Value_ perp, boca::Angle const &theta, boca::Angle const &phi)
Set Perpendicular, Theta and Phi.
Definition: Vector3.hh:175
std::string Stream(Value const &message, int width=20, bool right=false)
Definition: Debug.hh:48
Vector3 & operator*=(Value_2_ scalar)
Scaling with real numbers.
Definition: Vector3.hh:633
constexpr ValueSquare Mag2() const
The magnitude squared .
Definition: Vector3.hh:385
constexpr auto operator*(LorentzVectorBase< Value > const &lorentz_vector_1, LorentzVectorBase< Value_2 > const &lorentz_vector_2)
Scalar product of lorentzvectors.
Definition: LorentzVectorBase.hh:701
Vector3< double > Unit() const
Unit vector parallel to this.
Definition: Vector3.hh:517
constexpr Vector3< ValueProduct< Value_2_ > > Cross(Vector3< Value_2_ > const &vector) const
Cross product between two vector.
Definition: Vector3.hh:571
double CosTheta() const
Cosine of the polar angle .
Definition: Vector3.hh:287
typename boost::units::divide_typeof_helper< double, Value >::type ValueInverse
Definition: Units.hh:140
Vector3 & operator+=(Vector3< Value_2_ > const &vector)
Sum of two vectors.
Definition: Vector3.hh:611
boca::Angle Angle(Vector3 const &vector) const
The angle to vector.
Definition: Vector3.hh:341
constexpr friend Vector3< ValueProduct< Value_2_ > > operator^(Vector3 const &vector_1, Vector3< Value_2_ > const &vector_2)
Cross product.
Definition: Vector3.hh:661
constexpr bool operator==(Vector3 const &vector) const
Equality comparison.
Definition: Vector3.hh:602
constexpr Vector2< Value_ > Transversal() const
Transversal vector .
Definition: Vector3.hh:224
boca::Angle PseudoRapidity() const
Pseudorapidity .
Definition: Vector3.hh:360
boca::Angle DeltaRTo(Vector3< Value_2_ > const &vector) const
Difference to vector in .
Definition: Vector3.hh:333
constexpr Vector3(Vector2< Value_ > const &transversal, Value_ z)
Constructor accepting a two vector and a scalar.
Definition: Vector3.hh:93
typename boost::units::multiply_typeof_helper< Value, Value_2 >::type ValueProduct
Definition: Units.hh:134
Vector3 & Rotate(boca::Angle const &phi, Dim3 dim_1, Dim3 dim_2)
Rotate by phi in (dim_1, dim_2) plain.
Definition: Vector3.hh:445
boca::Angle DeltaPhiTo(Vector3< Value_2_ > const &vector) const
Difference to vector in azimuth restricted to .
Definition: Vector3.hh:315
void SetUniform(Value_ value)
Set x, y, z according to value.
Definition: Vector3.hh:124
constexpr ConstIterator< boca::Vector3, Value_ > end() const
Const end.
Definition: Vector3.hh:735
typename std::enable_if< !IsVector3< Value_ >::value >::type OnlyIfNotVector3
Definition: Vector3.hh:772
Vector3 & operator-=(Vector3< Value_2_ > const &vector)
Difference of two vectors.
Definition: Vector3.hh:622
void SetMag(Value_ magnitude)
Set the magnitude keeping theta and phi constant.
Definition: Vector3.hh:133
typename boost::units::multiply_typeof_helper< Value, Value >::type ValueSquare
Definition: Units.hh:143
Vector2< boca::Angle > EtaPhiVector() const
Angluar vector ( , )
Definition: Vector3.hh:538
Value_ & operator[](Dim3 dim_3)
Components by index.
Definition: Vector3.hh:701
boost::units::dimensionless_quantity< boost::units::si::system, Y >::type sinh(const boost::units::quantity< boost::units::si::plane_angle, Y > &theta)
sinh of theta in radians
Definition: Units.hh:68
Angle Restrict(Angle phi)
Restrict an angle to the interval .
Definition: Si.cpp:26
constexpr ValueProduct< Value_2_ > Dot(Vector3< Value_2_ > const &vector) const
Dot product between two vector.
Definition: Vector3.hh:562
constexpr ValueSquare Perp2(Vector3< Value_2_ > const &vector) const
The transverse component to a vector.
Definition: Vector3.hh:418
constexpr void RotateUz(Vector3< Value_2_ > const &vector)
Rotates reference frame from to .
Definition: Vector3.hh:490
double perp(fastjet::PseudoJet const &v_pj, fastjet::PseudoJet const &ref_pj)
Definition: FWM.cc:27
double SinTheta2() const
Square of the sine of the polar angle .
Definition: Vector3.hh:296
boca::Angle Eta() const
The azimuth angle restricted to .
Definition: Vector3.hh:369
typename boost::units::divide_typeof_helper< Value, Value_2 >::type ValueQuotient
Definition: Units.hh:137
Value_ const & operator[](Dim3 dim_3) const
Components by index.
Definition: Vector3.hh:686
Vector3 & Rotate(boca::Angle const &phi, Dim3 dim)
Rotate by phi around axis dim.
Definition: Vector3.hh:460
void SetMagThetaPhi(Value_ mag, boca::Angle const &theta, boca::Angle const &phi)
Set mag, theta, phi.
Definition: Vector3.hh:158
Vector3 Orthogonal() const
Vector orthogonal to this.
Definition: Vector3.hh:526
Definition: Vector3.hh:766
double Tan2(Vector3 const &vector)
Square of the tangent of the polar angle to a vector.
Definition: Vector3.hh:351