- Timestamp:
- Feb 5, 2009, 11:56:10 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SmearUtil.cc
r219 r244 979 979 if(index==-100) return; 980 980 iPhi = -100; 981 float dphi = TOWER_dphi[index]* PI/180.;981 float dphi = TOWER_dphi[index]*pi/180.; 982 982 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; 984 984 float high= low+dphi; 985 985 if(phi > low && phi < high ){ … … 988 988 } 989 989 } 990 if (phi > PI-dphi) iPhi = PI-dphi;990 if (phi > pi-dphi) iPhi = pi-dphi; 991 991 } 992 992 993 993 //**************************** Returns the delta Phi **************************** 994 994 float DeltaPhi(const float phi1, const float phi2) { 995 float deltaphi=phi1-phi2; // in here, - PI < phi < PI996 if(fabs(deltaphi) > PI) {997 deltaphi=2.* PI -fabs(deltaphi);// put deltaphi between 0 and PI995 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 998 998 } 999 999 else deltaphi=fabs(deltaphi);
Note:
See TracChangeset
for help on using the changeset viewer.