@@ -226,6 +226,24 @@ void FT3Layer::createSeparationLayer(TGeoVolume* motherVolume, const std::string
226226 motherVolume->AddNode (carbonFiberLayerVol2, 1 , new TGeoTranslation (0 , 0 , 0 + zSeparation));
227227}
228228
229+ void FT3Layer::createReferenceCircles (TGeoVolume* motherVolume, const std::string& name) {
230+
231+ // create reference circles at the inner and outer radius of the layer, for visualization purposes
232+ TGeoTube* innerCircle = new TGeoTube (mInnerRadius - 0.1 , mInnerRadius + 0.1 , 0.01 );
233+ TGeoTube* outerCircle = new TGeoTube (mOuterRadius - 0.1 , mOuterRadius + 0.1 , 0.01 );
234+
235+ TGeoVolume* innerCircleVol = new TGeoVolume ((mLayerName + " _InnerCircle" ).c_str (), innerCircle, gGeoManager ->GetMedium (" FT3_AIR$" ));
236+ TGeoVolume* outerCircleVol = new TGeoVolume ((mLayerName + " _OuterCircle" ).c_str (), outerCircle, gGeoManager ->GetMedium (" FT3_AIR$" ));
237+
238+ innerCircleVol->SetLineColor (kRed );
239+ outerCircleVol->SetLineColor (kBlue );
240+
241+ double z_position = mDirection ? 0.5 : -0.5 ;
242+
243+ motherVolume->AddNode (innerCircleVol, 1 , new TGeoTranslation (0 , 0 , z_position));
244+ motherVolume->AddNode (outerCircleVol, 1 , new TGeoTranslation (0 , 0 , z_position));
245+ }
246+
229247void FT3Layer::createLayer (TGeoVolume* motherVolume)
230248{
231249 auto & ft3Params = FT3BaseParam::Instance ();
@@ -393,16 +411,27 @@ void FT3Layer::createLayer(TGeoVolume* motherVolume)
393411 std::string separationLayerName = " FT3SeparationLayer" + std::to_string (mDirection ) + std::to_string (mLayerNumber );
394412
395413 TGeoMedium* medAir = gGeoManager ->GetMedium (" FT3_AIR$" );
396- TGeoTube* layer = new TGeoTube (mInnerRadius - 0.1 , mOuterRadius + 0.1 , 1.5 ); // Add a little additional room in radius; Try with 1.5 cm thickness
397- TGeoVolume* layerVol = new TGeoVolume (mLayerName .c_str (), layer, medAir);
398- layerVol->SetLineColor (kYellow + 2 );
399-
414+ TGeoVolume* layerVol = nullptr ;
400415 if (ft3Params.layoutFT3 == kSegmented ) {
416+ // Add a little additional room in radius
417+ TGeoTube* layer = new TGeoTube (mInnerRadius - 0.1 , mOuterRadius + 0.1 , 1.5 );
418+ layerVol = new TGeoVolume (mLayerName .c_str (), layer, medAir);
419+ layerVol->SetLineColor (kYellow + 2 );
401420 // createSeparationLayer_waterCooling(motherVolume, separationLayerName);
402421 createSeparationLayer (layerVol, separationLayerName);
403422 module .createModule (0 , mLayerNumber , mDirection , mInnerRadius , mOuterRadius , 0 ., " front" , " rectangular" , layerVol);
404423 module .createModule (0 , mLayerNumber , mDirection , mInnerRadius , mOuterRadius , 0 ., " back" , " rectangular" , layerVol);
405424 } else if (ft3Params.layoutFT3 == kSegmentedStave ) {
425+ // need a thicker air layer to encompass the staves (4.5cm high, 1.2cm offsets)
426+ // stave face is at z=0 (or +-z_offset_stave), meaning that volumes are at
427+ // ~-+1cm < z < ~+-6cm, the +- referring forward/backward discs
428+ TGeoTube* layer = new TGeoTube (mInnerRadius - 0.1 , mOuterRadius + 0.1 , 6 );
429+ layerVol = new TGeoVolume (mLayerName .c_str (), layer, medAir);
430+ if (ft3Params.drawReferenceCircles ) {
431+ std::string referenceCirclesName = " ReferenceCircles_Dir" + std::to_string (mDirection )
432+ + " _Layer" + std::to_string (mLayerNumber );
433+ createReferenceCircles (layerVol, referenceCirclesName); // for visualization purposes
434+ }
406435 module .createModule_staveGeo (0 ., mLayerNumber , mDirection , mInnerRadius ,
407436 mOuterRadius , 0 ., layerVol);
408437 }
0 commit comments