27 def __init__(self):
28 super(DiTauMassBlock, self).__init__()
29 self.addOption('algName', '', type=str,
30 info='optional name to distinguish between multiple instances of the algorithm.')
31 self.addOption('electrons', '', type=str,
32 info='the input electron container, with a possible selection, in the format `container` or `container.selection`.',
33 meta={'role':'containerRef'})
34 self.addOption('muons', '', type=str,
35 info='the input muon container, with a possible selection, in the format `container` or `container.selection`.',
36 meta={'role':'containerRef'})
37 self.addOption('jets', '', type=str,
38 info='the input jet container, with a possible selection, in the format `container` or `container.selection`.',
39 meta={'role':'containerRef'})
40 self.addOption('taus', '', type=str,
41 info='the input tau-jet container, with a possible selection, in the format `container` or `container.selection`.',
42 meta={'role':'containerRef'})
43 self.addOption('met', '', type=str,
44 info='the input MET container.',
45 meta={'role':'containerRef'})
46 self.addOption('eventSelection', '', type=str,
47 info='optional event filter to run on. If left empty, processes all events.',
48 meta={'role':'region'})
49 self.addOption('saveExtraVariables', False, type=bool,
50 info='whether to save additional output information from the MMC.')
51 self.addOption('floatStopCriterion', True, type=bool,
52 info='whether to activate the floating stopping criterion.')
53 self.addOption('floatStopCriterionMinIter', 10000, type=int,
54 info='minimum number of iteration to activate the floating stopping criterion.')
55 self.addOption('floatStopCriterionCheckFreq', 1000, type=int,
56 info='event frequency for floating stopping criterion to be checked after minimum number of iteration.')
57 self.addOption('floatStopCriterionComp', 0.05, type=float,
58 info='percentage used to assess compatibility for floating stopping criterion to be applied.')
59 self.addOption('calibration', '2024', type=str,
60 info='the calibration set to use.')
61 self.addOption('nSigmaMet', -1, type=int,
62 info='the number of sigmas for the MET resolution scan. Set to -1 to not run the scan.')
63 self.addOption('useTailCleanup', -1, type=int,
64 info='whether to activate the tail cleanup feature.')
65 self.addOption('niterFit2', -1, type=int,
66 info='the number of iterations for each MET scan loop.')
67 self.addOption('niterFit3', -1, type=int,
68 info='the number of iterations for each Mnu loop.')
69 self.addOption('useTauProbability', 1, type=int,
70 info='whether to apply tau probability (additional PDF term corresponding to the ratio of the neutrino momentum to the reconstructed tau momentum).')
71 self.addOption('useMnuProbability', False, type=bool,
72 info='whether to apply $m_\nu$ probability (additional PDF term corresponding to the mass of the neutrino system per tau decay, only applied to leptonic tau decays).')
73 self.addOption('useDefaultSettings', -1, type=int,
74 info='whether to take all default options from the tool itself.')
75 self.addOption('useEfficiencyRecovery', -1, type=int,
76 info='whether to enable refitting for failed events, to improve efficiency.')
77 self.addOption('useMETdphiLL', False, type=bool,
78 info='whether to parameterise the MET resolution using `sumET` and `dphiLL` (only for the lep-lep case).')
79 self.addOption('paramFilePath', 'MMC_params_v051224_angle_noLikelihoodFit.root', type=str,
80 info='path to the ROOT file used with `calibSet` ≥ 2024, containing the PDFs for the likelihood.')
81 self.addOption('doMLNU3P', False, type=bool,
82 info='save information about the reconstruction with the best-fit neutrino kinematics.')
83 self.addOption('doMAXW', False, type=bool,
84 info='save information about the reconstruction with the maximum-weight estimator.')
85 self.addOption('saveLlhHisto', False, type=bool,
86 info='save likelihood histograms for debugging purpose. If enabled, it can slow down MMC running time.')
87 self.addOption('doCollinearApprox', False, type=bool,
88 info='save additional variables (mass, x0, x1) from collinear approximation')
89
90 def instanceName (self) :
91 """Return the instance name for this block"""
92 if self.algName:
93 return self.taus.
replace(
'.',
'_') + self.algName
94 else:
95 return self.taus.
replace(
'.',
'_')
96
std::string replace(std::string s, const std::string &s2, const std::string &s3)