24 def makeAlgs(self, config):
25
26 if config.dataType() == DataType.Data:
27 return
28
29 alg = config.createAlgorithm('CP::SSVWeightsAlg', 'SSVWeightsAlg')
30
31 jetContainer, sep, jetSelectionName = self.jets.partition('.')
32 alg.jetSelection = config.getFullSelection(jetContainer, jetSelectionName)
33 alg.jets = config.readName(jetContainer)
34
35 electronContainer, sep, electronSelectionName = self.electrons.partition('.')
36 alg.electronSelection = config.getFullSelection(electronContainer, electronSelectionName)
37 alg.electrons = config.readName(electronContainer)
38
39 muonContainer, sep, muonSelectionName = self.muons.partition('.')
40 alg.muonSelection = config.getFullSelection(muonContainer, muonSelectionName)
41 alg.muons = config.readName(muonContainer)
42
43 print(
"Py:SSVWeightsAlg ",
"You run with the following jet selections: ", alg.jetSelection)
44 print(
"Py:SSVWeightsAlg ",
"You run with the following electron selections: ", alg.electronSelection)
45 print(
"Py:SSVWeightsAlg ",
"You run with the following muon selections: ", alg.muonSelection)
46
47 alg.NVSI_WP = self.NVSI_WP
48 alg.JsonConfigFile_SSVWeightsAlg = self.JsonConfigFile_SSVWeightsAlg
49 alg.BTaggingWP = self.BTaggingWP
50 alg.EfficiencyMethod = self.EfficiencyMethod
51 alg.nFMethod = self.nFMethod
52 alg.OutputVariableSize = self.OutputVariableSize
53
54 config.addOutputVar('EventInfo', 'SSV_weight_%SYS%', 'SSV_weight')
55
56 if alg.OutputVariableSize in ["extended", "additional", "all"] :
57 config.addOutputVar('EventInfo', 'P_eff_%SYS%', 'P_eff')
58 config.addOutputVar('EventInfo', 'P_ineff_%SYS%', 'P_ineff')
59 config.addOutputVar('EventInfo', 'P_fake_%SYS%', 'P_fake')
60
61 if alg.OutputVariableSize in ["additional", "all"] :
62 config.addOutputVar('EventInfo', 'N_matched_%SYS%', 'N_matched')
63 config.addOutputVar('EventInfo', 'N_missed_%SYS%', 'N_missed')
64 config.addOutputVar('EventInfo', 'N_fake_%SYS%', 'N_fake')
65 config.addOutputVar('EventInfo', 'number_of_bjets_%SYS%', 'number_of_bjets')
66 config.addOutputVar('EventInfo', 'number_of_accepted_Bhadrons_%SYS%', 'number_of_accepted_Bhadrons')
67 config.addOutputVar('EventInfo', 'number_of_good_SSVs_%SYS%', 'number_of_good_SSVs')
68
69 if alg.OutputVariableSize == "all":
70 config.addOutputVar('EventInfo', 'P_ineff_bjet_based_%SYS%', 'P_ineff_bjet_based')
71 config.addOutputVar('EventInfo', 'P_ineff_pt_eta_based_%SYS%', 'P_ineff_pt_eta_based')
72 config.addOutputVar('EventInfo', 'P_fake_pileup_bjet_based_%SYS%', 'P_fake_pileup_bjet_based')
73 config.addOutputVar('EventInfo', 'P_fake_pileup_based_linearfit_%SYS%', 'P_fake_pileup_based_linearfit')
74 config.addOutputVar('EventInfo', 'P_fake_pileup_based_binned_%SYS%', 'P_fake_pileup_based_binned')
void print(char *figname, TCanvas *c1)