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

[WIP] add plotting script to produce jet energy resolution plots #129

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

oviazlo
Copy link
Contributor

@oviazlo oviazlo commented Feb 20, 2020

BEGINRELEASENOTES

  • plotting script to produce jet energy resolution plots.
  • expected input is an output from JetAnalyzer processor (CLICPerformance/Calorimetry)
    ENDRELEASENOTES

Copy link
Contributor

@webermat webermat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest to rather look at the relative response of the matched jet pair, then doing an overall energy spread resolution measure. At very large energies, like they are present at CLIC's highest energies e.g., we have cases where the dijet exclusive jet cluster catches two out of 3 significant jets. These cases are indeed pretty rare, maybe a dphi requirement between both reconstructed jets and both MC jets dphi > 2.8 could ensure we cut out these events before filling the histograms as well and leave the code as is otherwise.

class histPool(object):
"""Helper class which contains all histograms."""

cosThetaRange = [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.925,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cosThetaRange = [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.925,
cosThetaRange = [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.925,
0.95, 0.975, 0.985, 1.025]

in the end we always hadd the trouble with the last bin, thus i introduced another bin from 0.975 to 0.985 where i plotted the last jet energy resolution, going up to that point and then another bin up to 1.025. The last bin was left empty, as there we have jets which are partially outside of the Calorimeter range, so in the C++ root macro it would have been
const unsigned int nRegionBins(14);
float pRegionBinEdges[nRegionBins + 1] = {0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.925, 0.95, 0.975, 0.985,1.025};

"""???"""
outHistInfo = []
histInfoTemplate = ['TH1F', 'cosThetaBin', '; reco + true neutrino energy [GeV]; Entries',
10000, 0., 500.]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for CLIC the upper limit might need larger numbers, for sure larger than 1500., I even observed very high tail events up to 3000.

for i in range(1, len(self.cosThetaRange)):
if cosTheta > self.cosThetaRange[i - 1] and cosTheta < self.cosThetaRange[i]:
binNumber = i - 1
fillVal = vTuple.recoJets[0].E() + vTuple.totalTrueInvisible.E()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typically the amount of invisible energy is negligible, I think maybe calculating the response value between the matched jets might be rather the value to fill, reconstructed-jet E/ matched MC particle-jet E, and for jet 0 and jet 1, then the histogram limits would also need no energy dependent range for CLIC and FCC, we could just have a range from 0 to 2 (or if we believe things to go south up to 3).
Final results are close to each other in both cases, if we want to correct the bias of the invisible energy, maybe a split of it to both jets would be better on average.

resolution = rms90Data['rms90']
resolutionError = resolution / math.sqrt(rms90Data['totalCounts'])

self.histDict2D[histSetName]['JER'].SetBinContent(i, resolution)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to fill the actual jet energy resolution value instead of the relative value, aka JER/jet-energy or JER/Mean. Iwould rather do the later, in case the calibration of the jet energy would be off as additional effect.

This can also be done in post processing as well though

recoJets=getLorentzVectors(iEv.recoJetPx, iEv.recoJetPy, iEv.recoJetPz, iEv.recoJetE)
)

if not checkJetPairMatching(vTuple.genJets, vTuple.recoJets, 10./180.*math.pi):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when checking of the jet pair match, at this point I would also save the responses of the matched pair,
resp = E_recoJet/E_genJet
as well as dphi = delta(phi_genJet,phi_recoJet) and dtheta = theta_recoJet-theta_genJet

thus we have all 3 quantities needed for filling the histograms, each jet is filled then

@webermat
Copy link
Contributor

webermat commented Jan 4, 2021

should we resume work on here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants