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