test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MCParticleReplacer_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
5 
6 generator = cms.EDProducer("MCParticleReplacer",
7  src = cms.InputTag("selectedMuons"),
8  beamSpotSrc = cms.InputTag("dummy"),
9  primaryVertexLabel = cms.InputTag("dummy"),
10  hepMcSrc = cms.InputTag("generatorSmeared"),
11 
12  algorithm = cms.string("ParticleGun"), # "ParticleGun", "Ztautau"
13  pluginType = cms.string("ParticleReplacerParticleGun"), # "ParticleReplacerParticleGun", "ParticleReplacerZtautau"
14  hepMcMode = cms.string("new"), # "new" for new HepMCProduct with taus and decay products,
15  # "replace" for replacing muons in the existing HepMCProcuct
16  verbose = cms.bool(False),
17 
18  ParticleGun = cms.PSet(
19  gunParticle = cms.int32(15),
20  particleOrigin = cms.string("muonReferencePoint"), # "primaryVertex", "muonReferencePoint"
21  forceTauPolarization = cms.string("W"), # "W", "H+", "h", "H", "A"
22  forceTauDecay = cms.string("none"), # "none", "hadrons", "1prong", "3prong"
23  forceTauPlusHelicity = cms.int32(0),
24  forceTauMinusHelicity = cms.int32(0),
25  generatorMode = cms.string("Tauola"), # "Tauola", "Pythia" (not implemented yet)
26  enablePhotosFSR = cms.bool(False),
27  ExternalDecays = cms.PSet(
28  Tauola = cms.PSet(
29  TauolaNoPolar,
30  TauolaDefaultInputCards
31  ),
32  parameterSets = cms.vstring('Tauola')
33  ),
34  PythiaParameters = cms.PSet(
35  pythiaUESettingsBlock,
36  pgunTauolaParameters = cms.vstring(["MDME(%d,1)=0" % x for x in range(89, 143)]),
37  parameterSets = cms.vstring("pythiaUESettings")
38  )
39  ),
40 
41  Ztautau = cms.PSet(
42  TauolaOptions = cms.PSet(
43  TauolaPolar,
44  InputCards = cms.PSet(
45  pjak1 = cms.int32(0),
46  pjak2 = cms.int32(0),
47  mdtau = cms.int32(0)
48  )
49  ),
50  PythiaParameters = cms.PSet(
51  pythiaUESettings = cms.vstring(
52  'MSTJ(11)=3 ! Choice of the fragmentation function',
53  'MSTJ(22)=2 ! Decay those unstable particles',
54  'PARJ(71)=10 . ! for which ctau 10 mm',
55  'MSTP(2)=1 ! which order running alphaS',
56  'MSTP(33)=0 ! no K factors in hard cross sections',
57  'MSTP(51)=10042 ! structure function chosen (external PDF CTEQ6L1)',
58  'MSTP(52)=2 ! work with LHAPDF',
59  'MSTP(81)=1 ! multiple parton interactions 1 is Pythia default',
60  'MSTP(82)=4 ! Defines the multi-parton model',
61  'MSTU(21)=1 ! Check on possible errors during program execution',
62  'PARP(82)=1.8387 ! pt cutoff for multiparton interactions',
63  'PARP(89)=1960. ! sqrts for which PARP82 is set',
64  'PARP(83)=0.5 ! Multiple interactions: matter distrbn parameter',
65  'PARP(84)=0.4 ! Multiple interactions: matter distribution parameter',
66  'PARP(90)=0.16 ! Multiple interactions: rescaling power',
67  'PARP(67)=2.5 ! amount of initial-state radiation',
68  'PARP(85)=1.0 ! gluon prod. mechanism in MI',
69  'PARP(86)=1.0 ! gluon prod. mechanism in MI',
70  'PARP(62)=1.25 ! ',
71  'PARP(64)=0.2 ! ',
72  'MSTP(91)=1 !',
73  'PARP(91)=2.1 ! kt distribution',
74  'PARP(93)=15.0 ! '
75  ),
76  parameterSets = cms.vstring('pythiaUESettings')
77  ),
78  PhotosOptions = cms.PSet(),
79  filterEfficiency = cms.untracked.double(1.0),
80  beamEnergy = cms.double(4000.), # GeV
81  rfRotationAngle = cms.double(0.),
82  rfMirror = cms.bool(True),
83  applyMuonRadiationCorrection = cms.string(""),
84  enablePhotosFSR = cms.bool(False),
85  pythiaHepMCVerbosity = cms.untracked.bool(False),
86  generatorMode = cms.string("Tauola"), # "Tauola", "Pythia" (not implemented yet)
87  verbosity = cms.int32(0)
88  )
89 )
90 
91 # Disable tau decays in Pythia for particle gun
92 def customise(process):
93  if process.generator.generatorMode.value() != "Pythia" and abs(process.generator.ParticleGun.gunParticle.value()) == 15:
94  process.generator.ParticleGun.PythiaParameters.parameterSets.append("pgunTauolaParameters")
Abs< T >::type abs(const T &t)
Definition: Abs.h:22