thin_slice_fit.fcl
Go to the documentation of this file.
1 #include "FitterPlotStyle.fcl"
2 #include "ProtoDUNECalibration.fcl"
3 #include "FitSystematics.fcl"
4 
5 #MCFileName: "/dune/app/users/calcuttj/PionStudies/rDataFrame/Prod4a_5_18_21_with_data/eventSelection_mc_all.root"
6 #DataFileName: "/dune/app/users/calcuttj/PionStudies/rDataFrame/Prod4a_5_18_21_with_data/eventSelection_mc_all.root"
7 MCFileName: "/dune/data/users/calcuttj/Prod4a_6_8_21_with_data/eventSelection_mc_all.root"
8 DataFileName: "/dune/data/users/calcuttj/Prod4a_6_8_21_with_data/eventSelection_mc_all.root"
9 TreeName: "pduneana/beamana"
10 
11 DriverName: "protoana::AbsCexDriver"
12 AnalysisOptions: {
13  #FakeDataRoutine: "SampleScales"
14  #FakeDataRoutine: "BinnedScales"
15  #FakeDataRoutine: "G4RW"
16  #FakeDataRoutine: "dEdX"
17  #FakeDataRoutine: "EffVar"
18  #FakeDataRoutine: "G4RWGrid"
19  #FakeDataRoutine: "PionAngle"
20  #FakeDataRoutine: "AngleVar"
21  #FakeDataRoutine: "BeamWeight"
22  FakeDataRoutine: "Asimov"
23  #FakeDataRoutine: "Toy"
24 
25  SetToy: false
26  ToyVals: [
27  1.02053,
28  0.763524,
29  1.3878,
30  0.831749,
31  0.492963,
32  0.992946,
33  1.14449,
34  0.895418,
35  0.32315
36  ]
37 
38  FakeDataScales: [
39  #[1, 2.]
40  [2, 2.]
41  ]
42 
43  FakeDataBinnedScales: [
44  [2, [1., 1.448, 1.394, 1.469, 1.]],
45  [1, [1., .748, .782, .832, .912, 1.]]
46  ]
47 
48  FakeDataG4RW: {
49  Position: 2
50  Shift: 1
51  Full: true
52  }
53 
54  FakeDataG4RWGrid: {
55  Position: [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 ]
56  Shift: [12, 12, 12, 12, 12, 12, 12, 08, 08, 08, 08, 08, 08, 08 ]
57  Branch: "g4rw_full_grid_piplus_weights_fake_data"
58 
59  ###(reac, 0), (abs, 1), (cex, 2), (dcex, 3), (prod, 4), (inel, 5)
60  ### x7 each (200 MeV bins) -- total range: 0, 41 (0, 1400)
61  }
62 
63  FakeDatadEdX: {
64  Cal_set: @local::CalorimetryParameters_SPProd4_MC_SCE
65  VariedCCal: 1.051e-3
66  }
67 
68  FakeDataEffVar: {
69  F: .333
70  }
71 
72  FakeDataPionAngle: {
73  #RatioFile: "angle_weight.root"
74  #RatioFile: "flat_pion_weights.root"
75  RatioFile: "half_shift.root"
76  Limits: [0., .4, .6, .8, 1.]
77  RatioNames: ["r1", "r2", "r3", "r4", "r5"]
78  }
79 
80  FakeDataAngleVar: {
81  #RatioFile: "angle_weight.root"
82  RatioFile: "gaus_pi0_weights_080.root"
83  #Limits: [0., .4, .6, .8, 1.]
84  Limits: [
85  [1, [0., 400., 500., 600., 800., 1000.]],
86  [2, [0., 450., 600., 800., 1200.]],
87  [3, [0., 400., 500. , 600., 700., 800., 900., 1000.]]
88  ]
89 
90  RatioNames: [
91  [1, ["r1", "r2", "r3", "r4", "r5", "r6"]],
92  [2, ["r1", "r2", "r3", "r4", "r5"]],
93  [3, ["r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8"]]
94  ]
95  PDG: 111
96  }
97 
98  FakeDataBeamWeight: {
99  RatioFile: "beam_weight.root"
100  }
101  EndZCut: 222.10561
102  SliceCut: 464
103  WirePitch: .47974
104  Z0: 0.56035
105 
106  Multinomial: true
107 
108  SliceMethod: "Traj" #E, Alt, Default
109 
110  TrajZStart: -.49375
111 
112  #Fixing reco
113  DoEnergyFix: true
114  EnergyFix: 80.
115 
116  EventSelection: {
117 
118  }
119 }
120 
121 Systematics: [
122  #@local::SystematicsList.beam_shift_spline_2,
123  @local::SystematicsList.beam_shift_ratio,
124  @local::SystematicsList.dEdX_Cal_Spline,
125  ##@local::G4RWSysts.g4rw_QE1,
126  ##@local::G4RWSysts.g4rw_QE2,
127  ##@local::G4RWSysts.g4rw_Prod,
128  ##@local::G4RWSysts.g4rw_DCex,
129  ##@local::G4RWSysts.g4rw_proton,
130  ##@local::SystematicsList.beam_shift,
131  @local::SystematicsList.ediv_weight,
132  @local::SystematicsList.no_track_weight,
133  @local::SystematicsList.beam_cut_weight
134 ]
135 
136 Systematics[2].Central: 1.0
137 Systematics[3].Central: 1.0
138 
139 #Systematics[6].Options.LowerLimit: -5.
140 #Systematics[6].Options.UpperLimit: 5.
141 #Systematics[6].Options.ThrowLimit: -5.
142 #Systematics[6].Options.ThrowLimitUp: 5.
143 #Systematics[6].Options.SaveInfo: false
144 #Systematics[6].Options.Limits: [-.075, .075]
145 #Systematics[6].Options.WeightCap: -999.
146 
147 AddSystTerm: true
148 CovarianceBins: [
149  ["dEdX_Cal_Spline", 0],
150  #["g4rw_QE1", 1],
151  #["g4rw_QE2", 2],
152  #["g4rw_Prod", 3],
153  #["g4rw_DCex", 4],
154  #["g4rw_proton", 5],
155  ["ediv_weight", 1],
156  #["beam_shift_spline_2", 2],
157  ["beam_shift_ratio", 2],
158  ["no_track_weight", 3],
159  ["beam_cut_weight", 4]
160 ]
161 #CovarianceFile: "full_with_dcex_beamcut.root"
162 CovarianceFile: "no_g4rw_new_shift.root"
163 #CovarianceFile: "full_no_beam_shift.root"
164 CovarianceMatrix: "m"
165 
166 FixVariables: false #true
167 SystsToFix: [
168  ["beam_shift", 0.]
169 ]
170 
171 Selections: [
172  {
173  Name: "Abs"
174  ID: 1
175  RecoBins: [[0., 400., 500., 600., 700., 800., 900., 1200.]]
176  BinLabels: [["0 - 400", "400 - 500", "500 - 600",
177  "600 - 700", "700 - 800", "800 - 900",
178  "900 - 1200"]]
179  #RecoBins: [[0., 400., 500., 600., 800., 1200.]]
180  #BinLabels: [["0 - 400", "400 - 500", "500 - 600", "600 - 800", "800 - 1200"]]
181  AxisTitles: ["Reconstructed KE (MeV)"]
182  },
183  {
184  Name: "Cex"
185  ID: 2
186  RecoBins: [[0., 500., 600., 700., 800., 900., 1200.]]
187  BinLabels: [["0 - 500", "500 - 600", "600 - 700",
188  "700 - 800", "800 - 900", "900 - 1200"]]
189  #RecoBins: [[0., 500., 600., 800., 1200.]]
190  #BinLabels: [["0 - 500", "500 - 600", "600 - 800", "800 - 1200"]]
191  AxisTitles: ["Reconstructed KE (MeV)"]
192  } ,
193  {
194  Name: "RejectedInt"
195  ID: 3
196  #RecoBins: [[0., 300., 350., 400., 450., 500., 550., 600., 650., 700., 750., 800., 850., 900., 950., 1000., 1200.]]
197  #BinLabels: [["0 - 300", "300 - 350", "350 - 400", "400 - 450", "450 - 500",
198  # "500 - 550", "550 - 600", "600 - 650", "650 - 700", "700 - 750",
199  # "750 - 800", "800 - 850", "850 - 900", "900 - 950", "950 - 1000", "1000 - 1200"]]
200  RecoBins: [[0., 400., 500., 600., 800., 1200.]]
201  BinLabels: [["0 - 400", "400 - 500", "500 - 600", "600 - 800", "800 - 1200"]]
202  AxisTitles: ["Reconstructed KE (MeV)"]
203  },
204  {
205  Name: "APA2"
206  ID: 4
207  #RecoBins: [[222, 275, 325, 375, 425, 580]]
208  RecoBins: [[222, 234, 580]]
209  AxisTitles: ["Reconstructed End Z (cm)"]
210  },
211  {
212  Name: "FailedBeamCuts"
213  ID: 5
214  RecoBins: [[0, 1]]
215  AxisTitles: [""]
216  },
217  {
218  Name: "NoBeamTrack"
219  ID: 6
220  RecoBins: [[0, 1]]
221  AxisTitles: [""]
222  }
223 ]
224 
225 
226 IncidentRecoBins: [-5000., 0., 200., 400., 600., 800., 1000., 1200.]
227 SelectedRecoBins: [-5000., 0., 200., 400., 600., 800., 1200.]
228 
229 FluxTypes: [
230  [2, "Muons"],
231  [1, "Pions"]
232  ]
233 
234 
235 #DefaultSignalBins: [450., 600., 800, 1200.]
236 DefaultSignalBins: [0., 400., 800., 1000, 1200.]
237 TrueIncidentBins: @local::DefaultSignalBins
238 
239 BeamEnergyBins: [0., 800., 900., 1000., 1100., 1200., 4000.]
240 #BeamEnergyBins: [0., 800., 1200., 4000.]
241 #BeamEnergyBins: [0., 4000.]
242 
243 #For use identifying the true incident samples
244 #used to make the final total pion incident histogram
245 IncidentSamples: [1, 2, 3, 6, 7]
246 MeasurementSamples: [1, 2]
247 
248 Samples: [
249  {
250  Name: "Abs"
251  ID: 1
252  IsSignal: true
253  #SignalBins: [400., 500., 600., 800., 1000.]
254  SignalBins: [400., 500., 600., 700., 800., 1000.]
255  FluxType: 1
256  },
257  {
258  Name: "Cex"
259  ID: 2
260  IsSignal: true
261  #SignalBins: [450., 600., 800., 1000.]
262  SignalBins: [500., 600., 700., 800., 900.]
263  FluxType: 1
264  },
265  {
266  Name: "OtherInel"
267  ID: 3
268  IsSignal: false
269  SignalBins: @local::DefaultSignalBins
270  FluxType: 1
271  },
272  {
273  Name: "UpstreamInt"
274  ID: 4
275  IsSignal: false
276  SignalBins: []
277  FluxType: 1
278  },
279  {
280  Name: "Muons"
281  ID: 5
282  IsSignal: false
283  SignalBins: []
284  FluxType: 2
285  },
286  {
287  Name: "PionPastFV"
288  ID: 6
289  IsSignal: false
290  SignalBins: []
291  FluxType: 1
292  },
293  {
294  Name: "Other"
295  ID: 7
296  IsSignal: false
297  SignalBins: []
298  FluxType: 1
299  }
300 ]
301 
302 ## Minimizer setup
303 MaxIterations: 1e6
304 MaxCalls: 1e9
305 NScanSteps: 100
306 Tolerance: 1.e-2 #0.001
307 UpperLimit: 10.0
308 LowerLimit: 1.e-5
309 ReducedIncidentChi2: false
310 FitFlux: true
311 ScaleDataToNorm: true
312 #DataNorm: 7189.
313 DataNorm: 66979.
314 #RNGSeed: 0
315 
316 FitFunctionType: 2
317 #####################
318 
319 ## Plotting
320 #PlotStyle: @local::ReducedColorsStyle
321 PlotStyle: @local::DefaultColorsStyle
322 PlotRebinned: true
323 DrawXSecUnderflow: false
324 #####################
325 
326 ## Validation
327 RandomStart: false
328 SplitMC: false
329 DoFakeData: true
330 FluctuateStats: false
331 DoThrows: false
332 NThrows: 1000
333 DoScans: false
334 RunHesse: false
335 Do1DShifts: false
336 DoSysts: true
337 MaxRethrows: 1000
338 #####################
339 
340 #FitType: "Normal"
341 FitType: "None"
342 #FitType: "Pulls"
343 #FitType: "Toy"
344 
345 NPulls: 10