HEP-FCC / FCCSW

FCC software, common to FCC-hh, -ee, and -eh.
https://cern.ch/fccsw
33 stars 111 forks source link

genParticle vertex coordinates always zero even for particles which should have some displacement #405

Open donalhill opened 3 years ago

donalhill commented 3 years ago

I have run a test where I filter genParticles to keep only D0 mesons according to genParticles.core.pdgId. I have plotted the genParticles.core.vertex.{x,y,z} values, and find them to be zero in all cases. Some of the D0's in my sample should be produced in the decays of B-hadrons, in other words produced at displaced vertices. Thus, there should be some distribution of the true vertex.{x,y,z} values.

The test is here:

https://github.com/donalrinho/fcc_python_tools/blob/master/examples/genParticles_vertex_test.ipynb

vvolkl commented 3 years ago

This is most likely just due to a flaw in the design of the data model - see https://github.com/HEP-FCC/fcc-edm/issues/60 the vertex positions are most likely actually set in genVertices/genVertices.position.{x,y,z} -- could you check that?

(Since we are moving to the new event data model edm4hep as part of key4hep and backward compatibility is tricky, we won't fix that, even though it definitely confusing.)

donalhill commented 3 years ago

Hi @vvolkl

Thanks for the input! The values in genVertices.position{x,y,z} are indeed non-zero. I haven't figured out how to apply a cut to genVertices using genParticles.core.pdgId, as they come from different arrays (the number of genParticles and genVertices isn't the same). But if edm4hep will have all of this info in one container, then it's not something to worry about.

donalhill commented 3 years ago

How can I get the genVertex for a given genParticle? Is there an index perhaps that I can use? I am able to pair up the genParticles and genVertices, and then keep only the pairs with a D0 pdgId. But this leaves me with D0's paired with all of the vertices, rather than just their own vertices.