23 def makeAlgs(self, config):
24 alg = config.createAlgorithm('CP::SSVWeightsAlg', 'SSVWeightsAlg')
25
26 jets = config.readName(self.jets)
27 electrons = config.readName(self.electrons)
28 muons = config.readName(self.muons)
29
30 alg.jets = jets
31 alg.electrons = electrons
32 alg.muons = muons
33 alg.NVSI_WP = self.NVSI_WP
34 alg.JsonConfigFile_SSVWeightsAlg = self.JsonConfigFile_SSVWeightsAlg
35 alg.BTagging_WP = self.BTagging_WP
36 alg.OverlapRemoval = self.OverlapRemoval
37 alg.Jvt = self.Jvt
38 alg.efficiency_Method = self.efficiency_Method
39 alg.nF_Method = self.nF_Method
40 alg.OutputVariable_Size = self.OutputVariable_Size
41
42 config.addOutputVar('EventInfo', 'SSV_weight_%SYS%', 'SSV_weight')
43
44 if alg.OutputVariable_Size in ["extended", "additional", "all"] :
45 config.addOutputVar('EventInfo', 'P_eff_%SYS%', 'P_eff')
46 config.addOutputVar('EventInfo', 'P_ineff_%SYS%', 'P_ineff')
47 config.addOutputVar('EventInfo', 'P_fake_%SYS%', 'P_fake')
48
49 if alg.OutputVariable_Size in ["additional", "all"] :
50 config.addOutputVar('EventInfo', 'N_matched_%SYS%', 'N_matched')
51 config.addOutputVar('EventInfo', 'N_missed_%SYS%', 'N_missed')
52 config.addOutputVar('EventInfo', 'N_fake_%SYS%', 'N_fake')
53 config.addOutputVar('EventInfo', 'number_of_bjets_%SYS%', 'number_of_bjets','number of b-jets in an event')
54 config.addOutputVar('EventInfo', 'number_of_accepted_Bhadrons_%SYS%', 'number_of_accepted_Bhadrons')
55 config.addOutputVar('EventInfo', 'number_of_good_SSVs_%SYS%', 'number_of_good_SSVs')
56
57 if alg.OutputVariable_Size == "all":
58 config.addOutputVar('EventInfo', 'P_ineff_bjet_based_%SYS%', 'P_ineff_bjet_based')
59 config.addOutputVar('EventInfo', 'P_ineff_pt_eta_based_%SYS%', 'P_ineff_pt_eta_based')
60 config.addOutputVar('EventInfo', 'P_fake_pileup_bjet_based_%SYS%', 'P_fake_pileup_bjet_based')
61 config.addOutputVar('EventInfo', 'P_fake_pileup_based_linearfit_%SYS%', 'P_fake_pileup_based_linearfit')
62 config.addOutputVar('EventInfo', 'P_fake_pileup_based_binned_%SYS%', 'P_fake_pileup_based_binned')