Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:23:25

0001 #!/usr/bin/env python
0002 
0003 from __future__ import print_function
0004 import sys
0005 from math import degrees, pi
0006 
0007 def main():
0008   if len(sys.argv) < 2:
0009     print("Usage: %s radian" % sys.argv[0])
0010     return
0011 
0012   rad = eval(sys.argv[1])
0013   if rad <= 0.:
0014     rad += 2*pi
0015   deg = degrees(rad)
0016   print("rad: {0} deg: {1}".format(rad, deg))
0017   
0018   sector = int((deg - 15)/60.) + 1
0019   print("{0:d}".format(sector))
0020   return
0021 
0022 
0023 # ______________________________________________________________________________
0024 if __name__ == '__main__':
0025 
0026   main()