From: Philipp Klaus Date: Fri, 4 Aug 2017 15:50:15 +0000 (+0200) Subject: v0.8 X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=7d91967195e19f67be55266c4cf1feea307d48f2;p=mvd_geometry.git v0.8 --- diff --git a/mvd.C b/mvd.C index 4ecbe25..505f5a0 100644 --- a/mvd.C +++ b/mvd.C @@ -20,6 +20,7 @@ Float_t explosion = .0; // set to 0. for no explosion, and 5. for a heavy explos TGeoVolume *top; TGeoVolume *stations[numStations]; +TGeoVolume* quadrant; void mvd() { @@ -28,7 +29,6 @@ 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); @@ -47,10 +47,13 @@ void mvd() 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; @@ -59,27 +62,27 @@ void mvd() 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; iMakeBox(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); @@ -111,6 +114,8 @@ void mvd() 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); @@ -122,6 +127,8 @@ void mvd() 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); @@ -133,6 +140,8 @@ void mvd() 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); @@ -145,8 +154,7 @@ void mvd() } // --- 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; kAddNode(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++)