How to (re)run the HLT

Think about your input!

  • Moore expects to be running on L0-data
  • Moore expects to be running before reconstruction
  • Moore expects to be running on a full DST or RAW(MDF) file
  • Moore expects the raw event to be located at DAQ/RawEvent
  • Moore does not expect to be running on top of a previous Moore's output

Think carefully about what is there on your input.

  • RawEventJuggler: to move around the raw event back how Moore expects it, a prerequisite for running Moore
  • L0App: to add the correct L0 to your file, a prerequisite for running Moore

Think about your Trigger conditions!

  • Moore for 2012 data which ran in the pit on 2012 data will only make sense to apply to 2012 simulation
  • Moore for 2011 data which ran in the pit on 2011 data will only make sense to apply to 2011 simulation
  • ... and so on.

Multiple Trigger Results into one file?

Running Moore

Moore is the trigger software, as run in the pit. It is available through the usual SetupProject command.

Default Moore options

This is a collection of options files that perform common tasks. If you have a use case you think is also useful for others, add your commented options here with a brief description of what they do.

Options for untriggered data

A skeleton script that should work on Moore as of v14r8 that runs on raw data looks like this:
# Minimal file for running Moore from python prompt
# Syntax is:
# ../options/
# or just
#   ../options/
import Gaudi.Configuration
from Moore.Configuration import Moore
from Configurables import L0MuonAlg
from Configurables import L0Conf

#Configure L0 emulation
L0MuonAlg( "L0Muon" ).L0DUConfigProviderType = "L0DUConfigProvider"
Moore().ForceSingleL0Configuration = True
Moore().CheckOdin  = False

# How are we configuring the trigger? TCK or settings? 
#Moore().ThresholdSettings = 'DoNotUseThresholdSettings' #Never use settings
Moore().UseTCK = True                                    #Always use a TCK
Moore().InitialTCK = '0x00a10045'                        #Change me to the TCK you want to use
Moore().WriterRequires=['HltDecsionSequence']            #What sequence must pass for the events to be written out? 
Moore().DataType        = "2012"
Moore().Simulation      = False
Moore().UseDBSnapshot = False
Moore().DDDBtag         = "head-20120126"  #Change me to the DB tag you want
Moore().CondDBtag       = "head-20120607"  #Change me to the DB tag you want
Moore().inputFiles  = [ 'castor:/castor/' ] #Your input files go here
Moore().EnableRunChangeHandler = False
Moore().Verbose = False
Moore().EvtMax = 100
Moore().outputFile  = 'mymooreout.dst'

from Configurables import EventSelector
EventSelector().PrintFreq = 100

N.B.: when using Moore v14r2p4, replace the line

Moore().ReplaceL0BanksWithEmulated = True
to avoid the error
PuVetoFillRawBuffer:: get():: No valid data at 'MC/Velo/PuFE'

TCK or Settings?

As a user running Moore on MC, you should always use a TCK instead of configuring using settings. This is at present the only way to guarantee that you will get the same trigger decisions as would have been obtained in the pit. To do this you'll need to modify the above script as follows:

Which TCK?

When a new TCK is made to be used in the pit, a new MC TCK is also made. The difference between the two is that prescales are turned off in the MC TCK. As of late this year, all MC TCKs will start with a "4", so if 0x00XXXXXX was run in the pit, 0x40XXXXXX is the MC TCK to use. You can explore the contents and differences of these TCKs using TCKsh. If the MC version is unavailable contact the HLT experts to get it made for you.

If you want to find out what TCKs were used for a given run, look it up in the rundb:

To find out what TCKs at-a-glance were used for a given year, take a look at the summary from the Operations Plots page

Version-specific configs

Moore is highly version dependent. You need to run the Moore version your TCK was designed for. Do not just take the latest version. You can find out which version of Moore is needed by which TCK using the TCKsh command

Multiple TCKs: adding a new TCK to a pre-existing dataset

Lets say you have MC that has been produced with one TCK, and you want to get trigger decisions for a different one. To do this you need to move the old TCK out of the default location before re-running Moore. The RawEventJuggler (see the twiki page) is what you need. The following script will do this for you:

from Gaudi.Configuration import *
from LHCbKernel.Configuration import *
from Configurables import GaudiSequencer,RawEventJuggler
from Configurables import LHCbApp



RawEventJuggler().GenericReplacePatterns={"Averyunlikelystringtohaveinaraweventlocation99": "idontcarebecausethiswillneverbeused"} #BUGFIX: This is needed until LHCb > v36r2 
RawEventJuggler().KillExtraNodes=True #remove DAQ/RawEvent completely

ApplicationMgr().TopAlg = [MySeq]
from GaudiConf import IOHelper
IOHelper().inputFiles([ "myInputDataSet.dst" ])

To run it, set up the latest version of LHCb:

SetupProject LHCb

Copy the script from here and modify it to point to your input dataset. Change the tck=0xORIGINALTCK to the one contained in the file that you want moved out of the way. You may also need to change the RawEventJuggler().Input=0.0 line to a different input event format depending on the way in which the input file was produced. See here for information on what the formats and their corresponding numbers look like. Now run the script:

You can check this has worked using Dst_Explorer:

SetupProject bender
Dst_Explorer myOutputDataSet.dst

If your move worked, you should see the following:

>>> ls('/Event/Trigger')
 /Event/Trigger                                                         DataObject 
 /Event/Trigger/RawEvent                                                LHCb::RawEvent 

You can now run Moore using the script shown earlier, which will write your new TCK to the modified output dst. You can do this several times, moving and writing new TCKs each time, until you have several TCKs saved to Event/Trigger/TCK1, Event/Trigger/TCK2, etc. If you don't move the last TCK you write to the file, you don't need to do anything special to access it- All LHCb applications will see its trigger decisions by default.

Multiple TCKs: recovering an old TCK from a file with several

If you want to access the old TCK after adding new ones as described above, SetupProject your application with the additional option:

SetupProject <Application> --use RawEventFormat

Where is DaVinci or whatever. The RawEventJuggler (see the twiki page) is what you need. Add the following lines to your application at the start of your options. Everything after this will see the TCK you requested, assuming it was written to the file:


Easy as that!

Edit | Attach | Watch | Print version | History: r14 | r12 < r11 < r10 < r9 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r10 - 2014-03-24 - RobLambert
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    LHCb All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2022 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