acts-project / acts-project/acts

Expand TrackingGeometry building from DD4hep with user given input

Abierto
#2,403 1 comentario 0 reacciones 0 asignados Ver en GitHub
Stale
Lenguaje dominante
C++
Estrellas
131
Forks
276
Merge medio
3 d 13 h
PR fusionados (30 d)
112

Descripción

In a discussion with ePIC there was the request of customising the `DD4hep` based building of the Tracking geometry, in a test version, e.g. with a calorimeter description made from layers.

This could be done as follows:

1. Create a n-layer Calorimeter description

Use the `Acts::PassiveLayerBuilder` to define representing layers for the calorimeter by giving appropriate dimensions to the config.

```c++
public:
/// @struct Config
/// Configuration struct for the passive layer builder
/// This nested struct is used to configure the layer building
struct Config {
/// string based identification
std::string layerIdentification;

std::vector centralLayerRadii; ///< central layer specs
std::vector centralLayerHalflengthZ; ///< central layer specs
std::vector centralLayerThickness; ///< central layer specs
std::vector>
centralLayerMaterial; ///< central layer specs

// the layers at p/e side
std::vector posnegLayerPositionZ; ///< p/n layer specs
std::vector posnegLayerRmin; ///< p/n layer specs
std::vector posnegLayerRmax; ///< p/n layer specs
std::vector posnegLayerThickness; ///< p/n layer specs
std::vector>
posnegLayerMaterial; ///< p/n layer specs
};
```

- [ ] Provide this `Acts::PassiveLayerBuilder` to a `Acts::CylinderVolumeBuilder` which should generate the layers described and build a volume triple.

- [ ] In a first test, a simple `Acts::TrackingGeometry` can be built out of this, and visualised.

2. Change the DD4hep building process to allow for a custom wrapping builder

This can be done, e.g. by adding a `defaulted=nullptr` element to the

```c++
std::unique_ptr convertDD4hepDetector(
dd4hep::DetElement worldDetElement, const Logger& logger,
BinningType bTypePhi = equidistant, BinningType bTypeR = equidistant,
BinningType bTypeZ = equidistant, double layerEnvelopeR = UnitConstants::mm,
double layerEnvelopeZ = UnitConstants::mm,
double defaultLayerThickness = UnitConstants::fm,
const std::function& detectors)>&
sortSubDetectors = sortDetElementsByID,
const GeometryContext& gctx = GeometryContext(),
std::shared_ptr matDecorator = nullptr,
std::shared_ptr geometryIdentifierHook =
std::make_shared(),
\\\ newly added
std::shared_ptr wrappingBuilder = nullptr
);
```

and amend this builder to the collected ones from `DD4hep`, e.g. in
`ConvertDD4hepDetector.cpp`:L124

```c++
// If a wrapping builder exists, add it
if (wrappingBuilder != nullptr){
volumeBuilders.push_back(wrappingBuilder);
}

// Finally add the beam pipe
if (beamPipeVolumeBuilder) {
volumeBuilders.push_back(beamPipeVolumeBuilder);
}
```

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.