{ int cavb_medium = 6; // introduce shift to account for target position float taroff = -65.; float shift = -taroff-36.; float dim_ttub[3] = { 118.0 , 210.0 , 240.0 }; float pos_ttub[3] = { 0.0 , 0.0 , 41.0+shift}; float dim_ctub[3] = { 0.0 , 109.0 , 205.0 }; float pos_ctub[3] = { 0.0 , 0.0 , 0.0+shift }; float dim_plch[3] = { 109. , 118. , 167.0 }; float pos_plch[3] = { 0.0 , 0.0 , 41.0+shift }; float dim_mtub[3] = { 55.7 , 84.85 , 79.4 }; float pos_mtub[3] = { 0.0 , 0.0 , 17.0+shift }; float dim_pbox[3] = { 200.0 , 200.0 , 90.0}; float pos_pbox[3] = { 0.0 , 0.0 , 351.0+shift}; float dim_zbox[3] = { 70.0 , 70.0 , 40.0}; float pos_zbox[3] = { 0.0 , 0.0 , 481.0+shift}; float null_rot[6] = { 90.0 , 0.0 , 90.0 , 90.0 , 0.0 , 0.0 }; float dim_stub[3] = { 0.0 , 15.0 , 20.0}; float pos_stub[3] = { 0.0 , 0.0 , -43.0+shift}; float dim_tptub[3] = { 0.0 , 20.0 , 100.0}; float pos_tptub[3] = { 0.0 , 0.0 , -23.0+shift}; float dim_tptub[3] = {5., 15.5, 73.}; float pos_tptub[3] = {0.0, 0.0, 0.0}; TGeoVolume *CAVB = gGeoManager->MakeBox("CAVB",medium[15], 500., 500., 500.); gGeoManager->SetVolumeAttribute("CAVB","seen",0); TGeoVolume *TTUB = gGeoManager->MakeBox("TTUB",medium[cavb_medium-1],dim_ttub[0],dim_ttub[1],dim_ttub[2]); TTUB->SetActivity(false); TTUB->SetTransparency(true); TTUB->SetVisibility(false); // gGeoManager->SetVolumeAttribute("TTTUB","colo",3); TGeoVolume *CTUB = gGeoManager->MakeTube("CTUB",medium[cavb_medium-1],dim_ctub[0],dim_ctub[1],dim_ctub[2]); gGeoManager->SetVolumeAttribute("CTUB","seen",0); gGeoManager->SetVolumeAttribute("CTUB","colo",3); TGeoVolume *PLCH = gGeoManager->MakeTube("PLCH",medium[cavb_medium-1],dim_plch[0],dim_plch[1],dim_plch[2]); gGeoManager->SetVolumeAttribute("PLCH","seen",0); gGeoManager->SetVolumeAttribute("PLCH","colo",3); TGeoVolume *MTUB = gGeoManager->MakeTube("MTUB",medium[cavb_medium-1],dim_mtub[0],dim_mtub[1],dim_mtub[2]); gGeoManager->SetVolumeAttribute("MTUB","seen",0); gGeoManager->SetVolumeAttribute("MTUB","colo",3); TGeoVolume *PBOX = gGeoManager->MakeBox("PBOX",medium[cavb_medium-1],dim_pbox[0],dim_pbox[1],dim_pbox[2]); gGeoManager->SetVolumeAttribute("PBOX","seen",0); gGeoManager->SetVolumeAttribute("PBOX","colo",3); TGeoVolume *ZBOX = gGeoManager->MakeBox("ZBOX",medium[cavb_medium-1],dim_zbox[0],dim_zbox[1],dim_zbox[2]); gGeoManager->SetVolumeAttribute("ZBOX","seen",0); gGeoManager->SetVolumeAttribute("ZBOX","colo",3); TGeoVolume *STUB = gGeoManager->MakeTube("STUB",medium[cavb_medium-1],dim_stub[0],dim_stub[1],dim_stub[2]); gGeoManager->SetVolumeAttribute("STUB","seen",0); gGeoManager->SetVolumeAttribute("STUB","colo",3); TGeoVolume *TPTUB = gGeoManager->MakeTube("TPTUB",medium[cavb_medium-1],dim_tptub[0],dim_tptub[1], dim_tptub[2]); CAVB->AddNodeOverlap(TTUB,1,new TGeoTranslation("TTUB",pos_ttub[0],pos_ttub[1],pos_ttub[2])); //CAVB->AddNodeOverlap(CTUB,1,new TGeoTranslation("CTUB",pos_ctub[0],pos_ctub[1],pos_ctub[2])); CAVB->AddNodeOverlap(PLCH,1,new TGeoTranslation("PLCH",pos_plch[0],pos_plch[1],pos_plch[2])); CAVB->AddNodeOverlap(MTUB,1,new TGeoTranslation("MTUB",pos_mtub[0],pos_mtub[1],pos_mtub[2])); CAVB->AddNodeOverlap(PBOX,1,new TGeoTranslation("PBOX",pos_pbox[0],pos_pbox[1],pos_pbox[2])); CAVB->AddNodeOverlap(ZBOX,1,new TGeoTranslation("ZBOX",pos_zbox[0],pos_zbox[1],pos_zbox[2])); CAVB->AddNodeOverlap(STUB,1,new TGeoTranslation("STUB",pos_stub[0],pos_stub[1],pos_stub[2])); CAVB->AddNodeOverlap(TPTUB,1,new TGeoTranslation("TPTUB",pos_tptub[0],pos_tptub[1],pos_tptub[2])); }