WIP: Add Area accessor for calorimeter parts
This MR is a preparation to alter CaloFutureTrackMatch algorithm from Rec.
A new method Area
is introduced to DeCalorimeter
that returns identifier of calorimeter area (Inner, Middle, Outer) that a 3D point is inside. Currently for this case the Cell_
method is used: first a cell is extracted and then the area is determined from the cell. This relies on the costly IGeometryInfo::isInside
method.
The Area
relies only on IGeometryInfo::toLocal
which AFAIU should take into account alignment, and on the X and Y size stored in the ConDB and accessible by DeSubSubCalorimeter::xSize
and DeSubSubCalorimeter::ySize
. In my profile tests it is ~5-6 times faster compared to calling Cell_
.
It also relies on the order in which SubSubCalorimeter instances are stored in SubCalorimeter - Inner first, Outer last. There is also change in treatment of the beam hole - it is now part of Inner area.
As a byproduct I reduced usage of isInside
in the Cell_
method and there should be slight speedup from first considering the Inner part as I assume more tracks are to be expected closer to the beam - I did not check this assumption very thoroughly though.
There is an additional possible speedup (in my back of the envelope calculations its ~25%) if the X/Y sizes of A and C sides and the whole calorimeter would be available through DeCalorimeter
and DeSubCalorimeter
classes as in the DeSubSubCalorimeter
one. This code is currently commented out and marked as TODO. How would I go about it? Make a MR for lhcb-conddb project with altered relevant structure.xml files??
Needed for Rec!1842 (closed)