SysCalc reweight doesn't work with gridpack?

Asked by Josh McFayden

Hi everyone,

I seem to be having problems running the SysCalc reweighting with a gridpack.

I can reproduce the issue with MG5_aMC_v2.3.0 by simply running 'generate p p > z' and then changing only '.true. = gridpack' in run_card.dat and then running PROC_sm_0/bin/generate_events.

In create_gridpack I see some tar errors:

INFO: Creating gridpack
P0_qq_z
P0_qq_z
Cleaning SubProcesses.
tar: README: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
INFO: gridpack created
quit

but the gridpack does get created.

And then if I unpack the tarball and execute ./run.sh 1000 1234 I see:

Updating grid_card.dat...
Now generating 1000 events with random seed 1234 and granularity -1
P0_qq_z
DONE
Moving events from events.lhe
Running addmasses.py to add masses and correct kinematics of fixed particles
addmasses failed with error, invalid literal for int() with base 10: '<mgrwt>'

Am I just doing something stupid here?

Cheers,

Josh.

Question information

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

This question was reopened

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

Hi,

The addmasses.py script is not compatible with SysCalc.
Are you using that script?
if not the best is probably to remove such script if not I should probably rewrite my own routine based on the MG object rather than this version developed originally by S. Mrenna.

Cheers,

Olivier

On 05 Aug 2015, at 22:46, Josh McFayden <email address hidden> wrote:

> New question #270040 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/270040
>
> Hi everyone,
>
> I seem to be having problems running the SysCalc reweighting with a gridpack.
>
> I can reproduce the issue with MG5_aMC_v2.3.0 by simply running 'generate p p > z' and then changing only '.true. = gridpack' in run_card.dat and then running PROC_sm_0/bin/generate_events.
>
> In create_gridpack I see some tar errors:
>
> INFO: Creating gridpack
> P0_qq_z
> P0_qq_z
> Cleaning SubProcesses.
> tar: README: Cannot stat: No such file or directory
> tar: Exiting with failure status due to previous errors
> INFO: gridpack created
> quit
>
> but the gridpack does get created.
>
> And then if I unpack the tarball and execute ./run.sh 1000 1234 I see:
>
> Updating grid_card.dat...
> Now generating 1000 events with random seed 1234 and granularity -1
> P0_qq_z
> DONE
> Moving events from events.lhe
> Running addmasses.py to add masses and correct kinematics of fixed particles
> addmasses failed with error, invalid literal for int() with base 10: '<mgrwt>'
>
>
> Am I just doing something stupid here?
>
> Cheers,
>
> Josh.
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Josh McFayden (mcfayden) said :
#2

Hi Olivier,

Well yes, addmasses.py does appear to be used since that is where the crash is. But I don't specifically ask for it, that's just what happens when you execute run.sh. What would happen if I just remove the script from the gridpack?

Cheers,

Josh.

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

That script will not be used and that’s it.

Cheers,

Olivier
On 06 Aug 2015, at 00:21, Josh McFayden <email address hidden> wrote:

> Question #270040 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/270040
>
> Status: Answered => Open
>
> Josh McFayden is still having a problem:
> Hi Olivier,
>
> Well yes, addmasses.py does appear to be used since that is where the
> crash is. But I don't specifically ask for it, that's just what happens
> when you execute run.sh. What would happen if I just remove the script
> from the gridpack?
>
> Cheers,
>
> Josh.
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Josh McFayden (mcfayden) said :
#4

Hi Olivier,

But will me LHE file be missing the masses of some particles in this case?

Cheers,

Josh.

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

Hi Josh,

The idea of that script is to reintroduce the mass of the muon/tau if they were 0 at generation level.
This would be done anyway by the PS program (in at least an as good way) so this should not be critical.

Cheers,

Olivier

On 06 Aug 2015, at 09:27, Josh McFayden <email address hidden> wrote:

> Question #270040 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/270040
>
> Status: Answered => Open
>
> Josh McFayden is still having a problem:
> Hi Olivier,
>
> But will me LHE file be missing the masses of some particles in this
> case?
>
> Cheers,
>
> Josh.
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Josh McFayden (mcfayden) said :
#6

Thanks Olivier Mattelaer, that solved my question.

Revision history for this message
Josh McFayden (mcfayden) said :
#7

Hi Olivier,

Sorry to come back to this so late, but it seems to me that the fix still didn't work.
If I generate the gridpack then remove addmasses.py before running the event generation then I still don't see the weights...

Cheers,

Josh.

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

Hi Josh,

Did you have the following information in the lhe event (this is an event by event information)?
<mgrwt>
<rscale> 0 0.93962913E+02</rscale>
<asrwt>0</asrwt>
<pdfrwt beam="1"> 1 2 0.13979440E-01 0.93962913E+02</pdfrwt>
<pdfrwt beam="2"> 1 -2 0.37371151E-02 0.93962913E+02</pdfrwt>
<totfact> 0.10965274E+05</totfact>
</mgrwt>
This is the information that MG generates when asking to keep the systematics information.

SysCalc code (C++) is not part of the gridpack by default. (like all external package: MadSpin/pythia/...)
I believe that, not including external package inside the tarball, is the cleaniest long term solution.

So the SysCalc code is not called within the generation of events via gridpack.
Now it should be easy to add SysCalc code inside the tarball (or put the executable executable in some other way)
and then edit run.sh to call that executable.

If you want a way to directly create a gridpack with SysCalc include, this is of course possible but I will then use that opportunity
to deeply change the interface handling the gridpack creation such that the gridpack creation will have the possibility to have a couple of options related to him (like the support reweighting options/ MadSpin options / call to the shower/...).
The bad news with that is that it will take some additional time.

Cheers,

Olivier

Revision history for this message
Josh McFayden (mcfayden) said :
#9

Hi Olivier,

Indeed, I get, e.g.

<mgrwt>
<rscale> 2 0.26461158E+03</rscale>
<asrwt>0</asrwt>
<pdfrwt beam="1"> 1 21 0.43444326E-01 0.26461158E+03</pdfrwt>
<pdfrwt beam="2"> 1 21 0.53638673E-01 0.26461158E+03</pdfrwt>
<totfact> 0.16097494E+04</totfact>
</mgrwt>

We would really like to have this functionality for a number of samples, so if it would be possible to add it to the code that would be great. How long would you say this might be? :-)

I would be happy to also try adding SysCalc by hand in parallel, but I'm not really sure where to start. Do you have some instructions?

Best,

Josh.

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

Hi Josh,

> I would be happy to also try adding SysCalc by hand in parallel, but I'm
> not really sure where to start. Do you have some instructions?

Sure the instruction to run it in standalone are present here:
https://cp3.irmp.ucl.ac.be/projects/madgraph/wiki/SysCalc

Cheers,

Olivier

> On Feb 6, 2016, at 11:42, Josh McFayden <email address hidden> wrote:
>
> Question #270040 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/270040
>
> Status: Answered => Open
>
> Josh McFayden is still having a problem:
> Hi Olivier,
>
> Indeed, I get, e.g.
>
> <mgrwt>
> <rscale> 2 0.26461158E+03</rscale>
> <asrwt>0</asrwt>
> <pdfrwt beam="1"> 1 21 0.43444326E-01 0.26461158E+03</pdfrwt>
> <pdfrwt beam="2"> 1 21 0.53638673E-01 0.26461158E+03</pdfrwt>
> <totfact> 0.16097494E+04</totfact>
> </mgrwt>
>
> We would really like to have this functionality for a number of samples,
> so if it would be possible to add it to the code that would be great.
> How long would you say this might be? :-)
>
> I would be happy to also try adding SysCalc by hand in parallel, but I'm
> not really sure where to start. Do you have some instructions?
>
> Best,
>
> Josh.
>
> --
> 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 Josh McFayden for more information if necessary.

To post a message you must log in.