How to make a L1 trigger analysis ntuple with your all time favourite package: L1TNTuple
Andreas Meyer updated 11/23/99
Anders W. Borgland updated 02/22/01
L1TNtuple allows the access to the full trigger information, as well as reconstructed DCH and EMC quantities and MC truth
information, allowing detailed studies of the trigger performance for both L1 and L3. There are two different executables
you can run.
L1TNtupleXtcApp is used to run on XTC-Files (data only). The raw information is accessible in XTC format for any run by
staging in the corresponding tapes. The procedure of tape staging and job submission is automated in the script l1ntp.prod.
You can edit this file to put your ntuples and output files anywhere you want.
The ntuple can also be produced from RAW data in the Objectivity database using the executable L1TNtupleDbApp and
the script l1dbntp.prod. Since for most runs the RAW information is not available in the database on disk the natural
application of this executable is to run on MC events.
By default the most DETAILED information is NOT being filled in the ntuple. This includes doEMT, doTrigger, doMCTruth,
doDchHits ..... The filling of this information must be activated by the USER through tcl-parameter switches in
L1TNtupleDbApp.tcl and L1TNtupleXtcApp.tcl; for example 'doDchHits set true' for detailed DCH information and 'doMCTruth set
true' for MC truth information.
A complete list of the L1TNtuple variables can be found
In case of problems, just send me a mail.
Two options are available: building the executables yourself or run the prebuilt ones (I try to make one once in a while ....).
General instructions for both options follow below. In case you want to built your own executables this will put them in your
local scratch area (they are rather large) i.e. they will need to be rebuilt regularely.
General setup (use any release you want):
newrel -s $BFROOT/work/'first_letter_in_username'/$USER -t 9.2.0 L1-9.2.0
If you only will run off some other database like ambientboot/recoboot/analboot2/.... and don't need your own private
database do (more info in: 'addpkg -h HOWTO', look at HOWTO/HOWTO-database-importing):
directory for tcl-files: mkdir workdir/steer
scratch disk directory for ntuple storage: mkdir $BFROOT/work/'first_letter_in_username'/$USER
ln -s ../L1TNtuple/l1ntp.prod
ln -s ../L1TNtuple/l1dbntp.prod
Import a database federation if you run MC (more info in: 'addpkg -h HOWTO', look at HOWTO/HOWTO-database-importing):
echo FD_NUMBER=<FDID number> > .bbobjy
gmake database.import BYPASS_LOAD=1
Build the two executables (but see the last point about prebuilt ones):
For newer releases you will have to do:
echo FD_NUMBER=<FDID number> > .bbobjy
gmake database.import BYPASS_CONDITIONS_LOAD=yes BYPASS_CONFIG_LOAD=yes
gmake database.load SNAPSHOT_DIR=/nfs/objyserv3/objy/databases/snapshots/sp3/latest
Change Directory to workdir and use the script l1ntp.prod to run the executable L1TNtupleXtcApp on XTC-data (real
bsub -q bldrecoq -o all.log gmake L1TNtuple.all
bjobs -l <run number>
Alternatively, use the script l1dbntp.prod to run the executable L1TNtupleDbApp on RAW data in an Objectivity Database
change the run number in foreach run ( <run number> )
change the run range in foreach evts ( <range> )
make the indicated changes for the running mode: work, development or interactive
srtpath <release version> $BFARCH (if necessary)
setboot (if necessary)
submit jobs by typing: l1ntp.prod
check the jobs typing bjobs
Edit l1dbntp.prod as necessary. The input collection can be selected using the environment variable L1TInputCollection i.e.
'setenv L1TInputCollection my_collection'. Default CollectionName is 'events'.
The .hbook files are by default placed in /nfs/farm/babar/trg/$USER/, but they can be placed anywhere by editing
the line 'histFileName set /nfs/farm/babar/trg/$USER/babar-$run-$evts-$BFCURRENT.hbook' in l1(db)ntp.prod.
Prebuilt executables: Version V00-03-36 of L1TNuple for releases 8.8.0i and 9.10.3a have been installed on the
trigger disk in /nfs/farm/babar/trg/L1TNtuple/L1-8.8.0i[9.10.3a]. Just edit l1(db)ntp.prod so it points to the release you
want to run.