5 import AthenaPoolCnvSvc.ReadAthenaPool
6 svcMgr.EventSelector.InputCollections = [
"!TESTSAMPLE!"]
7 from PyUtils.MetaReader
import read_metadata
8 filename = svcMgr.EventSelector.InputCollections[0]
15 name= name.replace(
".",
"p").
replace(
" ",
"_")
16 name= name.replace(
"pyoda",
".yoda")
17 name= name.replace(
":",
"_")
22 if '/Generation/Parameters' in metadata:
23 genpars=metadata[
'/Generation/Parameters']
24 if 'HepMCWeightNames' in genpars:
25 systWeights=genpars[
'HepMCWeightNames']
27 print(
'HepMCWeightName not found in /Generation/Parameters:')
30 print(
'/Generation/Parameters not found in metadata:')
34 from AthenaCommon.AlgSequence
import AlgSequence
37 from Rivet_i.Rivet_iConf
import Rivet_i
40 from AthenaCommon.AppMgr
import ServiceMgr
as svcMgr
41 from GaudiSvc.GaudiSvcConf
import THistSvc
44 analyses=
"!RIVETANALYSIS!"
45 if systWeights==
None: systWeights={
'Nominal': 0}
49 print(
'weight name:',i,
', output name',systName)
51 rivet = Rivet_i(systName)
52 for analysis
in analyses.split(
","):
53 rivet.Analyses +=[analysis]
56 if i!=
"Nominal" : rivet.WeightName=i
57 rivet.HistoFile = systName
58 rivet.DoRootHistos =
False
59 rivet.AnalysisPath = os.environ[
'PWD']
60 rivet.CrossSection = 1.0