TGeoVolume *top;
TGeoVolume *stations[numStations];
+TGeoVolume* quadrant;
void mvd()
{
TGeoManager *manager = new TGeoManager("Chamber Layout", "Chamber Layout");
TGeoMaterial *mat = new TGeoMaterial("Vacuum", 0.,0.,0.);
TGeoMaterial *matAl = new TGeoMaterial("Al", 26.98,13,2.7);
- //matAl->SetTransparency(0);
TGeoMaterial *matSilicon = new TGeoMaterial("silicon", 0, 0, 0);
TGeoMaterial *matGlue = new TGeoMaterial("glue", 0, 0, 0);
TGeoMaterial *matDiamond = new TGeoMaterial("diamond", 0, 0, 0);
TGeoVolume *sensorActive = manager->MakeBox("sensorActive", Al, sensorDimensionsActive[0]/2, sensorDimensionsActive[1]/2, sensorDimensionsActive[2]/2);
TGeoVolume *sensorPassive = manager->MakeBox("sensorPassive", Al, sensorDimensionsPassive[0]/2, sensorDimensionsPassive[1]/2, sensorDimensionsPassive[2]/2);
+ TGeoVolume *sensorGlue = manager->MakeBox("sensorGlue", glue, sensorDimensionsActive[0]/2, (sensorDimensionsActive[1] + sensorDimensionsPassive[1])/2, glueThickness/2);
sensorActive->SetTransparency(0);
- sensorActive->SetLineColor(20);
+ sensorActive->SetLineColor(24);
sensorPassive->SetTransparency(0);
- sensorPassive->SetLineColor(24);
+ sensorGlue->SetLineColor(34);
+ sensorGlue->SetTransparency(0);
+ sensorPassive->SetLineColor(44);
TGeoTranslation T;
TGeoRotation R;
int heatsinkpartno = 0;
// --- Sensor Assembly
- TGeoVolume *sensor_front = new TGeoVolumeAssembly("sensor_front");
- TGeoVolume *sensor_back = new TGeoVolumeAssembly("sensor_back");
- // Active
+ TGeoVolume *sensor = new TGeoVolumeAssembly("sensor");
+ // Glue
R.SetAngles(0.,0.,0.);
Float_t x_offset = -sensorDimensionsActive[0]/2;
- Float_t y_offset = -sensorDimensionsActive[1]/2;
- Float_t z_offset = sensorDimensionsActive[2]/2 + glueThickness;
+ Float_t y_offset = -(sensorDimensionsActive[1]+sensorDimensionsPassive[1])/2;
+ Float_t z_offset = -glueThickness/2;
T.SetTranslation(x_offset, y_offset, -z_offset);
M = new TGeoCombiTrans(T,R);
- sensor_front->AddNode(sensorActive, 1, M);
- T.SetTranslation(x_offset, y_offset, z_offset);
+ sensor->AddNode(sensorGlue, 1, M);
+ // Active
+ x_offset = -sensorDimensionsActive[0]/2;
+ y_offset = -sensorDimensionsActive[1]/2;
+ z_offset = sensorDimensionsActive[2]/2 + glueThickness;
+ T.SetTranslation(x_offset, y_offset, -z_offset);
M = new TGeoCombiTrans(T,R);
- sensor_back->AddNode(sensorActive, 1, M);
+ sensor->AddNode(sensorActive, 1, M);
// Passive
y_offset = -sensorDimensionsPassive[1]/2 - sensorDimensionsActive[1];
T.SetTranslation(x_offset, y_offset, -z_offset);
M = new TGeoCombiTrans(T,R);
- sensor_front->AddNode(sensorPassive, 1, M);
- T.SetTranslation(x_offset, y_offset, z_offset);
- M = new TGeoCombiTrans(T,R);
- sensor_back->AddNode(sensorPassive, 1, M);
+ sensor->AddNode(sensorPassive, 1, M);
for (int i=0; i<numStations; i++)
{
TGeoVolume *station = new TGeoVolumeAssembly(station_name);
// --- Quadrant Assembly
sprintf(quadrant_name, "quadrant_S%i", i);
- TGeoVolume *quadrant = new TGeoVolumeAssembly(quadrant_name);
+ quadrant = new TGeoVolumeAssembly(quadrant_name);
// --- Heatsink Assembly
sprintf(heatsink_name, "heatsink_S%i", i);
TGeoVolume *heatsink = new TGeoVolumeAssembly(heatsink_name);
// --- Carrier
sprintf(carrier_name, "carrier_S%i", i);
Float_t cd[3] = {carrierDimensions[i][0], carrierDimensions[i][1], carrierDimensions[i][2]};
- TGeoVolume* carrier = manager->MakeBox(carrier_name, Al, cd[0]/2, cd[1]/2, cd[2]/2);
- carrier->SetTransparency(1);
- carrier->SetLineColor(27);
+ TGeoVolume *carrier = manager->MakeBox(carrier_name, Al, cd[0]/2, cd[1]/2, cd[2]/2);
+ carrier->SetTransparency(0);
+ carrier->SetLineColor(13);
T.SetTranslation(-cd[0]/2, -cd[1]/2, 0);
R.SetAngles(0.,0.,0.);
M = new TGeoCombiTrans(T,R);
Float_t width_1 = heatsinkWidth[i]/2 + quadrantBeamOffset[i];
Float_t thickness = (heatsinkThickness-cd[2])/2.;
TGeoVolume* hs_part1 = manager->MakeBox(heatsinkpart_name, Al, width_1/2., height_1/2., thickness/2.);
+ hs_part1->SetTransparency(0);
+ hs_part1->SetLineColor(47);
T.SetTranslation(-width_1/2, -height_1/2-cd[1]+carrierClampOverlap, +(thickness+cd[2])/2*(1.0+explosion/0.2));
M = new TGeoCombiTrans(T,R);
quadrant->AddNode(hs_part1, 1, M);
Float_t height_2 = heatsinkWidth[i] - height_1 - width_1;
Float_t width_2 = heatsinkWidth[i]/2 - cd[0] + carrierClampOverlap + quadrantBeamOffset[i];
TGeoVolume* hs_part2 = manager->MakeBox(heatsinkpart_name, Al, width_2/2, height_2/2, thickness/2);
+ hs_part2->SetTransparency(0);
+ hs_part2->SetLineColor(47);
T.SetTranslation(-width_2/2-cd[0]+carrierClampOverlap, -height_2/2, +(thickness+cd[2])/2);
M = new TGeoCombiTrans(T,R);
quadrant->AddNode(hs_part2, 1, M);
Float_t height = (heatsinkHeight-heatsinkWidth[i])/2;
if (height > 0.1) {
TGeoVolume* hs_part3 = manager->MakeBox(heatsinkpart_name, Al, heatsinkWidth[i]/2, height/2, heatsinkThickness/2);
+ hs_part3->SetTransparency(0);
+ hs_part3->SetLineColor(47);
T.SetTranslation(0, height/2+heatsinkWidth[i]/2, 0);
M = new TGeoCombiTrans(T,R);
heatsink->AddNode(hs_part3, 1, M);
}
// --- Sensors
cout << " # of sensors per quadrant: " << sensorCols[i]*sensorRows[i] << endl;
- int sensor_front_count = 0;
- int sensor_back_count = 0;
+ R.SetAngles(0.,0.,0.);
for (int k=0; k<sensorCols[i]; k++)
{
for (int l=0; l<sensorRows[i]; l++)
Float_t x_offset = -sensorDimensionsActive[0]*k;
Float_t y_offset = - sensorPitch*l;
Float_t z_offset = cd[2]/2;
+ R.SetAngles(0.,0.,0.);
if (l%2 == 0) // front side
z_offset = -z_offset;
+ if (l%2 == 1) // back side
+ {
+ R.SetAngles(0.,180.,180.);
+ x_offset -= sensorDimensionsActive[0];
+ }
T.SetTranslation(x_offset, y_offset, z_offset);
- R.SetAngles(0.,0.,0.);
M = new TGeoCombiTrans(T,R);
- if (l%2 == 0) // front side
- quadrant->AddNode(sensor_front, sensor_front_count++, M);
- else // back side
- quadrant->AddNode(sensor_back, sensor_back_count++, M);
+ quadrant->AddNode(sensor, k*sensorCols[i] + l, M);
}
}
for (int j=0; j<4; j++)