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

Support both new and old electron IDs #752

Merged
merged 64 commits into from
May 3, 2019

Conversation

gpetruc
Copy link
Contributor

@gpetruc gpetruc commented Apr 16, 2019

Starting from #749, but keeping also support for older electron IDs (Spring15 and later) and the custom working points we had before (e.g. from susy PAG).

  • The MVA ID discriminators are all evaluated using the VID backend, even when we apply a custom WP
  • The POG-provided MVA WPs are taken also from VID
  • Cut-based IDs for Fall17V2 are from VID, V1 there's both the VID implementation and our old ones.
    I've validated the outputs against NanoAOD and the previous Heppy implementation, and found very good agreement (there's a few rare events where the MVA score changes in far decimal places, but I think this is not unexpected for a change of code)

Based on CMSSW_9_4_12

The differences wrt to #749 can be better seen in this diff: gpetruc/cmg-cmssw@merge_749...gpetruc:eleID_new_and_old

Important: add /DataFormats/FWLite/ to sparse checkout to avoid crashes.

@cbernet @GaelTouquet @steggema @lucastorterotot

steggema and others added 30 commits April 24, 2018 10:09
these messages can be very useful to get a detailed understanding
of where time is spent.
synchronized on one event! sync ntuple production running
guitargeek and others added 27 commits December 5, 2018 09:18
Electron MVA V2 (as in #23700 #23746 #23767)

All event based variables are now handeled by the new helper class

Hardcoding of variables and clips removed for Fall17

Generalized Fall17Iso and Fall17NoIso

Configurable categories and start to move Spring16 MVA

Dedicated variable files for Spring16 and Fall17

Removed Spring16 C++ code

All year specific C++ code removed

Small improvements

Cleared some inconsistencies in variable definitions. All IDs now validated.

Restructured VID python code a bit

New MVAVariableManager helper class

Forgot to actually add the class go git

The raw BDT score is now stored as well

Spring15 PhotonMVA uses now MVAVariableManager

Almost there for photon MVA

All Run2 Photon MVA IDs use now the new PhotonMVAEstimator class

Add variable files

Rewrote some python, ElectronID cuts on raw MWA values and autodetection of gzipped weight files

Implemented V2 MV Ele ID

Cut values are now found with parser as well

Include ntupizer for training

cleaned up a bit

Training Ntuplizer finished

Use auto generatetd config files

Finalized ntuplizer

Auto updated Training ntuplizer

Updated training ntuplizer

Fix in training ntuplizer

fixed wp90 iso V1 parameters

Fix

Added MVA output Validation ntuplizer for photons

Bugfix

Improved exception handling in GBRForestToors

Changed egammaObjectModificationsInMiniAOD_cff.py to comply with new config files

Add two lines in miniAOD_tools.py to cope with ElectronMVAVariableHelper

Fixed Fall17V1 variables

Addressed comments following visual code inspection

Simplified code

Included Fall17 MVAs in MiniAOD and NanoAOD

Added electronMVAVariableHelper to relevant processes

Revisited casting of candidates to electrons/photons

Fixup - prefer dynamic_cast if possible

Corrected the second C style cast in the photons

Avoid undefined category for photons

Changed category not defined error to warning

Changed mvaValue if category not found to -999

Fixed possible memory leak

Drop MVAObjectCache in MVAValueMapProducer

Commit after some code review

Comment out something so branch compiles

Added weightfiles

Some code cleaning (as in ID part of #23743)

Adapt GBRForestTools exception handling to 94X

Fall17 cutbased Electron ID V2 (as in #23477)

Added Photon MVA weight files

Technical Egamma MVA improvements (as in #24131)

Fall17_94X_v2 MVA Photon ID

Fixing mvaClassName in egammaObjectModificationsInMiniAOD_cff.py

Inclusion of V2 IDs in MiniAOD

fix worst charged iso variable

adding photon MVA V2 to the pat::Photon

Fixed copy-paste typo in Spring15 weight files

New MultiTokens (as in #24312 #24423)

cache AOD/miniAOD values to speed up repeated computations

Egamma IDs back to global cache (as in #25101)

Cutbased photonID Fall17 V2

update phoID v2 cutbased

Renamed cut based ID and put in MiniAOD

Modified PhotonNtuplizer to have genMatch information

Added variables from Fall17 ID to PhotonMVANtuplizer

New MVAVariableHelper for extra MVA variables

Moved Photon MVA to new interface

adapted constructors to run MVA estimator in python fwlite

ElectronMVA can be used in FWlite

Egamma Python wrapper class for Electron MVAs

Got rid of ElectronMVAVariableHelper

Adapted PhotonMVANtuplizer

Combined Electron Ntuplizer config files

Fixing problems detected while testing

exposing category in FWLite to be able to apply working point later on

infrastructure to take working points in python+fwlite. implemented for noiso v2 only so far

working points for the other mvas. somthing fishy with GP v1

Spring16 WPs with logistic transform
…d, electron attributes naming scheme changed, mva WP directly used from Egamma
…all17 cut-based IDs, read the EA from the file in the ID definition.
@gpetruc gpetruc added this to the Heppy 94X milestone Apr 16, 2019
@gpetruc gpetruc merged commit fe17c78 into CERN-PH-CMG:heppy_94X_dev May 3, 2019
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.

7 participants