-
Notifications
You must be signed in to change notification settings - Fork 1
/
DefaultConfig.cpp
504 lines (414 loc) · 23 KB
/
DefaultConfig.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
#include "ConfigFile.h"
template<class T>
void SetKey(ConfigFile &Conf, string key, const T& t)
{
if (! Conf.keyExists( key))
{
Conf.add(key, t);
}
}
void SetDefault(ConfigFile &Conf)
{
// MuCapture, if enabled, can prevent the standard analysis from running
SetKey(Conf, "MuCapture/Do", false);
SetKey(Conf, "MuCapture/MCType", "G3");
SetKey(Conf, "AnalyzeAllEvents", false); // Michel analysis code crashes on empty events
// ================ Standard Analysis =============== //
// Energy Calibration
SetKey(Conf, "EnergyCalibration/Mode", 0);
//// This is turned on or off using the command line
//// The possible modes:
//// 0 => alpha and beta corrections = shift
//// 1 => 1)beta correction = scale; 2)alpha correction = shift
//// 2 => 1)alpha correction = shift; 2)beta correction = scale
//// 3 => alpha and beta corrections = scale
// Momentum and angle smearing
SetKey(Conf, "MomAngSmearing/Do", false);
SetKey(Conf, "MomAngSmearing/MomMean", 0.0);
SetKey(Conf, "MomAngSmearing/MomSigma", 0.0);
SetKey(Conf, "MomAngSmearing/AngMean", 0.0);
SetKey(Conf, "MomAngSmearing/AngSigma", 0.0);
// Dimension scaling
SetKey(Conf, "MomentumScale/Do", false);
//// This scales the momentum values pz or pu and pv
//// If MomentumScale/Pt = S
//// Then pu=pu*S and pv=pv*S
SetKey(Conf, "MomentumScale/Pt", 1.0);
SetKey(Conf, "MomentumScale/Pz", 1.0);
SetKey(Conf, "MomentumScale/Pt_Upstream", 1.0);
SetKey(Conf, "MomentumScale/Pz_Upstream", 1.0);
SetKey(Conf, "MomentumScale/Pt_Downstream", 1.0);
SetKey(Conf, "MomentumScale/Pz_Downstream", 1.0);
// TCAPm12widthCut
SetKey(Conf, "TCAPm12widthCut/Do", true);
//// For 2006 data: TCAPMin = 26; TCAPMax = 52
//// For 2007 data: TCAPMin = 29; TCAPMax = 55
SetKey(Conf, "TCAPm12widthCut/TCAPMin", -10000.0);
SetKey(Conf, "TCAPm12widthCut/TCAPMax", 10000.0);
SetKey(Conf, "TCAPm12widthCut/m12widthMin", -100000.0);
SetKey(Conf, "TCAPm12widthCut/m12widthMax", 100000.0);
// TECCut
SetKey(Conf, "TECCut/Do", false);
SetKey(Conf, "TECCut/TECxMin", -1000.0);
SetKey(Conf, "TECCut/TECxMax", 1000.0);
SetKey(Conf, "TECCut/TECyMin", -1000.0);
SetKey(Conf, "TECCut/TECyMax", 1000.0);
SetKey(Conf, "TECCut/TECtanthxMin", -1000.0);
SetKey(Conf, "TECCut/TECtanthxMax", 1000.0);
SetKey(Conf, "TECCut/TECtanthyMin", -1000.0);
SetKey(Conf, "TECCut/TECtanthyMax", 1000.0);
SetKey(Conf, "TECCut/TECsigmaxMin", -1.0);
SetKey(Conf, "TECCut/TECsigmaxMax", 1000.0);
SetKey(Conf, "TECCut/TECsigmayMin", -1.0);
SetKey(Conf, "TECCut/TECsigmayMax", 1000.0);
SetKey(Conf, "TECCut/TECifailxMin", -1.0);
SetKey(Conf, "TECCut/TECifailxMax", 1000.0);
SetKey(Conf, "TECCut/TECifailyMin", -1.0);
SetKey(Conf, "TECCut/TECifailyMax", 1000.0);
// EventTypeCut
SetKey(Conf, "EventTypeCut/Do", true);
SetKey(Conf, "EventTypeCut/Types", "1,2,6,7,10,11,21,22");
// MuLastPCut
SetKey(Conf, "MuLastPCut/Do", true);
SetKey(Conf, "MuLastPCut/LastPlane", 28);
// MuUVCut
SetKey(Conf, "MuUVCut/Do", true);
SetKey(Conf, "MuUVCut/MaxRadius", 2.5);
// DkWinTimeCut
SetKey(Conf, "DkWinTimeCut/Do", true);
SetKey(Conf, "DkWinTimeCut/Min", -100000.0);
SetKey(Conf, "DkWinTimeCut/Max", 100000.0);
// NtracksCut
SetKey(Conf, "NtracksCut/Do", true);
// IerrorCut
SetKey(Conf, "IerrorCut/Do", true);
SetKey(Conf, "IerrorCut/SelectIerror", "0");
// StartStopCut
//// The module selects the tracks on the right side
//// of the target according to the classification.
//// The StartPlane and StopPlane can be defined
//// precisely. For example for the tracks starting
//// right at the target and using 22 planes:
//// StartStopCut/StartPlane = 22,23
//// StartStopCut/StopPlane = 1,44
SetKey(Conf, "StartStopCut/Do", true);
SetKey(Conf, "StartStopCut/StartPlane", "-1,-1");
SetKey(Conf, "StartStopCut/StopPlane", "-1,-1");
// ChargeCut
SetKey(Conf, "ChargeCut/Do", true);
SetKey(Conf, "ChargeCut/SelectCharge", 1);
// PairMatchingCut
SetKey(Conf, "PairMatchingCut/Do", true);
SetKey(Conf, "PairMatchingCut/MinCDA", 0.5); // For all the other tracks
SetKey(Conf, "PairMatchingCut/MinCDA_BrokTrk", 2.0); // For broken tracks
SetKey(Conf, "PairMatchingCut/MinCDA_Beame", 0.5); // For beam positron
SetKey(Conf, "PairMatchingCut/BrokTrk_Z_Range", "22.0,48.0"); // For beam positron
SetKey(Conf, "PairMatchingCut/Beame_Z_Range", "0.0,6.0"); // For beam positron
SetKey(Conf, "PairMatchingCut/MinDT", 60.0);
SetKey(Conf, "PairMatchingCut/tolerance_abs", 1.e-4); /*cm*/
SetKey(Conf, "PairMatchingCut/tolerance_rel", 0.);
SetKey(Conf, "PairMatchingCut/max_iter", 100);
SetKey(Conf, "PairMatchingCut/CalculateCDA", false);
// Mu_eVertexCut
SetKey(Conf, "Mu_eVertexCut/Do", true);
SetKey(Conf, "Mu_eVertexCut/Do_mu_e_Calc-MOFIA", 0);
//// Function 0:
//// min < r < max
//// CutParameters = min,max
//// Function 1:
//// Bmin + Amin / |cos(theta)| < r < Bmax + Amax / |cos(theta)|
//// CutParameters = Bmin,Amin,Bmax,Amax
SetKey(Conf, "Mu_eVertexCut/CutFunction", 1);
SetKey(Conf, "Mu_eVertexCut/CutParameters", "0.0,0.0,1.0,1.0");
// DistToTargetSel
SetKey(Conf, "DistToTargetSel/Do", true);
// Mu_eVertexSel
SetKey(Conf, "Mu_eVertexSel/Do", true);
SetKey(Conf, "Mu_eVertexSel/Do_mu_e_Calc-MOFIA", 0);
// DkFitTimeCut
SetKey(Conf, "DkFitTimeCut/Do", true);
SetKey(Conf, "DkFitTimeCut/Min", 1050.0); // in ns
SetKey(Conf, "DkFitTimeCut/Max", 9000.0); // in ns
// PACTCut
SetKey(Conf, "PACTCut/Do", 0);
SetKey(Conf, "PACTCut/NbBins", 500);
SetKey(Conf, "PACTCut/MaximumWidth", 500.0); // ns
SetKey(Conf, "PACTCut/quadrant_11", 1);
SetKey(Conf, "PACTCut/quadrant_12", 1);
SetKey(Conf, "PACTCut/quadrant_21", 1);
SetKey(Conf, "PACTCut/quadrant_22", 1);
SetKey(Conf, "PACTCut/region_11", "1.634, -5.428, -61.26, 642.3");
SetKey(Conf, "PACTCut/region_12", "1.634, -5.428, -61.26, 642.3");
SetKey(Conf, "PACTCut/region_21", "1.634, -5.428, -61.26, 642.3");
SetKey(Conf, "PACTCut/region_22", "1.634, -5.428, -61.26, 642.3");
SetKey(Conf, "MuCapture/PACT/smearing_11", 0.);
SetKey(Conf, "MuCapture/PACT/smearing_12", 0.);
SetKey(Conf, "MuCapture/PACT/smearing_21", 0.);
SetKey(Conf, "MuCapture/PACT/smearing_22", 0.);
// Fiducial Cut
SetKey(Conf, "FiducialCut/MinAbsCosTheta", 0.54);
SetKey(Conf, "FiducialCut/MaxAbsCosTheta", 0.96);
SetKey(Conf, "FiducialCut/MaxMomentum", 52.0); // Mev/c
SetKey(Conf, "FiducialCut/MinTransMom", 10.0); // Mev/c
SetKey(Conf, "FiducialCut/MaxTransMom", 38.0); // Mev/c
SetKey(Conf, "FiducialCut/MinLongiMom", 14.0); // Mev/c
// StatusHistograms
SetKey(Conf, "StatusHistograms/Do", true);
SetKey(Conf, "StatusHistograms/PerWindowType", false);
// ==================== Special Analyses ======================== //
// Truth Bank
SetKey(Conf, "TruthBank/Do", false);
//// This flag turns the truth bank analysis off. No vertex bank analysed
//// but the accflag is still used for the Michel spectrum.
// Bias Plots
SetKey(Conf, "BiasPlots/Do", true);
SetKey(Conf, "BiasPlots/Nptotbins", 8);
SetKey(Conf, "BiasPlots/minptot", 15.0); // MeV
SetKey(Conf, "BiasPlots/maxptot", 55.0); // MeV
SetKey(Conf, "BiasPlots/Nbinscosth", 100); //
SetKey(Conf, "BiasPlots/mincosth", 0.3); //
SetKey(Conf, "BiasPlots/maxcosth", -0.3); //
SetKey(Conf, "BiasPlots/Nbinsdp", 401); //
SetKey(Conf, "BiasPlots/mindp", -2.0); // MeV
SetKey(Conf, "BiasPlots/maxdp", 2.0); // MeV
SetKey(Conf, "BiasPlots/Nbinsdcosth", 200); //
SetKey(Conf, "BiasPlots/mindcosth", -0.05); //
SetKey(Conf, "BiasPlots/maxdcosth", 0.05); //
// Asymmetry Plots
SetKey(Conf, "AsymmetryPlots/WeightedPlots", 1); // default ON
SetKey(Conf, "AsymmetryPlots/UnweightedPlots", 0); // default OFF
SetKey(Conf, "AsymmetryPlots/tmu", 2197.03); // ns
SetKey(Conf, "AsymmetryPlots/t_min", 245.28); // ns
SetKey(Conf, "AsymmetryPlots/t_width_min", 68.435); // ns
SetKey(Conf, "AsymmetryPlots/Fiducial/costh_min", 0.54);
SetKey(Conf, "AsymmetryPlots/Fiducial/costh_max", 0.96);
SetKey(Conf, "AsymmetryPlots/Fiducial/ptot_min", 31.0);
SetKey(Conf, "AsymmetryPlots/Fiducial/ptot_max", 52.0);
SetKey(Conf, "AsymmetryPlots/Fiducial/long_min", 14.0);
SetKey(Conf, "AsymmetryPlots/Fiducial/trans_max", 38.0);
SetKey(Conf, "AsymmetryPlots/Weighting", 1.0);
// ChiSquare
SetKey(Conf, "ChiSquare/Do", 0); // default OFF
SetKey(Conf, "ChiSquare/RedChi2CutMin", -1.0); // default OFF
SetKey(Conf, "ChiSquare/RedChi2CutMax", -1.0); // default OFF
// Quadrant Spectra
SetKey(Conf, "PhiQuadrantSpectra/Do", false);
// Michel spectrum histogram
SetKey(Conf, "ChiSquare/NCosThBinsMichel", 100);
SetKey(Conf, "ChiSquare/NXBinsMichel", 110);
SetKey(Conf, "ChiSquare/XMinMichel", 0.0);
SetKey(Conf, "ChiSquare/XMaxMichel", 55.0);
// ================== Detector Parameters ======================== //
SetKey(Conf, "Detector/BField", 2.0);
SetKey(Conf, "Detector/GeometryFile", -57); // CFM number of the file
// ================== General Parameters ======================== //
// Truth Bank
SetKey(Conf, "TruthBank/MuUVMaxRadius", 4.0); //
SetKey(Conf, "TruthBank/TriggerTimeJitter", 100.0); //
SetKey(Conf, "TruthBank/MuZAroundTarget", 1.0); //
SetKey(Conf, "TruthBank/MueVertexEpsilon", 0.01); //
SetKey(Conf, "TruthBank/MinDkTimeAfterMu", 300.0); //
SetKey(Conf, "TruthBank/MaxDkTimeAfterMu", 9100.0);//
// Kinematic end point
SetKey(Conf, "Parameters/KinematicPmax", 52.828);
// Speed of light
SetKey(Conf, "Parameters/c",29.979245800); // cm/ns
// Michel spectrum histogram
SetKey(Conf, "Parameters/NCosThBinsMichel", 100);
SetKey(Conf, "Parameters/NXBinsMichel", 110);
SetKey(Conf, "Parameters/XMinMichel", 0.0);
SetKey(Conf, "Parameters/XMaxMichel", 55.0);
// Energy Calibration histograms
SetKey(Conf, "Parameters/NCBins_EC", 360);
SetKey(Conf, "Parameters/NCBins_ECinvc",72);
SetKey(Conf, "Parameters/NXBins_EC", 4000);
SetKey(Conf, "Parameters/XMin_EC", 30.0);
SetKey(Conf, "Parameters/XMax_EC", 70.0);
SetKey(Conf, "Parameters/CosMin_EC", 0.3);
SetKey(Conf, "Parameters/CosMax_EC", 0.95);
SetKey(Conf, "Parameters/MuonWinType", 1);
SetKey(Conf, "Parameters/UpDkWinType", "2,7,9,14");
SetKey(Conf, "Parameters/DownDkWinType", "3,8,10,15");
SetKey(Conf, "Parameters/DCplanes", "5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52");
SetKey(Conf, "Parameters/PCplanes", "1, 2, 3, 4, 27, 28, 29, 30, 53, 54, 55, 56");
SetKey(Conf, "Parameters/PlaneType", "PC,PC,PC,PC,DC,DC,DC,DC,DC,DC,DC,DC,DC,DC,DC,DC,DC,DC,DC,DC,DC,DC,DC,DC,DC,DC,PC,PC,PC,PC,DC,DC,DC,DC,DC,DC,DC,DC,DC,DC,DC,DC,DC,DC,DC,DC,DC,DC,DC,DC,DC,DC,PC,PC,PC,PC");
SetKey(Conf, "Parameters/DCzposition", "-49.7924,-49.3923,-48.9923,-48.5922,-48.1921,-47.7921,-47.3920,-46.9919,-42.1920,-41.7921,-36.9923,-36.5924,-29.7941,-29.3941,-22.5960,-22.1961,-15.3980,-14.9981,-10.1987, -9.7988, -4.9995, -4.5995, 4.5998, 4.9998, 9.7994, 10.1993, 14.9976, 15.3976, 22.1960, 22.5959, 29.3943, 29.7942, 36.5927, 36.9926, 41.7924, 42.1924, 46.9924, 47.3923, 47.7922, 48.1922, 48.5922, 48.9922, 49.3922, 49.7922");
// ================== MuCapture analysis ======================== //
SetKey(Conf, "MuCapture/loadDefaultTWISTVars", true);
SetKey(Conf, "MuCapture/fillXtalkPC", false);
SetKey(Conf, "MuCapture/fillXtalkDC", false);
SetKey(Conf, "MuCapture/debugEventList", "");
SetKey(Conf, "Detector/Geometry/dc_ppc", 25);
SetKey(Conf, "Detector/Geometry/pc_ppc", 5);
SetKey(Conf, "MuCapture/killPC6DeadWire", true);
SetKey(Conf, "MuCapture/HitPreproc/PC/applyXTalk", true);
SetKey(Conf, "MuCapture/HitPreproc/DC/applyXTalk", true);
SetKey(Conf, "MuCapture/HitPreproc/PC/processor", "SameWireHitDiscarder");
SetKey(Conf, "MuCapture/HitPreproc/PC/NarrowHitDiscarder/cutMinTDCWidth", 40.);
SetKey(Conf, "MuCapture/HitPreproc/PC/SameWireHitDiscarder/cutSameWireDt", 200.);
SetKey(Conf, "MuCapture/HitPreproc/DC/processor", "NarrowHitDiscarder");
SetKey(Conf, "MuCapture/HitPreproc/DC/NarrowHitDiscarder/cutMinTDCWidth", 50.);
// If defined, ignore all other input events
SetKey(Conf, "MuCapture/inputEventNumberFile", "");
// Print out details about events on this list
SetKey(Conf, "MuCapture/debugEventList", "");
SetKey(Conf, "MuCapture/winPCLength", 100.);
// Trigger window has to be within max dt from 0
SetKey(Conf, "MuCapture/winTrigMaxdt", 30.);
SetKey(Conf, "MuCapture/winPCPreTrigSeparation", 1050.);
SetKey(Conf, "MuCapture/cutMuonFirstPlane", 1);
SetKey(Conf, "MuCapture/Accidentals/tmax", -1100.);
// Cyclotron RF=23.058 MHz [Glen Marshall in the 2013-06-12 muminus meeting]
// See e.g.
// R.~H.~M.~Gummer,
// %``Accelerating Voltage Control and Stabilization in the TRIUMF Cyclotron,''
// IEEE Trans.\ Nucl.\ Sci.\ {\bf 22}, 1257 (1975).
// http://inspirehep.net/record/102708
// http://dx.doi.org/10.1109/TNS.1975.4327860
SetKey(Conf, "MuCapture/Accidentals/cycleLength", 1000./23.058);
SetKey(Conf, "MuCapture/Accidentals/numCycles", 104);
SetKey(Conf, "MuCapture/Accidentals/maxSubdivisions", 3);
SetKey(Conf, "MuCapture/winDCStart", -100.); // W.r.t PC win start
SetKey(Conf, "MuCapture/winDCEnd", 1050.); // W.r.t PC win start
SetKey(Conf, "MuCapture/winDCDoHistos", true);
SetKey(Conf, "MuCapture/muStopRMax", 2.5); // in cm
SetKey(Conf, "MuCapture/cutWinTimeMin", 400.); // ns
SetKey(Conf, "MuCapture/cutWinTimeMax", 10000. - 1050.); // ns, make sure DC window ends.
// PACT cuts have been moved to config files: different settings for data and MC
SetKey(Conf, "MuCapture/cutBeamVetoMaxPCplanes", 1);
SetKey(Conf, "MuCapture/DIOUp/cutMinTime", 300.);
SetKey(Conf, "MuCapture/DIODn/cutMinTime", 300.);
SetKey(Conf, "MuCapture/cutMultiwinNextdt", 1050.);
SetKey(Conf, "MuCapture/HistDriftTime/cutEffTrackHitDtPC", 100.);
SetKey(Conf, "MuCapture/HistDriftTime/cutEffTrackHitDtDC", 1500.);
// Empty file name disables the output
SetKey(Conf, "MuCapture/uvOutFileName", "");
SetKey(Conf, "MuCapture/commonSkimOutFileName", "");
//----------------
SetKey(Conf, "MuCapture/TrkAnalysisHF/pos/cutCharge", +1);
SetKey(Conf, "MuCapture/TrkAnalysisHF/pos/cutTrackWinTimedt", 100.);//ns
SetKey(Conf, "MuCapture/TrkAnalysisHF/pos/cutTrackRmax", 99999.);//cm
SetKey(Conf, "MuCapture/TrkAnalysisHF/pos/cutCosThetaMin", 0.5);
SetKey(Conf, "MuCapture/TrkAnalysisHF/pos/cutCosThetaMax", 0.98);
SetKey(Conf, "MuCapture/TrkAnalysisHF/pos/cutPtMin", 11.9); // MeV/c = 2 cm R
SetKey(Conf, "MuCapture/TrkAnalysisHF/pos/cutPzMin", 28.4); // MeV/c = 30cm L
SetKey(Conf, "MuCapture/TrkAnalysisHF/pos/cutPtotMin", 0.); // MeV/c
// NB: remember about "name helixfit helixfitmommax=..." in the KCM file.
SetKey(Conf, "MuCapture/TrkAnalysisHF/pos/cutPtotMax", 99999.); // MeV/c
SetKey(Conf, "MuCapture/TrkAnalysisHF/pos/cutTrackMuonOffset", 1.5);//cm
//----------------
// The kinematic cuts for the DIO normalization sample
// follow the TWIST DIO Phys.Rev.D.
// Here we use ptot rather than E. But the biggest difference
// is our use of the wire center fit.
SetKey(Conf, "MuCapture/TrkAnalysisHF/dioNorm/cutCharge", -1);
SetKey(Conf, "MuCapture/TrkAnalysisHF/dioNorm/cutTrackWinTimedt", 100.);//ns
SetKey(Conf, "MuCapture/TrkAnalysisHF/dioNorm/cutTrackRmax",6.34);//cm = 38.0 MeV/c pt
SetKey(Conf, "MuCapture/TrkAnalysisHF/dioNorm/cutCosThetaMin", 0.54);
SetKey(Conf, "MuCapture/TrkAnalysisHF/dioNorm/cutCosThetaMax", 0.92);
SetKey(Conf, "MuCapture/TrkAnalysisHF/dioNorm/cutPtMin", 11.0); // MeV/c
SetKey(Conf, "MuCapture/TrkAnalysisHF/dioNorm/cutPzMin", 14.0); // MeV/c
SetKey(Conf, "MuCapture/TrkAnalysisHF/dioNorm/cutPtotMin", 17.5); // MeV/c
SetKey(Conf, "MuCapture/TrkAnalysisHF/dioNorm/cutPtotMax", 73.5); // MeV/c
SetKey(Conf, "MuCapture/TrkAnalysisHF/dioNorm/cutTrackMuonOffset", 1.5);//cm
//----------------
// A loose set of cuts to get more DIOs for vetoing capture events
SetKey(Conf, "MuCapture/TrkAnalysisHF/dioVeto/cutCharge", -1);
SetKey(Conf, "MuCapture/TrkAnalysisHF/dioVeto/cutTrackWinTimedt", 100.);//ns
SetKey(Conf, "MuCapture/TrkAnalysisHF/dioVeto/cutTrackRmax",81.7);//cm, approx 49 MeV/c pt
SetKey(Conf, "MuCapture/TrkAnalysisHF/dioVeto/cutCosThetaMin", 0.0);
SetKey(Conf, "MuCapture/TrkAnalysisHF/dioVeto/cutCosThetaMax", 0.98);
SetKey(Conf, "MuCapture/TrkAnalysisHF/dioVeto/cutPtMin", 0.0); // MeV/c
SetKey(Conf, "MuCapture/TrkAnalysisHF/dioVeto/cutPzMin", 4.0); // MeV/c
SetKey(Conf, "MuCapture/TrkAnalysisHF/dioVeto/cutPtotMin", 0.); // MeV/c
SetKey(Conf, "MuCapture/TrkAnalysisHF/dioVeto/cutPtotMax", 73.5); // MeV/c
SetKey(Conf, "MuCapture/TrkAnalysisHF/dioVeto/cutTrackMuonOffset", 1.5);//cm
//----------------
// Require the track to NOT hit the last plane of the dense stack.
// So that it is not sensitive to hits in the outer PCs.
SetKey(Conf, "MuCapture/dnPosTrkContainment/cutMaxPlane", 51);
SetKey(Conf, "MuCapture/dnPosTrkContainment/cutMaxRout", 15.);
SetKey(Conf, "MuCapture/dnPosTrkContainment/useExtendedRange", true);
//================================================================
SetKey(Conf, "MuCapture/channels/versions", "rcp1,rp1,rpz1");
//----------------
// rangecos vs p: like legacy, but exclude outer PCs from contained tracks
SetKey(Conf, "MuCapture/channels/rcp1/contained/vars", "RangeCosVsP");
SetKey(Conf, "MuCapture/channels/rcp1/contained/ccut/cutMaxPlane", 51);
SetKey(Conf, "MuCapture/channels/rcp1/contained/ccut/cutMaxRout", 15.);
SetKey(Conf, "MuCapture/channels/rcp1/contained/ccut/useExtendedRange", true);
SetKey(Conf, "MuCapture/channels/rcp1/numGeneratorBins", 650);
SetKey(Conf, "MuCapture/channels/rcp1/genpmin", 0.);
SetKey(Conf, "MuCapture/channels/rcp1/genpmax", 650.);
SetKey(Conf, "MuCapture/channels/rcp1/contained/xvarnbins", 250);
SetKey(Conf, "MuCapture/channels/rcp1/contained/xvarmin", 25.);
SetKey(Conf, "MuCapture/channels/rcp1/contained/xvarmax", 650.);
SetKey(Conf, "MuCapture/channels/rcp1/contained/yvarnbins", 6);
SetKey(Conf, "MuCapture/channels/rcp1/contained/yvarmin", 8.);
SetKey(Conf, "MuCapture/channels/rcp1/contained/yvarmax", 32.);
SetKey(Conf, "MuCapture/channels/rcp1/uncontained/recopnbins", 250);
SetKey(Conf, "MuCapture/channels/rcp1/uncontained/recopmin", 25.);
SetKey(Conf, "MuCapture/channels/rcp1/uncontained/recopmax", 650.);
SetKey(Conf, "MuCapture/channels/rcp1/hitbased/cwiresnbins", 60);
SetKey(Conf, "MuCapture/channels/rcp1/hitbased/cwiresmin", 0.5);
SetKey(Conf, "MuCapture/channels/rcp1/hitbased/cwiresmax", 60.5);
SetKey(Conf, "MuCapture/channels/rcp1/hitbased/cplanesnbins", 25);
SetKey(Conf, "MuCapture/channels/rcp1/hitbased/cplanesmin", 0.5);
SetKey(Conf, "MuCapture/channels/rcp1/hitbased/cplanesmax", 25.5);
// histogram (costh vs p) in slices of range
SetKey(Conf, "MuCapture/channels/rcp1/doPCosthSlices", true);
// Make a PID plot for the paper with a nicer binning
SetKey(Conf, "MuCapture/channels/rcp1/doExtraHistos", true);
//----------------
// range vs p set of vars
SetKey(Conf, "MuCapture/channels/rp1/contained/vars", "RangeVsP");
SetKey(Conf, "MuCapture/channels/rp1/contained/ccut/cutMaxPlane", 51);
SetKey(Conf, "MuCapture/channels/rp1/contained/ccut/cutMaxRout", 15.);
SetKey(Conf, "MuCapture/channels/rp1/contained/ccut/useExtendedRange", true);
SetKey(Conf, "MuCapture/channels/rp1/numGeneratorBins", 650);
SetKey(Conf, "MuCapture/channels/rp1/genpmin", 0.);
SetKey(Conf, "MuCapture/channels/rp1/genpmax", 650.);
SetKey(Conf, "MuCapture/channels/rp1/contained/xvarnbins", 125);
SetKey(Conf, "MuCapture/channels/rp1/contained/xvarmin", 25.);
SetKey(Conf, "MuCapture/channels/rp1/contained/xvarmax", 650.);
SetKey(Conf, "MuCapture/channels/rp1/contained/yvarnbins", 16);
SetKey(Conf, "MuCapture/channels/rp1/contained/yvarmin", 7.5);
SetKey(Conf, "MuCapture/channels/rp1/contained/yvarmax", 23.5);
SetKey(Conf, "MuCapture/channels/rp1/uncontained/recopnbins", 250);
SetKey(Conf, "MuCapture/channels/rp1/uncontained/recopmin", 25.);
SetKey(Conf, "MuCapture/channels/rp1/uncontained/recopmax", 650.);
SetKey(Conf, "MuCapture/channels/rp1/hitbased/cwiresnbins", 60);
SetKey(Conf, "MuCapture/channels/rp1/hitbased/cwiresmin", 0.5);
SetKey(Conf, "MuCapture/channels/rp1/hitbased/cwiresmax", 60.5);
SetKey(Conf, "MuCapture/channels/rp1/hitbased/cplanesnbins", 25);
SetKey(Conf, "MuCapture/channels/rp1/hitbased/cplanesmin", 0.5);
SetKey(Conf, "MuCapture/channels/rp1/hitbased/cplanesmax", 25.5);
//----------------
// range vs pz set of vars
SetKey(Conf, "MuCapture/channels/rpz1/contained/vars", "RangeVsPz");
SetKey(Conf, "MuCapture/channels/rpz1/contained/ccut/cutMaxPlane", 51);
SetKey(Conf, "MuCapture/channels/rpz1/contained/ccut/cutMaxRout", 15.);
SetKey(Conf, "MuCapture/channels/rpz1/contained/ccut/useExtendedRange", true);
SetKey(Conf, "MuCapture/channels/rpz1/numGeneratorBins", 650);
SetKey(Conf, "MuCapture/channels/rpz1/genpmin", 0.);
SetKey(Conf, "MuCapture/channels/rpz1/genpmax", 650.);
SetKey(Conf, "MuCapture/channels/rpz1/contained/xvarnbins", 50);
SetKey(Conf, "MuCapture/channels/rpz1/contained/xvarmin", 0.);
SetKey(Conf, "MuCapture/channels/rpz1/contained/xvarmax", 650.);
SetKey(Conf, "MuCapture/channels/rpz1/contained/yvarnbins", 16);
SetKey(Conf, "MuCapture/channels/rpz1/contained/yvarmin", 7.5);
SetKey(Conf, "MuCapture/channels/rpz1/contained/yvarmax", 23.5);
SetKey(Conf, "MuCapture/channels/rpz1/uncontained/recopnbins", 250);
SetKey(Conf, "MuCapture/channels/rpz1/uncontained/recopmin", 25.);
SetKey(Conf, "MuCapture/channels/rpz1/uncontained/recopmax", 650.);
SetKey(Conf, "MuCapture/channels/rpz1/hitbased/cwiresnbins", 60);
SetKey(Conf, "MuCapture/channels/rpz1/hitbased/cwiresmin", 0.5);
SetKey(Conf, "MuCapture/channels/rpz1/hitbased/cwiresmax", 60.5);
SetKey(Conf, "MuCapture/channels/rpz1/hitbased/cplanesnbins", 25);
SetKey(Conf, "MuCapture/channels/rpz1/hitbased/cplanesmin", 0.5);
SetKey(Conf, "MuCapture/channels/rpz1/hitbased/cplanesmax", 25.5);
//================================================================
// This cut is inactive by default
SetKey(Conf, "HitBasedAnalysis/maxClusterWiresFilterCutPC", 999);
//================================================================
}