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

VBF: Update setup to UL #354

Open
wants to merge 30 commits into
base: master
Choose a base branch
from

Conversation

alpakpinar
Copy link
Contributor

Hey @AndreasAlbert, this PR contains an update of the whole VBF setup to UL settings. I'm currently testing if the code in this branch will reproduce the templates from my local branch, wanted to open the PR for the record and I'll let you know about the outcome of the test. If you have additional comments, please let me know and I can make adjustments, thanks!

@alpakpinar alpakpinar added the enhancement New feature or request label Jun 19, 2021
@alpakpinar alpakpinar modified the milestones: Consistency check with local branch, UL VBF H(inv): Consistency check with local branch, VBF H(inv): Upgrade to UL + consistency check Jun 19, 2021
'cr_1e_vbf' : re.compile(f'(EW.*|Top_FXFX.*|Diboson.*|QCD_HT.*|DYJetsToLL_M-50_HT_MLM.*|WJetsToLNu.*HT.*).*{year}'),
'cr_2m_vbf' : re.compile(f'(EW.*|Top_FXFX.*|Diboson.*|QCD_HT.*|DYJetsToLL_M-50_HT_MLM.*|WJetsToLNu.*HT.*).*{year}'),
'cr_2e_vbf' : re.compile(f'(EW.*|Top_FXFX.*|Diboson.*|QCD_HT.*|DYJetsToLL_M-50_HT_MLM.*|WJetsToLNu.*HT.*).*{year}'),
'cr_g_vbf' : re.compile(f'(GJets_((HT|DR-0p4)|SM).*|QCD_data.*|WJetsToLNu.*HT.*).*{year}'),
Copy link
Contributor

Choose a reason for hiding this comment

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

This will match both DR and non-DR, no? OK for now, but have to remember this when the DR samples come out

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah good point thanks, we'll need to update the regex once more when we switch to DR again

@@ -965,9 +986,9 @@ def photon_trigger_sf(weights, photons, df):
if year == 2016:
sf = np.ones(df.size)
elif year == 2017:
sf = sigmoid(x,0.335,217.91,0.065,0.996) / sigmoid(x,0.244,212.34,0.050,1.000)
sf = sigmoid(x,1.140,219.12,0.086,0.996) / sigmoid(x,0.171,207.22,0.092,1.000)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add an if block here to differentiatae UL vs non-UL? I think the way it is written now, it changes the values for non-UL monojet, too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, this is done in eb0a359

# Mask for 1/5th unlbinding
one_fifth_mask = ~pass_all
# Only pick each 5 entry in data
one_fifth_mask[::5] = True
Copy link
Contributor

Choose a reason for hiding this comment

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

Just for future reference: This is not entirely replciable because it will depend on the order of the events in the file. Genereally safer, to use the event number: mask = (df['event']%5)==0.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, done in 517c5e4

if cfg.RUN.APPLY_EWK_CORR_TO_SIGNAL:
if re.match('VBF_HToInv.*', df['dataset']):
def ewk_correction(a, b):
return 1 + a * df['GenMET_pt'] + b
Copy link
Contributor

Choose a reason for hiding this comment

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

For future use: Let's use the higgs boson from the gen collection here.
higgs_pt = gen[(gen.pdg==25)&(gen.status==62)].max()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, done in 517c5e4

@alpakpinar
Copy link
Contributor Author

Hey @AndreasAlbert , I updated the PR, and both monojet and VBF processors work fine for me with this config. Let me know if you want additional updates, thanks!

@alpakpinar
Copy link
Contributor Author

Just pushed new XS from new samples (not the newly measured V+jets ones yet). There is a subtle bug due to Z+jets dataset name right now: The short name for these becomes ZJetsToNuNu_HT-.*-MLM_2017, which won't match the XS entry (mg -> MLM). I'll need to fix this without affecting monojet functionality

@AndreasAlbert
Copy link
Contributor

Thanks for the updates. This looks good. Regarding XS I think we have to choices:

  1. We systematically include a tag for UL in the dataset name. For example, DYJets..._2017 -> DYJets..._UL2017. This would ensure that there is never any overlap between EOY and UL. Downside: You have to rename your existing skim files (basically move all folders in your UL skim). Upside: Clear separation.

  2. We separate the XS files for EOY and UL -> xs_eoy.yml, xs_ul.yml. Upside: Easier at the start. Downside: We now have to deal with having separate files, keeping track of which is file is used, etc.

It seems to me that 1 is cleaner, but feel free to let me know what you think.

@alpakpinar
Copy link
Contributor Author

Thanks for the suggestions, I guess method 1 is cleaner indeed. I was thinking since we're going to update V+jets XS as well, maybe separate files could be easier but we can still achieve that by including a UL tag in the dataset names.

@alpakpinar
Copy link
Contributor Author

Hey @AndreasAlbert, do you think instead of changing each of the dataset names in eos (to include UL tag), would it work if we modify the code in 1 to add the UL tag if a parameter like isUL=True is passed to scale_xs_lumi function?

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

Successfully merging this pull request may close these issues.

2 participants