Fork me on GitHub

Opened 8 years ago

Closed 8 years ago

#1112 closed How to (fixed)

How to set pi0 Particle Gun with Pythia8 within Delphes?

Reported by: Miguel Owned by:
Priority: minor Milestone:
Component: Delphes code Version: Delphes 3
Keywords: particle gun pythia8 pi0 Cc:

Description

Hello,

I would like to run Pythia8 within Delphes to get single pi0 decays. I am using the standard cmd file, i.e the one copied below, but I do not see an option to set pi0 in the particle gun. I tried to set Main:spareMode1 to 111 (pi0 code) but then I got the following error:

' PYTHIA Error in Pythia::check: incorrect colours , i = 1, id = 111 cols = 101 0

PYTHIA Error in Pythia::check: unknown particle code , i = 2, id = -111'

how can I solve this?
By the way, I tried to put Main:spareMode1 to 211 and it works just fine, producing single charged pions.

best regards,
Miguel

ProcessLevel:all = off

! 1) Settings used in the main program.

Main:numberOfEvents = 100 ! number of events to generate
Main:timesAllowErrors = 3 ! how many aborts before run stops
Main:spareFlag1 = on ! true means particle gun
Main:spareMode1 = 1 ! 1-5 - di-quark, 21 - di-gluon, 11 - single electron, 13 - single muon, 15 - single tau, 22 - single photon
Main:spareParm1 = 50000 ! max energy
Main:spareParm2 = 1.5 ! max eta

! 2) Settings related to output in init(), next() and stat().

Init:showChangedSettings = on ! list changed settings
Init:showChangedParticleData = off ! list changed particle data
Next:numberCount = 100 ! print message every n events
Next:numberShowInfo = 1 ! print event information n times
Next:numberShowProcess = 1 ! print process record n times
Next:numberShowEvent = 0 ! print event record n times

! 3) Set the input LHE file

! Beams:frameType = 4

Change History (2)

comment:1 by Pavel Demin, 8 years ago

I'd suggest to modify line 344 in readers/DelphesPythia8.cpp. The code on this line checks particles IDs. I think that adding || pythia->mode("Main:spareMode1") == 111} to this line should enable pi0 particle gun.

comment:2 by Pavel Demin, 8 years ago

Resolution: fixed
Status: newclosed

I've modified the code in readers/DelphesPythia8.cpp: 78d1846b8d9dd50645b8b4fb49d6ea17945256b7/git. Now it should work with any particle ID. This code is now in the 3.4.1 release.

Note: See TracTickets for help on using tickets.