Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:32:12

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
0004 TTbarAnalyzeSpinCorr = DQMEDAnalyzer('TTbarSpinCorrHepMCAnalyzer',
0005                                       genEventInfoProductTag = cms.InputTag("generator"),
0006                                       genParticlesTag = cms.InputTag("genParticles")
0007                                       )
0008 
0009 from GeneratorInterface.LHEInterface.lheCOMWeightProducer import *
0010 lheCOMWeightProducer.NewECMS = cms.double(8000)
0011 
0012 
0013 ## get lorentzvectors
0014 analyzeTopKinematics = DQMEDAnalyzer('TTbar_Kinematics',
0015                                       SaveTree = cms.untracked.bool(False),
0016                                       hepmcCollection = cms.InputTag("generatorSmeared"),
0017                                       genEventInfoProductTag = cms.InputTag("generator")
0018                                       )
0019 
0020 ## analyze genjets
0021 analyzeGenJets = DQMEDAnalyzer('TTbar_GenJetAnalyzer',
0022                                 jets = cms.InputTag('ak4GenJets' ),
0023                                 genEventInfoProductTag = cms.InputTag("generator")
0024                                 )
0025 
0026 # --- Create list of interesting genParticles ---
0027 from SimGeneral.HepPDTESSource.pythiapdt_cfi import *
0028 
0029 # --- ShortList is to prevent running multiple times over full particle list ---
0030 #see https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideGenParticlePruner
0031 
0032 genParticlesShortList = cms.EDProducer("GenParticlePruner",
0033                                        src = cms.InputTag("genParticles",""),
0034                                        select = cms.vstring("drop  *  ",
0035                                                             "keep pdgId = {mu+}      & status = 1",
0036                                                             "keep pdgId = {mu-}      & status = 1",
0037                                                             "keep pdgId = {e+}       & status = 1",
0038                                                             "keep pdgId = {e-}       & status = 1",
0039                                                             "keep pdgId = {nu_e}     & status = 1",
0040                                                             "keep pdgId = {nu_ebar}  & status = 1",
0041                                                             "keep pdgId = {nu_mu}    & status = 1",
0042                                                             "keep pdgId = {nu_mubar} & status = 1"
0043                                                             )
0044                                        )
0045 
0046 #see https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideGenParticlePruner
0047 genParticlesMuons     = cms.EDProducer("GenParticlePruner",
0048                                        src = cms.InputTag("genParticlesShortList"),
0049                                        select = cms.vstring("drop  *  ",
0050                                                             "keep pdgId = {mu+} & status = 1 & pt > 30 & abs(eta) < 2.5",
0051                                                             "keep pdgId = {mu-} & status = 1 & pt > 30 & abs(eta) < 2.5"
0052                                                             )
0053                                        )
0054 
0055 #see https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideGenParticlePruner
0056 genParticlesElectrons = cms.EDProducer("GenParticlePruner",
0057                                        src = cms.InputTag("genParticlesShortList"),
0058                                        select = cms.vstring("drop  *  ",
0059                                                             "keep pdgId = {e+} & status = 1 & pt > 30 & abs(eta) < 2.5",
0060                                                             "keep pdgId = {e-} & status = 1 & pt > 30 & abs(eta) < 2.5"
0061                                                             )
0062                                        )
0063 
0064 #see https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideGenParticlePruner
0065 genParticlesNeutrinos = cms.EDProducer("GenParticlePruner",
0066                                        src = cms.InputTag("genParticlesShortList"),
0067                                        select = cms.vstring("drop  *  ",
0068                                                             "keep pdgId = {nu_e}     & status = 1",
0069                                                             "keep pdgId = {nu_ebar}  & status = 1",
0070                                                             "keep pdgId = {nu_mu}    & status = 1",
0071                                                             "keep pdgId = {nu_mubar} & status = 1"
0072                                                             )
0073                                        )
0074 
0075 ## analyze gen leptons
0076 analyzeGenMuons = DQMEDAnalyzer('TTbar_GenLepAnalyzer', leptons = cms.InputTag('genParticlesMuons' ))
0077 analyzeGenElecs = DQMEDAnalyzer('TTbar_GenLepAnalyzer', leptons = cms.InputTag('genParticlesElectrons' ))
0078 analyzeGenNtrns = DQMEDAnalyzer('TTbar_GenLepAnalyzer', leptons = cms.InputTag('genParticlesNeutrinos' ))
0079 
0080 
0081