fastjet 2.4.5
Functions | Variables
fastjet::d0::inline_maths Namespace Reference

Functions

double sqr (double a)
double min (double a, double b)
double delta_phi (double phi1, double phi2)
double phi (double px, double py)
double y (double E, double pz)

Variables

const double PI = fabs(acos(-1.))
const double TWOPI = 2*PI

Function Documentation

double fastjet::d0::inline_maths::delta_phi ( double  phi1,
double  phi2 
) [inline]

Definition at line 31 of file inline_maths.h.

References min(), and PI.

Referenced by fastjet::d0::RD2(), and fastjet::d0::RDelta().

                                                  {
  return min( double(fabs(phi1-phi2)), double(2.*PI-fabs(phi1-phi2)) );
}
double fastjet::d0::inline_maths::min ( double  a,
double  b 
) [inline]
double fastjet::d0::inline_maths::phi ( double  px,
double  py 
) [inline]
double fastjet::d0::inline_maths::sqr ( double  a) [inline]

Definition at line 19 of file inline_maths.h.

Referenced by fastjet::d0::HepEntity::pT().

                            {
  return a*a;
}
double fastjet::d0::inline_maths::y ( double  E,
double  pz 
) [inline]

Definition at line 43 of file inline_maths.h.

Referenced by fastjet::ClusterSequence::_really_dumb_cluster(), fastjet::Coord2D::distance2(), fastjet::VoronoiDiagramGenerator::generateVoronoi(), fastjet::d0::ILConeAlgorithm< Item >makeClusters(), fastjet::Point::operator*(), fastjet::Coord2D::operator*(), fastjet::Point::operator+(), fastjet::Coord2D::operator+(), fastjet::ClosestPair2D::Shuffle::operator+=(), fastjet::Point::operator-(), fastjet::Coord2D::operator-(), fastjet::Coord2D::operator/(), fastjet::ClosestPair2D::Shuffle::operator<(), fastjet::d0::P2y(), fastjet::d0::ProtoJet< Item >::setJet(), and fastjet::d0::HepEntity::y().

                                     {
  errno=0;
  double y;
  //cout << "inline_maths: ";
  if (fabs(E-pz) == 0.) {
    //    cout << "Error in header mathe.h: division by 0 in function eta!" <<  " p=" << p << " pz=" << pz << endl;
    //  exit(721);
    errno=721;
    y = 99999.;
  }
  else {
    y = 0.5*log((E+pz)/(E-pz));
  }
  //cout << "y: E=" << E << " pz=" << pz << " y=" << y << endl;
  return y;
}

Variable Documentation

const double fastjet::d0::inline_maths::PI = fabs(acos(-1.))
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines