-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Intoduce the photon flux into Pythia 8 for UPC studies.
- Loading branch information
Andre Govinda Stahl Leiton
committed
Feb 28, 2024
1 parent
d862fb4
commit 4c0f63c
Showing
3 changed files
with
187 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 88 additions & 0 deletions
88
GeneratorInterface/Pythia8Interface/test/pythia8ex2_ConvertToMain70_cfg.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
process = cms.Process("PROD") | ||
|
||
process.load("Configuration.StandardSequences.SimulationRandomNumberGeneratorSeeds_cff") | ||
|
||
process.source = cms.Source("EmptySource") | ||
|
||
process.generator = cms.EDFilter("Pythia8GeneratorFilter", | ||
maxEventsToPrint = cms.untracked.int32(1), | ||
pythiaPylistVerbosity = cms.untracked.int32(1), | ||
filterEfficiency = cms.untracked.double(1.0), | ||
pythiaHepMCVerbosity = cms.untracked.bool(False), | ||
comEnergy = cms.double(5360.), | ||
doProtonPhotonFlux = cms.untracked.bool(True), | ||
#PPbarInitialState = cms.PSet(), | ||
#SLHAFileForPythia8 = cms.string('Configuration/Generator/data/CSA07SUSYBSM_LM9p_sftsdkpyt_slha.out'), | ||
#reweightGen = cms.PSet( # flat in pT | ||
# pTRef = cms.double(15.0), | ||
# power = cms.double(4.5) | ||
#), | ||
#reweightGenRap = cms.PSet( # flat in eta | ||
# yLabSigmaFunc = cms.string("15.44/pow(x,0.0253)-12.56"), | ||
# yLabPower = cms.double(2.), | ||
# yCMSigmaFunc = cms.string("5.45/pow(x+64.84,0.34)"), | ||
# yCMPower = cms.double(2.), | ||
# pTHatMin = cms.double(15.), | ||
# pTHatMax = cms.double(3000.) | ||
#), | ||
#reweightGenPtHatRap = cms.PSet( # flat in Pt and eta | ||
# yLabSigmaFunc = cms.string("15.44/pow(x,0.0253)-12.56"), | ||
# yLabPower = cms.double(2.), | ||
# yCMSigmaFunc = cms.string("5.45/pow(x+64.84,0.34)"), | ||
# yCMPower = cms.double(2.), | ||
# pTHatMin = cms.double(15.), | ||
# pTHatMax = cms.double(3000.) | ||
#), | ||
PythiaParameters = cms.PSet( | ||
pythia8_example02 = cms.vstring('HardQCD:all = on', | ||
'PhaseSpace:pTHatMin = 10.',#CM Edit 20->10 | ||
'PhotonParton:all = on',#Added from main70 | ||
'MultipartonInteractions:pT0Ref = 3.0',#Added from main70 | ||
'PDF:beamA2gamma = on',#Added from main70 | ||
#This option below crashes - debug | ||
'PDF:proton2gammaSet = 0',#Added from main70 | ||
'PDF:useHardNPDFB = on', | ||
'PDF:gammaFluxApprox2bMin = 13.272', | ||
'PDF:beam2gammaApprox = 2', | ||
'Photon:sampleQ2 = off' | ||
), | ||
parameterSets = cms.vstring('pythia8_example02') | ||
) | ||
) | ||
|
||
# in order to use lhapdf PDF add a line like this to pythia8_example02: | ||
# 'PDF:pSet = LHAPDF6:CT10' | ||
|
||
process.load("FWCore.MessageLogger.MessageLogger_cfi") | ||
process.MessageLogger = cms.Service("MessageLogger", | ||
cerr = cms.untracked.PSet( | ||
enable = cms.untracked.bool(False) | ||
), | ||
cout = cms.untracked.PSet( | ||
default = cms.untracked.PSet( | ||
limit = cms.untracked.int32(2) | ||
), | ||
enable = cms.untracked.bool(True) | ||
) | ||
) | ||
|
||
process.RandomNumberGeneratorService = cms.Service("RandomNumberGeneratorService", | ||
generator = cms.PSet( | ||
initialSeed = cms.untracked.uint32(123456789), | ||
) | ||
) | ||
|
||
process.maxEvents = cms.untracked.PSet( | ||
input = cms.untracked.int32(10) | ||
) | ||
|
||
process.GEN = cms.OutputModule("PoolOutputModule", | ||
fileName = cms.untracked.string('pythia8ex2.root') | ||
) | ||
|
||
process.p = cms.Path(process.generator) | ||
process.outpath = cms.EndPath(process.GEN) | ||
|
||
process.schedule = cms.Schedule(process.p, process.outpath) |
51 changes: 51 additions & 0 deletions
51
GeneratorInterface/Pythia8Interface/test/pythia8ex2_ConvertToMain70_cfg_Fragment.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
_generator = cms.EDFilter("Pythia8GeneratorFilter", | ||
maxEventsToPrint = cms.untracked.int32(1), | ||
pythiaPylistVerbosity = cms.untracked.int32(1), | ||
filterEfficiency = cms.untracked.double(1.0), | ||
pythiaHepMCVerbosity = cms.untracked.bool(False), | ||
comEnergy = cms.double(5360.), | ||
doProtonPhotonFlux = cms.untracked.bool(True), | ||
#PPbarInitialState = cms.PSet(), | ||
#SLHAFileForPythia8 = cms.string('Configuration/Generator/data/CSA07SUSYBSM_LM9p_sftsdkpyt_slha.out'), | ||
#reweightGen = cms.PSet( # flat in pT | ||
# pTRef = cms.double(15.0), | ||
# power = cms.double(4.5) | ||
#), | ||
#reweightGenRap = cms.PSet( # flat in eta | ||
# yLabSigmaFunc = cms.string("15.44/pow(x,0.0253)-12.56"), | ||
# yLabPower = cms.double(2.), | ||
# yCMSigmaFunc = cms.string("5.45/pow(x+64.84,0.34)"), | ||
# yCMPower = cms.double(2.), | ||
# pTHatMin = cms.double(15.), | ||
# pTHatMax = cms.double(3000.) | ||
#), | ||
#reweightGenPtHatRap = cms.PSet( # flat in Pt and eta | ||
# yLabSigmaFunc = cms.string("15.44/pow(x,0.0253)-12.56"), | ||
# yLabPower = cms.double(2.), | ||
# yCMSigmaFunc = cms.string("5.45/pow(x+64.84,0.34)"), | ||
# yCMPower = cms.double(2.), | ||
# pTHatMin = cms.double(15.), | ||
# pTHatMax = cms.double(3000.) | ||
#), | ||
PythiaParameters = cms.PSet( | ||
pythia8_example02 = cms.vstring('HardQCD:all = on', | ||
'PhaseSpace:pTHatMin = 10.',#CM Edit 20->10 | ||
'PhotonParton:all = on',#Added from main70 | ||
'MultipartonInteractions:pT0Ref = 3.0',#Added from main70 | ||
'PDF:beamA2gamma = on',#Added from main70 | ||
#This option below crashes - debug | ||
'PDF:proton2gammaSet = 0',#Added from main70 | ||
'PDF:useHardNPDFB = on', | ||
'PDF:gammaFluxApprox2bMin = 13.272', | ||
'PDF:beam2gammaApprox = 2', | ||
'Photon:sampleQ2 = off' | ||
), | ||
parameterSets = cms.vstring('pythia8_example02') | ||
) | ||
) | ||
|
||
|
||
from GeneratorInterface.Core.ExternalGeneratorFilter import ExternalGeneratorFilter | ||
generator = ExternalGeneratorFilter(_generator) |