All MOnte Carlo Files have associated Metadata. This allows the contents of the files to be described and are essential for any file that will be part of the official Monte Carlo Production. For this reason you will have to createMetadata for your user generated files. Ideally all generators will be included in runjob which produces metadata by default. This metadata is stored in a very similar format to the metadata used to create requests.
All importa files have a common header and inlculde a python metadata dictionary.
from import_classes import *
appfamily=AppFamily('generator', 'p13.08.00', 'pythia') # application_family, version of software, generator name
filename = 'gen-pythia-p13.08.00_Dec-incl_NumEv-1000000_Prod-qcd_bertram_heavy-flavour-id_mcp14_lancs_5940_03110160222'
t = SAMMCFile(filename,Events(first_event, last_event, total_events),"generated",appfamily,
"start_date_and_time","end_date_and_time",size_in_kbytes (du -sk), Dict{})
For example, here is a possible set of metadata. To store you would do your
usual sam store --descrip=import_script.py --source=`pwd`
from import_classes import *
appfamily=AppFamily('generator', 'p13.08.00', 'pythia') # application_family, version of software, generator name
filename = 'gen-pythia-p13.08.00_Dec-incl_NumEv-1000000_Prod-qcd_bertram_heavy-flavour-id_mcp14_lancs_5940_03110160222'
t = SAMMCFile(filename,Events(7, 8059, 500),"generated-bygroup",appfamily,"04/20/2003 16:03:16","4/20/2003 16:10:2",15032,
{'Global':{ # Global Metadata describing geeral job and use details
'ProducedByName':'bertram',
'OriginName':'lancs',
'Phase':'mcp14', # Phase should be group-phase1
'FacilityName':'lancs',
'ProducedForName':'sonne',
'RunType':'monte carlo', # Obviously needed
'GroupName':'heavy flavour id',
'Stream':'notstreamed',
'Description':'p14.01.00 mc pythia bbbar incl pt100',},
'Generated' : { # Information about your generated file, this is minimal information.
'AppFamily':'generator',
'AppName':'pythia',
'AppVersion':'p13.08.00',
'D0Release':'p13.08.00',
'FrameworkRCPPackage':'None', # Did you use a framework rcp package other than the default (not o important for generator files
'FrameworkRCPName':'runMCpythia.rcp', # generator framework rcp this is the default
'RanSeed1':'2073558724', # The random number seeds for this file
'RanSeed2':'2037107454',
'CardfileVersion':'v00-04-28', # version of cardfiles, you MUST have your crdfile published
'CardfileDir':'bid',
'Production':'qcd',
'Decay':'incl',
'CollisionEnergy':'1960.0', # collision energy, especially if it is non-standard
'PDFLibFunc':'CTEQ4L', # pdf please use standard names, ask if not sure. case insensitive
'D0MessProcess':'bbbar-incl', # if using d0mess the mess rcpo should be in the sam release as the cardfiles
'TopMass':'174.3', # only list the masses you use, this is a partial list of current settable masses
'HiggsMass':'120.0',
'ChTechniRhoMass':'175.0',
'TechniPi0Mass':'85.0',
'WPrimeMass':'750.0',
'LeptoQuarkMass':'250.0',
'TechniRho0Mass':'175.0',
'ChTechniPiMass':'85.0',
'TechniOmega0Mass':'175.0',
'HppMass':'200.0',
'TechniPi0PrimeMass':'85.0',
'EtaGt':'-4.2', # The following are possible parameters from runjob
'EtaLt':'4.2',
'PtGt':'100.0',
'PtLt':'99999.0',
'KinMassGt':'2.0',
'KinMassLt':'-1.0',
'UseQQ':'off', # Are you using qq or evtgen or different tauola....
'UseEvtGen':'off',
'MultiplePartonInteractions':'on',}})
Iain Bertram
April 29, 2003