Skip to content
Snippets Groups Projects

WIP: Add Area accessor for calorimeter parts

Merged Konrad Klimaszewski requested to merge conrad_calo_area_speedup into master

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)

Edited by Rosen Matev

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • mentioned in merge request Rec!1842 (closed)

  • Correct me if I am misunderstanding something, the size of the Calorimeter is redundant information in the database if the positions and sizes of the sub parts are known. If yes, could you calculate the size on the fly when creating or updating DeCalorimeter due to a conditions change, and then cache it?

    Edited by Sascha Stahl
  • Sascha Stahl changed the description

    changed the description

  • added 98 commits

    Compare with previous version

  • The DeCalorimeter and DeSubCalorimeter dimensions are now calculated from the Outer DeSubSubCalorimeter. The DeCalorimeter::Area and DeCalorimeter::Cell use this info to finish early the iteration over SubSubCalorimeters.

    The DeCalorimeter::Area returns a std::optional.

    Edited by Konrad Klimaszewski
  • Konrad Klimaszewski unmarked as a Work In Progress

    unmarked as a Work In Progress

  • Hi @conrad, I notice you un-wip-ed this, but I guess we should wait for Rec!1842 (closed) and test them together?

  • This MR will work without Rec!1842 (closed), as it does not break the current interface. So we can do what's more convenient, merge this now and then cope with Rec!1842 (closed) or test them together.

  • Cool. I guess its better to spot problems early. I will start a ci-test.

  • mentioned in issue Moore#141 (closed)

  • Rosen Matev marked as a Work In Progress

    marked as a Work In Progress

  • assigned to @conrad

  • A small update.

    Changing the order in which subSubCalos are stored (!2267 (diffs)) resulted in all MCCaloDigits having different energies.

    I was looking into Boole/Calo/CaloDigit/src/CaloSignalAlg.cpp where AFAIU MCCaloDigits are created but so far everything is the same there.

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading