diff --git a/_config.yml b/_config.yml index 68056358..87fa6e04 100644 --- a/_config.yml +++ b/_config.yml @@ -11,7 +11,7 @@ carpentry: "swc" # Overall title for pages. -title: "CMSDAS@IIT Hyderabad 2025: Jets Short Exercise" +title: "CMSDAS@IIT Hyderabad 2025: Jets and MET Short Exercise" # Life cycle stage of the lesson # See this page for more details: https://cdh.carpentries.org/the-lesson-life-cycle.html diff --git a/_episodes/01-jets101.md b/_episodes/01-jets101.md index 04ac42d7..efa8363e 100644 --- a/_episodes/01-jets101.md +++ b/_episodes/01-jets101.md @@ -233,15 +233,14 @@ Three main jet collections are stored in the MiniAOD format, as described [here] > > ### In C++ > Please take a look at the file [`jmedas_miniAODAnalyzer.C`](https://github.com/cms-jet/JMEDAS/blob/DASJune2025/src/jmedas_miniAODAnalyzer.C) with your favourite code viewer. -> You can run this code by using the python config file [`jmedas_miniAODtest.py`](https://github.com/cms-jet/JMEDAS/blob/DASJune2025/scripts/jmedas_miniAODtest.py) from your terminal once you have set a CMSSW environment and download this JMEDAS package. This script will only print out some information about the jets in that sample. Again, the most important part of this exercise is to get familiar with how to access jet collections from miniAOD. Take a good look at the prints this script produces to your terminal. -Use a **new** directory outside the cloned `JMEDAS` directory. +> You can run this code by using the python config file [`jmedas_miniAODtest.py`](https://github.com/cms-jet/JMEDAS/blob/DASJune2025/scripts/jmedas_miniAODtest.py) from your terminal once you have set a CMSSW environment and download this JMEDAS package. This script will only print out some information about the jets in that sample. Again, the most important part of this exercise is to get familiar with how to access jet collections from miniAOD. Take a good look at the prints this script produces to your terminal. Use a **new** directory outside the cloned `JMEDAS` directory. > ~~~ > cmsrel CMSSW_14_0_7 > cd CMSSW_14_0_7/src > cmsenv > mkdir Analysis > cd Analysis -> ln /JMEDAS +> ln -s JMEDAS > scram b > cmsRun $CMSSW_BASE/src/Analysis/JMEDAS/scripts/jmedas_miniAODtest.py > ~~~ diff --git a/_episodes/05-MET101.md b/_episodes/05-MET101.md new file mode 100644 index 00000000..e1b6b737 --- /dev/null +++ b/_episodes/05-MET101.md @@ -0,0 +1,145 @@ +--- +title: "Missing Transverse Energy 101" +teaching: 20 +exercises: 10 +questions: +- "What is MET? How is MET reconstructed?" +- "What are the types of MET at CMS?" +- "Examples of analyses with MET at CMS" +objectives: +- "Learn about MET, the definition, types and reconstruction algorithms." +- "Learn about extracting MET in MiniAOD files." +keypoints: +- Weakly interacting neutral particles produced in proton-proton (pp) collisions at the LHC traverse the CMS detector unobserved. +- Their presence is inferred from the measurable momentum imbalance in the plane perpendicular to the beam direction when produced alongside electromagnetically charged or neutral particles. This measurable transverse momentum imbalance is referred to as missing transverse momentum (MET). +- Precise determination of MET is critical for Standard Model measurements involving final states with neutrinos and searches for physics beyond the SM targeting new weakly interacting particles. +- MET reconstruction is sensitive to experimental resolutions and mis-measurements of reconstructed particles, detector artifacts, and the effects of additional pp interactions within the same or nearby bunch crossings (pileup). +--- + +> ## After following the instructions in the jets exercise setup, make sure you have the CMS environment and create the symbolic link to MET analyzer: +> +> ~~~ +> cd $CMSSW_BASE/src +> cmsenv +> cd Analysis +> ln -s JMEDAS/MET_Analysis MET +> scram b +> ~~~ +> {: .language-bash} +{: .callout} + +## Event Reconstruction + +Event reconstruction in CMS is achieved using the Particle Flow (PF) algorithm, which integrates information from all CMS subdetectors to reconstruct individual particles. +The algorithm produces a list of PF candidates classified as electrons, photons, muons, neutral hadrons, or charged hadrons. +These PF candidates are then used to reconstruct high-level physics objects, including jets and missing transverse momentum (MET). + +
+ +
Schematic of the CMS particle flow reconstruction algorithm.
+
+ +## Missing Transverse Energy + +MET quantifies the imbalance in the transverse momentum of all visible particles in the final state of collisions—those interacting via electromagnetic or strong forces. +Due to momentum conservation in the transverse plane (the plane perpendicular to the beam), MET reflects the transverse momentum carried by undetected weakly interacting particles, such as neutrinos or potential dark matter candidates. +Although these invisible particles leave no direct signature in the CMS detector, their presence is inferred from the observed net momentum imbalance in the event. + +An example of event with MET is shown in the figure below where two top quarks are produced. Each top quark decays into a b-jet and a W boson. The leptonic decay of a W boson leads to a lepton and its corresponding neutrino. So, the final state contains two jets, two leptons and missing transverse energy from two neutrinos. + +
+ +
Event display of a ttbar event recorded by CMS shows the dileptonic decay channel with two jets, one electron, one muon, and missing transverse energy from two neutneutrinosrinoes.
+
+ +MET is a vital variable in many CMS analyses, playing a key role in both Standard Model measurements and Beyond Standard Model searches. +In the Standard Model, MET is used to study processes involving neutrinos in the final state, such as the W boson mass measurement. +In searches for new physics, MET helps identify potential signatures where weakly interacting particles escape detection, such as dark matter, resulting in an imbalance in transverse momentum. + +The images below illustrate two such cases: on the left, a candidate W boson event with $W \rightarrow \mu \nu$, used in the W mass measurement, and on the right, a candidate event for dark matter production, featuring a hard jet recoiling against large missing energy. + +
+
+ W boson candidate event +
W boson candidate event with a muon and neutrino.
+
+
+ Dark matter search event +
Dark matter search event with a hard jet recoiling against large MET.
+
+
+

Event displays of analyses involving MET.

+ + +### Raw PF MET + +The most widely used MET reconstruction algorithm in CMS is the PF MET. +PF MET is reconstructed as the negative vector sum of the pT of all PF candidates in the event, which is summarized in the following equation: + + +$$\textrm{PF}~\vec{p}_{T}^{~miss} = - \sum_{i \in all~PF~Cands} \vec{p}_{T, i}$$ + +This is also known as the "raw" PF MET. + +### Raw PUPPI MET + +Multiple simultaneous proton-proton collisions occurring in the same bunch crossing, referred to as pileup, adversely affect MET resolution, leading to poorer performance at higher pileup levels. To mitigate these effects and improve MET performance with respect to pileup, CMS employs an alternative reconstruction algorithm known as PUPPI MET. + + + +The PUPPI (Pileup Per Particle Identification) algorithm applies inherently local corrections by leveraging specific properties of particles. Particles originating from the hard scatter process are typically geometrically close to other particles from the same interaction and generally exhibit higher pT. In contrast, pileup particles lack shower structures, have lower pT on average, and are uncorrelated with particles from the leading vertex. + + + +Using this information, the PUPPI algorithm removes charged particles associated with pileup vertices and assigns weights (ranging between 0 and 1) to neutral particles based on their likelihood of originating from pileup, thus enhancing MET reconstruction in high-pileup environments. The PUPPI MET is calculated using particle weights and can be summarized in the following equation: + + +$$\textrm{PUPPI}~\vec{p}_{T}^{~miss} = - \sum_{i \in all~PF~Cands} w_i~\vec{p}_{T, i}$$ + + +The figure below presents the MET distribution for both PF MET and PUPPI MET in events with leptonically decaying W bosons, demonstrating the improved performance achieved with PUPPI MET. + + + +> ## Remember +> PUPPI MET is the default MET algorithm in Run~3. +{: .callout} + + +## Exercise 1 +The goal of this part is to get familiar: +- with the event content of the miniAOD data tier, +- the MET collections stored by default in miniAOD, +- how to use tools to easily browse through the miniAOD file. + +The file used for in part contains simulated events ([/DYJetsToLL_M-50_TuneCP5_13TeV-amcatnloFXFX-pythia8/RunIISummer19UL18MiniAOD-106X_upgrade2018_realistic_v11_L1v1-v2/MINIAODSIM](https://cmsweb.cern.ch/das/request?input=dataset%3D%2FDYJetsToLL_M-50_TuneCP5_13TeV-amcatnloFXFX-pythia8%2FRunIISummer19UL18MiniAOD-106X_upgrade2018_realistic_v11_L1v1-v2%2FMINIAODSIM&instance=prod/global)), but the same conclusions hold for data files. + +To view the event content of a miniAOD file one can use the `edmDumpEventContent` command and since we are interested in the MET collections only we use `grep` to avoid long printouts. + +~~~ +edmDumpEventContent root://eosuser.cern.ch//eos/user/c/cmsdas/2025/MET/DYJetsToLL_M50_amcatnloFXFX.root | grep MET +~~~ +{: .language-bash} + + +> ## Question 1 +> What MET collections do you see inside a MiniAOD file? +{: .challenge} + +> ## Solution 1 +> The output is: +> ``` +> vector "slimmedMETs" "" "PAT" +> vector "slimmedMETsNoHF" "" "PAT" +> vector "slimmedMETsPuppi" "" "PAT" +> ``` +> Each entry (line) corresponds to a separate MET collection. +> The first column, `pat::MET`, shows the class of the MET object, where one finds the properties of the MET object. +> The second column shows the MET collection, and finally PAT is the namespace (in MiniAOD it is PAT). +> +> In this exercise we will focus on the `slimmedMETs` and `slimmedMETsPuppi` collections. +{: .solution} + + +{% include links.md %} + diff --git a/_episodes/06-METcalibration.md b/_episodes/06-METcalibration.md new file mode 100644 index 00000000..88c3a559 --- /dev/null +++ b/_episodes/06-METcalibration.md @@ -0,0 +1,235 @@ +--- +title: "MET Calibrations" +teaching: 20 +exercises: 10 +questions: +- "Why do we need to calibrate MET? How is the performance measured?" +- "What are the different ways of calibrating MET at CMS?" +- "What is MET phi modulation? How to correct for it?" +- How is the uncertainty on MET estimated? +objectives: +- "Learn about the MET calibration procedure and techniques used at CMS." +- "Learn about measuring MET performance." +- "Understand MET phi modulation and how to account for it." +- "Learn about MET uncertainty sources and to get the MET uncertainty in MiniAOD analyses." +keypoints: +- "Inaccurate MET estimation can result from sources such as non-linearity in the calorimeter's response to hadrons, minimum energy thresholds in the calorimeters, and pT thresholds or inefficiencies in track reconstruction. These issues are mitigated through calibration procedures discussed in this exercise." +- "Type-1 MET is the default MET calibration recommended by CMS." +- "Type-1 smear MET enhances data-MC agreement, and JME POG advises analysts to assess its impact in their studies." +- "MET is influenced by uncertainties from all contributing objects, including jets, leptons, photons, and unclustered energy. Systematic variations in the scale and resolution of each component must be propagated to the MET calculation to evaluate their impact on the analysis." +--- + +> ## After following the instructions in the setup, make sure you have the CMS environment: +> +> ~~~ +> cd $CMSSW_BASE/src/Analysis +> cmsenv +> ~~~ +> {: .language-bash} +{: .callout} + +## MET Corrections + +$$\vec{p}_{T}^{~miss,~raw} = - \sum_{i \in all} \vec{p}_{T, i} $$ + +The MET objects described earlier (PF-MET and PUPPI-MET) are referred to as _raw_ MET, and they are systematically different from the _true_ MET, which corresponds to the transverse momentum carried by invisible particles. +This difference arises from factors such as the non-compensating nature of the calorimeters, calorimeter thresholds, and detector misalignment, among others. +To improve the MET estimate and make it closer to the true MET, corrections can be applied. + + +### Type-1 Correction + +The **Type-I correction** is the most commonly used MET correction in CMS. +It propagates the jet energy corrections (JEC) to MET. Specifically, the Type-I correction replaces the vector sum of the transverse momenta of particles clustered as jets with the vector sum of the transverse momenta of the jets, which have been corrected with JEC. + +Particles can be classified into two disjoint sets: those that are clustered as jets and those that remain unclustered. + +$$\vec{p}_{T}^{~miss,~raw} = - \sum_{i \in jets} \vec{p}_{T, i} - \sum_{i \in uncl} \vec{p}_{T, i}$$ + +The first vector sum corresponds to the total pT of all jets: + +$$\sum_{i \in jets} \vec{p}_{T, i} = \sum_{i}^{nJets} \vec{p}_{T, jet}^{~uncorr}$$ + +The superscript "uncorr" indicates that the jet energy correction (JEC) has not yet been applied to these jets. + +The Type-I correction replaces the raw jet pT with the corrected jet pT. The Type-I correction can be expressed as the difference between two vector sums: + +$$C_{T}^{~Type-1} = \sum_{i}^{nJets} \vec{p}_{T, jet}^{~uncorr} - \sum_{i}^{nJets} \vec{p}_{T, jet}^{~corr}$$ + +or equivalently: + +$$C_{T}^{~Type-1} = \sum_{i \in jets} \vec{p}_{T, i} - \sum_{i}^{nJets} \vec{p}_{T, jet}^{~corr}$$ + +This vector term can be added to the raw MET to obtain the Type-1 corrected MET: + +$$\vec{p}_{T}^{~miss,~Type-1} = \vec{p}_{T}^{~miss,~raw} + C_{T}^{~Type-1}$$ + +Thus, the Type-I corrected MET is: + +$$\vec{p}_{T}^{~miss,~Type-1} = \vec{p}_{T}^{~miss,~raw} - \sum_{i}^{nJets} (\vec{p}_{T, jet}^{~corr} - \vec{p}_{T, jet}^{~uncorr}) $$ + +or equivalently: + +$$\vec{p}_{T}^{~miss,~Type-1} = - \sum_{i}^{nJets} \vec{p}_{T, jet}^{~corr} - \sum_{i \in uncl} \vec{p}_{T, i}$$ + + +
+ + +
We will revisit this in MET performance, but this figure shows a comarison between the MET scale for raw PF MET vs Type-1 PF MET.
+
+ +### Type-1 Smear MET (For MC only) + +In MC simulations, jets are smeared to achieve better agreement with data. This smearing of _MC jets_ can additionally be propagated to MET, resulting in **Type-1 smear MET**. + +> ## Remember +> PF MET is the recommended MET algorithm in Run 2, and PUPPI MET is recommended for Run 3 analyses. +> Type-I corrected MET is the default MET calibration required in all analyses. +{: .callout} + +### XY corrections +The XY correction reduces the MET $\phi$ modulation. This correction also helps mitigate pile-up effects. + +The distribution of true MET is independent of $\phi$ due to the rotational symmetry of collisions around the beam axis. +However, we observe that the reconstructed MET does depend on $\phi$. +The MET $\phi$ distribution follows roughly a sinusoidal curve with a period of $2\pi$. + +The possible causes of this modulation include: +- Anisotropic detector responses +- Inactive calorimeter cells +- Detector misalignment +- Displacement of the beam spot + +The amplitude of the modulation increases roughly linearly with the number of pile-up interactions. + +For example, following plot shows the MET $\phi$ distribution without the XY correction in events with an electron and a muon where $t\bar{t}$+jets background dominates: + + +After applying the correction the data/MC agreement improves: + + +## MET Uncertainty + +For analyses sensitive to missing transverse energy — those involving large MET contributions from neutrinos or other signatures — it is necessary to break MET into its individual components. +Since MET is calculated as the vector sum of contributions from jets, electrons, muons, taus, photons, and "unclustered energy" (energy not associated with reconstructed objects), the resolution and scale of each component must be propagated to MET. +These uncertainties are then treated as separate nuisance parameters each arising from a different physics object. + +The physics objects that contribute the most are: +- **Jets:** Jet energy scale (JES) and jet energy resolution (JER) uncertainties directly impact MET, as jets typically contribute significantly to the total energy. +- **Unclustered Energy:** Unclustered energy includes contributions from particles not grouped into jets, leptons, or photons. The uncertainty arises from the resolution of individual particle types, such as charged hadrons, neutral hadrons, photons, and hadronic forward (HF) particles. +- **Leptons:** This includes tau leptons, electrons, muons, and photons. Scale uncertainties for these objects need to be propagated to MET, as even small variations can affect its calculation. + +The scale and resolution of each component must be systematically varied within their respective uncertainties. These variations are then propagated to the MET calculation to calculate their impact on the analysis. + +Following figure shows the distribution of the Type 1 corrected MET reconstructed by the PF algorithm in MC and in data along with the uncertainties in the ratio plot. + + +## Exercise 2.1 + +In this section, we will focus on accessing the MET object(s) in miniAOD, including: +- Different MET calibrations +- MET uncertainties + +Firstly, we will access different MET flavors: the **raw PFMET**, the **Type-1 PFMET** (the default MET flavor in CMS), and the **Type-1 smeared PFMET**. +In Type-1 MET, corrections from the jet energy scale are propagated to MET, whereas in Type-1 smeared MET, corrections from both the jet energy scale and the jet energy resolution are applied. + +MET relies on accurate momentum/energy measurements of reconstructed physics objects, including muons, electrons, photons, hadronically decaying taus, jets, and unclustered energy (UE). The latter refers to contributions from PF candidates not associated with any of the previously mentioned physics objects. + +Since uncertainties in MET measurements strongly depend on the event topology, uncertainties in the momenta of all reconstructed objects are propagated to MET. This is done by varying the momentum estimate of each object within its uncertainty and recomputing MET. +In this exercise, we will consider three sources of uncertainty: +1. **Jet energy scale** +2. **Jet energy resolution** +3. **Unclustered energy** + +We will use the same file as in the previous exercise [Exercise 1.1](https://cms-jet.github.io/JMEDAS/05-MET101/index.html#exercise-1). + +Execute the following commands inside the CMSSW environment created during setup: + +~~~ +cd $CMSSW_BASE/src/Analysis/MET +cmsRun test/run_CMSDAS_MET_Exercise2_cfg.py +~~~ +{: .language-bash} + +This script will: +- Read the `slimmedMETs` collection +- Print the transverse momentum ($p_T$) and azimuthal angle ($\phi$) of the MET object for each event +- Print the values of various sources of systematic uncertainties +Additionally, the script demonstrates how to access MET with different levels of corrections applied. By default, Type-1 MET is selected. + +The analyzer being run using is command is `CMSDAS_MET_Analysis/plugins/CMSDAS_MET_AnalysisExercise2.cc`. The printout looks like the following: +``` +Begin processing the 1st record. Run 1, Event 138728702, LumiSection 513811 on stream 0 at 05-Jan-2025 14:40:03.942 CST + MET : + pt [GeV] = 4.42979 + phi [rad] = 2.92774 + MET uncertainties : + JES up/down [GeV] = 2.22909/6.63454 + JER up/down [GeV] = 4.34603/4.51426 + Unc up/down [GeV] = 9.2058/6.06604 + MET corrections : + Raw PFMET pt [GeV] = 10.7137 + PFMET-type1 pt [GeV] = 4.42979 + Smeared PFMET-type1 pt [GeV] = 4.40847 + ....... + ....... +``` + +> ## Question 2.1 +> Compare the distributions of the above quantities and get a feeling about their effect. Wheer are these distrucutions being stored? +{: .challenge} + +> ## Solution 2.1 +> The various MET histograms (raw, Type-1, JES Up, JER down etc.) are being stored at `./outputs/cmsdas_met_exercise2.root` +{: .solution} + +## Exercise 2.2 +Now we make the following modifications to the configuration script `CMSDAS_MET_Analysis/test/run_CMSDAS_MET_Exercise2_cfg.py`: +- Prevent printouts by setting `doprints` to `False`. +- Reduce the frequency of the report from "every" event to "every 10000" events by `modifying process.MessageLogger.cerr.FwkReport.reportEvery`. +- Run over all events in the file by updating `process.maxEvent`s from 10 to -1. + +After these modifications, please re-run the configuration with the following command: +~~~ +cmsRun test/run_CMSDAS_MET_Exercise2_cfg.py +~~~ +{: .language-bash} + +Once the process completes (it will take a few seconds), it will produce a ROOT file. We will then compare the 1D distribution of different MET flavors in a Z+jets sample (which has no genuine MET). +To generate the plot, run the following commands: + +~~~ +cd $CMSSW_BASE/src/Analysis/MET/scripts +root -l -q 'cmsdasmetplotsexercise2.C("step2a")' +~~~ +{: .language-bash} + +> ## Question 2.2 +> What do you observe looking at the different MET calibration algorithms? +{: .challenge} + +> ## Solution 2.2 +> +{: .solution} + +## Exercise 2.3 +Next, we will focus on Type-1 PF MET and study the impact of various uncertainties, including Unclustered, JES, and JER. +To generate the corresponding plot, use the following command: + +~~~ +cd $CMSSW_BASE/src/Analysis/MET/scripts +root -l -q 'cmsdasmetplotsexercise2.C("step2b")' +~~~ +{: .language-bash} + +> ## Question 2.3 +> What do you observe looking at the different sources of MET uncertainty? +{: .challenge} + +> ## Solution 2.3 +> +{: .solution} + + +{% include links.md %} diff --git a/_episodes/07-METperformance.md b/_episodes/07-METperformance.md new file mode 100644 index 00000000..4197247f --- /dev/null +++ b/_episodes/07-METperformance.md @@ -0,0 +1,175 @@ +--- +title: "MET performance" +teaching: 20 +exercises: 10 +questions: +- "How do we measure the MET performance (i.e. MET scale and MET resolution) ?" +objectives: +- "Learn about MET performance." +- "Measure the resolution and scale of MET for different MET algorithms and calibrations." +keypoints: +- "The performance of MET is studied in events with a well-measured Z boson (decaying to electrons or muons) or an isolated photon, which should have little to no genuine MET." +- "Transverse momentum conservation is used to study MET response and resolution along z-axis." +--- + +> ## After following the instructions in the setup, make sure you have the CMS environment: +> +> ~~~ +> cd $CMSSW_BASE/src/Analysis +> cmsenv +> ~~~ +> {: .language-bash} +{: .callout} + + +## MET performance + +A well-measured Z boson or photon provides a unique event axis and a precise momentum scale for evaluating MET performance. +To achieve this, the response and resolution of MET are studied in samples where a Z boson decays to a pair of electrons or muons, or in events with an isolated photon. +**Such events should have little to no genuine MET.** + +The MET performance is then assessed by comparing the momentum of the vector boson to that of the hadronic recoil system. +The hadronic recoil system is defined as the vector sum of the transverse momenta of all PF candidates, excluding the vector boson (or its decay products in the case of Z boson decay). + + + +Momentum conservation in the transverse plane imposes + +$$\vec{q}_{T} + \vec{u}_{T} + \vec{p}_{T}^{miss} =0$$, + +where $$\vec{q}_{T}$$ is the transverse momentum of the Z boson, and $$\vec{u}_{T}$$ is the hadronic recoil. + +Define two components of the hadronic recoil to study the MET response and resolution: +- hadronic recoil parallel ($$u_{\parallel}$$) to the boson axis: sensitive to the scale of boson/jets +- perpendicular ($$u_{\perp}$$) to the boson axis: sensitive to isotropic effects like pileup + +Specifically, the mean of the distribution of the magnitude of $$q_{T} + u_{\parallel}$$, is used to estimate the MET response, whereas the RMS of $$q_{T} + u_{\parallel}$$ and $$u_{\perp}$$ distributions are used to estimate the MET resolution in the axis parallel and perpendicular to the Z boson, respectively. + +An example of the $$q_{T} + u_{\parallel}$$ and $u_{\perp}$ distributions is shown in the following plots. + + + +Use the distribution of the parallel and perpendicular components of the hadronic recoil to measure the MET scale and resolution +- Get the mean of the parallel component to estimate MET scale. +- The RMS of the distributions gives the MET resolution in each direction. + +## Exercise 3.1: MET Scale + +In this exercise, we will measure the scale of the "uncorrected" (raw) PF MET as a function of the transverse momentum of the Z boson (pT(Z)). + +To start, run the following commands: +~~~ +cd $CMSSW_BASE/src/Analysis/MET/scripts +root -l -q 'cmsdasmetplotsexercise3.C("step3_scale_pfraw")' +~~~ +{: .language-bash} + +> ## Question 3.1 (a) +> For a fully calibrated MET object, what behavior would you expect to see in the distribution? +{: .challenge} + +> ## Solution 3.1 (a) +> +> For a fully calibrated MET object, the scale is expected to be approximately 1, indicating an accurate representation of the true missing transverse energy with minimal systematic bias. +{: .solution} + +Next, measure the MET scale using the Type-1 calibrated MET. Run the following commands: +~~~ +cd $CMSSW_BASE/src/Analysis/MET/scripts +root -l -q 'cmsdasmetplotsexercise3.C("step3_scale_pftype1")' +~~~ +{: .language-bash} + +> ## Question 3.1 (b) +> Compare the distributions of "Raw" and "Type-1" PF MET. Do you understand why there is a "turn-on" effect for Type-1 PFMET? +{: .challenge} + +> ## Solution 3.1 (b) +> +{: .solution} + +--- + +## Exercise 3.2: MET Resolution + +Now, let’s analyze the resolution of MET as a function of pT(Z) and the number of pileup vertices. To do this, run: +~~~ +cd $CMSSW_BASE/src/Analysis/MET/scripts +root -l -q 'cmsdasmetplotsexercise3.C("step3_resolution_pftype1")' +~~~ +{: .language-bash} + +This command will generate distributions showing the resolution of the parallel ($u_{\parallel}$) and perpendicular ($u_{\perp}$) components of MET with respect to pT(Z) and pileup. + +> ## Question 3.2 +> How does the MET resolution depend on pileup? +{: .challenge} + +> ## Solution 3.2 +> The MET resolution degrades significantly as pileup increases, with an average deterioration of approximately 4 GeV per additional pileup vertex. +> +>
+>
+> W boson candidate event +>
+>
+> Dark matter search event +>
+>
+> Z boson candidate event +>
+>
+> Exotic particle search event +>
+>
+{: .solution} + +For more detailed insights, refer to the CMS MET paper based on 13 TeV data: [CMS-JME-17-001](https://arxiv.org/abs/1903.06078). + +## Exercise 3.3 +Equipped with the ability to evaluate MET performance through scale and resolution, we now aim to compare Type-1 PF MET with Type-1 PUPPI MET. **Starting from Run 3, Type-1 PUPPI MET is the default MET algorithm in CMS.** In this example, we will examine the performance of PF MET and PUPPI MET by comparing their scale and resolution. + +To generate the corresponding plots, use the following command: +~~~ +cd $CMSSW_BASE/src/Analysis/MET/scripts +root -l -q 'cmsdasmetplotsexercise4.C' +~~~ +{: .language-bash} + +This might take a few minutes to process. + +> ## Question 3.3 (a) +> Compare the correlation between Type1 PFMET and Puppi MET. What do you observe? +{: .challenge} + +> ## Solution 3.3 (a) +> +{: .solution} + +> ## Question 3.3 (b) +> Compare the scale and resolution between Type1 PFMET and Puppi MET, especially the resolution as a function of $$N_{vtx}$$. What do you observe? +{: .challenge} + +> ## Solution 3.3 (b) +> Significantly improved MET resolution as a function of $$N_{vtx}$$ compared to PFMET. +> PUPPI-MET has 2x smaller degradation in resolution compared to PFMET. +> +>
+>
+> W boson candidate event +>
+>
+> Dark matter search event +>
+>
+> Z boson candidate event +>
+>
+> Exotic particle search event +>
+>
+{: .solution} + + +{% include links.md %} + diff --git a/_episodes/08-AnomalousMET.md b/_episodes/08-AnomalousMET.md new file mode 100644 index 00000000..41915471 --- /dev/null +++ b/_episodes/08-AnomalousMET.md @@ -0,0 +1,101 @@ +--- +title: "Handling Anomalous MET Events" +teaching: 20 +exercises: 10 +questions: +- "What is anomalous MET?" +- "How to identify these events?" +objectives: +- "Learn about anomalous MET" +- "Learn about the Noisy event filters and their implementation." +keypoints: +- "Large MET in an event may be caused by detector noise, cosmic rays, and beam-halo particles. Such MET with uninteresting origins is called false MET, anomalous MET, or fake MET and can be an indication of problematic event reconstruction." +- "Events with anomalos mets can be rejected using the Noisy event filters." +--- + +> ## After following the instructions in the setup, make sure you have the CMS environment: +> +> ~~~ +> cd $CMSSW_BASE/src/Analysis +> cmsenv +> ~~~ +> {: .language-bash} +{: .callout} + +## What is anomalous MET? + +Anomalous MET refers to events where the measured MET deviates from what is expected due to various factors, such as reconstruction failures, detector malfunctions, or background noise. +These anomalous MET events can arise from: +- **Detector Issues:** Malfunctions or mismeasurements in detectors, such as the electromagnetic calorimeter (ECAL) or hadronic calorimeter (HCAL), leading to spurious energy deposits. +- **Reconstruction Failures:** Errors in reconstructing particle tracks or energy, including issues with jets, leptons, or unclustered energy, that result in inaccurate MET calculations. +- **Non-collision Origins:** Spurious signals from sources unrelated to the particle collision, such as beam-halo particles, cosmic rays, or other environmental factors. +- **Dead or Malfunctioning Detector Cells:** Areas of the detector that fail to register energy deposits correctly, leading to underestimation of the MET. + +In such events, the MET value may be much higher than expected and does not reflect true missing energy from invisible particles (like neutrinos or dark matter candidates). + +## Noisy event filters + +To identify false MET, several algorithms have been developed that analyze factors such as timing, pulse shape, and signal topology. +When fake MET is detected, the corresponding events are typically discarded. +These cleaning algorithms, or filters, run in separate processing paths, and the outcome (success or failure) is recorded as a filter decision bit. +Analyzers can use this decision bit to filter out noisy events. These filters are specifically designed to reject events with unusually large MET values caused by spurious signals. + +
+ +
MET $p_T$ and leading jet $\phi$ distributions, with and without the application of event filters.
+
+ + +## Excercise 4 + +Noisy event filters (previously called MET Filters) are stored as trigger results, specifically in edm::TriggerResults of the RECO or PAT process. Each MET filter runs in a separate path, and the success or failure of the path is recorded as a filter decision bit. For more information, please refer to the provided [link](https://twiki.cern.ch/twiki/bin/viewauth/CMS/MissingETOptionalFiltersRun2). + +In this exercise, we will show how to access the MET Filters in miniAOD. Please run the following commands: +~~~ +cd $CMSSW_BASE/src/Analysis +cmsRun MET/test/run_CMSDAS_MET_Exercise4_cfg.py +~~~ +{: .language-bash} + +This example accesses the decision bits for the following MET Filters: `Beam Halo`, `HBHE`, `HBHE (Iso)`, `Ecal Trigger Primitives`, `EE SuperCluster`, `Bad Charged Hadron`, and `Bad PF Muon`. A "true" decision means the event was not rejected by the filter. The analyzer used in this example is `Analysis/MET/plugins/CMSDAS_MET_AnalysisExercise5.cc`. The printed result will look like this: + +``` +Begin processing the 1st record. Run 317626, Event 178458435, LumiSection 134 on stream 0 at 28-Jun-2020 10:39:20.656 CDT +MET Filters decision: + HBHE = 1 + HBHE (Iso) = 1 + Beam Halo = 1 + Ecal TP = 1 + EE SuperCluster = 1 + Bad Charged Hadron = 1 + Bad PF Muon = 1 +....... +....... +``` + +> ## Question 4 +> To see the output for a bad event, modify the input file in `Analysis/MET/test/run_CMSDAS_MET_Exercise4_cfg.py`. +> Comment out the line for the first input file `cmsdas_met_METFilters1.root` and uncomment the line for the second input file `cmsdas_met_METFilters2.root`. +> Then run the code again. What changes do you notice? +{: .challenge} + +> ## Solution 4 +> The event does not pass the `HBHE` filter and for an event to qualify it must pass **ALL** filters. +> ``` +> Begin processing the 1st record. Run 317182, Event 1740596074, LumiSection 1226 on stream 0 at 06-Jan-2025 08:22:50.035 CST +> MET Filters decision: +> HBHE = 0 +> HBHE (Iso) = 1 +> Beam Halo = 1 +> Ecal TP = 1 +> EE SuperCluster = 1 +> Bad Charged Hadron = 1 +> Bad PF Muon = 1 +> ....... +> ....... +> ``` +{: .solution} + + +{% include links.md %} + diff --git a/fig/episode5/CMS-JME-17-001_Figure_003.pdf b/fig/episode5/CMS-JME-17-001_Figure_003.pdf new file mode 100644 index 00000000..028de457 Binary files /dev/null and b/fig/episode5/CMS-JME-17-001_Figure_003.pdf differ diff --git a/fig/episode5/DM.png b/fig/episode5/DM.png new file mode 100644 index 00000000..97cc8d24 Binary files /dev/null and b/fig/episode5/DM.png differ diff --git a/fig/episode5/MET.png b/fig/episode5/MET.png new file mode 100644 index 00000000..a4298cc3 Binary files /dev/null and b/fig/episode5/MET.png differ diff --git a/fig/episode5/MET_ttbar.png b/fig/episode5/MET_ttbar.png new file mode 100644 index 00000000..6fbe8b63 Binary files /dev/null and b/fig/episode5/MET_ttbar.png differ diff --git a/fig/episode5/PF_vs_PUPPI.png b/fig/episode5/PF_vs_PUPPI.png new file mode 100644 index 00000000..1f4db0ea Binary files /dev/null and b/fig/episode5/PF_vs_PUPPI.png differ diff --git a/fig/episode5/ParticleFlow.png b/fig/episode5/ParticleFlow.png new file mode 100644 index 00000000..24741be0 Binary files /dev/null and b/fig/episode5/ParticleFlow.png differ diff --git a/fig/episode5/Wmass.png b/fig/episode5/Wmass.png new file mode 100644 index 00000000..4efb8b5b Binary files /dev/null and b/fig/episode5/Wmass.png differ diff --git a/fig/episode5/met_schematic.png b/fig/episode5/met_schematic.png new file mode 100644 index 00000000..09fdaace Binary files /dev/null and b/fig/episode5/met_schematic.png differ diff --git a/fig/episode5/puppi.svg b/fig/episode5/puppi.svg new file mode 100644 index 00000000..98fac680 --- /dev/null +++ b/fig/episode5/puppi.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/fig/episode5/puppi_sketch.png b/fig/episode5/puppi_sketch.png new file mode 100644 index 00000000..67bc696b Binary files /dev/null and b/fig/episode5/puppi_sketch.png differ diff --git a/fig/episode6/CMS-JME-17-001_Figure_009.pdf b/fig/episode6/CMS-JME-17-001_Figure_009.pdf new file mode 100644 index 00000000..8382316e Binary files /dev/null and b/fig/episode6/CMS-JME-17-001_Figure_009.pdf differ diff --git a/fig/episode6/CMS-JME-17-001_Figure_013.pdf b/fig/episode6/CMS-JME-17-001_Figure_013.pdf new file mode 100644 index 00000000..9f7d4aca Binary files /dev/null and b/fig/episode6/CMS-JME-17-001_Figure_013.pdf differ diff --git a/fig/episode6/Figure_2p2.png b/fig/episode6/Figure_2p2.png new file mode 100644 index 00000000..76117828 Binary files /dev/null and b/fig/episode6/Figure_2p2.png differ diff --git a/fig/episode6/Figure_2p3.png b/fig/episode6/Figure_2p3.png new file mode 100644 index 00000000..4eb46a45 Binary files /dev/null and b/fig/episode6/Figure_2p3.png differ diff --git a/fig/episode6/PFMET_Type1XY-2.pdf b/fig/episode6/PFMET_Type1XY-2.pdf new file mode 100644 index 00000000..4027dadb Binary files /dev/null and b/fig/episode6/PFMET_Type1XY-2.pdf differ diff --git a/fig/episode6/emu-inclusive-metphi-corr.pdf b/fig/episode6/emu-inclusive-metphi-corr.pdf new file mode 100644 index 00000000..3c061a90 Binary files /dev/null and b/fig/episode6/emu-inclusive-metphi-corr.pdf differ diff --git a/fig/episode6/emu-inclusive-metphi-uncorr.pdf b/fig/episode6/emu-inclusive-metphi-uncorr.pdf new file mode 100644 index 00000000..00398da4 Binary files /dev/null and b/fig/episode6/emu-inclusive-metphi-uncorr.pdf differ diff --git a/fig/episode6/raw_vs_type1.png b/fig/episode6/raw_vs_type1.png new file mode 100644 index 00000000..74ff44eb Binary files /dev/null and b/fig/episode6/raw_vs_type1.png differ diff --git a/fig/episode7/CMS-JME-17-001_Figure_008-a.pdf b/fig/episode7/CMS-JME-17-001_Figure_008-a.pdf new file mode 100644 index 00000000..262c94bb Binary files /dev/null and b/fig/episode7/CMS-JME-17-001_Figure_008-a.pdf differ diff --git a/fig/episode7/Figure_3p1a.png b/fig/episode7/Figure_3p1a.png new file mode 100644 index 00000000..980ff5d8 Binary files /dev/null and b/fig/episode7/Figure_3p1a.png differ diff --git a/fig/episode7/Figure_3p1b.png b/fig/episode7/Figure_3p1b.png new file mode 100644 index 00000000..b107adb0 Binary files /dev/null and b/fig/episode7/Figure_3p1b.png differ diff --git a/fig/episode7/Figure_3p2a.png b/fig/episode7/Figure_3p2a.png new file mode 100644 index 00000000..e4fd9e22 Binary files /dev/null and b/fig/episode7/Figure_3p2a.png differ diff --git a/fig/episode7/Figure_3p2b.png b/fig/episode7/Figure_3p2b.png new file mode 100644 index 00000000..071542c0 Binary files /dev/null and b/fig/episode7/Figure_3p2b.png differ diff --git a/fig/episode7/Figure_3p2c.png b/fig/episode7/Figure_3p2c.png new file mode 100644 index 00000000..8f93e046 Binary files /dev/null and b/fig/episode7/Figure_3p2c.png differ diff --git a/fig/episode7/Figure_3p2d.png b/fig/episode7/Figure_3p2d.png new file mode 100644 index 00000000..8f68fe47 Binary files /dev/null and b/fig/episode7/Figure_3p2d.png differ diff --git a/fig/episode7/Figure_3p3a.png b/fig/episode7/Figure_3p3a.png new file mode 100644 index 00000000..a468914a Binary files /dev/null and b/fig/episode7/Figure_3p3a.png differ diff --git a/fig/episode7/Figure_3p3b1.png b/fig/episode7/Figure_3p3b1.png new file mode 100644 index 00000000..14f98e9c Binary files /dev/null and b/fig/episode7/Figure_3p3b1.png differ diff --git a/fig/episode7/Figure_3p3b2.png b/fig/episode7/Figure_3p3b2.png new file mode 100644 index 00000000..abb78bc1 Binary files /dev/null and b/fig/episode7/Figure_3p3b2.png differ diff --git a/fig/episode7/Figure_3p3b3.png b/fig/episode7/Figure_3p3b3.png new file mode 100644 index 00000000..8a691600 Binary files /dev/null and b/fig/episode7/Figure_3p3b3.png differ diff --git a/fig/episode7/Figure_3p3b4.png b/fig/episode7/Figure_3p3b4.png new file mode 100644 index 00000000..c8a915e1 Binary files /dev/null and b/fig/episode7/Figure_3p3b4.png differ diff --git a/fig/episode7/parameterized_hadronicRecoil.png b/fig/episode7/parameterized_hadronicRecoil.png new file mode 100644 index 00000000..5c696a3c Binary files /dev/null and b/fig/episode7/parameterized_hadronicRecoil.png differ diff --git a/fig/episode7/upar_uperp_dist.png b/fig/episode7/upar_uperp_dist.png new file mode 100644 index 00000000..8acca1a8 Binary files /dev/null and b/fig/episode7/upar_uperp_dist.png differ diff --git a/fig/episode8/CMS-JME-17-001_Figure_004.pdf b/fig/episode8/CMS-JME-17-001_Figure_004.pdf new file mode 100644 index 00000000..3511b654 Binary files /dev/null and b/fig/episode8/CMS-JME-17-001_Figure_004.pdf differ diff --git a/fig/foto_facilitators.png b/fig/foto_facilitators.png deleted file mode 100644 index cc21fce2..00000000 Binary files a/fig/foto_facilitators.png and /dev/null differ diff --git a/fig/photo_facilitators.pdf b/fig/photo_facilitators.pdf new file mode 100644 index 00000000..78755a82 Binary files /dev/null and b/fig/photo_facilitators.pdf differ diff --git a/fig/team.png b/fig/team.png deleted file mode 100644 index 2dc1fdab..00000000 Binary files a/fig/team.png and /dev/null differ diff --git a/index.md b/index.md index 1b72aff7..2e355fd0 100644 --- a/index.md +++ b/index.md @@ -6,7 +6,7 @@ permalink: index.html # Is the only page that doesn't follow the pattern /:path -This tutorial will provide you with the basics you need to deal with jets in your analysis. +This tutorial will provide you with the basics you need to deal with jets and missing transverse momentum or MET in your analysis. We start with the basics of a jet, how they are reconstructed, what algorithms are used, etc. Then, we give examples with scripts on how to access jets and use them in your analysis frameworks, including corrections and systematics. @@ -14,20 +14,22 @@ In the second part of the exercise, we examine jet substructure algorithms, which have many uses, including the identification of hadronic decays of heavy SM particles such as top quarks, W, Z, and H bosons, as well as mitigation of pileup and others. +For the MET exercise we will start with an introduction to its reconstruction and the fundamental concepts underlying its calculation, ensuring a solid foundation for understanding its role in physics analyses. Next, we delve into MET calibration and uncertainties, providing the tools to accurately account for and quantify potential deviations. Finally, we cover the identification of sources that can lead to artificial MET and discuss Noisy Event filters (formerly known as MET filters) designed to mitigate such effects, equipping you to confidently handle MET-related challenges in your research. + The tutorial is designed to be executed on CERN LXPLUS, following the setup step, using jupyter notebooks. On this website, you will find links to instructional slides and more information about the topics to walk you through the exercises. -_For general questions, problems, debugs, or asking for help from experts on jets and missing ET:_ [CMS Talk JetMET category](https://cms-talk.web.cern.ch/c/pog/jetmet/51) +_For general questions, problems, debugs, or asking for help from experts on jets and MET:_ [CMS Talk JetMET category](https://cms-talk.web.cern.ch/c/pog/jetmet/51) _Follow the CMS workbook on jet analysis:_ [WorkBookJetAnalysis](https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookJetAnalysis) > ## What is this set of exercises trying to do? > >It gives you hands-on experience accessing jet collection in an event, plotting basic jet quantities, and applying jet energy correction. -> * This is a 101 on accessing jets in the CMS framework without assuming prior knowledge of jet analysis. -> * Make you familiar with basic jet types and algorithms and how to use them in your analysis. +> * This is a 101 on accessing jets and MET in the CMS framework without assuming prior knowledge. +> * Make you familiar with basic jet and MET types and algorithms and how to use them in your analysis. > * Illustrate each exercise using real-life example scripts. > * Give a comprehensive reference to more advanced workbook examples, additional resources, and pedagogical documentation in one place. {: .objectives} @@ -44,9 +46,9 @@ _Follow the CMS workbook on jet analysis:_ [WorkBookJetAnalysis](https://twiki.c > * The exercises are prepared to be run directly from a cmslpc node, with non-interactive notebooks to follow and discuss the exercises. {: .testimonial} -### Facilitators CMSDAS LPC 2025 +### Facilitators CMSDAS IIT Hyderabad 2025 - + ### Support