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/
alias asetup='source $AtlasSetup/scripts/'

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,,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

Save your job options as This is then run as:

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

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

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 -o outputPT

Again an output file is produced prefixed with outputPT. Your first file should be called


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,,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
    #don't set this in ESDtoAOD, it works with HLTonline since DS folders are stored in ESD metadata.

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

or similar from the directory you previously ran in to the current directory. Now we're ready to run the reconstruction. --ignoreerrors=True autoConfiguration=everything 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

You can check these using: my_AOD.pool.root

and 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,,here,setup

and then run the DPD making on the AOD produced in the previous step: --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 "" command: TrigJetHypo

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

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

cmt config

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


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


-- 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