Skip to content

Latest commit

 

History

History
104 lines (77 loc) · 3.18 KB

readme.md

File metadata and controls

104 lines (77 loc) · 3.18 KB

A step-by-step guide to introduce a new detector

The LayerTiles created for your new detector must be templated with the corresponding \*LayerTilesConstants.h.

1. Look at the existing example

All variable listed in the LayerTilesConstants.h must be present and specified:

  • [min, max][X, Y]
  • tileSize[-, Phi]
  • nColumns[-, Phi]
  • nRows
  • maxTileDepth
  • rX, rY, nTiles (formula to be kept)
  • nLayers
  • endcap (bool)

In the case of an endcap layer, the coordinates ( $\textnormal{x}, \textnormal{y}$ ) corresponds to the transverse plane positions and only the variables tileSize and nColumns are used.

In the case of a barrel layer, the coordinates ( $\textnormal{x}, \textnormal{y}$ ) correspond to ( $\textnormal{r} \cdot \phi, \textnormal{z}$ ), respectively. Moreover, only the variables tileSizePhi and nColumnsPhi are used and the nTiles must be defined as:

static constexpr int nTiles = nColumnsPhi * nRows;

For more details regarding the barrel extension, have a look at these slides of Oct 2022.

2. Changes in the templated classes

After having created your new detector layer tiles, for example in MyDetLayerTilesConstants.h, you need to make the CLUE classes aware of this.

Include the new header in LayerTiles.h:

#include "MyDetLayerTilesConstants.h"

and create the layer tiles with the new constants at the end of the file:

namespace clue {

  ...

  using MyDetLayerTile = LayerTiles_T<MyDetLayerTilesConstants>;
  using MyDetTiles = std::array<MyDetLayerTile, MyDetLayerTilesConstants::nLayers>;

} // end clue namespace

...

using MyDetLayerTiles = GenericTile<clue::MyDetTiles>;

Include almost at the end of CLUEAlgo.h the following line:

using MyDetCLUEAlgo = CLUEAlgo_T<MyDetLayerTiles>;

Explicit template instantiation at the end of CLUEAlgo.cc:

template class CLUEAlgo_T<MyDetLayerTiles>;

If you want to test it also on the GPU verison of CLUE, similar changes must be included also in CLUEAlgoGPU.h and LayerTilesGPU.h.

3. Use it!

You can use the templated version of CLUE with the new tiles built on your detector with

    CLUEAlgo_T<MyDetLayerTilesConstants> clueAlgo(dc, rhoc, outlierDeltaFactor, false);

or

    MyDetCLUEAlgo clueAlgo(dc, rhoc, outlierDeltaFactor, false);

Of course, the last step is to recompile the code in the main repository:

cd build/
make