31 def makeAlgs (self, config) :
32
33 if config.dataType() is DataType.Data: return
34
35 postfix = self.postfix
36 if postfix != '' and postfix[0] != '_' :
37 postfix = '_' + postfix
38
39
40 alg = config.createAlgorithm( 'CP::AsgEventScaleFactorAlg', 'JvtEventScaleFactorAlg' )
41 preselection = config.getFullSelection (self.containerName, '')
42 alg.preselection = preselection + '&&no_jvt' if preselection else 'no_jvt'
43 alg.scaleFactorInputDecoration = 'jvt_effSF_%SYS%'
44 alg.scaleFactorOutputDecoration = 'jvt_effSF_%SYS%'
45 alg.particles = config.readName (self.containerName)
46
47 config.addOutputVar('EventInfo', alg.scaleFactorOutputDecoration, 'weight_jvt_effSF' + postfix)
48
49 if self.enableFJvt:
50 alg = config.createAlgorithm( 'CP::AsgEventScaleFactorAlg', 'ForwardJvtEventScaleFactorAlg' )
51 preselection = config.getFullSelection (self.containerName, '')
52 alg.preselection = preselection + '&&no_fjvt' if preselection else 'no_fjvt'
53 alg.scaleFactorInputDecoration = 'fjvt_effSF_%SYS%'
54 alg.scaleFactorOutputDecoration = 'fjvt_effSF_%SYS%'
55 alg.particles = config.readName (self.containerName)
56
57 config.addOutputVar('EventInfo', alg.scaleFactorOutputDecoration, 'weight_fjvt_effSF' + postfix)
58