Run3 HH4b Cutflow Challenge
Mail from Marina
Please find below the (lxplus) path to the 2022EE NTuples:
afs[cern.ch/user/m/mkolosov/public/forJohn/data2022postEE0tree.root](http://cern.ch/user/m/mkolosov/public/forJohn/data_2022_postEE_0_tree.root)
To get the events in the 4b(>=3bT) control region you'd need to apply the following selections:
- (avgbdisctwoldgbdiscjets > 0.65)
- (dHHHHregmass > 350)
And then apply the 4b(>=3bT) mask:
MASK4b: (dHHNbtagM = 4) & (dHH_NbtagT > 3)
HM: np.stack([dHHH1regmass, dHHH2regmass], axis=1) ARcenter: '125, 120' ARdHM: np.sum( (HM - ARcenter)**2, axis=1 )**0.5
and the CR mask: ACR: (ARdHM >= 30) & (ARdHM < 55)
Logs
[BROKEN LINK: E58C60ED-9000-4234-835E-F6E00D672FCE]
- on cmslpc335
- Remaking B from nano
python runner.py -s -p skimmer/processor/skimmer_4b.py -c skimmer/metadata/HH4b.yml -y 2022_preEE -d data -e B -op skimmer/metadata/ -o picoaod_datasets_data_2022_preEEB_debug_v2.yml -m metadata/datasets_HH4b_Run3.yml --condorpython3 metadata/merge_yaml_datasets.py -m metadata/datasets_HH4b_Run3.yml -o metadata/datasets_HH4b_Run3_merged_debug_v2.yml -f skimmer/metadata/picoaod_datasets_data_2022_preEEB_debug_v2.ymlpython runner.py -s -p skimmer/processor/skimmer_4b.py -c skimmer/metadata/HH4b_fourTag.yml -y 2022_preEE -d data -op skimmer/metadata/ -o picoaod_datasets_fourTag_data_Run3_vDebug_v2.yml -m metadata/datasets_HH4b_Run3_merged_debug_v2.yml --condor
- Events not in four b skimmmer… problem was eta requirement in lowPt skimming
- Fixed.
- Now re-running skims on C and D over all
- Re-doing the four-tag skim
- Agreement now:
Total number of missing events: 317 (1.3% of total events)Total number of extra events: 5986 (19.87% of total events)
- Going to reskim all Run3
- Submitted 2022EE :
source skim2022_EE.sh
- Submitted 2022EE :
28 April 2025 Monday
- I think the cutflow problem could be due to the four tag skimmer.
- merging:
python3 metadata/merge_yaml_datasets.py -m metadata/datasets_HH4b_Run3.yml -o metadata/datasets_HH4b_Run3_merged_debug.yml -f skimmer/metadata/picoaod_datasets_data_2022_preEE*_debug.yml
- Running with out 4b skim on cmslpc331
python runner.py -o data_Run3_vDebug_new.coffea -d data -p analysis/processors/processor_HH4b.py -y 2022_preEE -op output/synthetic_dataset_analyze_all -c analysis/metadata/HH4b_run_fastTopReco.yml -m metadata/datasets_HH4b_Run3_merged_debug.yml --condor
- taking too long…. Will do 4b skim
python runner.py -s -p skimmer/processor/skimmer_4b.py -c skimmer/metadata/HH4b_fourTag.yml -y 2022_preEE -d data -op skimmer/metadata/ -o picoaod_datasets_fourTag_data_Run3_vDebug.yml -m metadata/datasets_HH4b_Run3_merged_debug.yml --condor
- Merging
python metadata/merge_yaml_datasets.py -m metadata/datasets_HH4b_Run3.yml -o metadata/datasets_HH4b_Run3_fourTag_vDebug.yml -f skimmer/metadata/picoaod_datasets_fourTag_data_Run3_vDebug.yml
- Running
- =python runner.py -o dataRun3vDebugnew.coffea -d data -p analysis/processors/processorHH4b.py -y 2022preEE -op output/syntheticdatasetanalyzeall -c analysis/metadata/HH4brunfastTopReco.yml -m metadata/datasetsHH4bRun3fourTagvDebug.yml =
- See way too few events in debug… needed to update the debug mask… Rerunning
- Agreement now
Total number of missing events: 1119 (4.58% of total events)Total number of extra events: 5778 (19.84% of total events)
- Most events dont make the skim…
- Reskimming on (cmslpc324) with debug info for correct numbers:
python runner.py -s -p skimmer/processor/skimmer_4b.py -c skimmer/metadata/HH4b_fourTag.yml -y 2022_preEE -d data -op skimmer/metadata/ -o picoaod_datasets_fourTag_data_Run3_vDebug.yml -m metadata/datasets_HH4b_Run3_merged_debug.yml --condor
- Jet eta cut is different! 2.4 (US) vs 2.5 (Marina)
- Reskimming with 2.5 cut
Total number of missing events: 580 (2.37% of total events)
- Added abs(deltadhh)
- Remaking the skims with the new eta cut
- Ran B, C and D
python runner.py -s -p skimmer/processor/skimmer_4b.py -c skimmer/metadata/HH4b.yml -y 2022_preEE -d data -e B -op skimmer/metadata/ -o picoaod_datasets_data_2022_preEE_debug.yml -m metadata/datasets_HH4b_Run3.yml --condor
- Merged .. Remade 4b… (Not clear where the events are going…they appear as fourTag in the first skim)
- Hmmm back to 5% …
22 April 2025 Tuesday
- cmslpc319
- Skim works when running on condor !
- All events are there in the skim now!
- Will re run C and D before redoing the cutflow
python runner.py -s -p skimmer/processor/skimmer_4b.py -c skimmer/metadata/HH4b.yml -y 2022_preEE -d data -e C -op skimmer/metadata/ -o picoaod_datasets_data_2022_preEEC_debug.yml -m metadata/datasets_HH4b_Run3.yml --condor
21 April 2025 Monday
- checking which file has the run I care about
dasgoclient --query"run dataset=/JetMET/Run2022C-22Sep2023-v1/NANOAOD"=> python runner.py -s -p skimmer/processor/skimmer_4b.py -c skimmer/metadata/HH4b.yml -y 2022_preEE -d data -e B -op skimmer/metadata/ -o picoaod_datasets_data_2022_preEE_debug.yml -m metadata/datasets_HH4b_Run3.yml --condor- Running on cmslpc332
- Adding debugging output
15 April 2025 Tuesday
- Impletented the Run3 case when dhh < 30 GeV
- Remade pkl inputs
- Now better agreement!
- Before:
Total number of missing events: 11690 (47.79% of total events)Total number of extra events: 4918 (27.81% of total events) - Now:
Total number of missing events: 8426 (34.45% of total events)Total number of extra events: 2706 (14.44% of total events)
- Before:
- Eg:
Run 355872: 99 missing events =First 5 missing events: [228793492, 993131619, 994362241, 994277091, 1003079747, 1007831198, 1141642728, 1145575379, 1145596930, 1086081738]
14 April 2025 Monday
- Yes, we follow the method used in HIG-20-005 ( [https://gitlab.cern.ch/mkolosov/hh4b_run3/-/blob/run2/python/producers/hh4bTreeProducer.py?ref_type=heads#L3350](https://gitlab.cern.ch/mkolosov/hh4b_run3/-/blob/run2/python/producers/hh4bTreeProducer.py?ref_type=heads#L3350) ) in which : if the difference of the minimum and second minimum distance from the diagonal is less than 30, we choose the pair that has the maximum H1 pT in the 4-jet center-of-mass frame.
- Implementing mhh < 30 check
python -m unittest analysis.tests.quadjet_test.quadJetTestCase
11 April 2025 Friday
- finding events…
- Most (70%) missing the skimmer.
- lxplus down…not down just slow
- Finding problem events… printing out the jet four vectors
9 April 2025 Wednesday
- adding
eventandrunto the skim - 50% of events different !
- run
355872: 94 missing events First 10 missing events: =[228793492, 993131619, 994277091, 995618735, 1003079747, 1145575379, 917646697, 1086081738, 276519899, 321185192 …python runner.py -o synthetic_data_Run3_v8_debug_seedXXX.coffea -d data -p analysis/processors/processor_HH4b.py -y 2022_preEE -op output/synthetic_dataset_analyze_all -c analysis/metadata/HH4b_run_fastTopReco.yml -m metadata/datasets_HH4b_Run3_fourTag_v8.yml
- Errors with running in cofffea … debugging (in Cursor! )
8 April 2025 Tuesday
- made python script to read Marinas file (Cursor !!!)
- = /Users/johnda/CMSWork/hh4b/coffea4bees/python/analysis > py processeventnumbers.py =
- re-Making my pkl file:
python runner.py -o synthetic_data_Run3_v8_debug_seedXXX.coffea -d data synthetic_data -p analysis/processors/processor_HH4b.py -y 2022_preEE -op output/synthetic_dataset_analyze_all -c analysis/metadata/HH4b_run_fastTopReco.yml -m metadata/datasets_HH4b_Run3_fourTag_v8.yml
- Marina's file has all the data events… How to get only the 4b CR events ? pinged her
- Got instructions for CR events
- skipping the input file for 4Tag events
- fighting with trying to filter the 4b events
31 March 2025 Monday
- Marina's cutflow is off
- requested events/run list
- [>>] Compare Events
17 March 2025 Monday
- added ptraw to debug output
- remade pkl file for Marina… sent
14 March 2025 Friday
- Fixed Cutflow for Marina
- Add was only including one data Era
- Add other eras
- Add other Pt corrections
- sent
13 March 2025 Thursday
- Implementing Run3 Selection
- Working cutflow … got unit test working
- Adding dhh min
- Synch Higgs Candidate Selection
- Making Cut flow for Marina:
python runner.py -o synthetic_data_Run3_v8_debug_seedXXX.coffea -d data synthetic_data -p analysis/processors/processor_HH4b.py -y 2022_preEE -op output/synthetic_dataset_analyze_all -c analysis/metadata/HH4b_run_fastTopReco.yml -m metadata/datasets_HH4b_Run3_fourTag_v8.yml
- Make output files for Marina
python analysis/debugRun3SyntheticData.py output/synthetic_dataset_analyze_all/synthetic_data_Run3_v8_debug_seedXXX.coffea
- Sent cutflow to Marina
- Running plots for data vs synthetic
12 March 2025 Wednesday
- Implementing Run3 selection
- From Marina:
- Synch Lepton Definition
- [>>] Synch Higgs Candidate Selection
- Synched Electrons
- Synched Muons:
- Testing with
time python runner.py -t -o synthetic_data_Run3_2022_preEE.coffea -d data -p analysis/processors/processor_HH4b.py -y 2022_preEE -op output/synthetic_dataset_analyze_all -c analysis/metadata/HH4b_run_fastTopReco.yml -m metadata/datasets_HH4b_Run3_fourTag_v6.yml
- Trying test case
python -m unittest analysis.tests.quadjet_test.quadJetTestCase
7 January 2025 Tuesday
- output event list for florida
python debug_HHRun3.py
- Outputting our preSelection event list
time python runner.py -o data_Run3_2022_EE.coffea -d data -p analysis/processors/processor_HH4b.py -y 2022_EE -op hists -c analysis/metadata/HH4b_run_fastTopReco.yml -m metadata/datasets_HH4b_Run3_fourTag_v4.yml
- Ask Marina to compare unblinded inclusive 4b counts… Maybe normalization is CR acceptance difference
- Made our event numbers list
python analysis/debugRun3CutFlow.py hists/data_Run3_2022_EE.coffea- Only missing ~1% of events
- Some differences in jet and b-jet multiplicities
6 January 2025 Monday
- Copied File from marina to
root://cmseos.fnal.gov//store/user/jda102/debugRun3HH/data_2022_postEE_0_tree.root - Chat GPT to write uproot program
- Wrote out a pkl file with the events and lumis
- Make pickle of events passing 4jets selection