Fork me on GitHub

Changeset 244 in svn for trunk/src


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

from PI to pi

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.