The tools to train MVA Muons identifications for CMS.
This toolkit requires the xgbo package to be installed:
git clone [email protected]:guitargeek/xgbo.git
cd xgbo
pip install --user .
The procedure splits up in a few fundamental steps:
- Make training ntuple with CMSSW
- Train the MVA with XGBoost
- Determine working points
- Generate configuration files to integrate MVA in CMSSW
- Make validation ntuple with CMSSW
- Draw performance plots
Only step 1 and 4 require interaction with CMSSW, the other steps can be done offline.
Adapt the configuration in e.g. config_2016.py
to your needs.
Start by setting up the CMSSW area:
cmsrel CMSSW_10_3_1
cd CMSSW_10_3_1/src
cmsenv
Checkout the needed packages:
git clone https://github.com/mkovac/MuonMVANtuplizer.git
git clone https://github.com/mkovac/MuonMVAReader.git
git clone https://github.com/mkovac/PileUpWeight.git
Make sure to have crab in your environment and launch the job to NTuplize the sample in e.g. config_2016.py:
python submit_ntuplizer_2016.py --train
When the job is done, you should merge the crab output files to one root file.
python merge_ntuple_2016.py --train
Launch the training with:
python training_2016.py