1#ifndef  D0RunIconeJets_HepEntityPre96_class 
    2#define  D0RunIconeJets_HepEntityPre96_class 
    4#include "inline_maths.h" 
    6#include <fastjet/internal/base.hh> 
   37class HepEntityIpre96 : 
public HepEntityI {
 
   56 HepEntityIpre96(
double E_in, 
double px_in, 
double py_in, 
double pz_in,
 
   57                 int index_in = -1) : index(index_in) {
 
   59    double pt = sqrt(px_in*px_in+py_in*py_in);
 
   60    double p = sqrt(pt*pt+pz_in*pz_in);
 
   61    phi = inline_maths::phi(px_in,py_in);
 
   62    double theta = asin(pt/p);
 
   63    eta = inline_maths::eta(theta);
 
   70    Ex = Et*cos(phi_pre96);
 
   71    Ey = Et*sin(phi_pre96);
 
   72    Ez = Et*sinh(eta_pre96);
 
   78  inline double px()
 const {
 
   79    return Et*cos(phi_pre96);
 
   82  inline double py()
 const {
 
   83    return Et*sin(phi_pre96);
 
   86  inline double pz()
 const {
 
   87    return Et*sinh(eta_pre96);
 
   90  inline double E()
 const {
 
   91    return Et*cosh(eta_pre96);
 
   95  inline void Add(
const HepEntityIpre96 el) {
 
  101    eta += w2*(el.eta - eta);
 
  102    phi += w2*inline_maths::delta_phi(el.phi, phi); 
 
  108    phi_pre96 = atan2(Ey, Ex);
 
  109    double theta_pre96 = atan2(sqrt(Ex*Ex+Ey*Ey),Ez);
 
  110    eta_pre96 = -log(tan(theta_pre96/2.));
 
  116  inline void Fill(
double E_in, 
double px_in, 
double py_in, 
double pz_in, 
int index_in) {
 
  117    double pt = sqrt(px_in*px_in+py_in*py_in);
 
  118    double p = sqrt(pt*pt+pz_in*pz_in);
 
  119    phi = inline_maths::phi(px_in,py_in);
 
  120    double theta = asin(pt/p);
 
  121    eta = inline_maths::eta(theta);
 
  123    Et = E_in*sin(theta);
 
  129    Ex = Et*cos(phi_pre96);
 
  130    Ey = Et*sin(phi_pre96);
 
  131    Ez = Et*sinh(eta_pre96);
 
double theta(const PseudoJet &a, const PseudoJet &b)
returns the angle between a and b