#!/usr/bin/env python
import os, sys, re
import glob
import string
from array import array 
from pprint import pprint
import ROOT

def signalCrossSection( glu_mass):
    if (glu_mass == 600): xsec = 9.20353
    elif (glu_mass == 605): xsec = 8.74315
    elif (glu_mass == 610): xsec = 8.30988
    elif (glu_mass == 615): xsec = 7.9012 
    elif (glu_mass == 620): xsec = 7.51811
    elif (glu_mass == 625): xsec = 7.15194
    elif (glu_mass == 630): xsec = 6.80558
    elif (glu_mass == 635): xsec = 6.47541
    elif (glu_mass == 640): xsec = 6.17196
    elif (glu_mass == 645): xsec = 5.87366
    elif (glu_mass == 650): xsec = 5.60048
    elif (glu_mass == 655): xsec = 5.33799
    elif (glu_mass == 660): xsec = 5.09822
    elif (glu_mass == 665): xsec = 4.86409
    elif (glu_mass == 670): xsec = 4.64349
    elif (glu_mass == 675): xsec = 4.43132
    elif (glu_mass == 680): xsec = 4.23046
    elif (glu_mass == 685): xsec = 4.03841
    elif (glu_mass == 690): xsec = 3.85666
    elif (glu_mass == 695): xsec = 3.68567
    elif (glu_mass == 700): xsec = 3.5251 
    elif (glu_mass == 705): xsec = 3.3737 
    elif (glu_mass == 710): xsec = 3.22336
    elif (glu_mass == 715): xsec = 3.0811 
    elif (glu_mass == 720): xsec = 2.9509 
    elif (glu_mass == 725): xsec = 2.81957
    elif (glu_mass == 730): xsec = 2.7 
    elif (glu_mass == 735): xsec = 2.57737
    elif (glu_mass == 740): xsec = 2.47729
    elif (glu_mass == 745): xsec = 2.3661 
    elif (glu_mass == 750): xsec = 2.26585
    elif (glu_mass == 755): xsec = 2.17436
    elif (glu_mass == 760): xsec = 2.08446
    elif (glu_mass == 765): xsec = 1.99341
    elif (glu_mass == 770): xsec = 1.91352
    elif (glu_mass == 775): xsec = 1.83188
    elif (glu_mass == 780): xsec = 1.76145
    elif (glu_mass == 785): xsec = 1.68078
    elif (glu_mass == 790): xsec = 1.62071
    elif (glu_mass == 795): xsec = 1.54896
    elif (glu_mass == 800): xsec = 1.4891 
    elif (glu_mass == 805): xsec = 1.42888
    elif (glu_mass == 810): xsec = 1.36759
    elif (glu_mass == 815): xsec = 1.31749
    elif (glu_mass == 820): xsec = 1.26659
    elif (glu_mass == 825): xsec = 1.2167 
    elif (glu_mass == 830): xsec = 1.16617
    elif (glu_mass == 835): xsec = 1.12555
    elif (glu_mass == 840): xsec = 1.07523
    elif (glu_mass == 845): xsec = 1.03426
    elif (glu_mass == 850): xsec = 0.996137 
    elif (glu_mass == 855): xsec = 0.957975 
    elif (glu_mass == 860): xsec = 0.921447 
    elif (glu_mass == 865): xsec = 0.885917 
    elif (glu_mass == 870): xsec = 0.852433 
    elif (glu_mass == 875): xsec = 0.820259 
    elif (glu_mass == 880): xsec = 0.788789 
    elif (glu_mass == 885): xsec = 0.759346 
    elif (glu_mass == 890): xsec = 0.731213 
    elif (glu_mass == 895): xsec = 0.703532 
    elif (glu_mass == 900): xsec = 0.677478 
    elif (glu_mass == 905): xsec = 0.652317
    elif (glu_mass == 910): xsec = 0.627695 
    elif (glu_mass == 915): xsec = 0.605596 
    elif (glu_mass == 920): xsec = 0.58302
    elif (glu_mass == 925): xsec = 0.561889 
    elif (glu_mass == 930): xsec = 0.540533 
    elif (glu_mass == 935): xsec = 0.521159 
    elif (glu_mass == 940): xsec = 0.501865
    elif (glu_mass == 945): xsec = 0.483546 
    elif (glu_mass == 950): xsec = 0.466352 
    elif (glu_mass == 955): xsec = 0.45012
    elif (glu_mass == 960): xsec = 0.433842 
    elif (glu_mass == 965): xsec = 0.418744 
    elif (glu_mass == 970): xsec = 0.403514 
    elif (glu_mass == 975): xsec = 0.389266 
    elif (glu_mass == 980): xsec = 0.375053 
    elif (glu_mass == 985): xsec = 0.36182
    elif (glu_mass == 990): xsec = 0.349764 
    elif (glu_mass == 995): xsec = 0.337454 
    elif (glu_mass == 1000): xsec = 0.325388
    elif (glu_mass == 1005): xsec = 0.314329 
    elif (glu_mass == 1010): xsec = 0.30314
    elif (glu_mass == 1015): xsec = 0.292987 
    elif (glu_mass == 1020): xsec = 0.282927 
    elif (glu_mass == 1025): xsec = 0.272778 
    elif (glu_mass == 1030): xsec = 0.263724 
    elif (glu_mass == 1035): xsec = 0.254721 
    elif (glu_mass == 1040): xsec = 0.245426 
    elif (glu_mass == 1045): xsec = 0.237403 
    elif (glu_mass == 1050): xsec = 0.229367 
    elif (glu_mass == 1055): xsec = 0.221273 
    elif (glu_mass == 1060): xsec = 0.214167 
    elif (glu_mass == 1065): xsec = 0.207025 
    elif (glu_mass == 1070): xsec = 0.199967 
    elif (glu_mass == 1075): xsec = 0.193881 
    elif (glu_mass == 1080): xsec = 0.186836 
    elif (glu_mass == 1085): xsec = 0.180783 
    elif (glu_mass == 1090): xsec = 0.174652 
    elif (glu_mass == 1095): xsec = 0.168526 
    elif (glu_mass == 1100): xsec = 0.163491 
    elif (glu_mass == 1105): xsec = 0.158451 
    elif (glu_mass == 1110): xsec = 0.153298 
    elif (glu_mass == 1115): xsec = 0.148246 
    elif (glu_mass == 1120): xsec = 0.143169
    elif (glu_mass == 1125): xsec = 0.139009 
    elif (glu_mass == 1130): xsec = 0.133972 
    elif (glu_mass == 1135): xsec = 0.129938
    elif (glu_mass == 1140): xsec = 0.125799 
    elif (glu_mass == 1145): xsec = 0.121755 
    elif (glu_mass == 1150): xsec = 0.117687 
    elif (glu_mass == 1155): xsec = 0.11358
    elif (glu_mass == 1160): xsec = 0.110557 
    elif (glu_mass == 1165): xsec = 0.107532 
    elif (glu_mass == 1170): xsec = 0.10339
    elif (glu_mass == 1175): xsec = 0.10036
    elif (glu_mass == 1180): xsec = 0.0971485 
    elif (glu_mass == 1185): xsec = 0.0942072 
    elif (glu_mass == 1190): xsec = 0.0912756 
    elif (glu_mass == 1195): xsec = 0.0883712 
    elif (glu_mass == 1200): xsec = 0.0856418 
    elif (glu_mass == 1205): xsec = 0.0830236 
    elif (glu_mass == 1210): xsec = 0.0804313 
    elif (glu_mass == 1215): xsec = 0.0779039 
    elif (glu_mass == 1220): xsec = 0.0755801 
    elif (glu_mass == 1225): xsec = 0.0732255 
    elif (glu_mass == 1230): xsec = 0.0709683 
    elif (glu_mass == 1235): xsec = 0.0688462 
    elif (glu_mass == 1240): xsec = 0.0666928 
    elif (glu_mass == 1245): xsec = 0.0646423 
    elif (glu_mass == 1250): xsec = 0.0627027 
    elif (glu_mass == 1255): xsec = 0.0607803 
    elif (glu_mass == 1260): xsec = 0.0589319 
    elif (glu_mass == 1265): xsec = 0.0571859 
    elif (glu_mass == 1270): xsec = 0.0554225 
    elif (glu_mass == 1275): xsec = 0.0536906 
    elif (glu_mass == 1280): xsec = 0.052051
    elif (glu_mass == 1285): xsec = 0.0504982 
    elif (glu_mass == 1290): xsec = 0.0489404 
    elif (glu_mass == 1295): xsec = 0.047474
    elif (glu_mass == 1300): xsec = 0.0460525
    elif (glu_mass == 1305): xsec = 0.0447038 
    elif (glu_mass == 1310): xsec = 0.0433373 
    elif (glu_mass == 1315): xsec = 0.0420362 
    elif (glu_mass == 1320): xsec = 0.0407723 
    elif (glu_mass == 1325): xsec = 0.0395728
    elif (glu_mass == 1330): xsec = 0.0383587
    elif (glu_mass == 1335): xsec = 0.0372043 
    elif (glu_mass == 1340): xsec = 0.0361694 
    elif (glu_mass == 1345): xsec = 0.0350586 
    elif (glu_mass == 1350): xsec = 0.0340187 
    elif (glu_mass == 1355): xsec = 0.0330251 
    elif (glu_mass == 1360): xsec = 0.0320787 
    elif (glu_mass == 1365): xsec = 0.0311325 
    elif (glu_mass == 1370): xsec = 0.0302294 
    elif (glu_mass == 1375): xsec = 0.0292919 
    elif (glu_mass == 1380): xsec = 0.0284627 
    elif (glu_mass == 1385): xsec = 0.0276679 
    elif (glu_mass == 1390): xsec = 0.0268339 
    elif (glu_mass == 1395): xsec = 0.0260313 
    elif (glu_mass == 1400): xsec = 0.0252977 
    elif (glu_mass == 1405): xsec = 0.0245679 
    elif (glu_mass == 1410): xsec = 0.0238741 
    elif (glu_mass == 1415): xsec = 0.0231433 
    elif (glu_mass == 1420): xsec = 0.0225194 
    elif (glu_mass == 1425): xsec = 0.0218959 
    elif (glu_mass == 1430): xsec = 0.0211928
    elif (glu_mass == 1435): xsec = 0.0206244 
    elif (glu_mass == 1440): xsec = 0.0200458 
    elif (glu_mass == 1445): xsec = 0.0194648 
    elif (glu_mass == 1450): xsec = 0.0188887 
    elif (glu_mass == 1455): xsec = 0.018364
    elif (glu_mass == 1460): xsec = 0.0178858 
    elif (glu_mass == 1465): xsec = 0.0173622 
    elif (glu_mass == 1470): xsec = 0.0168403 
    elif (glu_mass == 1475): xsec = 0.0163556 
    elif (glu_mass == 1480): xsec = 0.0159386 
    elif (glu_mass == 1485): xsec = 0.0154568 
    elif (glu_mass == 1490): xsec = 0.0150345 
    elif (glu_mass == 1495): xsec = 0.0146102 
    elif (glu_mass == 1500): xsec = 0.0141903 
    elif (glu_mass == 1505): xsec = 0.01377 
    elif (glu_mass == 1510): xsec = 0.0133923 
    elif (glu_mass == 1515): xsec = 0.0130286 
    elif (glu_mass == 1520): xsec = 0.012649
    elif (glu_mass == 1525): xsec = 0.0123374 
    elif (glu_mass == 1530): xsec = 0.0119628 
    elif (glu_mass == 1535): xsec = 0.0116378 
    elif (glu_mass == 1540): xsec = 0.0113183 
    elif (glu_mass == 1545): xsec = 0.0110039
    elif (glu_mass == 1550): xsec = 0.0107027 
    elif (glu_mass == 1555): xsec = 0.0103967
    elif (glu_mass == 1560): xsec = 0.0101149 
    elif (glu_mass == 1565): xsec = 0.00984079 
    elif (glu_mass == 1570): xsec = 0.00956216 
    elif (glu_mass == 1575): xsec = 0.00930893 
    elif (glu_mass == 1580): xsec = 0.00905112 
    elif (glu_mass == 1585): xsec = 0.00880102
    elif (glu_mass == 1590): xsec = 0.00856388 
    elif (glu_mass == 1595): xsec = 0.00832287 
    elif (glu_mass == 1600): xsec = 0.00810078 
    elif (glu_mass == 1605): xsec = 0.0078785
    elif (glu_mass == 1610): xsec = 0.00767087 
    elif (glu_mass == 1615): xsec = 0.00745579 
    elif (glu_mass == 1620): xsec = 0.00725443
    elif (glu_mass == 1625): xsec = 0.00705942 
    elif (glu_mass == 1630): xsec = 0.00687457
    elif (glu_mass == 1635): xsec = 0.00668418 
    elif (glu_mass == 1640): xsec = 0.00651001 
    elif (glu_mass == 1645): xsec = 0.00633268 
    elif (glu_mass == 1650): xsec = 0.00616072
    elif (glu_mass == 1655): xsec = 0.00599673 
    elif (glu_mass == 1660): xsec = 0.00583243 
    elif (glu_mass == 1665): xsec = 0.00567868 
    elif (glu_mass == 1670): xsec = 0.00553066 
    elif (glu_mass == 1675): xsec = 0.00538094 
    elif (glu_mass == 1680): xsec = 0.00523764 
    elif (glu_mass == 1685): xsec = 0.00509647 
    elif (glu_mass == 1690): xsec = 0.0049577
    elif (glu_mass == 1695): xsec = 0.00483094 
    elif (glu_mass == 1700): xsec = 0.00470323 
    elif (glu_mass == 1705): xsec = 0.0045807
    elif (glu_mass == 1710): xsec = 0.00445824 
    elif (glu_mass == 1715): xsec = 0.0043369
    elif (glu_mass == 1720): xsec = 0.00422488 
    elif (glu_mass == 1725): xsec = 0.00411276
    elif (glu_mass == 1730): xsec = 0.00400698 
    elif (glu_mass == 1735): xsec = 0.00389655 
    elif (glu_mass == 1740): xsec = 0.00379497 
    elif (glu_mass == 1745): xsec = 0.00370003
    elif (glu_mass == 1750): xsec = 0.00359842 
    elif (glu_mass == 1755): xsec = 0.00350486
    elif (glu_mass == 1760): xsec = 0.00341375 
    elif (glu_mass == 1765): xsec = 0.00332255
    elif (glu_mass == 1770): xsec = 0.00323809 
    elif (glu_mass == 1775): xsec = 0.00314866 
    elif (glu_mass == 1780): xsec = 0.00306841 
    elif (glu_mass == 1785): xsec = 0.00298808 
    elif (glu_mass == 1790): xsec = 0.00291365 
    elif (glu_mass == 1795): xsec = 0.0028312
    elif (glu_mass == 1800): xsec = 0.00276133
    elif (glu_mass == 1805): xsec = 0.00269156 
    elif (glu_mass == 1810): xsec = 0.00262156 
    elif (glu_mass == 1815): xsec = 0.00254938 
    elif (glu_mass == 1820): xsec = 0.00248581 
    elif (glu_mass == 1825): xsec = 0.00241549 
    elif (glu_mass == 1830): xsec = 0.00235625 
    elif (glu_mass == 1835): xsec = 0.00229576
    elif (glu_mass == 1840): xsec = 0.00223603 
    elif (glu_mass == 1845): xsec = 0.00218302 
    elif (glu_mass == 1850): xsec = 0.00212345 
    elif (glu_mass == 1855): xsec = 0.00207 
    elif (glu_mass == 1860): xsec = 0.00200972 
    elif (glu_mass == 1865): xsec = 0.00196025 
    elif (glu_mass == 1870): xsec = 0.00191132 
    elif (glu_mass == 1875): xsec = 0.00185789 
    elif (glu_mass == 1880): xsec = 0.00181527
    elif (glu_mass == 1885): xsec = 0.00176658 
    elif (glu_mass == 1890): xsec = 0.00172274 
    elif (glu_mass == 1895): xsec = 0.00167806 
    elif (glu_mass == 1900): xsec = 0.00163547 
    elif (glu_mass == 1905): xsec = 0.0015925
    elif (glu_mass == 1910): xsec = 0.00155445 
    elif (glu_mass == 1915): xsec = 0.00151503 
    elif (glu_mass == 1920): xsec = 0.00147199 
    elif (glu_mass == 1925): xsec = 0.0014401
    elif (glu_mass == 1930): xsec = 0.0014016
    elif (glu_mass == 1935): xsec = 0.00136297 
    elif (glu_mass == 1940): xsec = 0.001331 
    elif (glu_mass == 1945): xsec = 0.001299 
    elif (glu_mass == 1950): xsec = 0.0012642
    elif (glu_mass == 1955): xsec = 0.00123087 
    elif (glu_mass == 1960): xsec = 0.00120048 
    elif (glu_mass == 1965): xsec = 0.00117053 
    elif (glu_mass == 1970): xsec = 0.00114051 
    elif (glu_mass == 1975): xsec = 0.00111722 
    elif (glu_mass == 1980): xsec = 0.00108758 
    elif (glu_mass == 1985): xsec = 0.00105813 
    elif (glu_mass == 1990): xsec = 0.00102936 
    elif (glu_mass == 1995): xsec = 0.00100614 
    elif (glu_mass == 2000): xsec = 0.000981077
    else: xsec = 0.
    return xsec

  
