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

Bug in MCParticle list in conversion from HepMC to LCIO through DDSIM #760

Closed
eleogran opened this issue Nov 26, 2020 · 13 comments · Fixed by #753, #754 or #765
Closed

Bug in MCParticle list in conversion from HepMC to LCIO through DDSIM #760

eleogran opened this issue Nov 26, 2020 · 13 comments · Fixed by #753, #754 or #765
Assignees
Labels

Comments

@eleogran
Copy link

eleogran commented Nov 26, 2020

I have a HepMC file with the correct MCParticle list.
When giving it as input to ddsim, the LCIO output file results in a wrong MCParticle list.

  • HepMC file with 100k events e+e- -> Z -> nu N, with N -> eqq generated with DelphesPythia8:
    /afs/cern.ch/work/e/eleogran/public/MCParticleList_issue/HNL.hepmc
  • event 198: printout of the list of particle pdg and vertex position from the hepmc file:
    /afs/cern.ch/work/e/eleogran/public/MCParticleList_issue/evt_198_mc_info.txt
  • ddsim steering file:
    /afs/cern.ch/work/e/eleogran/public/MCParticleList_issue/fcc_steer.py
  • LCIO output file:
    /afs/cern.ch/work/e/eleogran/public/MCParticleList_issue/HNLOutput.slcio
    NB: event 198 is event 2 in this file, i.e. to look at it: dumpevent HNLOutput.slcio 2 | less

In the MCParticle list from the lcio file, particles with index = 7 and > 44 have vertex position:
(-8.35e-01, 3.80e-01,-7.65e-02)
rather than
(-3.73e+02, 1.64e+02,-3.31e+01)

I suspect a problem in the Lorentz boost for the crossing angle, which in my steering file is set:
SIM.crossingAngleBoost = 0.015

If I change this to 0.0, particles with index = 7 and > 44 have vertex position:
(-6.54e-309, 2.88e-309,-5.80e-310)
while the other particles are unchanged.

I have used /cvmfs/clicdp.cern.ch/iLCSoft/builds/2020-02-07/x86_64-slc6-gcc62-opt/.
and run:
$ ddsim --steeringFile fcc_steer.py

@andresailer andresailer self-assigned this Dec 2, 2020
@petricm petricm mentioned this issue Dec 2, 2020
8 tasks
@petricm petricm added the bug label Dec 2, 2020
@andresailer
Copy link
Member

As far as I can tell neither setting of Lorentz boost gives you a correct result. With the lorentzboost you get a short lifetime for the N (right handed neutrino?), without the boost there is 0 lifetime. So I think the problem isn't in the Lorentzboost, or at least not exclusively.
The particles between 8 and 44 are not given to geant4 (quarks and "strings" and such), so their information isn't updated.

@eleogran
Copy link
Author

eleogran commented Dec 2, 2020

Correct, neither result is the right one.
As the boost was affecting only the particles with the wrong vertex, I thought that there could be something weird in the boost. Do I understand from your comment that it's a problem of Geant4 then?

@andresailer
Copy link
Member

I can't make that call yet. I don't think this is a Geant4 issue, more likely a HepMC and DD4hep issue.

@petricm
Copy link

petricm commented Dec 2, 2020

Is there an easy way to convert hepmc to stdhep and we try with that?

@andresailer
Copy link
Member

andresailer commented Dec 2, 2020

There is an issue with the creation of G4PrimaryParticles
in

g4->SetMass(p->mass);

I added g4->Print() before and after this line, which gives:

==== PDGcode 9900012  Particle name nu_Re
 Assigned charge : 0
     Momentum ( -28.3765[GeV/c], 12.5034[GeV/c], -2.5186[GeV/c] )
     kinetic Energy : 31.0612 [GeV]
     Mass : 0.05 [GeV]
     Polarization ( 0, 0, 0 )
     Weight : 1
<<<< End of link
Massive
==== PDGcode 9900012  Particle name nu_Re
 Assigned charge : 0
     Momentum ( -58.1954[GeV/c], 25.6423[GeV/c], -5.16523[GeV/c] )
     kinetic Energy : 31.0612 [GeV]
     Mass : 50 [GeV]
     Polarization ( 0, 0, 0 )
     Weight : 1
<<<< End of link

EDIT: Part of the problem is addressed in #753 , in addition there is an inconsistency of the mass in particle.tbl and what is in the hepmc file.

@andresailer
Copy link
Member

@eleogran Could you please try what happens when you set the mass for 9900012 in the particle.tbl file to 50 GeV?

@eleogran
Copy link
Author

eleogran commented Dec 2, 2020

@andresailer the particle vertex is yet different, but still not correct.
Please find the file here: /afs/cern.ch/work/e/eleogran/public/MCParticleList_issue/evt198_fixedMN.slcio
At the same path the updated particle.tbl

@andresailer
Copy link
Member

Thanks!
The hepmc2 reader does not treat the vertex information correctly.
This works with the HepMC3 reader. I'll try to find an iLCSoft installation with that enabled.
With that reader enabled I get

[00000020]    5|   9900012|-2.84e+01, 1.25e+01,-2.52e+00|-2.84e+01, 1.25e+01,-2.52e+00| 5.89e+01| 22 |[    c   ]| 0.00e+00, 0.00e+00, 0.00e+00|-3.73e+02, 1.64e+02,-3.31e+01| 5.00e+01| 0.00e+00| 0.00e+00, 0.00e+00, 0.00e+00|  (0, 0)   | [4] - [7,8,9] 

@eleogran
Copy link
Author

eleogran commented Dec 3, 2020

Great! Thank you very much @andresailer

@eleogran
Copy link
Author

eleogran commented Dec 7, 2020

Hello,
is there a nightly release already compiled with the HepMC3 flag on?

@andresailer
Copy link
Member

No, not yet. Sorry!

@vvolkl
Copy link
Contributor

vvolkl commented Dec 7, 2020

@eleogran you could try the key4hep nightly build:

source /cvmfs/sw-nightlies.hsf.org/spackages/linux-centos7-broadwell/gcc-8.3.0/key4hep-stack-master-2020-12-07-qca3v5rnrsmeqsrsrb4zkhsi7xattb4k/setup.sh

There dd4hep is already built with HepMC3 ( although I haven't tested the reader myself yet).

@eleogran
Copy link
Author

eleogran commented Dec 7, 2020

@vvolkl it works!
Thank you and @andresailer

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