Dark Pion sample production: from LHE to xAOD

Quick description of how to produce private samples with full detector simulation and pileup. Starting point is a Les Houches Event (LHE) File. As an example a dark pion signal sample with configuration SU2L_gaugephobic_55_1000 is used. The chosen releases and options reproduce the mc16e campaign.

Parton showering in Pythia8: LHE to EVNT

Using release AtlasProduction,19.2.5.12 to emulate e5984.

Local processing

The creation of a job options file is required. This can be kept quite simple. An example would be to create a file called MC15.999999.MadGraphPythia8EvtGen_DarkMesons.py with the following content:

evgenConfig.description = 'MadGraph_DarkMesons'
evgenConfig.contact  = [ 'jochen.jens.heinrich@cern.ch' ]

include("MC15JobOptions/Pythia8_A14_NNPDF23LO_EvtGen_Common.py")
include("MC15JobOptions/Pythia8_MadGraph.py")

Next, the input LHE file has to be renamed following the convention group.phys-gener.[generator].[DSID].[process].TXT.mcXX_vX._0XXXX.events. For the example job the file is called group.phys-gener.MadGraph.999999.DarkPion_SU2L_gaugephobic_55_1000.TXT.mc16_v1._00001.events. The LHE file is then placed inside a tar-ball which follows the same naming conventions and is in this case called group.phys-gener.MadGraph.999999.DarkPion_SU2L_gaugephobic_55_1000.TXT.mc16_v1._00001.tar.gz.

The command to run Generate_tf.py to output an EVNT file is the following:

Generate_tf.py --ecmEnergy=13000. --maxEvents=100 --runNumber=999999 --firstEvent=1 --randomSeed=123456 --outputEVNTFile=DarkPion_SU2L_gaugephobic_55_1000.EVNT.root --jobConfig=MC15.999999.MadGraphPythia8EvtGen_DarkMesons.py --inputGeneratorFile=group.phys-gener.MadGraph.999999.DarkPion_SU2L_gaugephobic_55_1000.TXT.mc16_v1._00001.tar.gz

Grid processing

In order to be able to run the job on the grid, the input LHE file needs to be made available on the grid, meaning it needs to be uploaded with rucio. The command to do this is

rucio -v upload --rse CERN-PROD_SCRATCHDISK user.joheinri:group.phys-gener.MadGraph.999999.DarkPion_SU2L_gaugephobic_55_1000.TXT.mc16_v1 group.phys-gener.MadGraph.999999.DarkPion_SU2L_gaugephobic_55_1000.TXT.mc16_v1._00001.events

Here the rse can be any SCRATCHDISK or LOCALGROUPDISK. This will create a container with name group.phys-gener.MadGraph.999999.DarkPion_SU2L_gaugephobic_55_1000.TXT.mc16_v1, and all following files are placed inside this container. If there is more than one file, the are simply added without a comma. Notice that it is the original *.event files which get uploaded, rather than the tar-balls.

The command for grid processing is

pathena --trf "Generate_tf.py --ecmEnergy=13000 --maxEvents=20000 --runNumber=999999 --randomSeed=%RNDM:100 --inputGeneratorFile=%IN --outputEVNTFile=%OUT.EVNT.pool.root --jobConfig=MC15.999999.MadGraphPythia8EvtGen_DarkMesons.py" --inDS user.joheinri:group.phys-gener.MadGraph.999999.DarkPion_SU2L_gaugephobic_55_1000.TXT.mc16_v4 --outDS user.joheinri.mc16_13TeV.999999.MGPy8EG_A14N23LO_DarkPions_SU2L_gaugephobic_55_1000.EVNT.190322.A --nEventsPerFile=20000 --nEventsPerJob=20000 --noBuild

Since the generation process is fairly quick there is no point in splitting up the job at this stage and we will create just a single output file containing all 20000 events. Note that the --skipevents option will not work here.

Detector simulation: EVNT to HITS

Using release AtlasOffline,21.0.15 to emulate s3126

Local processing

The simulation step takes the EVNT output from the previous step as input and outputs a HITS file. Since this step is very time consuming a small number of events is recommended. The command for local testing is

Sim_tf.py --inputEvgenFile DarkPion _SU2L_gaugephobic_55_1000.EVNT.root --outputHitsFile DarkPion _SU2L_gaugephobic_55_1000.HITS.pool.root --geometryVersion "default:ATLAS-R2-2016-01-00-01_VALIDATION" --conditionsTag "default:OFLCOND-MC16-SDR-14" --DBRelease "all:current" --DataRunNumber 284500 --physicsList FTFP_BERT_ATL_VALIDATION --postInclude "default:RecJobTransforms/UseFrontier.py" --truthStrategy MC15aPlus --simulator FullG4 --preExec "EVNTtoHITS:simFlags.SimBarcodeOffset.set_Value_and_Lock(200000)" "EVNTtoHITS:simFlags.TRTRangeCut=30.0;simFlags.TightMuonStepping=True" --preInclude "EVNTtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py,SimulationJobOptions/preInclude.FrozenShowersFCalOnly.py" --maxEvents 10

Grid processing

For grid processing the following command can be used:

pathena --trf "Sim_tf.py --inputEvgenFile=%IN --outputHitsFile=%OUT.HITS.pool.root --maxEvents=50 --skipEvents=%SKIPEVENTS --geometryVersion=\"default:ATLAS-R2-2016-01-00-01_VALIDATION\" --conditionsTag=\"default:OFLCOND-MC16-SDR-14\" --DBRelease=\"all:current\" --DataRunNumber=284500 --physicsList=FTFP_BERT_ATL_VALIDATION --postInclude=\"default:RecJobTransforms/UseFrontier.py\" --truthStrategy=MC15aPlus --simulator=FullG4 --preExec=\"EVNTtoHITS:simFlags.SimBarcodeOffset.set_Value_and_Lock(200000);simFlags.TRTRangeCut=30.0;simFlags.TightMuonStepping=True\" --preInclude=\"EVNTtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py,SimulationJobOptions/preInclude.FrozenShowersFCalOnly.py\"" --inDS user.joheinri.mc16_13TeV.999999.MGPy8EG_A14N23LO_DarkPions_SU2L_gaugephobic_55_1000.EVNT.190322.B_EXT0/ --outDS user.joheinri.mc16_13TeV.999999.MGPy8EG_A14N23LO_DarkPions_SU2L_gaugephobic_55_1000.HITS.190322.C --nEventsPerFile 20000 --nEventsPerJob 50 --split 400 --noBuild

Since the simulation step is computationally intensive, the one large output EVNT file from the previous step is split up into 400 smaller jobs of 50 events each. This keeps the processing time acceptable, but will still take >24h until all jobs are processed successfully.

Reconstruction: HITS to AOD

Using release Athena,21.0.77 to emulate r10724

Local processing

The reconstruction step takes the HITS output from the previous step as an input and outputs an AOD file. The command for local testing is

Reco_tf.py --inputHitsFile DarkPion _SU2L_gaugephobic_55_1000.HITS.pool.root --outputAODFile DarkPion _SU2L_gaugephobic_55_1000.AOD.pool.root --jobNumber 10724 --maxEvents 10 --autoConfiguration everything --geometryVersion "default:ATLAS-R2-2016-01-00-01" --conditionsTag "default:OFLCOND-MC16-SDR-25" --digiSteeringConf 'StandardSignalOnlyTruth' --inputHighPtMinbiasHitsFile highPt.root --inputLowPtMinbiasHitsFile lowPt.root --numberOfCavernBkg 0 --numberOfHighPtMinBias 0.2595392 --numberOfLowPtMinBias 99.2404608 --pileupFinalBunch 6 --postExec "all:CfgMgr.MessageSvc().setError+=[\"HepMcParticleLink\"]" "ESDtoAOD:fixedAttrib=[s if \"CONTAINER_SPLITLEVEL = '99'\" not in s else \"\" for s in svcMgr.AthenaPoolCnvSvc.PoolAttributes];svcMgr.AthenaPoolCnvSvc.PoolAttributes=fixedAttrib" --postInclude "default:PyJobTransforms/UseFrontier.py" --preExec "all:rec.Commissioning.set_Value_and_Lock(True);from AthenaCommon. BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD. LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True); from LArDigitization. LArDigitizationFlags import jobproperties;jobproperties.LArDigitizationFlags.useEmecIwHighGain.set_Value_and_Lock(False)" "ESDtoAOD:from TriggerJobOpts. TriggerFlags import TriggerFlags;TriggerFlags.AODEDMSet.set_Value_and_Lock(\"AODSLIM\");" --preInclude "HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInlcude.PileUpBunchTrainsMC16c_2017_Config1.py,RunDependentSimData/configLumi_run310000.py" --AMITag="r10724" --steering="doRDO_TRIG" --triggerConfig "RDOtoRDOTrigger=MCRECO:DBF:TRIGGERDBMC:2216,76,260" --valid True

Grid processing

For grid processing the command is

pathena --trf "Reco_tf.py --inputHitsFile=%IN --outputAODFile=%OUT.AOD.pool.root --jobNumber=%RNDM:0 --autoConfiguration=everything --geometryVersion=\"default:ATLAS-R2-2016-01-00-01\" --conditionsTag=\"default:OFLCOND-MC16-SDR-25\" --digiSteeringConf 'StandardSignalOnlyTruth' --inputHighPtMinbiasHitsFile=%HIMBIN --inputLowPtMinbiasHitsFile=%LOMBIN --numberOfCavernBkg=0 --numberOfHighPtMinBias=0.2595392 --numberOfLowPtMinBias=99.2404608 --pileupFinalBunch=6 --postExec 'all:CfgMgr.MessageSvc().setError+=[\"HepMcParticleLink\"]' 'ESDtoAOD:fixedAttrib=[s if \"CONTAINER_SPLITLEVEL = '99'\" not in s else \"\" for s in svcMgr.AthenaPoolCnvSvc.PoolAttributes];svcMgr.AthenaPoolCnvSvc.PoolAttributes=fixedAttrib' --postInclude=\"default:PyJobTransforms/UseFrontier.py\" --preExec 'all:rec.Commissioning.set_Value_and_Lock(True);from AthenaCommon. BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD. LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True); from LArDigitization. LArDigitizationFlags import jobproperties;jobproperties.LArDigitizationFlags.useEmecIwHighGain.set_Value_and_Lock(False)' 'ESDtoAOD:from TriggerJobOpts. TriggerFlags import TriggerFlags;TriggerFlags.AODEDMSet.set_Value_and_Lock(\"AODSLIM\");' --preInclude=\"HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInlcude.PileUpBunchTrainsMC16c_2017_Config1.py,RunDependentSimData/configLumi_run310000.py\" --AMITag=\"r10724\" --steering=\"doRDO_TRIG\" --triggerConfig=\"RDOtoRDOTrigger=MCRECO:DBF:TRIGGERDBMC:2216,76,260\" --valid=True --maxEvents=50" --highMinDS=mc16_13TeV.361239.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_high.simul.HITS.e4981_s3087_s3111/ --lowMinDS=mc16_13TeV.361238.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_low.simul.HITS.e4981_s3087_s3111/ --nLowMin 2 --nHighMin 1 --inDS user.joheinri.mc16_13TeV.999999.MGPy8EG_A14N23LO_DarkPions_SU2L_gaugephobic_55_1000.HITS.190322.C_EXT0/ --outDS user.joheinri.mc16_13TeV.999999.MGPy8EG_A14N23LO_DarkPions_SU2L_gaugephobic_55_1000.AOD.190322.A --nFilesPerJob 1 --nEventsPerFile 50 --nEventsPerJob 50 --noBuild

Merging: AOD to merge.AOD

This step is of course only required on the grid and the same release as for the reconstruction can be used. The command is:

pathena --trf "AODMerge_tf.py --inputAODFile=%IN --maxEvents=1000 --outputAOD_MRGFile=%OUT.AOD.pool.root --autoConfiguration=everything --fastPoolMerge=False --postInclude=\"default:RecJobTransforms/UseFrontier.py\" --skipEvents=%SKIPEVENTS" --nEventsPerFile 50 --nEventsPerJob 1000 --inDS user.joheinri.mc16_13TeV.999999.MGPy8EG_A14N23LO_DarkPions_SU2L_gaugephobic_55_1000.AOD.190322.A_EXT0/ --outDS user.joheinri.mc16_13TeV.999999.MGPy8EG_A14N23LO_DarkPions_SU2L_gaugephobic_55_1000.merge.AOD.190322.A --noBuild

-- JochenJensHeinrich - 2019-02-23

Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r8 - 2019-04-24 - JochenJensHeinrich
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Sandbox All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback