@@ -374,21 +374,34 @@ void FT3Module::addStaveVolume(
374374void FT3Module::addDetectorVolume (
375375 TGeoVolume* motherVolume, std::string volumeName, int color, TGeoMedium* med,
376376 unsigned volume_count, double x_mid, double y_mid, double z_mid,
377- double x_half_length, double y_half_length, double z_half_length)
377+ double x_half_length, double y_half_length, double z_half_length, double rotX )
378378{
379379 TGeoManager* geoManager = gGeoManager ;
380380 TGeoVolume* volume = geoManager->MakeBox (volumeName.c_str (), med, x_half_length,
381381 y_half_length, z_half_length);
382382 volume->SetLineColor (color);
383383 volume->SetFillColorAlpha (color, 0.4 );
384- motherVolume->AddNode (
385- volume,
386- volume_count,
387- new TGeoTranslation ( // midpoint of box to add
388- x_mid,
389- y_mid,
390- z_mid) // TGeoTranslation
391- ); // addNode
384+ if (rotX == 0 .) {
385+ motherVolume->AddNode (
386+ volume,
387+ volume_count,
388+ new TGeoTranslation ( // midpoint of box to add
389+ x_mid,
390+ y_mid,
391+ z_mid) // TGeoTranslation
392+ ); // addNode
393+ }
394+ else {
395+ motherVolume->AddNode (
396+ volume,
397+ volume_count,
398+ new TGeoCombiTrans (" " ,
399+ x_mid,
400+ y_mid,
401+ z_mid,
402+ new TGeoRotation (" " , 0 ., rotX, 0 .)) // TGeoCombinTrans
403+ ); // addNode
404+ }
392405}
393406
394407/*
@@ -463,11 +476,12 @@ void FT3Module::addSingleSensorVolume(
463476 TGeoVolume* sensor;
464477 TGeoManager* geoManager = gGeoManager ;
465478 // ACTIVE AREA
479+ // Sensor thickness is along the Y axis; this convention is used in digitisation by barrels and disks
466480 std::string sensor_name = " FT3Sensor_Active_" + std::to_string (direction) + " _" + std::to_string (layerNumber) + " _" + std::to_string (stave_idx) + " _" + std::to_string (volume_count);
467481 addDetectorVolume (
468482 motherVolume, sensor_name, Constants::SiColor, siliconMed,
469483 volume_count, active_x_mid, y_mid, z_mid,
470- Constants::active_width / 2 , Constants::single_sensor_height / 2 , Constants::siliconThickness / 2 );
484+ Constants::active_width / 2 , Constants::siliconThickness / 2 , Constants::single_sensor_height / 2 , 90 . );
471485
472486 // INACTIVE STRIP ON LEFT OR RIGHT
473487 double inactive_x_mid = isLeft ? (active_x_mid - Constants::active_width / 2 - Constants::inactive_width / 2 )
0 commit comments