MadSpin fails with TypeError

Bug #1521012 reported by Stephan Lammel
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MadGraph5_aMC@NLO
Fix Released
Undecided
Unassigned

Bug Description

Dear All,
   i am trying to generate some SUSY events, decaying them via MadSpin.
Unfortunately it fails with:

Command "generate_events run_01" interrupted with error:
TypeError : unsupported operand type(s) for -=: 'float' and 'str'
Please report this bug on https://bugs.launchpad.net/madgraph5

I only have charginos decaying into stau, tau-neutrino followed by stau
decay into tau tau-neutrino. (I wouldn't mind decaying the tau too but
i understand that is not yet an option for MadSpin. Let me know in case
that is wrong.)

I took a look at line 547 of MadSpin/decay.py but don't see why "m" is
considered a string. Could you please take a look.

Thanks,
                 cheers, Stephan

Revision history for this message
Stephan Lammel (lammel) wrote :
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote : Re: [Bug 1521012] [NEW] MadSpin fails with TypeError

Dear Stephan,

Could you attach your madspin_card?
I’m not sure to understand which decay you are trying to perform.

Cheers,

Olivier

> On Nov 30, 2015, at 00:46, Stephan Lammel <email address hidden> wrote:
>
> Public bug reported:
>
> Dear All,
> i am trying to generate some SUSY events, decaying them via MadSpin.
> Unfortunately it fails with:
>
> Command "generate_events run_01" interrupted with error:
> TypeError : unsupported operand type(s) for -=: 'float' and 'str'
> Please report this bug on https://bugs.launchpad.net/madgraph5
>
> I only have charginos decaying into stau, tau-neutrino followed by stau
> decay into tau tau-neutrino. (I wouldn't mind decaying the tau too but
> i understand that is not yet an option for MadSpin. Let me know in case
> that is wrong.)
>
> I took a look at line 547 of MadSpin/decay.py but don't see why "m" is
> considered a string. Could you please take a look.
>
> Thanks,
> cheers, Stephan
>
> ** Affects: mg5amcnlo
> Importance: Undecided
> Status: New
>
> ** Attachment added: "MG5_aMC_v2_3_3/ewkino/run_01_tag_1_debug.log"
> https://bugs.launchpad.net/bugs/1521012/+attachment/4527336/+files/madspin.txt
>
> --
> You received this bug notification because you are subscribed to
> MadGraph5_aMC@NLO.
> https://bugs.launchpad.net/bugs/1521012
>
> Title:
> MadSpin fails with TypeError
>
> Status in MadGraph5_aMC@NLO:
> New
>
> Bug description:
> Dear All,
> i am trying to generate some SUSY events, decaying them via MadSpin.
> Unfortunately it fails with:
>
> Command "generate_events run_01" interrupted with error:
> TypeError : unsupported operand type(s) for -=: 'float' and 'str'
> Please report this bug on https://bugs.launchpad.net/madgraph5
>
> I only have charginos decaying into stau, tau-neutrino followed by stau
> decay into tau tau-neutrino. (I wouldn't mind decaying the tau too but
> i understand that is not yet an option for MadSpin. Let me know in case
> that is wrong.)
>
> I took a look at line 547 of MadSpin/decay.py but don't see why "m" is
> considered a string. Could you please take a look.
>
> Thanks,
> cheers, Stephan
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mg5amcnlo/+bug/1521012/+subscriptions

Revision history for this message
Stephan Lammel (lammel) wrote :
Revision history for this message
Stephan Lammel (lammel) wrote :

Did you have a chance to take a look/any update?
Thanks,
 - Stephan

Revision history for this message
Stephan Lammel (lammel) wrote :

Hallo Olivier, et al.,
   did you have a chance to look at this? Thanks,
                                                          - Stephan

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote : Re: [Bug 1521012] MadSpin fails with TypeError

Sorry,

I just look at it now,
on my computer it crashes since some mass are not defined within your input_card:
Command "generate_events -f" interrupted with error:
MadGraph5Error : mass (1000022,) not define
Please report this bug on https://bugs.launchpad.net/madgraph5
More information is found in '/Users/omatt/Documents/eclipse/2.3.4/PROC_mssm_0/run_02_tag_1_debug.log'.
Please attach this file to your report.

according to some warning in madevent, you have a couple of entry missing:
WARNING: information about "mass [23]" is missing using default value: 91.1876.
WARNING: information about "mass [24]" is missing using default value: 79.82901.
WARNING: information about "mass [1000022]" is missing using default value: 96.68807.
WARNING: information about "mass [1000023]" is missing using default value: 181.0882.
WARNING: information about "mass [1000025]" is missing using default value: -363.756.
WARNING: information about "mass [1000035]" is missing using default value: 381.7294.
WARNING: information about "mass [1000024]" is missing using default value: 181.6965.
WARNING: information about "mass [1000021]" is missing using default value: 607.7137.
WARNING: information about "mass [25]" is missing using default value: 110.8991.
WARNING: information about "mass [35]" is missing using default value: 399.9601.
WARNING: information about "mass [36]" is missing using default value: 399.5839.
WARNING: information about "mass [37]" is missing using default value: 407.879.

So I guess that the problem is with your input file more than anything else.
With the default input (SLHA1a) it works nicely

Cheers,

Olivier

> On Jan 13, 2016, at 00:49, Stephan Lammel <email address hidden> wrote:
>
> Hallo Olivier, et al.,
> did you have a chance to look at this? Thanks,
> - Stephan
>
> --
> You received this bug notification because you are subscribed to
> MadGraph5_aMC@NLO.
> https://bugs.launchpad.net/bugs/1521012
>
> Title:
> MadSpin fails with TypeError
>
> Status in MadGraph5_aMC@NLO:
> New
>
> Bug description:
> Dear All,
> i am trying to generate some SUSY events, decaying them via MadSpin.
> Unfortunately it fails with:
>
> Command "generate_events run_01" interrupted with error:
> TypeError : unsupported operand type(s) for -=: 'float' and 'str'
> Please report this bug on https://bugs.launchpad.net/madgraph5
>
> I only have charginos decaying into stau, tau-neutrino followed by stau
> decay into tau tau-neutrino. (I wouldn't mind decaying the tau too but
> i understand that is not yet an option for MadSpin. Let me know in case
> that is wrong.)
>
> I took a look at line 547 of MadSpin/decay.py but don't see why "m" is
> considered a string. Could you please take a look.
>
> Thanks,
> cheers, Stephan
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mg5amcnlo/+bug/1521012/+subscriptions

Revision history for this message
Stephan Lammel (lammel) wrote :

Hallo Olivier,
    thanks for looking into this and your reply. The masses are
all specified in the SLHA file, i.e. ewkino/Cards/param_card.dat
(Take a look at MG5_aMC_v2_3_3/ewkino/run_01_tag_1_debug.log
they are all listed right at the beginning.) Do i need to specify
the SLHA file again for MadSpin or something? I do a

launch ewkino
madspin=ON
done
done
exit

Without the madspin=ON it finds the masses/works fine. Thanks,
                                               cheers, Stephan

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

Hi Stephan,

Then, I probably mess up when I copy your card this morning.

The real problem is that the mass of the tau neutrino is written as
0.048166378-09

Since the mssm model forces that mass to be zero, Madgraph do not try to convert this mass to a number and take 0 whatever value you put (it will not know what to do with it anyway) explaining why it does not crash.
Madspin tries to use that mass to generate the decay PS and crash since this is not a number.

When fixing your card, you will face another problem that all the masses of the light quark are not define.
Here is a patch to avoid that problem (you can also add them in your param_card)

=== modified file 'MadSpin/decay.py'
--- MadSpin/decay.py 2016-01-13 14:28:49 +0000
+++ MadSpin/decay.py 2016-01-13 18:21:58 +0000
@@ -2416,7 +2416,13 @@
                     self.curr_event.particle[part_for_curr_evt]['momentum']=ext_mom[prod2full[part-1]-1]
                     self.curr_event.particle[part_for_curr_evt]['helicity']=helicities[prod2full[part-1]-1]
                     if not use_mc_masses or abs(pid) not in self.MC_masses:
- self.curr_event.particle[part_for_curr_evt]['mass']=self.banner.get('param_card','mass', abs(pid)).value
+ try:
+ self.curr_event.particle[part_for_curr_evt]['mass']=self.banner.get('param_card','mass', abs(pid)).value
+ except KeyError:
+ if self.model.get_particle(abs(pid)).get('mass').lower() == 'zero':
+ self.curr_event.particle[part_for_curr_evt]['mass'] = 0
+ else:
+ raise
                     else:

Cheers,

Olivier

Revision history for this message
Stephan Lammel (lammel) wrote : Re: [Bug 1521012] Re: MadSpin fails with TypeError

Ohh, i mistyped the tau neutrino mass missing the "e". Sorry!
Thanks for looking forward and the light quark info/path!
Many Thanks Olivier!
                        cheers, Stephan

Changed in mg5amcnlo:
status: New → Fix Committed
Changed in mg5amcnlo:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.