Builder class for bars PSD.
This class builds the bars PSD and provides some utility methods. It handles both the construction of top and side detectors. It implements quirks to deal with some historical differences for the conventions on side and top:
- the elements of the vector returned by NormalPositions are in reverse order for the side PSD, i.e. element 0 is the position of the plane nearest to the calorimeter, while for top is the opposite
- the copy number of the layers is always increasing going from external to internal layers, but while on top the copy number is unique for each layer (e.g. with 4 layers there will be layers segmented along X with copy numbers 0 and 1 and layers segmented along Y with copy numbers 2 and 3 ) on sides it is unique only among layers with the same orientation (e.g. there will be layers segmented along the horizontal with copy numbers 0 and 1 and layers segmented along the vertical with copy numbers 0 and 1).
The code implements the conventions for the sides, and quirks for top are placed where needed.