Muon code duplicated between LHCb and Rec
I noticed that several muon-related bits of code are now duplicated between LHCb
and Rec
, so far I haven't noticed any actual problems resulting from this, but some bits of the current master
are, I think, very fragile.
The duplications I noticed are:
-
CommonMuonHit.h
exists in bothLHCb
andRec
. At first glance these are identical, so the one inRec
can just be removed -
CommonMuonStation.h
exists in bothLHCb
andRec
. These are not identical (the constructor signatures differ), but they use the same macro as an include guard so will behave unexpectedly if both were included. We may have been saved from really weird behaviour because it looks like the data layout will be the same, even though other aspects of the definition differ. -
MuonHitContainer.h
inLHCb
seems to be the modern version ofMuonHitHandler.h
inRec
. This isn't obviously such a problem, as here there is no name collision, but theRec
one could probably be removed.
Additionally, CommonMuonStation
in LHCb
(Muon/MuonDAQ
) has a .cpp
file that's only built as part of a module, not a library, so it cannot be linked against in other packages (I think this issue was hidden so far because users of this class linked against the copy in Rec
(Muon/MuonID
)).
Hopefully the duplication can just be removed, otherwise we should probably use some kind of namespace versioning to avoid using the same class names in different places with different definitions.