CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/TauAnalysis/MCEmbeddingTools/python/MCParticleReplacer_cfi.py

Go to the documentation of this file.
00001 import FWCore.ParameterSet.Config as cms
00002 
00003 from Configuration.generator.PythiaUESettings_cfi import *
00004 from GeneratorInterface.ExternalDecays.TauolaSettings_cff import *
00005 
00006 # Note: currently this is just a sketch and should not be used
00007 
00008 newSource = cms.EDProducer("MCParticleReplacer",
00009     src                = cms.InputTag("selectedMuons"),
00010     beamSpotSrc        = cms.InputTag("dummy"),
00011     primaryVertexLabel = cms.InputTag("dummy"),
00012     hepMcSrc           = cms.InputTag("generator"),
00013 
00014     algorithm = cms.string("ParticleGun"), # "ParticleGun", "ZTauTau"
00015     hepMcMode = cms.string("new"),         # "new" for new HepMCProduct with taus and decay products,
00016                                            # "replace" for replacing muons in the existing HepMCProcuct
00017     verbose = cms.bool(False),
00018 
00019     ParticleGun = cms.PSet(
00020         gunParticle           = cms.int32(15),
00021         particleOrigin        = cms.string("muonReferencePoint"), # "primaryVertex", "muonReferencePoint"
00022         forceTauPolarization  = cms.string("W"), # "W", "H+", "h", "H", "A"
00023         forceTauDecay         = cms.string("none"), # "none", "hadrons", "1prong", "3prong"
00024         forceTauPlusHelicity  = cms.int32(0),
00025         forceTauMinusHelicity = cms.int32(0),
00026         generatorMode = cms.string("Tauola"),  # "Tauola", "Pythia" (not implemented yet)
00027         ExternalDecays = cms.PSet(
00028             Tauola = cms.PSet(
00029                 TauolaPolar,
00030                 TauolaDefaultInputCards
00031             ),
00032             parameterSets = cms.vstring('Tauola')
00033         ),
00034         PythiaParameters = cms.PSet(
00035             pythiaUESettingsBlock,
00036             pgunTauolaParameters = cms.vstring(["MDME(%d,1)=0" % x for x in range(89, 143)]),
00037             parameterSets = cms.vstring("pythiaUESettings")
00038         ),
00039     ),
00040 
00041     ZTauTau = cms.PSet(
00042                     TauolaOptions = cms.PSet(
00043                                 TauolaPolar,
00044                                 InputCards = cms.PSet
00045                                         (
00046                                             pjak1 = cms.int32(0),
00047                                             pjak2 = cms.int32(0),
00048                                             mdtau = cms.int32(102)
00049                                         )
00050                                 ),
00051         filterEfficiency = cms.untracked.double(1.0),
00052         pythiaHepMCVerbosity = cms.untracked.bool(False),
00053         generatorMode = cms.string("Tauola"),  # "Tauola", "Pythia" (not implemented yet)
00054 
00055     )
00056 
00057 )
00058 
00059 # Disable tau decays in Pythia for particle gun
00060 def customise(process):
00061     if process.newSource.generatorMode.value() != "Pythia" and abs(process.newSource.ParticleGun.gunParticle.value()) == 15:
00062         process.newSource.ParticleGun.PythiaParameters.parameterSets.append("pgunTauolaParameters")