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

2011 branch: updates needed (other than the poet config) #85

Open
4 of 5 tasks
katilp opened this issue Nov 15, 2022 · 9 comments
Open
4 of 5 tasks

2011 branch: updates needed (other than the poet config) #85

katilp opened this issue Nov 15, 2022 · 9 comments
Labels
2011 Branch 2011

Comments

@katilp
Copy link
Member

katilp commented Nov 15, 2022

  • clean the data directory and copy over the correct json file

  • create the JEC txt files by running the updated jec_cfg.py cmsRun jec_cfg.py True and cmsRun jec_cfg.py False

  • find out where to get the correct JetResolutionInputAK5PF.txt
    - NB: I copied over the one from the 2012 branch but that is certainly not correct

  • when running with option isPat = False JetAnalyzer.cc is called. 2012 values are hardcoded in the 2012 JetAnalyzer.cc and are the same in the 2011 branch

    • these values may need to be updated, see the instruction in the BTagging package README. When running the b-efficiency tool for 2011 data, I observe the following:
      • The 2012 input file is MonteCarlo2012/Summer12_DR53X/TTbar_8TeV-Madspin_aMCatNLO-herwig/, now updating to this (/TTJets_TuneZ2_7TeV-madgraph-tauola/Summer11LegDR-PU_S13_START53_LV6-v1/AODSIM).

      • with this input file cmsRun python/befficiency_recojets_cfg.py fails with:

        ----- Begin Fatal Exception 15-Nov-2022 20:48:36 CET-----------------------
        An exception of category 'Configuration' occurred while
           [0] Constructing the EventProcessor
           [1] Constructing module: class=WeightAnalyzerBEff label='mcweightanalyzer'
        Exception Message:
        MissingParameter: Parameter 'jetTag' not found.
        ----- End Fatal Exception -------------------------------------------------
        
      • with this input and GT update, cmsRun python/befficiency_patjets_cfg.py fails with the softElectronByPtBJetTags, see below

  • when running with option isPat = True, PatJetAnalyter.cc is called. It fails due to softElectronByPtBJetTags. For cmsRun python/poet_cfg.py False True (i.e. MC, PAT)

    An exception of category 'ProductNotFound' occurred while
       [0] Processing run: 1 lumi: 45 event: 4401
       [1] Running path 'p'
       [2] Calling event method for module PATJetProducer/'patJets'
    Exception Message:
    Principal::getByLabel: Found zero products matching all criteria
    Looking for type: edm::AssociationVector<edm::RefToBaseProd<reco::Jet>,std::vector<float>,edm::RefToBase<reco::Jet>,unsigned int,edm::helper::AssociationIdenticalKeyReference>
    Looking for module label: softElectronByPtBJetTags
    Looking for productInstanceName: 
    

    There's a similar label in the data but not this one:

    edmDumpEventContent root://eospublic.cern.ch//eos/opendata/cms/Run2011A/DoubleMu/AOD/12Oct2013-v1/10000/000D143E-9535-E311-B88B-002618943934.root | grep soft
    edm::AssociationVector<edm::RefToBaseProd<reco::Jet>,vector<float>,edm::RefToBase<reco::Jet>,unsigned int,edm::helper::AssociationIdenticalKeyReference>    "softPFElectronBJetTags"    ""                "RECO"
    edm::AssociationVector<edm::RefToBaseProd<reco::Jet>,vector<float>,edm::RefToBase<reco::Jet>,unsigned int,edm::helper::AssociationIdenticalKeyReference>    "softPFMuonBJetTags"        ""                "RECO"
    
@jmhogan
Copy link
Collaborator

jmhogan commented Nov 22, 2022

@katilp unfortunately I think we are kind of stuck on the JetResolution input file... we got this file from the Workbook instructions, and it's definitely for 2012: https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideJetResolution
I'm not sure why this was never moved from this developer's cmssw fork to the main one.

Looking at the same folder in central cmssw, the 53X branch only contains resolutions marked as "Spring10": https://github.com/cms-sw/cmssw/tree/CMSSW_5_3_X/CondFormats/JetMETObjects/data
Seems like there were no further updates to the contents of this directory.

Similarly, that TWiki seems to have been updated directly from 2010 to 2012. Revision 5 looks to be for 2010 data:
https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideJetResolution?rev=5
And the next revision was not made until 2014.

So the information for 2011 looks to be a bit lost... Options:

  • Drop JER completely for 2011
  • Use 2012 resolutions under the assumption that any change would be very small... We can try to talk to JetMET but I'm not optimistic.

@katilp
Copy link
Member Author

katilp commented Nov 22, 2022

OK, thanks for investigating!

I would expect JER for 2011 to be more recent than those for 2012 (because of their later reprocessing) but that does not change what you've found (or did not find...). They should still be 5_3_X.

I can try to do some further data archeology with that file JER file name, and then we can decide.

@katilp
Copy link
Member Author

katilp commented Nov 22, 2022

For the record going through JEC/JER meetings at that time:

And for the record, in general on that reprocessing (but no information on JER):

https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideFrontierConditions?rev=609#7_TeV_MC_Legacy_reprocessing_in

@katilp katilp added the 2011 Branch 2011 label Nov 22, 2022
@katilp
Copy link
Member Author

katilp commented Nov 23, 2022

There's a collection of different tables for JER in https://twiki.cern.ch/twiki/bin/viewauth/CMS/JetResolution

and, in particular, for 2011

e.g

image

image

However, I'm not sure how these numbers correlate with those in the file JetResolutionInputAK5PF.txt that have function parameters and narrower eta bins.

@jmhogan
Copy link
Collaborator

jmhogan commented Nov 23, 2022 via email

@jmhogan
Copy link
Collaborator

jmhogan commented Dec 8, 2022

B-tagging efficiency setup is updated for 2011, separate from 2012.

6ba3f38

@katilp
Copy link
Member Author

katilp commented Feb 2, 2023

Chat with @kirschen :

  1. JER scale factors

    Update those in the end of the jet analyzer i.e.

    std::vector<float>
    JetAnalyzer::factorLookup(float eta) { //used in jet loop for JER factor value
      //eta input is > 0
      if(eta > 3.2) return {1.056, 0.865, 1.247}; // {factor, factor_down, factor_up}
      else if(eta > 2.8) return {1.395, 1.332, 1.468};
      else if(eta > 2.3) return {1.254, 1.192, 1.316};
      else if(eta > 1.7) return {1.208, 1.162, 1.254};
      else if(eta > 1.1) return {1.121, 1.092, 1.15};
      else if(eta > .5) return {1.099, 1.071, 1.127};
      else return {1.079, 1.053, 1.105};
    }
    
    

    with the values in the table in https://twiki.cern.ch/twiki/bin/viewauth/CMS/JetResolution#JER_Scaling_factors_and_Unce_AN2 e.g.
    image

  2. For JetResolutionInputAK5PF.txt:

    This was the first that file was produced. It was on 8 TeV CMSSW_5_3_X MC. 2011 data was re-reco'ed with 5_3_X, and these values were not re-evaluated specifically for 8 TeV. The best approach is to use these same values for 2011

Page 11 in these slides shows the values in the file for a certain pt (not mentioned)

@katilp
Copy link
Member Author

katilp commented Feb 2, 2023

For the future Run2 jets

Corrections are applied but smearing is still expected to be done at the mini/nano level because it involves random numbers so cannot be "undone" (although discussions were ongoing whether to do it for Mini/Nano and store the smearing factor used )

@jmhogan
Copy link
Collaborator

jmhogan commented Feb 10, 2023

@katilp Aha, I was wrong to think we had already used the 2011 numbers in the 2011 branch... Fixed now!

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

No branches or pull requests

2 participants