5import AthenaPoolCnvSvc.ReadAthenaPool
6svcMgr.EventSelector.InputCollections = [
"!TESTSAMPLE!"]
7from PyUtils.MetaReader
import read_metadata
8filename = svcMgr.EventSelector.InputCollections[0]
15 name= name.replace(
".",
"p").
replace(
" ",
"_")
16 name= name.replace(
"pyoda",
".yoda")
17 name= name.replace(
":",
"_")
21metadata = read_metadata(filename,
None,
'full')[filename]
22if '/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:')
34from AthenaCommon.AlgSequence
import AlgSequence
37from Rivet_i.Rivet_iConf
import Rivet_i
40from AthenaCommon.AppMgr
import ServiceMgr
as svcMgr
41from GaudiSvc.GaudiSvcConf
import THistSvc
44analyses=
"!RIVETANALYSIS!"
45if systWeights==
None: systWeights={
'Nominal': 0}
49 print(
'weight name:',i,
', output name',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
void print(char *figname, TCanvas *c1)
Interface to the Rivet analysis package.
std::string replace(std::string s, const std::string &s2, const std::string &s3)