Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

3.1 Getting Started: Higgs Mass Analysis with FCCAnalyses

Original author: Michele Selvaggi

Let’s first clone and build FCCAnalyses with the following commands:

git clone --branch master https://github.com/HEP-FCC/FCCAnalyses.git
cd FCCAnalyses
source ./setup.sh
fccanalysis build -j 8

and create a directory containing this tutorial:

cd ..
mkdir tutorial && cd tutorial

Copy the necessary files, either from the web or from some location where the files were produced locally

mkdir localSamples && cd localSamples
mkdir  p8_ee_WW_mumu_ecm240 && cd p8_ee_WW_mumu_ecm240
wget https://fccsw.web.cern.ch/tutorials/ana-sim-evt/p8_ee_WW_mumu_ecm240/p8_ee_WW_mumu_ecm240_edm4hep.root
cd ..
mkdir p8_ee_ZZ_mumubb_ecm240 && cd p8_ee_ZZ_mumubb_ecm240
wget https://fccsw.web.cern.ch/tutorials/ana-sim-evt/p8_ee_ZZ_mumubb_ecm240/p8_ee_ZZ_mumubb_ecm240_edm4hep.root
cd ..
mkdir p8_ee_ZH_Zmumu_ecm240  && cd p8_ee_ZH_Zmumu_ecm240
wget https://fccsw.web.cern.ch/tutorials/ana-sim-evt/p8_ee_ZH_Zmumu_ecm240/p8_ee_ZH_Zmumu_ecm240_edm4hep.root
cd ../..

This tutorial consists in two parts. Both parts will make use of ee->ZH (Z->mumu)events, with its relevant backgrounds ee->WW and ee->ZZ:

Part I - Recoil Mass: Analysis and Histograms in a Single Step

Start by downloading this file called functions.h. This contains C++ helper functions that you will need to compute observables with RDataframe.

Next, download the histmaker_recoil.py script, which processes the previously produced ROOT samples, reconstructs muon and Z candidates, applies a sequence of event-selection cuts, and produces a set of histograms.

The script first defines the input/output paths, luminosity scaling, and histogram binning. The main analysis logic is implemented in the build_graph function: reconstructed muons are selected and isolated muons with p > 20 GeV are retained. The analysis then applies successive cuts, including opposite-sign muon selection, Z-boson candidate reconstruction, Z mass and momentum requirements, missing-energy selection, and finally a recoil-mass window to suppress background processes.

Before running the script, update the inputDir variable so it points to the directory containing your local samples; the output histograms will be written to outputDir. Finally, run the histmaker script using the fccanalysis run parameter to generate a ROOT file containing the resulting TH1 histograms:

fccanalysis run histmaker_recoil.py

Now download the the plotting script plots_recoil.py and run it using the fccanalysis plots parameter:

fccanalysis plots plots_recoil.py

Please note that the event statistics is not great because we only produced on 10 000 events in the Delphes Fast Simulation step.

Part II - Jet Flavor: Producing a flat ntuple tree before creating histograms and plots

This first analysis stage usually runs on large samples on batch, and the idea is to produce small ntuples with less variables. Also, jet inference of the jet tagger is pretty slow, and usually has to be performed only once. In this exercise we will run the histmaker in a separate, second stage.

Download this analysis script treemaker_flavor.py and run

fccanalysis run treemaker_flavor.py

This will produce a root file for every process containing a flat tree events containing high-level variables. In addition to selecting muons as done in the previous example, this script create a new collection of ReconstructedParticles without the two high energy muons, and runs the jet clustering algorithm in exclusive N=2 mode of the new collection. In such a way, the two clustered jets form the H->jj jet candidates. The jet flavour algorithm is then evaluated on these two jets and the relevant scores are stored in the output tree.

Now we can download a dedicated histmaker_flavor.py script, that runs this time on the just created flat ntuples files instead of the edm4hep format.

Run it as before:

fccanalysis run histmaker_flavor.py

This script takes the ntuples produced in the previous step, applies a similar selection as in the previous examples, but requires the jets to have a high probability to be B-like.

To compare the results between the flavor and recoil approaches, we again produce plots using a dedicated plots_flavor.py script and run it:

fccanalysis plots plots_flavor.py