iLCSoft / CEDViewer

Marlin processor for the CED event display
GNU General Public License v3.0
2 stars 9 forks source link

MCParticles created in the simulation are not drawn by DDCEDViewer #26

Closed Zehvogel closed 2 weeks ago

Zehvogel commented 1 month ago

They have generator status 0. The culprit:

https://github.com/iLCSoft/CEDViewer/blob/eec6d2391ca5bd735e402eb17de192863f959d62/src/DDCEDViewer.cc#L646-L653

Results in not being able to figure out what all the particles are in events like this (single muon having an interaction in the tracker):

image

The obvious workaround is to run with usingParticleGun set to true, but I think we should handle this better. In particular this workaround is not optimal in "real" events.

Maybe changing the comparison from != to > is good enough, maybe we do want a flag for this? The usingParticleGun flag should be obsolete anyway as ddsim also sets the generator status to 1 for gun particles.

I can open a PR for these changes if no one complains already now :)

gaede commented 1 month ago

Not sure, one always wants to draw all particles created in simulation. How about introducing a flag _drawMCParticlesCreatedInSimulation ?

Zehvogel commented 1 month ago

Yes I will also add a flag, otherwise this can result in pure chaos when not adjusting the minimum energy cut accordingly

image