Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:03:33

0001 import FWCore.ParameterSet.Config as cms
0002 from Configuration.Generator.Pythia8CommonSettings_cfi import *
0003 from Configuration.Generator.MCTunes2017.PythiaCP5Settings_cfi import *
0004 from GeneratorInterface.EvtGenInterface.EvtGenSetting_cff import *
0005 
0006 _generator = cms.EDFilter("Pythia8GeneratorFilter",
0007                          comEnergy = cms.double(13000.0),
0008                          crossSection = cms.untracked.double(54000000000),
0009                          filterEfficiency = cms.untracked.double(3.0e-4),
0010                          pythiaHepMCVerbosity = cms.untracked.bool(False),
0011                          maxEventsToPrint = cms.untracked.int32(0),
0012                          pythiaPylistVerbosity = cms.untracked.int32(0),
0013                          ExternalDecays = cms.PSet(
0014                          #using alternative name for decayer
0015                          EvtGen1 = cms.untracked.PSet(
0016                         #uses latest evt and decay tables from evtgen 
0017                             decay_table = cms.string('GeneratorInterface/EvtGenInterface/data/DECAY_NOLONGLIFE.DEC'),
0018                             particle_property_file = cms.FileInPath('GeneratorInterface/EvtGenInterface/data/evt.pdl'),
0019                             convertPythiaCodes = cms.untracked.bool(False),
0020                             #here we will use the user.dec store in the release
0021                             user_decay_file = cms.vstring('GeneratorInterface/ExternalDecays/data/Bs_mumu.dec'),
0022                             list_forced_decays = cms.vstring('MyB_s0','Myanti-B_s0'),
0023                             operates_on_particles = cms.vint32()
0024                          ),
0025                          parameterSets = cms.vstring('EvtGen1')
0026                         ),
0027                         PythiaParameters = cms.PSet(
0028                            pythia8CommonSettingsBlock,
0029                            pythia8CP5SettingsBlock,
0030                            processParameters = cms.vstring(
0031                               #filter of a b-quark before hadronizing, and use a better data-like process
0032                               'PTFilter:filter = on',
0033                               'PTFilter:quarkToFilter = 5',
0034                               'PTFilter:scaleToFilter = 1.0',
0035                               'SoftQCD:nonDiffractive = on',
0036                            ),
0037                            parameterSets = cms.vstring('pythia8CommonSettings',
0038                                     'pythia8CP5Settings',
0039                                     'processParameters',
0040                            )
0041                         )
0042 )
0043 
0044 from GeneratorInterface.Core.ExternalGeneratorFilter import ExternalGeneratorFilter
0045 generator = ExternalGeneratorFilter(_generator)
0046 
0047 generator.PythiaParameters.processParameters.extend(EvtGenExtraParticles)
0048 
0049 MuMuFilter = cms.EDFilter("MCParticlePairFilter",
0050                           Status = cms.untracked.vint32(1, 1),
0051                           MinPt = cms.untracked.vdouble(3., 3.),
0052                           MaxEta = cms.untracked.vdouble(2.5, 2.5),
0053                           MinEta = cms.untracked.vdouble(-2.5, -2.5),
0054                           ParticleCharge = cms.untracked.int32(-1),
0055                           ParticleID1 = cms.untracked.vint32(13,-13),
0056                           )
0057 
0058 # -- Require Muon from Bs
0059 MuFilter = cms.EDFilter("PythiaFilter",
0060                         Status = cms.untracked.int32(1),
0061                         MotherID = cms.untracked.int32(531),
0062                         MinPt = cms.untracked.double(3.),
0063                         ParticleID = cms.untracked.int32(13),
0064                         MaxEta = cms.untracked.double(2.5),
0065                         MinEta = cms.untracked.double(-2.5)
0066                         )
0067 
0068 ProductionFilterSequence = cms.Sequence(generator*MuMuFilter*MuFilter)