Dark Sector Event Generation

This section describes getting Itay Yavin's dark-sector event generation files into a format usable for ATLAS simulation. Itay's code requires an input file in Les Houches Event Format (.lhe) which contains the "parent" event including a SUSY LSP (particle ID 1000022) which is decayed into a boson-fermion dark state. The code is in Mathematica and produces a .lhe output file which needs further processing by Pythia. Itay gave me an example input file with 250 events.

ACTION ITEM: Consult with Itay about the "input" file his code uses, getting the machinery and range of types of events that would be useful for the prompt lepton jet searches.

ATLAS event generation should be able to read in the .lhe file and produce an evnt root file suitable for use by the ATLAS simulation, digitization and reconstruction chain.

I used release to try to get something working. On our system this is accessed using CVMFS.

Originally I tried the Evgen_try.py transform to convert the .lhe file into an evnt root file. The input file I used was produced by Itay's Mathematica code is was called EWino_sps8_LHC7_1_decayed_events2.lhe.evts (NOTE: I appended the .evts because of some issues I saw described below). The issue is what the JobConfig and JobOptions need to be to read-in the .lhe file, process it with Pythia and produce the needed evnt root file. From reading in the ATLAS workbook, it seems that the .lhe file needs to be packaged as a gzipped tarfile.

I transferred the .lhe file to our Linux cluster and created one like:

tar czvf EWino_sps8_LHC7_1_decayed_events2.lhe.evts.tar.gz EWino_sps8_LHC7_1_decayed_events2.lhe.evts

After some experimenting I found the following worked:

Evgen_trf.py inputGeneratorFile=EWino_sps8_LHC7_1_decayed_events2.lhe.evts.tar.gz outputEvgenFile=darksector.10001.evnt.root runNumber=10001 --omitvalidation=testEventMinMax ecmEnergy=7000 firstEvent=1 maxevents=250 randomSeed=12345678 jobConfig=job_Pythia.py

The job_Pythia.py (jobConfig) was used to setup the read-in of the .lhe file and produce the output evnt.root file. This worked fine. NOTE: Please let me know if you have edits or suggestions for the job_Pythia.py file I am using. I assembled it from various sources and there may be better options to choose.

I then realized that Evgen_trf.py is supposed to be deprecated in release 17.x (and maybe 16.x?) and its replacement is supposed to be Generate_trf.py. This transform should be almost the same as Evgen_trf.py except for some small syntax changes. However I hit a snag in trying to make it work.

The equivalent command line should have been something like this:

Generate_trf.py inputGeneratorFile=EWino_sps8_LHC7_1_decayed_events2.lhe.evts.tar.gz outputEVNTFile=darksector.20001.evnt.root runNumber=20001 --omitvalidation=testEventMinMax ecmEnergy=7000 firstEvent=1 randomSeed=12345678 jobConfig=job_Pythia.py

But this fails as follows:

Shortened traceback (most recent user call last):
  File "/cvmfs/atlas.cern.ch/repo/sw/software/i686-slc5-gcc43-opt/17.0.3/AtlasOffline/17.0.3/InstallArea/jobOptions/EvgenJobTransforms/skeleton.GENtoEVGEN.py", line 293, in <module>
    raise RuntimeError( "No *%s*.events|.evts file found in %s" % (inputbase,inputArg) )
RuntimeError: No *EWino_sps8_LHC7_1_decayed_events2.lhe*.events|.evts file found in EWino_sps8_LHC7_1_decayed_events2.lhe.evts.tar.gz
Py:Athena            INFO leaving with code 8: "an unknown exception occurred"

The issue seems to be in the skeleton.GENtoEVGEN.py code. There is a section which does some kind of check to verify the needed file is available:

    if whoNeedsEventsFile:
        inputEvents = '*%s.*.ev*ts' % inputroot
        eventsFiles = glob.glob( inputEvents )
        if len(eventsFiles) == 0:
            raise RuntimeError( "No *%s*.events|.evts file found in %s" % (inputbase,inputArg) )
        elif len(eventsFiles) > 1:
            raise RuntimeError( "More than 1 *%s*.events files found in %s" % (inputbase,inputArg) )
        eventsFile = eventsFiles[0]

I have a little test script to see its behavior using the gzipped tarfile that worked on Evgen_trf.py call test_python.py:

import os, glob

inputArg = "EWino_sps8_LHC7_1_decayed_events2.lhe.evts.tar.gz"
inputroot = os.path.basename(inputArg).split("._")[0]
print " inputroot = ", inputroot
inputEvents = '*%s.*.ev*ts' % inputroot
print " inputEvents = ", inputEvents
eventsFiles = glob.glob( inputEvents )
print " eventsFiles = ", eventsFiles

Running it in the same directory as I ran the Generate_trf.py I get:

smckee@umt3int01 ~/ATLAS/DarkMatter/testarea/AtlasPhysics-$ python test_python.py
 inputroot =  EWino_sps8_LHC7_1_decayed_events2.lhe.evts.tar.gz
 inputEvents =  *EWino_sps8_LHC7_1_decayed_events2.lhe.evts.tar.gz.*.ev*ts
 eventsFiles =  []

Since eventsFiles is empty, the check in skeleton.GENtoEVGEN.py will fail (as it does). The question is what should be done to make Generate_trf.py work? Is this a bug? It may be that not many people have tried Generate_trf.py using an input file.

UPDATE December 8, 2011: Loek Hooft van Huysduynen was able to determine I had a file naming convention problem in how I constructed the gzipped-tarball. It turns our Generate_trf.py has a different naming requirement compared to Evgen_trf.py. The working version Loek provided was named EWino_sps8_LHC7_1_decayed._000002.tar.gz which contained the single file EWino_sps8_LHC7_1_decayed._000002.events. This now "passes" my simple test script:
smckee@umt3int01 ~/ATLAS/DarkMatter/testarea/AtlasPhysics-$ python test_python.py
 inputroot =  EWino_sps8_LHC7_1_decayed
 inputEvents =  *EWino_sps8_LHC7_1_decayed.*.ev*ts
 eventsFiles =  ['EWino_sps8_LHC7_1_decayed._000002.events']

Also a simple run works:

Generate_trf.py ecmEnergy=7000 runNumber=1079999 firstEvent=1 maxEvents=5000 randomSeed=123456 jobConfig=MC11.107259.PythiaMadgraph_leptonjets_Squark_a00_m150.py outputEVNTFile=output.pool.root inputGeneratorFile=EWino_sps8_LHC7_1_decayed._000002.tar.gz

The MC11.107259.PythiaMadgraph_leptonjets_Squark_a00_m150.py file is here.

Thanks Loek!

Our near-term goal is to have the complete machinery in place from generation through reconstruction for representative dark-sector models that yield prompt lepton jets consistent with prior cosmic-ray experimental results.


-- ShawnMcKee - 08 Dec 2011

  • job_Pythia.py.txt: Job options file to read-in LHE format, process with Pythia and output evnt root file

Topic attachments
I Attachment Action Size Date Who Comment
MC11.107259.PythiaMadgraph_leptonjets_Squark_a00_m150.py.txttxt MC11.107259.PythiaMadgraph_leptonjets_Squark_a00_m150.py.txt manage 1 K 08 Dec 2011 - 17:09 ShawnMcKee jobConfig for Madgraph -> Pythia (LHE input file)
job_Pythia.py.txttxt job_Pythia.py.txt manage 3 K 08 Dec 2011 - 12:46 ShawnMcKee Job options file to read-in LHE format, process with Pythia and output evnt root file
skeleton.GENtoEVGEN.py.txttxt skeleton.GENtoEVGEN.py.txt manage 14 K 08 Dec 2011 - 12:58 ShawnMcKee skeleton.GENtoEVGEN.py
Topic revision: r3 - 08 Dec 2011, ShawnMcKee
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback