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

Include photon purity #17

Open
mcremone opened this issue May 12, 2020 · 2 comments
Open

Include photon purity #17

mcremone opened this issue May 12, 2020 · 2 comments

Comments

@mcremone
Copy link
Owner

No description provided.

@trtomei
Copy link

trtomei commented May 14, 2020

Description of the method.
PhotonPurity.pdf

@mcremone
Copy link
Owner Author

mcremone commented Jun 8, 2020

Documenting the email exchange with Andreas

Us: Regarding the measurement of the photon purity for the photon CR: in the latest analysis I remember, there were two ways of measuring it. One could either use the distribution in the photon isolation variable, or in EGamma shower variables. Both methods were shown to give the same results. Are you still going to use both, or are you using only one now?

Andreas: Just now, we've seen the first results from the isolation-based measurement. This is still a bit WIP as we see some differences between a) sieie measurements by different groups and b) the sieie and isolation-based measurements. We will decide what to do once we
understand a little bit better what's going on.

Us: Do you have the photon purity study implemented in coffea? In that case, can you point me to your photon purity processor? What do you use to perform the template fit? Do you do it in combine?

Andreas: The purity processor is here: https://github.com/bu-cms/bucoffea/blob/master/bucoffea/photon_purity/photonPurityProcessor.py
This implementation has relatively rudimentary selection (i.e. no tight monojet selection), and we are currently looking into the effect of the selection.
The fitting is implemented here using RooFit (combine is overkill IMO): https://github.com/bu-cms/photon_purity
One thing to look out for if you want to use it is the input format: I usually convert my *coffea files into klepto.dir_archive objects (it's a great solution to an annoying problem, but that's for another time :)), which is what this code will read. In the end, though, you can just change [1] to read whatever input format you have, just make sure that 'acc' is a dict-like object that has the (name, coffea histogram) pairs from the processor.
[1] https://github.com/bu-cms/photon_purity/blob/master/fit_photon_purity.py#L20-L27

Us: Do you perform the photon purity measurement separately per year?
Andreas: Yes. Between 2017 and 2018, the results are similar but not identical.

Us: If I understand correctly you store the photon purities in this file:

https://github.com/bu-cms/photon_purity/blob/master/intermediate/2019-11-06_purity_v6/results.pkl

Would you mind pointing me to the part of the code that uses this file in input and applies the purities to derive the shape/rate of QCD in the photon CR?

Andreas: to avoid binning effects, I perform an exponential fit to the individual points stored in the file you point out. This is shown in Fig. 14 of [1].
I use the code at [2] to fill a histogram accordingly. Really, the only thing that happens is that events from data get an additional weight (the impurity), and are filled into a recoil histogram.

[1] http://cms.cern.ch/iCMS/jsp/db_notes/noteInfo.jsp?cmsnoteid=CMS%20AN-2020/042
[2] https://github.com/bu-cms/bucoffea/blob/master/bucoffea/monojet/monojetProcessor.py#L667-L676

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

No branches or pull requests

2 participants