Introduction
To generate xAOD root files from LHE text files (e.g. MG5 output) you probably first want to apply a parton shower. Here we use the standard ATLAS Pythia8 setup for this which produces EVENT files.
Those can be easily converted into xAODs using the standard Reco_tf.py script.
Parton Shower with Pythia8
First Athena has to be set up.
asetup AtlasProduction,19.2.5.23,here
is working. If you're not familiar with setting up Athena have a look at recommended release of the [PhysicsAnalysisWorkBook ][ATLAS Physics Analysis Workbook].
Then the showering can be run using the following command:
Generate_tf.py --ecmEnergy=13000. --maxEvents=-1 --runNumber=999999 --firstEvent=1 --randomSeed=123456 --outputEVNTFile=EVNT.root --jobConfig=MC15.999999.MadGraphPythia8EvtGen_ALP_DiPhoton.py --inputGeneratorFile=group.phys-gener.MadGraph.999999.aa_aa.Alp_DiPhoton_incl.mc15_v1._00001.tar.gz
The input file is specified with the option
--inputGeneratorFile=
. The LHE file must be named like this:
group.phys-gener.[generator].[DSID].[process].TXT.mcXX_vX._0XXXX.events
and placed inside a tarball named similarly:
group.phys-gener.[generator].[DSID].[process].TXT.mcXX_vX._0XXXX.tar.gz
--jobConfig=
specifies the configuration of the Generate_tf job. For the pythia showering only few lines are needed. The example file
MC15.999999.MadGraphPythia8EvtGen_ALP_DiPhoton.py.txt is attached.
Running the above command will create the file EVNT.root containing by default 5000 events at most. If you want to process more events it should be done in separate jobs, adjusting the
--firstEvent
option.
Conversions from EVENT to xAOD format
One easy way to do the conversion is by using the derivation framework, as suggested
here.
Athena version tested:
asetup 20.7.9.6,AtlasDerivation,gcc48,here
Just run the command:
Reco_tf.py --inputEVNTFile ./EVNT.root --outputDAODFile MadGraph_Alp_Diphoton.pool.root --reductionConf TRUTH1
If needed different TRUTH derivations that are smaller than TRUTH1 can be specified.
The the
documentation of the derivation framework for more information.
An example bash script usable to submit a sequence of shower and EVT->xAOD conversion jobs to lxbatch is attached
run_batch.sh: run_batch.sh
In order to use it the INPUT and INPUTPATH variables in the script have to be adjusted. The script expects a number n, corresponding to the n-th 5k events to process (5k events is the maximum to process in one job).
--
KristofSchmieden - 2017-07-18