Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-05-09 22:40:13

0001 import FWCore.ParameterSet.Config as cms
0002 from  PhysicsTools.NanoAOD.genparticles_cff import *
0003 from PhysicsTools.NanoAOD.simpleGenParticleFlatTableProducer_cfi import simpleGenParticleFlatTableProducer
0004 
0005 
0006 # for BPHPark start with merged particles (pruned + packed),
0007 # where pruned contain K* states, but not final states, 
0008 # and packed contain final states (K pi).
0009 # then you save also final states (granddaughters)
0010 finalGenParticlesBPH = finalGenParticles.clone(
0011   src = cms.InputTag("mergedGenParticles"),
0012   select = cms.vstring(
0013         "drop *",
0014         "keep++ (abs(pdgId) == 511 || abs(pdgId) == 521 || abs(pdgId)==531)",  #keep all B0(=511) and B+/-(521) + their daughters and granddaughters
0015    )
0016 )
0017 
0018 genParticleBPHTable = simpleGenParticleFlatTableProducer.clone(
0019   src = cms.InputTag("finalGenParticlesBPH"),
0020   name = cms.string("BPHGenPart"),
0021   doc = cms.string("interesting gen particles for BPH"),  
0022   variables = cms.PSet(
0023       genParticleTable.variables,
0024       vx = Var("vx", float, doc="x coordinate of the production vertex position, in cm", precision=10),
0025       vy = Var("vy", float, doc="y coordinate of the production vertex position, in cm", precision=10),
0026       vz = Var("vz", float, doc="z coordinate of the production vertex position, in cm", precision=10),
0027   )
0028 )
0029 
0030 
0031 
0032 genParticleBPHSequence = cms.Sequence(finalGenParticlesBPH)
0033 genParticleBPHTables = cms.Sequence(genParticleBPHTable)
0034