Open mhl0116 opened 5 years ago
It makes sense to me to modify the gen match types in: https://github.com/cms-analysis/flashgg/blob/dev_legacy_runII/DataFormats/interface/Photon.h#L29 one might have:
with modifications here to assign the flags: https://github.com/cms-analysis/flashgg/blob/4e958a7c7997466be6c95115734527577d9d88d8/MicroAOD/interface/PhotonMCUtils.h
The not nice part of the job is to make sure that in the framework the usage of kPrompt is replaced correctly with (kPromptME or kPromptHad). There should be somewhere a method that given a photon returs isPrompt() as the or of the two flags to be backward compatible with the previous definition of kPrompt.
Have a look at the header of the GenParticle, there are already several methods that tells if the particle comes from the hardscattering or not, etc...
Hi @shervin86 , related to the overlap removal (in terms of implementation), I discussed your other suggestion with @mhl0116 : want to store the mother particle of each photon so that we can study photon origins (does it come from a quark, W, etc.).
Hualin already needs to calculate the mother ID of each photon to perform the overlap removal, so he will also store that information as a property of each photon. Then, we can remake microAOD with these changes and make tables of photon origins for MC samples as you suggest.
Implement the overlap removal method studied in this presentation originally dedicated to ttH analysis: https://indico.cern.ch/event/754291/contributions/3133922/attachments/1713144/2762621/ttH_gg_overlapRemove_20180910.pdf
There is an old PR #1083 implementing the method in TTHLeptonicTagger, which can be generalized so that this option is available to other tags.