30 #ifndef __SPH_VECTOR_H__ 31 #define __SPH_VECTOR_H__ 35 #include <siscone/reference.h> 109 inline double phi()
const {
return atan2(
py,
px);}
167 CSphmomentum(
double _px,
double _py,
double _pz,
double _E);
176 inline double mass()
const {
return sqrt(mass2());}
230 inline double sqr(
double x){
return x*x;}
271 return norm2_cross_product3(v1,v2)/sqr(dot_product3(v1,v2));
278 return atan2(sqrt(norm2_cross_product3(*v1,*v2)), dot_product3(*v1,*v2));
290 double dot = dot_product3(*v1,*v2);
291 return (dot>=0) && (norm2_cross_product3(*v1,*v2)<=tan2R*dot*dot);
300 return dot_product3(*v1,*v2)>=cosR*sqrt(v1->
norm2()*v2->
norm2());
CSph3vector & operator=(const CSph3vector &v)
assignment of vectors
CSph3vector & operator+=(const CSph3vector &v)
incrementation of vectors WARNING= norm is not updated
double theta() const
3-vect polar angle
const CSph3vector operator+(const CSph3vector &v)
addition of vectors WARNING= norm is not updated
double _norm
particle spatial norm (available ONLY after a call to build_norm)
const CSph3vector operator-(const CSph3vector &v)
subtraction of vectors WARNING= norm is not updated
double perpmass() const
transverse mass, mt = sqrt(pt^2+m^2) = sqrt(E^2 - pz^2)
double _phi
particle phi angle (available ONLY after a call to build_thetaphi)
CSph3vector & operator/=(const double &r)
division by a constant WARNING= norm is not updated
double perp() const
computes pT
double mass() const
computes m
siscone::Creference ref
reference number for the vector
CSph3vector & operator-=(const CSph3vector &v)
decrementation of vectors WARNING= norm is not updated
void build_thetaphi()
just a useful tool to store theta and phi locally (in _theta and _phi) in case you need repeated acce...
~CSph3vector()
default dtor
CSph3vector & operator*=(const double &r)
multiplication by a constant WARNING= norm is not updated
void get_angular_directions(CSph3vector &angular_dir1, CSph3vector &angular_dir2)
for this direction, compute the two reference directions used to measure angles
double mass2() const
computes m^2
int parent_index
particle number in the parent list
double norm2() const
3-vect norm squared
double Et() const
computes transverse energy
double _theta
particle theta angle (available ONLY after a call to build_thetaphi)
double norm() const
3-vect norm
double perp2() const
computes pT^2
const CSph3vector operator/(const double &r)
division by a constant WARNING= norm is not updated
int index
internal particle number
void build_norm()
build the spatial normfrom 4-momentum info !!! WARNING !!! !!! computing the norm is the only time-co...
double perpmass2() const
transverse mass squared, mt^2 = pt^2+m^2 = E^2 - pz^2
double Et2() const
computes transverse energy (squared)
base class for dynamic coordinates management
base class for managing the spatial part of Cmomentum (defined after)
CSph3vector()
default ctor
references used for checksums.
double phi() const
3-vect azimuthal angle