Madgraph plus Pythia, is it feasible to generate SM photon in madgraph and customize it to dark photon in pythia

Asked by Yao Yao on 2019-08-23

Hello,

I am trying to generate dark photon which is similar to SM photon, but just want it to be massive and change its kinetic fixing factor. I would like to know if it is possible to generate the process with standard model particles: p p > mu+ mu- a by using madgraph, and later on customize the SM photon to dark photon by using pythia?

If it is feasible, then it will be a pythia/Geant4 question. Or if you know some other way of doing it, please let me know.

I have done the SM process generation and generate the lhe file, and I got stuck at customizing it in pythia. I am using CMSSW, and I find some code in SimG4Core/CustomPhysics/ package that could customize particle with pdgId=1072000 (dark photon), modify its mass and dark factor. I want to ask how to modify lhe or write pythia code that make the customization works on SM photon.

So far I changed all the pdgId of SM photon to dark photon (22->1072000) in lhe file, and customize the process as following details, but pythia pops up the errors:

 *------- PYTHIA Error and Warning Messages Statistics ----------------------------------------------------------*
 | |
 | times message |
 | |
 | 100 Abort from Pythia::next: parton+hadronLevel failed; giving up |
 | 1937 Error in Pythia::check: unknown particle code |
 | 1000 Error in Pythia::next: check of event revealed problems |
 | 3 Error in SpaceShower::pT2nearThreshold: stuck in loop |
 | 1 Info from SLHAinterface::initSLHA: No MODSEL found, keeping internal SUSY switched off |
 | 1 Info from SLHAinterface::initSLHA: importing MASS entries |
 | 2 Warning in SLHAinterface::initSLHA: ignoring DECAY tables |
 | 2 Warning in SLHAinterface::initSLHA: ignoring MASS entries |
 | 1 Warning in SLHAinterface::initSLHA: massless particle forced stable |
 | 13 Warning in SpaceShower::pT2nextQCD: small daughter PDF |
 | 30 Warning in SpaceShower::pT2nextQCD: weight above unity |
 | 2 Warning in StringFragmentation::fragmentToJunction: bad convergence junction rest frame |
 | |
 *------- End PYTHIA Error and Warning Messages Statistics ------------------------------------------------------*

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The code is the followings:
import FWCore.ParameterSet.Config as cms

from Configuration.StandardSequences.Eras import eras

process = cms.Process('SIM',eras.Run2_2017)

# import of standard configurations
process.load('Configuration.StandardSequences.Services_cff')
process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
process.load('FWCore.MessageService.MessageLogger_cfi')
process.load('Configuration.EventContent.EventContent_cff')
process.load('SimGeneral.MixingModule.mixNoPU_cfi')
process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
process.load('Configuration.StandardSequences.GeometrySimDB_cff')
process.load('Configuration.StandardSequences.MagneticField_cff')
process.load('Configuration.StandardSequences.Generator_cff')
process.load('IOMC.EventVertexGenerators.VtxSmearedRealistic25ns13TeVEarly2017Collision_cfi')
process.load('GeneratorInterface.Core.genFilterSummary_cff')
process.load('Configuration.StandardSequences.SimIdeal_cff')
process.load('Configuration.StandardSequences.EndOfProcess_cff')
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')

process.maxEvents = cms.untracked.PSet(
    input = cms.untracked.int32(100)
)

# Input source
process.source = cms.Source("LHESource",
    dropDescendantsOfDroppedBranches = cms.untracked.bool(False),
    fileNames = cms.untracked.vstring('root://cmsxrootd.fnal.gov///store/user/yayao/DarkPhoton_lhe/darkPhoton_m5e-4_customize/cmsgrid_final_darkphoton.lhe')
)

process.options = cms.untracked.PSet(

)
# Output definition

process.RAWSIMoutput = cms.OutputModule("PoolOutputModule",
    SelectEvents = cms.untracked.PSet(
        SelectEvents = cms.vstring('generation_step')
    ),
    compressionAlgorithm = cms.untracked.string('LZMA'),
    compressionLevel = cms.untracked.int32(9),
    dataset = cms.untracked.PSet(
        dataTier = cms.untracked.string('GEN-SIM'),
        filterName = cms.untracked.string('')
    ),
    eventAutoFlushCompressedSize = cms.untracked.int32(20971520),
    fileName = cms.untracked.string('file:customize_darkphoton_massive_fromSMPhoton_test.root'),
    outputCommands = process.RAWSIMEventContent.outputCommands,
    splitLevel = cms.untracked.int32(0)
)

# Additional output definition
# Other statements
process.XMLFromDBSource.label = cms.string("Extended")
process.genstepfilter.triggerConditions=cms.vstring("generation_step")
from Configuration.AlCa.GlobalTag import GlobalTag
process.GlobalTag = GlobalTag(process.GlobalTag, '93X_mc2017_realistic_v3', '')

from Configuration.Generator.Pythia8CommonSettings_cfi import *
from Configuration.Generator.MCTunes2017.PythiaCP2Settings_cfi import *

process.generator = cms.EDFilter("Pythia8HadronizerFilter",
                         maxEventsToPrint = cms.untracked.int32(1),
                         pythiaPylistVerbosity = cms.untracked.int32(1),
                         filterEfficiency = cms.untracked.double(1),
                         pythiaHepMCVerbosity = cms.untracked.bool(False),
                         comEnergy = cms.double(13000.),
                         PythiaParameters = cms.PSet(
        pythia8CommonSettingsBlock,
        pythia8CP2SettingsBlock,
        processParameters = cms.vstring(
            'SLHA:useDecayTable = on',

        ),
        parameterSets = cms.vstring('pythia8CommonSettings',
                                    'pythia8CP2Settings',
                                    'processParameters'
                                    )
        )
                         )
# Path and EndPath definitions

process.generation_step = cms.Path(process.pgen)
process.simulation_step = cms.Path(process.psim)
process.genfiltersummary_step = cms.EndPath(process.genFilterSummary)
process.endjob_step = cms.EndPath(process.endOfProcess)
process.RAWSIMoutput_step = cms.EndPath(process.RAWSIMoutput)

process.schedule = cms.Schedule(process.generation_step,process.genfiltersummary_step,process.simulation_step,process.endjob_step,process.RAWSIMoutput_step)
from PhysicsTools.PatAlgos.tools.helpers import associatePatAlgosToolsTask
associatePatAlgosToolsTask(process)

#Setup FWK for multithreaded
#process.options.numberOfThreads=cms.untracked.uint32(8)
process.options.numberOfStreams=cms.untracked.uint32(0)
# filter all path with the production filter sequence
for path in process.paths:
    if path in ['lhe_step']: continue
    getattr(process,path)._seq = process.generator * getattr(process,path)._seq

# customisation of the process.
from SimG4Core.CustomPhysics.DarkPhoton_SIM_customize_cfi import *
process = customiseDarkPhotonSIM_2en2(process)
# End of customisation functions

# Customisation from command line

# Add early deletion of temporary data products to reduce peak memory need
from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete
process = customiseEarlyDelete(process)
# End adding early deletion

Question information

Language:
English Edit question
Status:
Answered
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Last query:
2019-08-23
Last reply:
2019-08-23

For the py8 customisations I have no idea how I can help.
My suggestion would be to use a UFO model with dark photon from the beginning or use the mass reshuffling method of Rambo to change the mass

Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: <email address hidden> <email address hidden> on behalf of Yao Yao <email address hidden>
Sent: Friday, August 23, 2019 4:33:06 AM
To: Olivier Mattelaer <email address hidden>
Subject: [Question #683182]: Madgraph plus Pythia, is it feasible to generate SM photon in madgraph and customize it to dark photon in pythia

New question #683182 on MadGraph5_aMC@NLO:
https://answers.launchpad.net/mg5amcnlo/+question/683182

Hello,

I am trying to generate dark photon which is similar to SM photon, but just want it to be massive and change its kinetic fixing factor. I would like to know if it is possible to generate the process with standard model particles: p p > mu+ mu- a by using madgraph, and later on customize the SM photon to dark photon by using pythia?

If it is feasible, then it will be a pythia/Geant4 question. Or if you know some other way of doing it, please let me know.

I have done the SM process generation and generate the lhe file, and I got stuck at customizing it in pythia. I am using CMSSW, and I find some code in SimG4Core/CustomPhysics/ package that could customize particle with pdgId=1072000 (dark photon), modify its mass and dark factor. I want to ask how to modify lhe or write pythia code that make the customization works on SM photon.

So far I changed all the pdgId of SM photon to dark photon (22->1072000) in lhe file, and customize the process as following details, but pythia pops up the errors:

 *------- PYTHIA Error and Warning Messages Statistics ----------------------------------------------------------*
 | |
 | times message |
 | |
 | 100 Abort from Pythia::next: parton+hadronLevel failed; giving up |
 | 1937 Error in Pythia::check: unknown particle code |
 | 1000 Error in Pythia::next: check of event revealed problems |
 | 3 Error in SpaceShower::pT2nearThreshold: stuck in loop |
 | 1 Info from SLHAinterface::initSLHA: No MODSEL found, keeping internal SUSY switched off |
 | 1 Info from SLHAinterface::initSLHA: importing MASS entries |
 | 2 Warning in SLHAinterface::initSLHA: ignoring DECAY tables |
 | 2 Warning in SLHAinterface::initSLHA: ignoring MASS entries |
 | 1 Warning in SLHAinterface::initSLHA: massless particle forced stable |
 | 13 Warning in SpaceShower::pT2nextQCD: small daughter PDF |
 | 30 Warning in SpaceShower::pT2nextQCD: weight above unity |
 | 2 Warning in StringFragmentation::fragmentToJunction: bad convergence junction rest frame |
 | |
 *------- End PYTHIA Error and Warning Messages Statistics ------------------------------------------------------*

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The code is the followings:
import FWCore.ParameterSet.Config as cms

from Configuration.StandardSequences.Eras import eras

process = cms.Process('SIM',eras.Run2_2017)

# import of standard configurations
process.load('Configuration.StandardSequences.Services_cff')
process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
process.load('FWCore.MessageService.MessageLogger_cfi')
process.load('Configuration.EventContent.EventContent_cff')
process.load('SimGeneral.MixingModule.mixNoPU_cfi')
process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
process.load('Configuration.StandardSequences.GeometrySimDB_cff')
process.load('Configuration.StandardSequences.MagneticField_cff')
process.load('Configuration.StandardSequences.Generator_cff')
process.load('IOMC.EventVertexGenerators.VtxSmearedRealistic25ns13TeVEarly2017Collision_cfi')
process.load('GeneratorInterface.Core.genFilterSummary_cff')
process.load('Configuration.StandardSequences.SimIdeal_cff')
process.load('Configuration.StandardSequences.EndOfProcess_cff')
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')

process.maxEvents = cms.untracked.PSet(
    input = cms.untracked.int32(100)
)

# Input source
process.source = cms.Source("LHESource",
    dropDescendantsOfDroppedBranches = cms.untracked.bool(False),
    fileNames = cms.untracked.vstring('root://cmsxrootd.fnal.gov///store/user/yayao/DarkPhoton_lhe/darkPhoton_m5e-4_customize/cmsgrid_final_darkphoton.lhe')
)

process.options = cms.untracked.PSet(

)
# Output definition

process.RAWSIMoutput = cms.OutputModule("PoolOutputModule",
    SelectEvents = cms.untracked.PSet(
        SelectEvents = cms.vstring('generation_step')
    ),
    compressionAlgorithm = cms.untracked.string('LZMA'),
    compressionLevel = cms.untracked.int32(9),
    dataset = cms.untracked.PSet(
        dataTier = cms.untracked.string('GEN-SIM'),
        filterName = cms.untracked.string('')
    ),
    eventAutoFlushCompressedSize = cms.untracked.int32(20971520),
    fileName = cms.untracked.string('file:customize_darkphoton_massive_fromSMPhoton_test.root'),
    outputCommands = process.RAWSIMEventContent.outputCommands,
    splitLevel = cms.untracked.int32(0)
)

# Additional output definition
# Other statements
process.XMLFromDBSource.label = cms.string("Extended")
process.genstepfilter.triggerConditions=cms.vstring("generation_step")
from Configuration.AlCa.GlobalTag import GlobalTag
process.GlobalTag = GlobalTag(process.GlobalTag, '93X_mc2017_realistic_v3', '')

from Configuration.Generator.Pythia8CommonSettings_cfi import *
from Configuration.Generator.MCTunes2017.PythiaCP2Settings_cfi import *

process.generator = cms.EDFilter("Pythia8HadronizerFilter",
                         maxEventsToPrint = cms.untracked.int32(1),
                         pythiaPylistVerbosity = cms.untracked.int32(1),
                         filterEfficiency = cms.untracked.double(1),
                         pythiaHepMCVerbosity = cms.untracked.bool(False),
                         comEnergy = cms.double(13000.),
                         PythiaParameters = cms.PSet(
        pythia8CommonSettingsBlock,
        pythia8CP2SettingsBlock,
        processParameters = cms.vstring(
            'SLHA:useDecayTable = on',

        ),
        parameterSets = cms.vstring('pythia8CommonSettings',
                                    'pythia8CP2Settings',
                                    'processParameters'
                                    )
        )
                         )
# Path and EndPath definitions

process.generation_step = cms.Path(process.pgen)
process.simulation_step = cms.Path(process.psim)
process.genfiltersummary_step = cms.EndPath(process.genFilterSummary)
process.endjob_step = cms.EndPath(process.endOfProcess)
process.RAWSIMoutput_step = cms.EndPath(process.RAWSIMoutput)

process.schedule = cms.Schedule(process.generation_step,process.genfiltersummary_step,process.simulation_step,process.endjob_step,process.RAWSIMoutput_step)
from PhysicsTools.PatAlgos.tools.helpers import associatePatAlgosToolsTask
associatePatAlgosToolsTask(process)

#Setup FWK for multithreaded
#process.options.numberOfThreads=cms.untracked.uint32(8)
process.options.numberOfStreams=cms.untracked.uint32(0)
# filter all path with the production filter sequence
for path in process.paths:
    if path in ['lhe_step']: continue
    getattr(process,path)._seq = process.generator * getattr(process,path)._seq

# customisation of the process.
from SimG4Core.CustomPhysics.DarkPhoton_SIM_customize_cfi import *
process = customiseDarkPhotonSIM_2en2(process)
# End of customisation functions

# Customisation from command line

# Add early deletion of temporary data products to reduce peak memory need
from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete
process = customiseEarlyDelete(process)
# End adding early deletion

--
You received this question notification because you are an answer
contact for MadGraph5_aMC@NLO.

Can you help with this problem?

Provide an answer of your own, or ask Yao Yao for more information if necessary.

To post a message you must log in.