Changeset 244 in svn
- Timestamp:
- Feb 5, 2009, 11:56:10 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Utilities/Fastjet/plugins/CDFCones/interface/CalTower.hh
r100 r244 8 8 #include <cmath> 9 9 #include <iostream> 10 11 #ifndef M_PI12 #define M_PI 3.14159265358979323846264338327950288419713 #endif14 15 const double pi = acos(-1);16 17 10 18 11 /* // CDF data : 22 towers. step=2.7° at the beginning, and after, it changes … … 48 41 10,10,10,10,10, 10,10,10,10,10, 10,10,10,10,10, 10,10,10,20, 20 }; 49 42 43 44 #ifndef __PI__ 45 #define __PI__ 46 const float pi = 3.14159265358979312; 47 #endif 50 48 51 49 class CalTower -
trunk/interface/SmearUtil.h
r240 r244 47 47 }; 48 48 49 #ifndef __PI__ 50 #define __PI__ 49 51 extern const float pi = 3.14159265358979312; 52 #endif 50 53 51 54 class RESOLution … … 194 197 void BinEtaPhi(const float phi, const float eta, float& iPhi, float& iEta); 195 198 196 static const float pi = 3.14159265358979312;197 199 }; 198 200 -
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.