Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class FT3Module
void addDetectorVolume(
TGeoVolume* motherVolume, std::string volumeName, int color, TGeoMedium* med,
unsigned volume_count, double x_mid, double y_mid, double z_mid,
double x_half_length, double y_half_length, double z_half_length);
double x_half_length, double y_half_length, double z_half_length, double rotX = 0);

void add2x1GlueVolume(
TGeoVolume* motherVolume, int layerNumber, int direction, unsigned stave_idx,
Expand Down
33 changes: 23 additions & 10 deletions Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Module.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -374,21 +374,33 @@ void FT3Module::addStaveVolume(
void FT3Module::addDetectorVolume(
TGeoVolume* motherVolume, std::string volumeName, int color, TGeoMedium* med,
unsigned volume_count, double x_mid, double y_mid, double z_mid,
double x_half_length, double y_half_length, double z_half_length)
double x_half_length, double y_half_length, double z_half_length, double rotX)
{
TGeoManager* geoManager = gGeoManager;
TGeoVolume* volume = geoManager->MakeBox(volumeName.c_str(), med, x_half_length,
y_half_length, z_half_length);
volume->SetLineColor(color);
volume->SetFillColorAlpha(color, 0.4);
motherVolume->AddNode(
volume,
volume_count,
new TGeoTranslation( // midpoint of box to add
x_mid,
y_mid,
z_mid) // TGeoTranslation
); // addNode
if (rotX == 0.) {
motherVolume->AddNode(
volume,
volume_count,
new TGeoTranslation( // midpoint of box to add
x_mid,
y_mid,
z_mid) // TGeoTranslation
); // addNode
} else {
motherVolume->AddNode(
volume,
volume_count,
new TGeoCombiTrans("",
x_mid,
y_mid,
z_mid,
new TGeoRotation("", 0., rotX, 0.)) // TGeoCombiTrans
); // addNode
}
}

/*
Expand Down Expand Up @@ -463,11 +475,12 @@ void FT3Module::addSingleSensorVolume(
TGeoVolume* sensor;
TGeoManager* geoManager = gGeoManager;
// ACTIVE AREA
// Sensor thickness is along the Y axis; this convention is used in digitisation by barrels and disks
std::string sensor_name = "FT3Sensor_Active_" + std::to_string(direction) + "_" + std::to_string(layerNumber) + "_" + std::to_string(stave_idx) + "_" + std::to_string(volume_count);
addDetectorVolume(
motherVolume, sensor_name, Constants::SiColor, siliconMed,
volume_count, active_x_mid, y_mid, z_mid,
Constants::active_width / 2, Constants::single_sensor_height / 2, Constants::siliconThickness / 2);
Constants::active_width / 2, Constants::siliconThickness / 2, Constants::single_sensor_height / 2, 90.);

// INACTIVE STRIP ON LEFT OR RIGHT
double inactive_x_mid = isLeft ? (active_x_mid - Constants::active_width / 2 - Constants::inactive_width / 2)
Expand Down
Loading