ATLAS Offline Software
Loading...
Searching...
No Matches
python.PMGTruthWeightAlgConfig Namespace Reference

Functions

 PMGTruthWeightAlgCfg (flags, systematicsRegex='.*')

Function Documentation

◆ PMGTruthWeightAlgCfg()

python.PMGTruthWeightAlgConfig.PMGTruthWeightAlgCfg ( flags,
systematicsRegex = '.*' )
Decorate systematically varied generator weights to
'EventInfo', with a human-readable name.

With systematicsRegex set to 'None', do not add the
SystematicsSvc.

Definition at line 25 of file PMGTruthWeightAlgConfig.py.

25def PMGTruthWeightAlgCfg(flags, systematicsRegex='.*'):
26 """Decorate systematically varied generator weights to
27 'EventInfo', with a human-readable name.
28
29 With systematicsRegex set to 'None', do not add the
30 SystematicsSvc.
31
32 """
33 ca = ComponentAccumulator()
34 # we need both the systematics service and the metadata service to
35 # make this tool work.
36 if systematicsRegex is not None:
37 ca.addService(
38 CompFactory.CP.SystematicsSvc(
39 name="SystematicsSvc",
40 sigmaRecommended=1,
41 systematicsRegex=systematicsRegex,
42 )
43 )
44 ca.merge(MetaDataSvcCfg(flags))
45 ca.addEventAlgo(
46 CompFactory.CP.PMGTruthWeightAlg(
47 name="PMGTruthWeightAlg",
48 truthWeightTool=CompFactory.PMGTools.PMGTruthWeightTool(
49 name="PMGTruthWeightTool"
50 ),
51 decoration = 'generatorWeight_%SYS%',
52 )
53 )
54 return ca