The DaVinci.opts provided with DaVinci v8r1 has an example on how to run the L0 and L1 with the TDR tuning.
The necessary lines to have in the options, before the execution of the algorithms accessing the trigger results, are:
#include "$DAVINCIROOT/options/L0.opts" #include "$DAVINCIROOT/options/L1Decision.opts"
This will execute the necessary algorithms and give you a summary at the end of the job.
If you want to know if an event passed L0 and L1 trigger you can then simply retrieve the results from the Transient store where you will find the new results.
In order to access the results is an algorithm:
1. Make sure that in the requirements file of the package where you have the algorithm accessing the information you have: use L0Event v* Event use L1Event v* Event
Note that you will have access to the WHOLE event class headers if you have use EventSys v* Event
2. You should have the following headers in your algorithm: #include "Event/L0DUReport.h" #include "Event/L1Report.h"
3. Retrieve the information from the transient store. Note you will need to correct for a mistake in L1 calibration during the production as doen below (full details at: http://cern.ch/Thomas.Schietinger/lhcb/L1/prod03/)
3.1 For L0: SmartDataPtr<L0DUReport> l0Report( eventSvc(), l0DUReportLocation::Default ); if ( 0 == l0Report ) { msg << MSG::ERROR << "Unable to retrieve L0DU report " << endreq; } else { if ( l0report->decision() ) { msg << MSG::DEBUG << "Event accepted by L0 trigger' << endreq; } }
3.2 For L1: SmartDataPtr<L1Report> l1Report( eventSvc(), L1ReportLocation::Default ); if ( 0 == l1Report ) { msg << MSG::ERROR << "Unable to retrieve L1 report " << endreq; } else { if ( l1Report->decision() ) { msg << MSG::DEBUG << "Event accepted by L1 trigger' << endreq; } }
Note that L1Decision::decision() does not need any correction after having run the L1 with the new tuning.