Mu2e / REve

Eve-7 based event display
Apache License 2.0
0 stars 11 forks source link

Clean up use of Geometry Information #172

Open kutschke opened 2 weeks ago

kutschke commented 2 weeks ago

This is the more general issue referred to in issue #171 .

When I last looked at the code that determines the positions of objects, it found geometry information from a variety of sources: from the GDML file, from the raw geometry files, from the GeometryService and from hand coded offsets (and rotations?).

The code needs to be refactored:

  1. to remove all hand coded offsets and rotations
  2. remove parsing the geometry files
  3. Strongly prefer to get information from the GeometryService. If it's not present in the GeometryService it should be added to the GeometryService.

There may remain some rare cases where it is necessary to get information from the GDML file. We should discuss those on case by case basis.

sophiemiddleton commented 2 weeks ago

We cannot use the GeomService because we are mutli-threaded and the event and geom are on separate threads. That is why we use the text file.

A better update would be to encode the offsets somehow in the GDML. There are a few hardcoded offsets, this is mostly for the CRV. These do need to be removed.

kutschke commented 2 weeks ago

We cannot use the GeomService because we are mutli-threaded and the event and geom are on separate threads. That is why we use the text file.

Does any of the code you write run in the second thread (ie the thread that does not contain the geometry service)?

sophiemiddleton commented 2 weeks ago

I do not think it does. The geometry is built once. Things like highlighting a CRV bar are part of the event thread but these are in fact separate objects added/removed on a per event basis. The actual geometry is only build once.