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