@@ -400,21 +400,33 @@ void FT3Module::addStaveVolume(
400400void FT3Module::addDetectorVolume (
401401 TGeoVolume* motherVolume, std::string volumeName, int color, TGeoMedium* med,
402402 unsigned volume_count, double x_mid, double y_mid, double z_mid,
403- double x_half_length, double y_half_length, double z_half_length)
403+ double x_half_length, double y_half_length, double z_half_length, double rotX )
404404{
405405 TGeoManager* geoManager = gGeoManager ;
406406 TGeoVolume* volume = geoManager->MakeBox (volumeName.c_str (), med, x_half_length,
407407 y_half_length, z_half_length);
408408 volume->SetLineColor (color);
409409 volume->SetFillColorAlpha (color, 0.4 );
410- motherVolume->AddNode (
411- volume,
412- volume_count,
413- new TGeoTranslation ( // midpoint of box to add
414- x_mid,
415- y_mid,
416- z_mid) // TGeoTranslation
417- ); // addNode
410+ if (rotX == 0 .) {
411+ motherVolume->AddNode (
412+ volume,
413+ volume_count,
414+ new TGeoTranslation ( // midpoint of box to add
415+ x_mid,
416+ y_mid,
417+ z_mid) // TGeoTranslation
418+ ); // addNode
419+ } else {
420+ motherVolume->AddNode (
421+ volume,
422+ volume_count,
423+ new TGeoCombiTrans (" " ,
424+ x_mid,
425+ y_mid,
426+ z_mid,
427+ new TGeoRotation (" " , 0 ., rotX, 0 .)) // TGeoCombiTrans
428+ ); // addNode
429+ }
418430}
419431
420432/*
@@ -489,11 +501,12 @@ void FT3Module::addSingleSensorVolume(
489501 TGeoVolume* sensor;
490502 TGeoManager* geoManager = gGeoManager ;
491503 // ACTIVE AREA
504+ // Sensor thickness is along the Y axis; this convention is used in digitisation by barrels and disks
492505 std::string sensor_name = " FT3Sensor_Active_" + std::to_string (direction) + " _" + std::to_string (layerNumber) + " _" + std::to_string (stave_idx) + " _" + std::to_string (volume_count);
493506 addDetectorVolume (
494507 motherVolume, sensor_name, Constants::SiColor, siliconMed,
495508 volume_count, active_x_mid, y_mid, z_mid,
496- Constants::active_width / 2 , Constants::single_sensor_height / 2 , Constants::siliconThickness / 2 );
509+ Constants::active_width / 2 , Constants::siliconThickness / 2 , Constants::single_sensor_height / 2 , 90 . );
497510
498511 // INACTIVE STRIP ON LEFT OR RIGHT
499512 double inactive_x_mid = isLeft ? (active_x_mid - Constants::active_width / 2 - Constants::inactive_width / 2 )
0 commit comments