Fork me on GitHub

Changeset 244 in svn


Ignore:
Timestamp:
Feb 5, 2009, 11:56:10 AM (16 years ago)
Author:
Xavier Rouby
Message:

from PI to pi

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Utilities/Fastjet/plugins/CDFCones/interface/CalTower.hh

    r100 r244  
    88#include <cmath>
    99#include <iostream>
    10 
    11 #ifndef M_PI
    12 #define M_PI  3.141592653589793238462643383279502884197
    13 #endif
    14 
    15 const double pi = acos(-1);
    16 
    1710
    1811/* // CDF data : 22 towers. step=2.7° at the beginning, and after, it changes
     
    4841    10,10,10,10,10, 10,10,10,10,10, 10,10,10,10,10, 10,10,10,20, 20 };
    4942
     43
     44#ifndef __PI__
     45#define __PI__
     46const float pi = 3.14159265358979312;
     47#endif
    5048
    5149class CalTower
  • trunk/interface/SmearUtil.h

    r240 r244  
    4747};
    4848
     49#ifndef __PI__
     50#define __PI__
    4951extern const float pi = 3.14159265358979312;
     52#endif
    5053
    5154class RESOLution
     
    194197  void BinEtaPhi(const float phi, const float eta, float& iPhi, float& iEta);
    195198
    196   static const float pi = 3.14159265358979312;
    197199};
    198200
  • trunk/src/SmearUtil.cc

    r219 r244  
    979979   if(index==-100) return;
    980980   iPhi = -100;
    981    float dphi = TOWER_dphi[index]*PI/180.;
     981   float dphi = TOWER_dphi[index]*pi/180.;
    982982   for (unsigned int i=1; i < 360/TOWER_dphi[index]; i++ ) {
    983         float low = -PI+(i-1)*dphi;
     983        float low = -pi+(i-1)*dphi;
    984984        float high= low+dphi;
    985985        if(phi > low && phi < high ){
     
    988988        }
    989989   }
    990    if (phi > PI-dphi) iPhi = PI-dphi;
     990   if (phi > pi-dphi) iPhi = pi-dphi;
    991991}
    992992
    993993//**************************** Returns the delta Phi ****************************
    994994float DeltaPhi(const float phi1, const float phi2) {
    995   float deltaphi=phi1-phi2; // in here, -PI < phi < PI
    996   if(fabs(deltaphi) > PI) {
    997         deltaphi=2.*PI -fabs(deltaphi);// put deltaphi between 0 and PI
     995  float deltaphi=phi1-phi2; // in here, -pi < phi < pi
     996  if(fabs(deltaphi) > pi) {
     997        deltaphi=2.*pi -fabs(deltaphi);// put deltaphi between 0 and pi
    998998        }
    999999  else deltaphi=fabs(deltaphi);
Note: See TracChangeset for help on using the changeset viewer.