From 99a7819dbcf3e2ff3af9cec04fed0f397cdb054f Mon Sep 17 00:00:00 2001 From: Martin Date: Thu, 15 Aug 2024 13:35:25 -0500 Subject: [PATCH] Split lessons and rename --- _episodes/03-FindingTriggerInfo.md | 78 +++++++++++++++++++ _episodes/03-HLT_efficiency.md | 37 --------- _episodes/04-HLT_efficiency.md | 56 +++++++++++++ .../{04-TriggerObj.md => 05-TriggerObj.md} | 0 _episodes/{05-Matching.md => 06-Matching.md} | 0 5 files changed, 134 insertions(+), 37 deletions(-) create mode 100644 _episodes/03-FindingTriggerInfo.md delete mode 100644 _episodes/03-HLT_efficiency.md create mode 100644 _episodes/04-HLT_efficiency.md rename _episodes/{04-TriggerObj.md => 05-TriggerObj.md} (100%) rename _episodes/{05-Matching.md => 06-Matching.md} (100%) diff --git a/_episodes/03-FindingTriggerInfo.md b/_episodes/03-FindingTriggerInfo.md new file mode 100644 index 0000000..7a7838b --- /dev/null +++ b/_episodes/03-FindingTriggerInfo.md @@ -0,0 +1,78 @@ +--- +title: "Finding information about a trigger path" +teaching: 10 +exercises: 10 +objectives: +- "Learn different ways to look up information about a trigger path" +--- +> ## Prerequisites +> Set up your machine following instructions in [setup][lesson-setup] first. +{: .prereq} + +### Find the L1 seed of the MET HLT path +There are different ways to learn which is the L1 seed of a specific HLT path. Two examples will be tested in this exercise: + * looking into [OMS](https://cmsoms.cern.ch/); + * looking into [web-based confdb](https://hlt-config-editor-confdbv3.app.cern.ch/); + * inspecting a HLT configuration. + +In the context of this exercise, we will retrieve the information of the `HLT_PFMET170_HBHECleaned_v*` path from OMS for a specific run (`run 284043`) and HLT configuration (`/cdaq/physics/Run2016/25ns15e33/v4.2.3/HLT/V2`). + +### OMS method +As a first step, connect to [OMS](https://cmsoms.cern.ch/cms/runs/report?cms_run=284043&cms_run_sequence=GLOBAL-RUN) + * Click on `"Runs > Triggers > HLT Path Report"`, + * Use search option at the bottom left ("FILTER > Path Name") to look for `HLT_PFMET170_HBHECleaned_v*`. + * Find the information about the L1 seed names of the HLT path of interest. + +Then move to the L1 Trigger rate page in OMS and search for the L1 seeds there to have a look at the rates and prescales of these L1 seeds.
+(Note that you might need to increase the number of rows at the bottom of the page to find them.) +### Web-based confdb +The [web-based confdb](https://hlt-config-editor-confdbv3.app.cern.ch/) is a web-based GUI of the database that holds all of CMS HLT configurations.
+One can **inspect** any given HLT menu without downloading one or connecting to the database.
+More information about the web-based confdb can be found in these [slides](https://indico.cern.ch/event/1230321/contributions/5177149/attachments/2580137/4450016/webbased%20confdb.pdf) + +Let's try to find the `/cdaq/physics/Run2016/25ns15e33/v4.2.3/HLT/V2` menu in the GUI. + * Connect to [https://hlt-config-editor-confdbv3.app.cern.ch/](https://hlt-config-editor-confdbv3.app.cern.ch/) + * Click "Configurations > Open remote" + * In the drop-down menu, select `online` + * Follow the directory of the menu `/cdaq/physics/Run2016/25ns15e33/v4.2.3/` + * Select "V2" from the side penal, and click "OK" + +After retriving from the DB, you can see all the paths. + * Type the name of the path `HLT_PFMET170_HBHECleaned` into the search box in the left panel + * Expand the path. This shows all the **modules** that the HLT path will run in sequence. + * The L1 seed of a HLT path is always the first module (after the `HLTBeginSequence`) starting with the name `hltL1sXXXX` + * Click on `hltL1sETM50ToETM120` + * In the right panel, the `L1SeedsLogicalExpression` shows the L1 seeds used by the path. + +> You should see the same L1 seeds that you find from OMS. +{: .checklist} + +### Inspecting a HLT configuration +`hltGetConfiguration` is the official command to retrive a HLT configuration from the database.
+> Since this involves connecting to the confdb database directly, this command should never be used in a large number of jobs or programatic loop. It should only be used interactively. +{: .caution} +~~~ +ssh -f -N -D 1080 @lxplus.cern.ch +hltConfigFromDB --configName --adg /cdaq/physics/Run2016/25ns15e33/v4.2.3/HLT/V2 --dbproxy --dbproxyhost localhost --dbproxyport 1080 > dump_hlt_online_2016G.py +~~~ +If you have connection issue, simply inspect one that has been downloaded for you +~~~ +xrdcp root://cmseos.fnal.gov//store/user/cmsdas/2023/short_exercises/Trigger/dump_hlt_online_2016G.py . +~~~ +Then, inspect the HLT configuration dump_hlt_online_2016G.py to look for the information about the L1 seed of the path into it: +~~~ +grep 'process.HLT_PFMET170_HBHECleaned_v9' dump_hlt_online_2016G.py +~~~ +You should see the expected output below: +~~~ +process.HLT_PFMET170_HBHECleaned_v9 = cms.Path(process.HLTBeginSequence+process.hltL1sETM50ToETM120+process.hltPrePFMET170HBHECleaned+process.HLTRecoMETSequence+process.hltMET90+process.HLTHBHENoiseCleanerSequence+process.hltMetClean+process.hltMETClean80+process.HLTAK4PFJetsSequence+process.hltPFMETProducer+process.hltPFMET170+process.HLTEndSequence) +~~~ + +> ### Questions +> To conclude, answer the following questions: +> +> Which was the lowest threshold L1 seed active in the L1 menu? +> Which is the lowest threshold L1 seed unprescaled? +> How is it called the HLT module that contains the information about the L1 seeding? +{: .challenge} + diff --git a/_episodes/03-HLT_efficiency.md b/_episodes/03-HLT_efficiency.md deleted file mode 100644 index 40f270d..0000000 --- a/_episodes/03-HLT_efficiency.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: "Measuring trigger efficiencies" -teaching: 30 -exercises: 0 -objectives: -- "Learn how to access the trigger information stored in MiniAOD and NanoAOD" -- "Learn what is trigger objects and how to access them" -- "Measure trigger efficiency using the tag-and-probe method" ---- - -> ## Prerequisites -> Set up your machine following instructions in [setup][lesson-setup] first. -{: .prereq} - -> ## Objective -> The goal of the following exercises is to learn how to access and play with the trigger objects in our data and compute the efficiency of a specific HLT path and look also at its Level 1 (L1) seed. -> -> The focus will be on a HLT path used during the 2016 data-taking to select events with a certain amount of missing transverse energy: `HLT_PFMET170_HBHECleaned_v*`. -{: .objectives} - -## Ex 1: Access trigger bits and compute a MET trigger efficiency - -We will first run this exercise on MiniAOD format, then run it again on NanoAOD. - -> ## MiniAOD -> The MINIAOD format was introduced at the beginning of Run 2 to reduce the information and file size from the AOD file format. -> For Run 2 analyses, most of the analysis groups at CMS skimmed the centrally produced MiniAOD files into smaller, analysis-specific ROOT Ntuples. -> This means that several redundant versions of Ntuples for different analysis groups are stored in the limited CMS storage spaces. -{: .solution} - -> ## NanoAOD -> A centrally maintained NanoAOD format was proposed in 2018, aiming for a common Ntuple format that can be used by most of the CMS analysis groups. -> Information about the NanoAOD format can be found [here](https://cms-nanoaod-integration.web.cern.ch/integration/master-102X/mc102X_doc.html#HLT). -{: .solution} - -{% include links.md %} - diff --git a/_episodes/04-HLT_efficiency.md b/_episodes/04-HLT_efficiency.md new file mode 100644 index 0000000..f461349 --- /dev/null +++ b/_episodes/04-HLT_efficiency.md @@ -0,0 +1,56 @@ +--- +title: "Measuring trigger efficiencies" +teaching: 30 +exercises: 0 +objectives: +- "Learn how to access the trigger information stored in MiniAOD and NanoAOD" +- "Learn what is trigger objects and how to access them" +- "Measure trigger efficiency using the tag-and-probe method" +--- + +> ## Prerequisites +> Set up your machine following instructions in [setup][lesson-setup] first. +{: .prereq} + +> ## Objective +> The goal of the following exercises is to learn how to access and play with the trigger objects in our data and compute the efficiency of a specific HLT path and look also at its Level 1 (L1) seed. +> +> The focus will be on a HLT path used during the 2016 data-taking to select events with a certain amount of missing transverse energy: `HLT_PFMET170_HBHECleaned_v*`. +{: .objectives} + +## Compute a MET trigger efficiency + +We will first run this exercise on MiniAOD format, then run it again on NanoAOD. + +> ## MiniAOD +> The MINIAOD format was introduced at the beginning of Run 2 to reduce the information and file size from the AOD file format.
+> This means that several redundant versions of Ntuples for different analysis groups are stored in the limited CMS storage spaces.
+> For Run 2 analyses, most of the analysis groups at CMS skimmed the centrally produced MiniAOD files into smaller, analysis-specific ROOT Ntuples.
+ +MiniAOD events contain two trigger products that we will need in these exercises.
+The `TriggerResults` product contains trigger bits for each HLT path, whereas the `TriggerObjectStandAlone` product contains the trigger objects used at HLT.
+In addition, the trigger prescales, L1 trigger decisions, and L1 objects are stored in MiniAOD.
+A more detailed description of the trigger-related MiniAOD event content can be found [here](https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookMiniAOD2016#Trigger). + +In this exercise we work with a skimmed MiniAOD file. (In case you are wondering where this skimmed file came from: it has been created using the configuration in `ShortExerciseTrigger/test/skim_pfmet100.py`, which selects events with offline MET above a threshold of 100 GeV.) + +> ### Inspect MiniAOD content +> First, inspect the contents of the skimmed MiniAOD input file as follows: +> ~~~ +> edmDumpEventContent root://cmseos.fnal.gov//store/user/cmsdas/2023/short_exercises/Trigger/skim_pfmet100_SingleElectron_2016G_ReReco_87k.root --regex=Trigger +> ~~~ +> You can also inspect the full file content by dropping the --regex parameter. +{: .challenge} + +As you see, there are indeed multiple TriggerResults products here, as well as other trigger-related collections.
+We will learn how to interact with these two products and how to use their packed information in our physics analyses in this and the following exercises. + +{: .solution} + +> ## NanoAOD +> A centrally maintained NanoAOD format was proposed in 2018, aiming for a common Ntuple format that can be used by most of the CMS analysis groups. +> Information about the NanoAOD format can be found [here](https://cms-nanoaod-integration.web.cern.ch/integration/master-102X/mc102X_doc.html#HLT). +{: .solution} + +{% include links.md %} + diff --git a/_episodes/04-TriggerObj.md b/_episodes/05-TriggerObj.md similarity index 100% rename from _episodes/04-TriggerObj.md rename to _episodes/05-TriggerObj.md diff --git a/_episodes/05-Matching.md b/_episodes/06-Matching.md similarity index 100% rename from _episodes/05-Matching.md rename to _episodes/06-Matching.md