3
3
4
4
class LoadVesuvioBackParameters :
5
5
def __init__ (self , ipFilesPath ):
6
- self .ipfile = ipFilesPath / "ip2019.par"
6
+ self .ipfile = ipFilesPath / "ip2019.par"
7
7
8
- runs = "43066-43076" # 77K # The numbers of the runs to be analysed
9
- empty_runs = "41876-41923" # 77K # The numbers of the empty runs to be subtracted
10
- mode = 'DoubleDifference'
8
+ runs = "43066-43076" # 77K # The numbers of the runs to be analysed
9
+ empty_runs = (
10
+ "41876-41923" # 77K # The numbers of the empty runs to be subtracted
11
+ )
12
+ mode = "DoubleDifference"
11
13
12
- subEmptyFromRaw = True # Flag to control wether empty ws gets subtracted from raw
13
- scaleEmpty = 1 # None or scaling factor
14
+ subEmptyFromRaw = True # Flag to control wether empty ws gets subtracted from raw
15
+ scaleEmpty = 1 # None or scaling factor
14
16
scaleRaw = 1
15
17
16
18
17
19
class LoadVesuvioFrontParameters :
18
20
def __init__ (self , ipFilesPath ):
19
- self .ipfile = ipFilesPath / "ip2018_3.par"
21
+ self .ipfile = ipFilesPath / "ip2018_3.par"
20
22
21
- runs = '43066-43076' # 100K # The numbers of the runs to be analysed
22
- empty_runs = '43868-43911' # 100K # The numbers of the empty runs to be subtracted
23
- mode = 'SingleDifference'
23
+ runs = "43066-43076" # 100K # The numbers of the runs to be analysed
24
+ empty_runs = (
25
+ "43868-43911" # 100K # The numbers of the empty runs to be subtracted
26
+ )
27
+ mode = "SingleDifference"
24
28
25
- subEmptyFromRaw = False # Flag to control wether empty ws gets subtracted from raw
26
- scaleEmpty = 1 # None or scaling factor
29
+ subEmptyFromRaw = False # Flag to control wether empty ws gets subtracted from raw
30
+ scaleEmpty = 1 # None or scaling factor
27
31
scaleRaw = 1
28
32
29
33
30
34
class GeneralInitialConditions :
31
35
"""Used to define initial conditions shared by both Back and Forward scattering"""
36
+
32
37
# Sample slab parameters
33
38
vertical_width , horizontal_width , thickness = 0.1 , 0.1 , 0.001 # Expressed in meters
34
39
35
40
36
41
class BackwardInitialConditions (GeneralInitialConditions ):
37
42
def __init__ (self , ipFilesPath ):
38
- self .InstrParsPath = ipFilesPath / "ip2018_3.par"
43
+ self .InstrParsPath = ipFilesPath / "ip2018_3.par"
39
44
40
45
HToMassIdxRatio = 19.0620008206 # Set to zero or None when H is not present
41
46
massIdx = 0
@@ -45,21 +50,25 @@ def __init__(self, ipFilesPath):
45
50
# noOfMasses = len(masses)
46
51
47
52
# Intensities, NCP widths, NCP centers
48
- initPars = np .array ([
49
- 1 , 12 , 0. ,
50
- 1 , 12 , 0. ,
51
- 1 , 12.5 , 0.
52
- ])
53
- bounds = np .array ([
54
- [0 , np .nan ], [8 , 16 ], [- 3 , 1 ],
55
- [0 , np .nan ], [8 , 16 ], [- 3 , 1 ],
56
- [0 , np .nan ], [11 , 14 ], [- 3 , 1 ]
57
- ])
53
+ initPars = np .array ([1 , 12 , 0.0 , 1 , 12 , 0.0 , 1 , 12.5 , 0.0 ])
54
+ bounds = np .array (
55
+ [
56
+ [0 , np .nan ],
57
+ [8 , 16 ],
58
+ [- 3 , 1 ],
59
+ [0 , np .nan ],
60
+ [8 , 16 ],
61
+ [- 3 , 1 ],
62
+ [0 , np .nan ],
63
+ [11 , 14 ],
64
+ [- 3 , 1 ],
65
+ ]
66
+ )
58
67
constraints = ()
59
68
60
- noOfMSIterations = 3 # 4
61
- firstSpec = 3 # 3
62
- lastSpec = 134 # 134
69
+ noOfMSIterations = 3 # 4
70
+ firstSpec = 3 # 3
71
+ lastSpec = 134 # 134
63
72
64
73
maskedSpecAllNo = np .array ([18 , 34 , 42 , 43 , 59 , 60 , 62 , 118 , 119 , 133 ])
65
74
@@ -68,12 +77,12 @@ def __init__(self, ipFilesPath):
68
77
GammaCorrectionFlag = False
69
78
70
79
# # Parameters of workspaces in input_ws
71
- tofBinning = ' 275.,1.,420' # Binning of ToF spectra
80
+ tofBinning = " 275.,1.,420" # Binning of ToF spectra
72
81
maskTOFRange = None
73
82
74
- transmission_guess = 0.8537 # Experimental value from VesuvioTransmission
83
+ transmission_guess = 0.8537 # Experimental value from VesuvioTransmission
75
84
multiple_scattering_order = 2
76
- number_of_events = 1.e5
85
+ number_of_events = 1.0e5
77
86
78
87
# Original data uses histogram data instead of point data
79
88
runHistData = True
@@ -82,41 +91,46 @@ def __init__(self, ipFilesPath):
82
91
83
92
class ForwardInitialConditions (GeneralInitialConditions ):
84
93
def __init__ (self , ipFilesPath ):
85
- self .InstrParsPath = ipFilesPath / "ip2018_3.par"
94
+ self .InstrParsPath = ipFilesPath / "ip2018_3.par"
86
95
87
96
masses = np .array ([1.0079 , 12 , 16 , 27 ])
88
97
89
98
# Intensities, NCP widths, NCP centers
90
- initPars = np .array ([
91
- 1 , 4.7 , 0 ,
92
- 1 , 12.71 , 0. ,
93
- 1 , 8.76 , 0. ,
94
- 1 , 13.897 , 0.
95
- ])
96
- bounds = np .array ([
97
- [0 , np .nan ], [3 , 6 ], [- 3 , 1 ],
98
- [0 , np .nan ], [12.71 , 12.71 ], [- 3 , 1 ],
99
- [0 , np .nan ], [8.76 , 8.76 ], [- 3 , 1 ],
100
- [0 , np .nan ], [13.897 , 13.897 ], [- 3 , 1 ]
101
- ])
99
+ initPars = np .array ([1 , 4.7 , 0 , 1 , 12.71 , 0.0 , 1 , 8.76 , 0.0 , 1 , 13.897 , 0.0 ])
100
+ bounds = np .array (
101
+ [
102
+ [0 , np .nan ],
103
+ [3 , 6 ],
104
+ [- 3 , 1 ],
105
+ [0 , np .nan ],
106
+ [12.71 , 12.71 ],
107
+ [- 3 , 1 ],
108
+ [0 , np .nan ],
109
+ [8.76 , 8.76 ],
110
+ [- 3 , 1 ],
111
+ [0 , np .nan ],
112
+ [13.897 , 13.897 ],
113
+ [- 3 , 1 ],
114
+ ]
115
+ )
102
116
constraints = ()
103
117
104
- noOfMSIterations = 0 # 4
105
- firstSpec = 144 # 144
106
- lastSpec = 182 # 182
118
+ noOfMSIterations = 0 # 4
119
+ firstSpec = 144 # 144
120
+ lastSpec = 182 # 182
107
121
108
122
# Boolean Flags to control script
109
123
MSCorrectionFlag = True
110
124
GammaCorrectionFlag = True
111
125
112
126
maskedSpecAllNo = np .array ([173 , 174 , 179 ])
113
127
114
- tofBinning = "110,1,430" # Binning of ToF spectra
128
+ tofBinning = "110,1,430" # Binning of ToF spectra
115
129
maskTOFRange = None
116
130
117
- transmission_guess = 0.8537 # Experimental value from VesuvioTransmission
131
+ transmission_guess = 0.8537 # Experimental value from VesuvioTransmission
118
132
multiple_scattering_order = 2
119
- number_of_events = 1.e5
133
+ number_of_events = 1.0e5
120
134
121
135
# Original data uses histogram data instead of point data
122
136
runHistData = True
@@ -126,19 +140,19 @@ def __init__(self, ipFilesPath):
126
140
class YSpaceFitInitialConditions :
127
141
showPlots = True
128
142
symmetrisationFlag = True
129
- rebinParametersForYSpaceFit = "-25, 0.5, 25" # Needs to be symetric
130
- fitModel = "Gaussian3D" # Options: 'SINGLE_GAUSSIAN', 'GC_C4', 'GC_C6', 'GC_C4_C6', 'DOUBLE_WELL', 'ANSIO_GAUSSIAN', 'Gaussian3D'
143
+ rebinParametersForYSpaceFit = "-25, 0.5, 25" # Needs to be symetric
144
+ fitModel = "Gaussian3D" # Options: 'SINGLE_GAUSSIAN', 'GC_C4', 'GC_C6', 'GC_C4_C6', 'DOUBLE_WELL', 'ANSIO_GAUSSIAN', 'Gaussian3D'
131
145
runMinos = True
132
- globalFit = True # Performs global fit with Minuit by default
133
- nGlobalFitGroups = 4 # Number or string "ALL"
134
- maskTypeProcedure = "NAN" # Options: 'NCP', 'NAN', None
146
+ globalFit = True # Performs global fit with Minuit by default
147
+ nGlobalFitGroups = 4 # Number or string "ALL"
148
+ maskTypeProcedure = "NAN" # Options: 'NCP', 'NAN', None
135
149
136
150
137
151
class UserScriptControls :
138
152
runRoutine = True
139
153
140
154
# Choose main procedure to run
141
- procedure = "FORWARD" # Options: None, "BACKWARD", "FORWARD", "JOINT"
155
+ procedure = "FORWARD" # Options: None, "BACKWARD", "FORWARD", "JOINT"
142
156
143
157
# Choose on which ws to perform the fit in y space
144
158
fitInYSpace = "FORWARD" # Options: None, "BACKWARD", "FORWARD", "JOINT"
0 commit comments