Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verifying/Testing generated root files #6

Closed
cschwan opened this issue Jan 21, 2019 · 5 comments
Closed

Verifying/Testing generated root files #6

cschwan opened this issue Jan 21, 2019 · 5 comments
Assignees

Comments

@cschwan
Copy link
Contributor

cschwan commented Jan 21, 2019

It would be nice if were able regression test the root files generated by amcfast. The problem is that, when I run mg5_aMC+aMCfast+APPLgrid once, store the root file, and run the same commands again, I get a different root file. One difference is due to the automatic seeding of mg5_aMC, but this should be fixed by set run_card iseed 1 (it isn't, I still get a different file).

Intuitively, a run with the same seed should give the same events and therefore the same file. Does anyone know why this is not the case?

@scarrazza
Copy link
Member

Ok, so lets parse the ROOT file and compare for each key/object its content.

@scarrazza
Copy link
Member

In a few words we need a rootdiff program.

@cschwan cschwan self-assigned this Jan 22, 2019
@cschwan
Copy link
Contributor Author

cschwan commented Jan 23, 2019

I have a preliminary version of our rootdiff program. It's more or less tailored to *.root files which are in fact applgrids. One thing which complicates the comparison of two applgrids is the fact that they store a custom type TFileString which looks like a class from ROOT, but it's actually implemented in applgrid, in such a way that it's not visible from outside (there's no header file installed for TFileString which would allow to reconstruct this type). But I think that, for the time being, it's safe to ignore this entry in the .root file.

I have verified that the diff works if I run MG5_aMC twice with the same seed and that it shows differences if I modify the seed in one of the runs.

@scarrazza
Copy link
Member

Sounds good, could you please open a pull request with the script so I can test?

@cschwan
Copy link
Contributor Author

cschwan commented Jan 23, 2019

I added the python script in commit f742eab. This script is adapted from https://github.com/wiso/ROOTDiff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants