Introduction

The purpose of this twiki is to briefly describe the process of implementing a new trigger chain and running this on RAW data files. The example used to illustrate this purpose is the implementation of the L1.5 jet trigger.

Preliminary Setup

Several different versions of athena are needed for the various stages of this process. Before beginning you should setup your work area in the standard Atlas way.

export AtlasSetup=/afs/cern.ch/atlas/software/dist/AtlasSetup
alias asetup='source $AtlasSetup/scripts/asetup.sh'

You should also ensure that you have a RAW data file to hand to work with. After setting up dq2, you can retrieve an example file with:

dq2-get -f data11_7TeV.00180710.physics_JetTauEtmiss.merge.RAW._lb0611._SFO-ALL._0001.1 data11_7TeV.00180710.physics_JetTauEtmiss.merge.RAW

Setting up the Trigger Menu

Rerunning L2

The L2 trigger is rerun using athenaMT. This takes as input a RAW file and produces as output a new RAW file. To run athenaMT you must first setup an AtlasCAFHLT or AtlasP1HLT release.

asetup AtlasP1HLT,17.1.4.4,here,setup

Before continuing we need a job options file. A very simple example would is:

testPhysicsV3=True  # choice of menu
testJet=True        # turn on only the jet slice
HLTOutputLevel=DEBUG
OutputLevel=INFO
EvtMax=-1
doL2=True
doEF=True
include(’TriggerRelease/runHLT_standalone.py’)

Save your job options as CaloTestFull.py. This is then run as:

athenaMT -f data11_7TeV.00180710.physics_JetTauEtmiss.merge.RAW._lb0611._SFO-ALL._0001.1 -o outputMT -n 10 CaloTestFull.py

This will produce an output file called outputMT* where * is a number generated at run time. Your first file should be called outputMT-1._101.data.

Rerunning the EF

In order to have a sensible output file it's also necessary to rerun the EF. This is acheived in a similar way to L2 except this time the athenaPT program is used to reprocess the output produced by athenaMT. An example is:

athenaPT -f outputMT-1._0101.data -o outputPT CaloTestFull.py

Again an output file is produced prefixed with outputPT. Your first file should be called outputPT-1._101.data.

Reconstruction

In order to properly investigate the contents of our new RAW file one should rerun the reconstruction. To produce an AOD and an ESD from the outputPT file, first setup an AtlasProduction release:

asetup AtlasProduction,17.1.4.4,here,setup

If you've changed the trigger menu you'll have to prepare a preInclude file to tell the reconstruction about your new menu. A simple example is:

# This sets up the trigger config for a BStoESD job
# to use the HLT output XML file generated by a previous BStoBS step
# and a fixed LVL1 file from the release which is broadly compatible
# with the 2009 cosmic runs.
# It is intended for special trigger reprocessing only.
# Contact: Sylvie Brunet, Clemencia Mora or other trigger configuration experts

##preInclude for all steps but enable only for RAWtoESD
from RecExConfig.RecFlags import rec
if rec.readRDO and rec.doESD:
    from TriggerJobOpts.TriggerFlags import TriggerFlags as tf
    tf.inputHLTconfigFile.set_Value_and_Lock("./HLTconfig_Physics_pp_v2_17.1.4.4.xml")
    tf.readLVL1configFromXML.set_Value_and_Lock(True)
    tf.readHLTconfigFromXML.set_Value_and_Lock(True)
    tf.configForStartup.set_Value_and_Lock("HLToffline")
    tf.configurationSourceList.set_Value_and_Lock(['xml'])
    #don't set this in ESDtoAOD, it works with HLTonline since DS folders are stored in ESD metadata.
    

Save this as TrigConf.py. This requires the XML file generated by your athenaMT/PT job. Copy

 HLTconfig_Physics_pp_v2_17.1.4.4.xml 
or similar from the directory you previously ran in to the current directory. Now we're ready to run the reconstruction.

Reco_trf.py --ignoreerrors=True autoConfiguration=everything preInclude=TrigConfig.py inputBSFile=outputPT-1._101.data outputESDFile=my_ESD.pool.root outputAODFile=my_AOD.pool.root

This should take a while. And when it's complete you'll see two output files

 my_ESD.pool.root 
and
 my_AOD.pool.root 
You can check these using:

checkFile.py my_AOD.pool.root

and

checkTrigger.py my_AOD.pool.root

One important thing to note is that the reconstruction will fail if an AOD/ESD file exists with the same name you specify. So make sure you choose a unique name.

DPD making

To reconstruct DPDs from an AOD simply setup an appropriate AtlasPhysics or AtlasProduction release:

asetup AtlasProduction,17.1.4.4,here,setup

and then run the DPD making on the AOD produced in the previous step:

Reco_trf.py --ignoreerrors=True inputAODFile=my_AOD.pool.root maxEvents=-1 outputNTUP_JETMETFile=my_DPD.root autoConfiguration=everything

Modifying code

To check out the appropriate jet hypothesis use the "pkgco.py" command:

pkgco.py TrigJetHypo

This will get the appropriate tag of TrigJetHypo for the setup release. To use a different version specify this explicitly to the pkgco.py command. e.g:

pkgco.py TrigJetHypo-00-02-16

then make your changes, go to the cmt directory of this hypo and:

cmt config
source setup.sh
gmake

then rerun using the above instructions. Your changes should be visible after the running of athenaMT.

Running with only a limited menu

Often you won't want to re run the entire trigger menu as it's very time consuming and will lead to large amounts of output. To run with only a few triggers add the following to CaloTestFull.py:

emptyMenu=True
addSignatures={'JetSlice':["rd0_filled_NoAlg",'j10_a4tc_EFFS']}

This would run with only the trigger EF_j10_a4tc_EFFS (note here we also had to include the L2 chain name). Alternatively if you want to run only the jet slice add the following to CaloTestFull.py:

emptyMenu=True
testJet=True

-- MatthewTamsett - 26-Oct-2011

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r4 - 2012-03-09 - MatthewTamsett
 
    • 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