Public Member Functions | |
def | __init__ |
def | beginLoop |
def | declareHandles |
def | makeMCInfo |
def | process |
Public Attributes | |
allGenTaus | |
makeAllGenParticles | |
makeSplittedGenLists | |
savePreFSRParticleIds | |
stableBSMParticleIds | |
Save the hard-scattering final state of the event: top quarks, gauge & higgs bosons and BSM particles, plus their immediate decay products, and their siblings (in order to get the jets from matched X+jets generation. Incoming partons are not included, by design. In the default configuration, leptons, light quarks and gluons are saved before FSR (a la status 3). Everything else is saved after any radiation, i.e. immediately before the decay. Particles are saved in a list event.generatorSummary, with the index of their mothers ('motherIndex') if the mother is also in the list, and with the pdgId of the mother ('motherId') and grand-mother ('grandmotherId'). Particles also carry their index in the miniAOD genparticles collection ('rawIndex') In addition, a 'sourceId' is set to the pdgId of the heaviest ancestor (or of the particle itself) i.e. in top -> W -> lepton: the lepton sourceId will be 6 in tt+W with W -> lepton, the sourceId of the lepton will be 24. sourceId will be 99 for paricles from hard scattering whose mother is light If requested, the full list of genParticles is also produced in event.genParticles (with indices aligned to the miniAOD one). For particles that are in the generatorSummary, the same object is used. An extra index 'genSummaryIndex' will be added to all particles, with the index in the generatorSummary or -1 if the particle is not in the generatorSummary. Also, if requested it creates the splitted collections: event.genHiggsBosons = [] event.genVBosons = [] event.gennus = [] # prompt neutrinos event.gennusFromTop = [] # Neutrinos from t->W decay event.genleps = [] # leptons from direct decays event.gentauleps = [] # leptons from prompt taus event.gentaus = [] # hadronically-decaying taus (if allGenTaus is False) or all taus (if allGenTaus is True) event.gentopquarks = [] event.genbquarks = [] # b quarks from hard event (e.g. from top decays) event.genwzquarks = [] # quarks from W,Z decays event.genbquarksFromTop = [] event.genbquarksFromH = [] event.genlepsFromTop = [] #mu/ele that have a t->W chain as ancestor, also contained in event.genleps event.genwzquarks and event.genbquarks, might have overlaps event.genbquarksFromTop and event.genbquarksFromH are all contained in event.genbquarks
Definition at line 9 of file GeneratorAnalyzer.py.
def gen.GeneratorAnalyzer.GeneratorAnalyzer.__init__ | ( | self, | |
cfg_ana, | |||
cfg_comp, | |||
looperName | |||
) |
Definition at line 50 of file GeneratorAnalyzer.py.
def gen.GeneratorAnalyzer.GeneratorAnalyzer.beginLoop | ( | self, | |
setup | |||
) |
Definition at line 62 of file GeneratorAnalyzer.py.
def gen.GeneratorAnalyzer.GeneratorAnalyzer.declareHandles | ( | self | ) |
Definition at line 58 of file GeneratorAnalyzer.py.
References core.Analyzer.Analyzer.mchandles.
def gen.GeneratorAnalyzer.GeneratorAnalyzer.makeMCInfo | ( | self, | |
event | |||
) |
Definition at line 65 of file GeneratorAnalyzer.py.
References funct.abs(), gen.GeneratorAnalyzer.GeneratorAnalyzer.allGenTaus, any(), analyzer.Analyzer.cfg_ana, gen.GeneratorAnalyzer.interestingPdgId(), genutils.isNotFromHadronicShower(), join(), gen.GeneratorAnalyzer.GeneratorAnalyzer.makeAllGenParticles, gen.GeneratorAnalyzer.GeneratorAnalyzer.makeSplittedGenLists, core.Analyzer.Analyzer.mchandles, benchmark_cfg.pdgId, genutils.realGenDaughters(), genutils.realGenMothers(), gen.GeneratorAnalyzer.GeneratorAnalyzer.savePreFSRParticleIds, gen.GeneratorAnalyzer.GeneratorAnalyzer.stableBSMParticleIds, and ntuplemaker.status.
Referenced by gen.GeneratorAnalyzer.GeneratorAnalyzer.process().
def gen.GeneratorAnalyzer.GeneratorAnalyzer.process | ( | self, | |
event | |||
) |
Definition at line 242 of file GeneratorAnalyzer.py.
References gen.GeneratorAnalyzer.GeneratorAnalyzer.makeMCInfo(), and core.Analyzer.Analyzer.readCollections().
Referenced by ConfigBuilder.ConfigBuilder.addExtraStream(), ConfigBuilder.ConfigBuilder.completeInputCommand(), ConfigBuilder.ConfigBuilder.doNotInlineEventContent(), ConfigBuilder.ConfigBuilder.PrintAllModules.leave(), ConfigBuilder.ConfigBuilder.prepare_HLT(), ConfigBuilder.ConfigBuilder.prepare_LHE(), ConfigBuilder.ConfigBuilder.prepare_PATFILTER(), ConfigBuilder.ConfigBuilder.prepare_VALIDATION(), ConfigBuilder.ConfigBuilder.renameHLTprocessInSequence(), ConfigBuilder.ConfigBuilder.renameInputTagsInSequence(), and ConfigBuilder.ConfigBuilder.scheduleSequence().
gen.GeneratorAnalyzer.GeneratorAnalyzer.allGenTaus |
Definition at line 56 of file GeneratorAnalyzer.py.
Referenced by gen.GeneratorAnalyzer.GeneratorAnalyzer.makeMCInfo().
gen.GeneratorAnalyzer.GeneratorAnalyzer.makeAllGenParticles |
Definition at line 54 of file GeneratorAnalyzer.py.
Referenced by gen.GeneratorAnalyzer.GeneratorAnalyzer.makeMCInfo().
gen.GeneratorAnalyzer.GeneratorAnalyzer.makeSplittedGenLists |
Definition at line 55 of file GeneratorAnalyzer.py.
Referenced by gen.GeneratorAnalyzer.GeneratorAnalyzer.makeMCInfo().
gen.GeneratorAnalyzer.GeneratorAnalyzer.savePreFSRParticleIds |
Definition at line 53 of file GeneratorAnalyzer.py.
Referenced by gen.GeneratorAnalyzer.GeneratorAnalyzer.makeMCInfo().
gen.GeneratorAnalyzer.GeneratorAnalyzer.stableBSMParticleIds |
Definition at line 52 of file GeneratorAnalyzer.py.
Referenced by gen.GeneratorAnalyzer.GeneratorAnalyzer.makeMCInfo().