Make simple histograms
Prerequisites and goal
Complete the tutorial setup and build tea. The goal is to histogram the muon multiplicity, transverse momentum, and pseudorapidity for a semileptonic top background sample.
Prepare the configuration
From the analysis root:
cp tea/configs/das_exercises/task1_simple_histograms.py configs/simple_histograms.py
Set the paths and histogram definitions:
base_path = "/eos/cms/store/group/committee_schools/2025-cmsdas-hamburg/llp/samples"
process = "background_ttsemileptonic"
inputFilePath = f"{base_path}/{process}/output_0.root"
histogramsOutputFilePath = f"../results/tutorial/histograms/{process}.root"
defaultHistParams = (
("Event", "nMuon", 50, 0, 50, ""),
("Muon", "pt", 400, 0, 200, ""),
("Muon", "eta", 100, -2.5, 2.5, ""),
)
weightsBranchName = "genWeight"
Build and run
Rebuild so the new config is linked into bin/, then run:
source tea/build.sh
cd bin
./histogrammer --config simple_histograms.py
Expected output
results/tutorial/histograms/background_ttsemileptonic.root should contain Event_nMuon, Muon_pt, Muon_eta, and cut-flow histograms. Inspect the keys with:
rootls ../results/tutorial/histograms/background_ttsemileptonic.root
If the file is missing, check the input path and output directories.
Next step
Plot the histograms and overlay an LLP signal.