Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script to make HTML pages and PDF plots more user-friendly #12

Closed
jpata opened this issue Jan 24, 2019 · 6 comments
Closed

Script to make HTML pages and PDF plots more user-friendly #12

jpata opened this issue Jan 24, 2019 · 6 comments
Labels
particleflow CMS Particle Flow Validation

Comments

@jpata
Copy link
Owner

jpata commented Jan 24, 2019

We use the script https://github.com/jpata/cmssw/blob/pfvalidation/Validation/RecoParticleFlow/test/compare.py
to create A vs B type comparison plots from DQM*.root files.

I'm working on creating a more convenient command line interface for that script, something along the lines of

./test/compare.py --sample QCD:DQMfile1.root:DQMfile2.root:DQMfile3.root --sample QCDNoPU:DQMfile4.root:DQMfile5.root:DQMfile6.root --plots JetResponse:reso_dist_10_24:reso_dist_10_24_eta05:reso_dist_10_24_eta13

would compare 3 versions of the sample QCD (DQMFile[1-3].root) and 3 versions of the sample QCDNoPu (DQMFile[4-6].root) and plot the histograms reso_dist_10_24_eta05:reso_dist_10_24_eta13 from the folder JetResponse on a canvas reso_dist_10_24.

@hatakeyamak @juska would appreciate your thoughts.

@jpata jpata added the particleflow CMS Particle Flow Validation label Jan 24, 2019
@jpata
Copy link
Owner Author

jpata commented Jan 25, 2019

@juska @hatakeyamak can you give a try if you find the plotting script interface usable by you? Attached is a DQM root file for testing.

DQM_V0001_R000000001__Global__CMSSW_X_Y_Z__RECO.root.zip

@hatakeyamak
Copy link
Collaborator

Hey, Thanks. I will try.

@juska
Copy link
Collaborator

juska commented Jan 25, 2019

I'm now able to run the code without any problems by simply following the instructions in README, thanks a lot Joosep for the update! (I'm only in the reco processing step for now though)

I am waiting to hear back from Chad for hearing what is the 'official' match definition. If the deltaR requirement was something else than 0.2, that's one important fix. The convention is that it is half the cone size (or radius parameter in case of anti-kT), so we should have it at 0.2 as we have R=0.4 jets.
I'm surprised though that despite having the much looser matching condition the number of jets ending up to the response histograms was rather low (IIRC) - this could have to do with the matching.

I'll get back to you later today. I'll fix the pfreso.py to take the files as input and to spit out another file for the compare.py to use, and I'll try to see if I can recreate my nanoAOD resolution result with the DQM code.

@juska
Copy link
Collaborator

juska commented Jan 25, 2019 via email

@jpata
Copy link
Owner Author

jpata commented Jan 26, 2019

Ah sorry, I had edited the script run_relval.sh script for the batch workflow but didn't test it with just the local workflow, which produces files with a slightly different name. Can you try again with 94722fd?

@jpata
Copy link
Owner Author

jpata commented Jan 29, 2019

The comparison script now has the following default commandline interface


$ python test/compare.py --help
usage: compare.py [-h] -s SAMPLE [-p PLOTS] [--doResponsePlots]

optional arguments:
  -h, --help            show this help message and exit
  -s SAMPLE, --sample SAMPLE
                        DQM files to compare for a single sample, in the
                        format 'name:file1.root:file2.root:...:fileN.root'
  -p PLOTS, --plots PLOTS
                        Plots to put on a single canvas, in the format
                        'folder:name:plot1:plot2:...:plotN'
  --doResponsePlots     If enabled, do all jet response plots

and usage can be as simple as

$ python test/compare.py --sample FlatQCD:DQM1.root:DQM2.root--doResponsePlots

in order to produce the folder plots with HTML output.

I'm closing this issue, please make a new one in case you have additional suggestions or wishes how the plots should be called.

@jpata jpata closed this as completed Jan 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
particleflow CMS Particle Flow Validation
Projects
None yet
Development

No branches or pull requests

3 participants