%CERTIFY%

Validation tool for b-jet triggers

Introduction

The aim of the validation tool is to have an infrastructure which can validate the behavior of b-jet triggers which were used during 2016 and 2017 data-taking. This tool can check whether a trigger is configured correctly by emulating the criteria to select an event of that trigger. This tool contains two components:

  • An analysis framework that processes a release 21 xAOD, then produces an N-tuple containing necessary jet’s objects for the trigger emulation.
  • An emulation function that can mimic the trigger decision using the jet’s information provided by the analysis framework.

Analysis framework description

This analysis framework was developed following this instruction https://twiki.cern.ch/twiki/bin/view/AtlasComputing/SoftwareTutorialxAODAnalysisInROOT#. The main purpose of this framework is to process an xAOD sample and create an N-tuple that contains the jet’s information such as transverse energy (ET ), pseudorapidity (η), etc of level 1 (L1) jet and high level trigger (HLT) jet as well as the decision of triggers that you want to emulate.

Structure

The analysis package can be found in lxplus and in the following directory /afs/cern.ch/work/h/honguyen/public/BjetTriggerValidation/ It includes:

  • A header code: BjetTriggerValidation /MyAnalysis/MyAnalysis/MyxAODAnalysis.h
  • A source code: BjetTriggerValidation /MyAnalysis/Root/MyxAODAnalysis.cxx
  • and a steering macro that runs the analysis: BjetTriggerValidation /Run/ATestRun.cxx

Firstly, The header code MyxAODAnalysis.h contains the declaration of necessary variables for the emulation tool such as

  • L1 jet: ET, η
  • HLT jet: ET, η and mv2c20 tagger of different jet collections.
  • Trigger decision tool

Secondly, the source code MyxAODAnalysis.cxx then retrieves these objects from the xAOD sample and fills them into an N-tuple. However, the b-jet triggers decisions can be stored perfectly in the N-tuple only if they follow the correct numerical order in the vector m_tmpTriggerdecisions, since this vector contains all the b-jet trigger decisions of each event. The list of b-jet triggers following this order can be found in the text file BjetTriggerValidation/Run/Check/Check_TrigTree.txt after the first trial run on the xAOD, then manually add into the source code in

EL::StatusCode MyxAODAnalysis :: histInitialize ()

Then all the main tasks of the source code MyxAODAnalysis.cxx is located in

EL::StatusCode MyxAODAnalysis :: execute ()

This function will run on every event and stores all the pre-defined b-jet triggers decisions into the N-tuple. Besides, it can also retrieve the kinematic variables of L1 jet from ”LVL1JetRoIs” jet container and store them in the N-tuple. However, it is quite different for HLT jet. To retrieve jet’s information. some performance triggers are used to retrieve jets from different jet containers. They are by default

  • HLT_j35_boffperf split to retrieve jets from ”SplitJet” container.
  • HLT_j35_boffperf and HLT_j15_boffperf to retrieve jets from ”EFJet” container.
  • HLT_j15_gsc35_boffperf_split to retrieve jets from ”GSCJet” container.
With four different performance triggers, we obtain four jet collections respectively. Each contains jet’s variables such as transverse momentum PT , pseudorapidity η, angular angle %phi;, energy E, transverse energy ET , and b-tagging weight mv2c20. Then these variables are filled into the N-tuples.

Lastly, the steering macro ATestRun.cxx will add the MyxAODAnalysis algorithm to a job and specify the path the input file. There is an AOD input file sample which is available in the following directory /afs/cern.ch/work/h/honguyen/public/AOD.10513237._000001.pool.root.1 It is defined in the steering macro as

const char* inputFilePath = gSystem->ExpandPathName ("/afs/cern.ch/work/h/honguyen/public/");
SH::ScanDir().filePattern("AOD.10513237._000001.pool.root.1").scan(sh,inputFilePath);

Here you can modify the path of the input file to another individual AOD sample or a dataset that you want to test.

Run the analysis package and save N-tuples

In order to run the analysis package, first in the main directory you need to setup

lsetup rcsetup
lsetup panda
export ALRB_TutorialData=/afs/cern.ch/atlas/project/PAT/tutorial/cern-oct2016/

if you make any changes on the codes, you need to compile the codes with

rc compile

before accessing the Run/ directory. Then within the Run/ directory, you need to execute the ATestRun.cxx macro with root by typing the following command

root -l ?$ROOTCOREDIR/scripts/load_packages.C? ?ATestRun.cxx ("submitDir")?

You can quit ROOT after the process is finished. The name submitDir is the directory where the output of your job is stored. If you want to run again, either you remove that directory or pass a different name into ATestRun.cxx. Your output N-tuple can be found in the directory submitDir/data-myOutput/ and it looks like this

Trigger emulation method

A sample trigger validation code nominal.C and a header file nominal.h were created in the directory /BjetTriggerValidation/Run to run trigger validation methods on the N-tuple produced by the MyxAODAnalysis framework. They contain two methods

emulate_trigger()
emulate_trigger_GSC()

One is to emulate 2016 b-jet triggers and the other is to emulate 2017 GSC triggers. You need to specify the path of the N-tuple in the nominal.h before running the trigger validation code. The code will then emulate the behavior of the trigger based on the name of the trigger and compare with its true decision. It will list on the screen if there are mismatches between the emulation and the trigger decision.

How to emulate a b-jet trigger

Taking the trigger HLT_j70_bmv2c2077_split_3j70_L14J15.0ETA25 for example. In order to emulate this trigger you need to

  • Require at level 1 (L14J15.0ETA25)
    • At least 4 L1 jets with ET > 15 GeV and |η| < 2.5.
  • Require at high level (HLT_j70_bmv2c2077_split_3j70)
    • At least 4 boffperf jets (from ”EFJet” collection) with ET > 70 GeV and |η| < 3.2.
    • At least 1 boffperf_split jet (from ”SplitJet” collection) with ET > 70 GeV and |η| < 3.2 has b-tagging weight larger than mv2c20 cut at 77% WP.

How to emulate a GSC trigger

Taking the trigger HLT_2j15_gsc35_bmv2c2050_split_2j15_gsc35_boffperf_split_L14J15.0ETA25 for example. To emulate this trigger you need to

  • Require at level 1 (L14J15.0ETA25)
    • At least 4 L1 jets with ET > 15 GeV and |η| < 2.5.
  • Require at high level (HLT_j70_bmv2c2077_split_3j70)
    • At least 4 boffperf jets (from ”EFJet” collection) with ET > 15 GeV and |η| < 3.2.
    • At least 4 boffperf_split jets (from ”SplitJet” collection) with ET > 15 GeV and |η| < 3.2.
    • At least 4 GSC jets (from "GSCJet” collection) with ET > 35 GeV and |η| < 3.2.
    • At least 2 of the 4 GSC jets pass the mv2c20 cut at 50% WP.

Trigger initialization

The trigger validation code works correctly only if you give it the correct arguments in the methods. The full definition of the methods are

emulate_trigger( TriggerChain, LV1_JetNumber_cut , LV1_ET_cut , LV1_ETA_cut ,
                 HLT_plus_Number_cut ,HLT_plus_ET_cut , HLT_plus_ETA_cut , HLT_plus_weight_cut ,
                 HLT_btag_Number_cut , HLT_btag_ET_cut , HLT_btag_ETA_cut , HLT_btag_weight_cut );

emulate_trigger_GSC( TriggerChain, LV1_JetNumber_cut , LV1_ET_cut , LV1_ETA_cut ,
                     HLT_plus_Number_cut ,HLT_plus_ET_cut , HLT_plus_GSC_cut, HLT_plus_ETA_cut,
                     HLT_plus_weight_cut , HLT_btag_Number_cut , HLT_btag_ET_cut , HLT_GSC_cut ,
                     HLT_btag_ETA_cut , HLT_btag_weight_cut );

Therefore, you need to initialize these arguments correctly based on the trigger’s name. The following is an example of how to initiate the inputs of the trigger HLT_j70_bmv2c2077_split_3j70_L14J15.0ETA25

TriggerChain = "HLT_j70_bmv2c2077_split_3j70_L14J15.0ETA25";
Trigger_pointer = &HLT_j70_bmv2c2077_split_3j70_L14J15_0ETA25;
//LV1 jet requirement
LV1_JetNumber_cut = 4;
LV1_ET_cut = 15000, LV1_ETA_cut = 2.5;
//HLT jet and b-jet requirements
HLT_btag_Number_cut = 1, HLT_plus_Number_cut = 3;
HLT_btag_ET_cut = 70000, HLT_btag_ETA_cut = 3.2, HLT_btag_weight_cut = -0.764668;
HLT_plus_ET_cut = 70000, HLT_plus_ETA_cut = 3.2;

another example for GSC trigger initialization is available in the nominal.C file.

Run the code

After you finish initiate the input parameters of triggers you want to validate and specify the path of the N-tuple, you need to open ROOT and type the following commands to run the trigger validation code

root> .L nominal.C
root> nominal t
root> t.Loop();

As a result, on the terminal screen, you will see

Total: 99800 Trigger ID: 26 Trigger Index: 1
Trigger Chain: HLT_j70_bmv2c2077_split_3j70_L14J15.0ETA25
Number of events pass the trigger: 6131
Number of events pass the trigger and simulation: 6131
Number of events pass the simulatiom: 6131
Number of events pass the trigger but NOT the simulation: 0 Deviation: 0 %
Number of events pass the simulation but NOT the trigger: 0 Deviation: 0 %
STATUS: SUCCESS

which tells you the detail information of the trigger decision and its emulation. If there are mismatches between a trigger emulation and its true decision, there will be non-zero differences in the number of events and the status line will show ”FAIL”. With this, you can quickly identify which trigger among the list fail the validation and the source of mismatches.


Major updates:
-- HoangDaiNghiaNguyen - 2017-08-09

%RESPONSIBLE% HoangDaiNghiaNguyen
%REVIEW% Never reviewed

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r5 - 2017-09-17 - HoangDaiNghiaNguyen
 
    • 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-2023 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