gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
a Global And Modular Bsm Inference Tool
generate_raster_scan_settings.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 #
3 # GAMBIT: Global and Modular BSM Inference Tool
4 #*********************************************
5 # \file
6 #
7 # Simple script for generating parameter value
8 # lists for the 'raster' scanner, when used
9 # to perform "SLHA scans" of simplified models
10 # with ColliderBit.
11 #
12 #*********************************************
13 #
14 # Authors (add name and date if you modify):
15 #
16 # \author Anders Kvellestad
17 # (a.kvellestad@imperial.ac.uk)
18 # \date 2019 Jul
19 #
20 #*********************************************
21 
22 #
23 # Example:
24 #
25 # m1 : mass of neutralino1
26 # m2 : mass of chargino1 = mass of neutralino2
27 # xsec_fb: NLO+NLL cross-section [fb] for wino-like chi1pm + chi10 production at 13 TeV.
28 # xsec_uncert_fb: absolute cross-section uncertainty [fb]
29 #
30 # Cross-section values and uncertainties are taken from
31 # https://twiki.cern.ch/twiki/bin/view/LHCPhysics/SUSYCrossSections13TeVn2x1wino#Envelope_of_CTEQ6_6_and_MSTW2008
32 #
33 
34 from __future__ import print_function
35 
36 m2_data = [100, 125, 150, 175, 200, 225, 250, 275, 300, 325, 350, 375, 400, 425, 450, 475, 500, 525, 550, 575, 600, 625, 650, 675, 700, 725, 750, 775, 800, 825, 850, 875, 900, 925, 950, 975, 1000]
37 xsec_fb_data = [22670.1, 10034.8, 5180.86, 2953.28, 1807.39, 1165.09, 782.487, 543.03, 386.936, 281.911, 209.439, 158.06, 121.013, 93.771, 73.4361, 58.0811, 46.3533, 37.2636, 30.1656, 24.5798, 20.1372, 16.5706, 13.7303, 11.3975, 9.51032, 7.9595, 6.69356, 5.63562, 4.75843, 4.02646, 3.42026, 2.90547, 2.49667, 2.12907, 1.8164, 1.56893, 1.34352]
38 xsec_uncert_fb_data = [973.967, 457.604, 253.223, 154.386, 101.316, 68.8042, 48.7463, 35.4083, 26.3602, 20.0201, 15.4539, 12.0956, 9.61659, 7.73547, 6.2389, 5.05005, 4.16461, 3.46763, 2.88065, 2.40183, 2.04438, 1.70195, 1.43519, 1.21937, 1.04092, 0.885243, 0.769988, 0.654544, 0.564061, 0.478362, 0.412315, 0.366257, 0.314019, 0.26801, 0.242682, 0.217618, 0.175604]
39 
40 assert len(m2_data) == len(xsec_fb_data)
41 assert len(m2_data) == len(xsec_uncert_fb_data)
42 
43 
44 # Pick out every n-th point, and no more than N different m2 values
45 n = 2
46 N = 8
47 m2 = m2_data[::n][:N]
48 xsec_fb = xsec_fb_data[::n][:N]
49 xsec_uncert_fb = xsec_uncert_fb_data[::n][:N]
50 
51 # Steps in m1 for every m2
52 m1_min = 25.
53 m1_step = 50.
54 
55 # Generate lists
56 m1_raster = []
57 m2_raster = []
58 xsec_fb_raster = []
59 xsec_uncert_fb_raster = []
60 # xsec_fractional_uncert_raster = []
61 
62 for i in range(len(m2)):
63 
64  m1 = m1_min
65  while (m1 < m2[i]):
66  m1_raster.append(m1)
67  m2_raster.append(m2[i])
68  xsec_fb_raster.append(xsec_fb[i])
69  xsec_uncert_fb_raster.append(xsec_uncert_fb[i])
70  # xsec_fractional_uncert_raster.append(xsec_uncert_fb[i] / xsec_fb[i])
71  m1 += m1_step
72 
73 
74 # Format parameter lists for output
75 model_name= "ColliderBit_SLHA_scan_model"
76 
77 m1_str = "\"" + model_name + "::m1\"" + ": ["
78 for x in m1_raster:
79  m1_str += "%.1f, " % x
80 m1_str = m1_str[:-2] + "]"
81 
82 m2_str = "\"" + model_name + "::m2\"" + ": ["
83 for x in m2_raster:
84  m2_str += "%.1f, " % x
85 m2_str = m2_str[:-2] + "]"
86 
87 xsec_fb_str = "\"" + model_name + "::xsec_fb\"" + ": ["
88 for x in xsec_fb_raster:
89  xsec_fb_str += "%.1f, " % x
90 xsec_fb_str = xsec_fb_str[:-2] + "]"
91 
92 xsec_uncert_fb_str = "\"" + model_name + "::xsec_uncert_fb\"" + ": ["
93 for x in xsec_uncert_fb_raster:
94  xsec_uncert_fb_str += "%.2f, " % x
95 xsec_uncert_fb_str = xsec_uncert_fb_str[:-2] + "]"
96 
97 # xsec_fractional_uncert_str = "\"" + model_name + "::p4\"" + ": ["
98 # for x in xsec_fractional_uncert_raster:
99 # xsec_fractional_uncert_str += "%.2f, " % x
100 # xsec_fractional_uncert_str = xsec_fractional_uncert_str[:-2] + "]"
101 
102 
103 # Print output
104 output = """
105 
106 Scanner:
107 
108  use_scanner: raster
109 
110  scanners:
111 
112  raster:
113  plugin: raster
114  like: LogLike
115  parameters:
116  {}
117  {}
118  {}
119  {}
120 
121 """.format(m1_str, m2_str, xsec_fb_str, xsec_uncert_fb_str)
122 # """.format(m1_str, m2_str, xsec_fb_str, xsec_fractional_uncert_str)
123 
124 print(output)
125 
void print(MixMatrix A)
Helper function to print a matrix.