Integers instead of floats in QNUMBERS block of param_card

Asked by Yury

Hi,

while working on particles with fractional charges (let's say for example ±0.4e, ±2.5e and ±8.5e), I noticed the "QUANTUM NUMBERS OF NEW STATE(S) (NON SM PDG CODE)" block looks as follows:

Block QNUMBERS 10000040 # qb0p4
        1 1 # 3 times electric charge
        2 2 # number of spin states (2S+1)
        3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
        4 1 # Particle/Antiparticle distinction (0=own anti)
Block QNUMBERS 10000250 # qb2p5
        1 7 # 3 times electric charge
        2 2 # number of spin states (2S+1)
        3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
        4 1 # Particle/Antiparticle distinction (0=own anti)
Block QNUMBERS 10000850 # qb8p5
        1 25 # 3 times electric charge
        2 2 # number of spin states (2S+1)
        3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
        4 1 # Particle/Antiparticle distinction (0=own anti)

I'm looking now at the first line of each sub-block (where it says "3 times electric charge"): for the first sub-block, which corresponds to ±0.4e charge, this number is 1, but it should be 0.4*3=1.2. For the second and third sub-blocks, it is 7 and 25 instead of 2.5*3=7.5 and 8.5*3=25.5, respectively. Why is that? Should I manually change these numbers to 1.2, 7.5 and 25.5 in param_card.dat or I shouldn't even worry about it?

Thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Solved by:
Yury
Solved:
Last query:
Last reply:
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#1

Hi,

The formatting was forcing those to be integer since we had problem in the past with some PS program.
The following patch should solve your problem and keep the integer format when possible (and should therefore working with those PS program).

I will include such change in the next release.

Cheers,

Olivier

=== modified file 'models/write_param_card.py'
--- models/write_param_card.py 2014-07-16 12:50:15 +0000
+++ models/write_param_card.py 2015-08-05 16:54:26 +0000
@@ -35,7 +35,7 @@

     sm_pdg = [1,2,3,4,5,6,11,12,13,13,14,15,16,21,22,23,24,25]
     qnumber_str ="""Block QNUMBERS %(pdg)d # %(name)s
- 1 %(charge)d # 3 times electric charge
+ 1 %(charge)g # 3 times electric charge
         2 %(spin)d # number of spin states (2S+1)
         3 %(color)d # colour rep (1: singlet, 3: triplet, 8: octet)
         4 %(antipart)d # Particle/Antiparticle distinction (0=own anti)\n"""

Revision history for this message
Yury (letra1947) said :
#2

Hi Olivier,

thanks! I just tried that, but it didn't work. I don't get it: am I supposed to simply apply this change to write_param_card.py, start a new MG session and try again (import -> generate -> output -> launch)? Because somehow nothing changes when I look at the param_card.dat from within the MG session after "launch". Even more, I tried to add or edit stuff in the write_param_card.py (like change comments or blocks names), but nothing propagates into my real param_card.dat. How could that be?

P.S. Just in case, I even deleted all *.pyo files, but still no changes in param_card.dat.

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#3

Dear Yury,

I tested my change and it was working.
You should not remove any file in your UFO directory (but if you do the important one is the .pkl one)

My guess is that you modify the wrong write_param_card.py file (they are so many). you should not modify the one present in the UFO directory (the directory where you have particles.py/...) but in the models directory, the directory which contains all the UFO directory.

Cheers,

Olivier

Revision history for this message
Yury (letra1947) said :
#4

Hi Olivier,

that's it! Earlier, I was editing the write_param_card.py inside the UFO directory with my own model. Now, after I edited the one in the directory with all the UFO models, I see the changes. And everything changed as expected in my param_card.dat.

Thanks for quick help!