Open lawrenceleejr opened 2 years ago
So moving forward with this side of it a bit (there's a lot of stuff here, so we'll chip at this slowly):
loop.py
also store the profiles into the output ROOT file?loop.py
) and make a plot of:Charged+Neutral particle multiplicity on the y axis. Jet P on the x axis. Four profiles drawn.
All of this using 1 TeV ee collisions. (I think the second one requires making a new jjj sample at 1 TeV.)
When filling up the histograms, we will eventually want to exclude jets that originate from a gluon as well. That will require asking if the jet has a small deltaR to a gluon that has parents that are the electron and positron.
Extra points if the drawing is done in matplotlib. (You might want to look into using uproot
to read in the root files for then manipulation in python with matplotlib.) That's what we'll want eventually for a final thing.
One potential way of showing a comparison of these shapes as a function of momentum is to form so-called split violin plots.
Can easily use seaborn for that. See https://seaborn.pydata.org/generated/seaborn.violinplot.html
This way, we can actually show the distributions as a function of momentum for both the Z+gluon and the Z+gamma. Also this is probably what we should call those samples...
To split up the Z+gamma and Z+gluon events in Herwig -- these are the draw commands.
Delphes->Draw("GenJet.NCharged+GenJet.NNeutrals:GenJet.PT*cosh(GenJet.Eta)","GenJet.Mass>0.01&&abs(GenJet.Mass)<70&&(MinIf$(GenJet.Mass,GenJet.PT>50)>0.01) ","colz profx ")
Delphes->Draw("GenJet.NCharged+GenJet.NNeutrals:GenJet.PT*cosh(GenJet.Eta)","GenJet.Mass>5&&abs(GenJet.Mass)<70&&(MinIf$(GenJet.Mass,GenJet.PT>50)<0.01) ","colz profx same")
First one (Z+gamma):
Second one (Z+jet):
For the split violin plots, @jslawless can help out with some of the tricky data handling that will be needed for that. We can focus on that plot the week of the 16th. So let's focus on getting the root files with the histograms all ready for that during next week.
Attached are the profiles for eeToZgamma and eeToZgluon plots merged into one. This is for the Pythia sample only, so far.
Very nice. Note to self to discuss: it might be interesting to make the Z+gamma plot where the momentum is in the rest frame of the Z.
I wrote a script that splits a 2d histogram in violin plots. Later I can add functionality to it to compare two different distributions.
Example:
Unfortunately I chose a bad 2d histogram and these all look samey, but it works enough as a starting point.
Yes this is a great starting point. Hopefully we can get you a few histograms soon to try out. One thing that would be good to get started with is the splitting of them. We'll want one side of each violin to be Z+gamma and the other side to be jjj. And yeah it looks like it's already doing the normalization the way we want it to which is great.
We'll also need to be careful about how the x axis is translated. i.e. we'll want the original x axis to stay the same (here it looks like its being translated to integer bins) But yeah it's beautiful -- looking forward to it!!
.ProfileX()
of that 2D histogram to see the behavior of the mean vs pT.