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

Undo JEC for subjets in FatJet #281

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

Conversation

nurfikri89
Copy link
Contributor

This PR is to address issue #280. The subjets' p4 should now have the raw (i.e no JEC applied on them) p4 and the raw softdrop mass can be correctly calculated.

@nurfikri89
Copy link
Contributor Author

FYI JMAR convenors @camclean @alefisico

@mariadalfonso
Copy link
Contributor

@nurfikri89

can you document the change with a plot comparing the SDmass after correction and the raw ?

@nurfikri89
Copy link
Contributor Author

@mariadalfonso will do

@nurfikri89
Copy link
Contributor Author

nurfikri89 commented Jun 2, 2021

The attached plot compares the fatjet soft-drop mass distribution for the following cases:

  • Nano: from NanoAODs using FatJet_msoftdrop branch (Black Solid Line)
  • Raw (Before Fix): raw value as currently calculated (Blue Dashed Line)
  • Raw (After Fix): raw value with the fix introduced by this PR(Red Dotted Line)

As shown in the plot, the Raw (Before Fix) curve overlaps exactly with Nano because currently we do not undo the jet energy correction on the subjets. With this PR, the raw soft-drop mass will be properly calculated.

FatJets with pT > 200 GeV, |eta| < 2.4 and have 2 subjets are considered. The input file used for this plot is /store/mc/RunIISummer19UL17NanoAODv2/BulkGravToWWToWhadWhad_narrow_M-2000_TuneCP5_PSWeights_13TeV-madgraph-pythia/NANOAODSIM/106X_mc2017_realistic_v8-v1/280000/7C04C439-A221-DB44-BB93-B9426EC957D8.root.
The majority of the fatjets are expected to be fully-contained W->qq jets.

BulkGravToWWToWhadWhad_M2000_mSD.pdf

@camclean
Copy link
Contributor

camclean commented Jun 2, 2021

Can you also compare FatJet_msoftdrop_nom before and after the fix? I think it will be effected through the JMR correction factor, which contributes to the corrected softdrop mass here.

groomedP4 = subJets[jet.subJetIdx1].p4() + subJets[
jet.subJetIdx2].p4() # check subjet jecs
groomedP4 = (subJets[jet.subJetIdx1].p4() * (1. - subJets[jet.subJetIdx1].rawFactor)) \
+ (subJets[jet.subJetIdx2].p4() * (1. - subJets[jet.subJetIdx2].rawFactor))
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 check that the eta and phi of the jet are not affected? The raw factor should only be applied to the pt and mass.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@camclean Are you referring to eta and phi of the AK8 parent jet or each of the subjets?

Copy link
Contributor

Choose a reason for hiding this comment

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

The one you get from groomedP4

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The attached slide shows pT, eta and phi distributions of subjet 1 (top) and subjet 2 (bottom). Black solid histogram is with JEC applied (by default in NanoAOD) and blue dashed histogram is without the JEC applied (as implemented by the fixed in this PR). The implementation does not affect the subjets' eta and phi variables.

SubJetKinematics_WithAndWithoutJEC.pdf

@camclean
Copy link
Contributor

camclean commented Jun 3, 2021

There are also these lines after your fix that affect the "raw"softdrop mass.

@nurfikri89
Copy link
Contributor Author

nurfikri89 commented Jun 3, 2021

Can you also compare FatJet_msoftdrop_nom before and after the fix? I think it will be effected through the JMR correction factor, which contributes to the corrected softdrop mass here.

Attached is a plot comparing the FatJet_msoftdrop_nom variable before the fix (solid black) and after the fix (dashed blue). Also included in the plot is the FatJet_msoftdrop variable (red dotted) as defined in the nanoAODs. From the plot, we can see that currently FatJet_msoftdrop_nom is over-corrected, as the Puppi, JMS and JMR corrections are applied to the soft-drop mass calculated from the JEC corrected subjets. The corrections should actually be applied to the raw soft-drop mass as prescribed by JMAR.

Note: FatJets with pT > 200 GeV, |eta| < 2.4 and have 2 subjets are considered. The input file used for this plot is /store/mc/RunIISummer19UL17NanoAODv2/BulkGravToWWToWhadWhad_narrow_M-2000_TuneCP5_PSWeights_13TeV-madgraph-pythia/NANOAODSIM/106X_mc2017_realistic_v8-v1/280000/7C04C439-A221-DB44-BB93-B9426EC957D8.root.
The majority of the fatjets are expected to be fully-contained W->qq jets.

BulkGravToWWToWhadWhad_M2000_mSD_Nom.pdf

@camclean
Copy link
Contributor

camclean commented Jun 3, 2021

Can you also compare FatJet_msoftdrop_nom before and after the fix? I think it will be effected through the JMR correction factor, which contributes to the corrected softdrop mass here.

Attached is a plot comparing the FatJet_msoftdrop_nom variable before the fix (solid black) and after the fix (dashed blue). Also included in the plot is the FatJet_msoftdrop variable (red dotted) as defined in the nanoAODs. From the plot, we can see that currently FatJet_msoftdrop_nom is over-corrected, as the Puppi, JMS and JMR corrections are applied to the soft-drop mass calculated from the JEC corrected subjets. The corrections should actually be applied to the raw soft-drop mass as prescribed by JMAR.

BulkGravToWWToWhadWhad_M2000_mSD_Nom.pdf

So now we have:

  • msoftdrop_nom (Before fix): JES, JER, JMR, JMS, and PUPPI softdrop mass correction applied
  • msoftdrop_nom (After fix): JER, JMR, JMS, and PUPPI softdrop mass correction applied; no JES applied
  • msoftdrop (SubJets with JEC): Only JES applied

The question is whether or not we want to keep msoftdrop_nom with JES applied for consistency. We've had analyses in the past have issues with changes because there is no version control for nanoAOD-Tools. What do you think @mariadalfonso @alefisico?

@alefisico
Copy link

Can you also compare FatJet_msoftdrop_nom before and after the fix? I think it will be effected through the JMR correction factor, which contributes to the corrected softdrop mass here.

Attached is a plot comparing the FatJet_msoftdrop_nom variable before the fix (solid black) and after the fix (dashed blue). Also included in the plot is the FatJet_msoftdrop variable (red dotted) as defined in the nanoAODs. From the plot, we can see that currently FatJet_msoftdrop_nom is over-corrected, as the Puppi, JMS and JMR corrections are applied to the soft-drop mass calculated from the JEC corrected subjets. The corrections should actually be applied to the raw soft-drop mass as prescribed by JMAR.
BulkGravToWWToWhadWhad_M2000_mSD_Nom.pdf

So now we have:

* msoftdrop_nom (Before fix): **JES**, JER, JMR, JMS, and PUPPI softdrop mass correction applied

* msoftdrop_nom (After fix): JER, JMR, JMS, and PUPPI softdrop mass correction applied; **no JES applied**

* msoftdrop (SubJets with JEC): Only JES applied

The question is whether or not we want to keep msoftdrop_nom with JES applied for consistency. We've had analyses in the past have issues with changes because there is no version control for nanoAOD-Tools. What do you think @mariadalfonso @alefisico?

From the plots that @nurfikri89 showed, I think we should only keep the msoftdrop_nom without JES. But maybe we can check the hash of this PR and announce it in HN and in the twiki that this definition changed.

@camclean
Copy link
Contributor

camclean commented Jun 4, 2021

Can you also compare FatJet_msoftdrop_nom before and after the fix? I think it will be effected through the JMR correction factor, which contributes to the corrected softdrop mass here.

Attached is a plot comparing the FatJet_msoftdrop_nom variable before the fix (solid black) and after the fix (dashed blue). Also included in the plot is the FatJet_msoftdrop variable (red dotted) as defined in the nanoAODs. From the plot, we can see that currently FatJet_msoftdrop_nom is over-corrected, as the Puppi, JMS and JMR corrections are applied to the soft-drop mass calculated from the JEC corrected subjets. The corrections should actually be applied to the raw soft-drop mass as prescribed by JMAR.
BulkGravToWWToWhadWhad_M2000_mSD_Nom.pdf

So now we have:

* msoftdrop_nom (Before fix): **JES**, JER, JMR, JMS, and PUPPI softdrop mass correction applied

* msoftdrop_nom (After fix): JER, JMR, JMS, and PUPPI softdrop mass correction applied; **no JES applied**

* msoftdrop (SubJets with JEC): Only JES applied

The question is whether or not we want to keep msoftdrop_nom with JES applied for consistency. We've had analyses in the past have issues with changes because there is no version control for nanoAOD-Tools. What do you think @mariadalfonso @alefisico?

From the plots that @nurfikri89 showed, I think we should only keep the msoftdrop_nom without JES. But maybe we can check the hash of this PR and announce it in HN and in the twiki that this definition changed.

Agreed

@mariadalfonso
Copy link
Contributor

@alefisico @camclean @nurfikri89

msoftdrop_nom (After fix): JER, JMR, JMS, and PUPPI softdrop mass correction applied; no JES applied
in #281 (comment)

can you document

  1. the value of the JMR, JMS used: we have a lot of placeholders values 1.
  2. if this corresponds to the UL samples ?

@lcorcodilos
Copy link
Contributor

Just linking that this issue was raised a year and a half ago by #234

@bartokm
Copy link
Contributor

bartokm commented Aug 27, 2021

Shouldn't this PR to be merged to master?

@nurfikri89 nurfikri89 closed this Oct 9, 2021
@nurfikri89 nurfikri89 deleted the fix_subjetJEC branch October 9, 2021 19:16
@nurfikri89 nurfikri89 restored the fix_subjetJEC branch October 9, 2021 19:19
@nurfikri89 nurfikri89 reopened this Oct 11, 2021
@nurfikri89
Copy link
Contributor Author

msoftdrop_nom (After fix): JER, JMR, JMS, and PUPPI softdrop mass correction applied; no JES applied in #281 (comment)

can you document

  1. the value of the JMR, JMS used: we have a lot of placeholders values 1.
  2. if this corresponds to the UL samples ?

@mariadalfonso My apologies for dropping this PR. Picking this back up again so it can be merged.

The JMR and JMS values used for the plot in #281 (comment) are 1.0 which are the default values for UL2017 as defined here for JMR and here for JMS.

@mariadalfonso
Copy link
Contributor

msoftdrop_nom (After fix): JER, JMR, JMS, and PUPPI softdrop mass correction applied; no JES applied in #281 (comment)
can you document

  1. the value of the JMR, JMS used: we have a lot of placeholders values 1.
  2. if this corresponds to the UL samples ?

@mariadalfonso My apologies for dropping this PR. Picking this back up again so it can be merged.

The JMR and JMS values used for the plot in #281 (comment) are 1.0 which are the default values for UL2017 as defined here for JMR and here for JMS.

for the SF, it's safest to take the value from the json files from JMAR-EOY.

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

Successfully merging this pull request may close these issues.

6 participants