30 if (!sts_setup->
IsInit()) {
31 sts_setup->
Init(
nullptr);
34 if (sts_setup ==
nullptr) {
35 LOG(warning) <<
"Something is wrong with the setup ...";
42 for (
unsigned short unit_idx = 0; unit_idx <
nb_sts_station_; unit_idx++) {
52 for (
unsigned short module_idx = 0; module_idx < sts_setup->
GetNofModules(); module_idx++) {
59 TGeoPhysicalNode* sensor_node = sts_sensor->
GetPnode();
60 TGeoVolume* sensor_volume = sensor_node->GetVolume();
61 TGeoBBox* sensor_shape = (TGeoBBox*) sensor_volume->GetShape();
62 TGeoMatrix* sensor_matrix = sensor_node->GetMatrix();
65 const double* trans = sensor_matrix->GetTranslation();
67 fStsGeoInfo[address][0] = trans[0] - sensor_shape->GetDX();
68 fStsGeoInfo[address][1] = trans[0] + sensor_shape->GetDX();
69 fStsGeoInfo[address][2] = trans[1] - sensor_shape->GetDY();
70 fStsGeoInfo[address][3] = trans[1] + sensor_shape->GetDY();
71 fStsGeoInfo[address][4] = trans[2] - sensor_shape->GetDZ();
72 fStsGeoInfo[address][5] = trans[2] + sensor_shape->GetDZ();
75 switch (2 * (
int) sensor_shape->GetDY()) {
81 LOG(warning) << Form(
"Unknown sensor shape 0x%x: [%0.3f , %0.3f , %0.3f]", address, sensor_shape->GetDX(),
82 sensor_shape->GetDY(), sensor_shape->GetDZ());
88 LOG(debug) <<
"Loaded setup information:\n";
90 LOG(debug) << Form(
"0x%x: [%+0.3f, %+0.3f] ^ [%+0.3f, %+0.3f] ^ [%+0.3f, %+0.3f]", address, geo[0], geo[1], geo[2],
91 geo[3], geo[4], geo[5]);