Hi Pietro,
Got the code and am able to run it (welcome to the world of git). You really shouldn’t be imposing ontological structure onto Eve representation of beams and particles … Eve is a drawing toolkit … so just decide what you want to show and and have it once in the hierarchy of the Event scene. Maybe like this:
- Beam
1.1 b1
1.2 b2
- Products
2.1 p1
2.2 …
Or just have a flat list of all the tracks. You also don’t need all those ProcessEvent calls everywhere … if you do need it, it would be in an animation loop (and even there one would be better of using TTimer which will allow the rest of ROOT event loop to run). Maybe what you really need is gEve->Redraw3D() – which will setup a timer to do redraw of all eve scenes once the control is passed back to the root event loop.
[ If you go looking into real collision simulation, or hard process simulation, or event generation (what happens “in the interaction point”, before outgoing particles enter the detector) – you will see that on that level proper (multi-)parent - daughter relationship is maintained … but it’s because all the intermediate products are also there and the theory used there always imposes such a structure through either theoretical or computational concepts that somehow boil down to 3-point and 4-point functions. Pythia is one of the most widely-use packages for this, if you want to google it. ]
You probably know of the TEveCalo3D (see calorimeters.C tutorial).
Now, I think you’ve done a lot in the direction your proto-supervisor asked you to do … maybe even went a bit too far He might not be aware of EVE and was thinking you will implement everything using the “traditional” root graphics. Maybe you can add an “Event Control” tab to the bottom right, where “Command” tab is now and put a “next event” button there and maybe some gui to control energy / theta spread.
He’s asking you to animate unfolding of the 3D detector barrel cylinder into a plane. So he wants you to think about a smooth coordinate transform between the 3D and 2D space. Interesting If you want to draw this in Eve, you could start by just drawing a bunch of lines (or use TEveStraightLineSet) or, if you are adventurous, develop your own Eve element – but this likely an overkill.
Now, don’t invest too much time into TEve and its details, it’s almost 15 years old and we are working on the next-generation web-gui based REve … along with all of ROOT GUI transitioning to web / javascript. This is probably true for any HEP computing technology – those of us who choose this path sooner or later stop doing physics (not saying this is good or bad in itself). You have been warned
After all this, and now that I have your code, what do you want me to look into? Just one or two things, please
Cheers,
Matevz