Struct Acts::TGeoParser

struct TGeoParser

TGeoParser is a helper struct that walks recursively through a TGeometry and selects by string comparison the TGeoNodes that match the criteria.

It also buils up the global transform for the conversion into an ACTS Surface

Public Types

using ParseRange = std::pair<double, double>

Public Static Functions

static void select(State &state, const Options &options, const TGeoMatrix &gmatrix = TGeoIdentity("ID"))

The parsing module, it takes the top Volume and recursively steps down.

Parameters
  • state – [out] The parseing state configuration, passed through

  • options – [in] The parsing options as requiremed

  • gmatrix – The current built-up transform to global at this depth

struct Options

Nested configuration struct.

This contains the parsing configuration

Public Members

std::string localAxes = "XYZ"

The local axis definition of TGeo object wrt Acts::Surface.

std::vector<std::pair<BinningValue, ParseRange>> parseRanges = {}

Parse restrictions, several can apply.

std::vector<std::string> targetNames = {}

Identify the sensor(s)/target(s) by name.

double unit = 1 * UnitConstants::cm

Scaling from TGeo to ROOT.

std::vector<std::string> volumeNames = {}

Identify the vlume by name.

struct SelectedNode

Public Members

const TGeoNode *node = nullptr
std::unique_ptr<TGeoMatrix> transform = nullptr
struct State

Nested state struct.

This is needed for the recursive parsing of the geometry, it collects the information during the parsing process and keeps track of the built up transform

Public Members

TGeoNode *node = nullptr
bool onBranch = false
std::vector<SelectedNode> selectedNodes = {}
TGeoVolume *volume = nullptr