{ int sp_medium = 33; int ap_medium = 19; int plb_medium = 2; int plb_n_box = 32 ; int plb_nsec = 6 ; float splb_dphi = 5.625; float plb_rt = 111.4 ; float plb_x = 4.05 ; float plb_y = 3.25 ; float plb_len = 150.0 ; float plb_rt = 113.2 ; float plb_z0 = -28.8 ; float splb_x = 4.58 ; float splb_y = 20.35 ; float splb_len = 150.6040 ; float splb_z0 = -28.8 ; float aplb_x = 4.48 ; float aplb_y = 20.15 ; float aplb_len = 150.6040 ; float d_phi; float d_phid; float plb_rot[6]; float rti_pos; float phi; float sp_dim[3] = { splb_x/2 , splb_y/2 , splb_len/2 }; float ap_dim[3] = { aplb_x/2 , aplb_y/2 , aplb_len/2 }; float pl_dim[3] = { plb_x/2 , plb_y/2 , plb_len }; float step_cel = aplb_y/plb_nsec ; float pos_fir_cel = 0.5*(step_cel-aplb_y); float plch_dim[3] = { 109. , 118. , 167. }; float plch_pos[3] = { 0.0 , 0.0 , 41.0 }; d_phi = 360./plb_n_box; d_phid = d_phi ; d_phi = 3.14/180*d_phi; for(int j=0;j360) plb_rot[1] = plb_rot[1] - 360. ; plb_rot[2] = 90. ; plb_rot[3] = plb_rot[1]+90. ; if(plb_rot[3]>360) plb_rot[3] = plb_rot[3] - 360. ; plb_rot[4] = 0.; plb_rot[5] = 0.; phi = plb_rot[1]*3.14/180; rti_pos = plb_rt - 0.5 * (splb_x - aplb_x ) ; float sp_pos[3] = { rti_pos*cos(phi) , rti_pos*sin(phi) , splb_z0 - plch_pos[2] }; float ap_pos[3] = { (0.5*(splb_x-aplb_x)) , 0. , 0.}; // Iron Box TGeoVolume *SP = gGeoManager -> MakeBox("SP",medium[sp_medium-1],sp_dim[0],sp_dim[1],sp_dim[2]); gGeoManager->SetVolumeAttribute("SP","seen",1); gGeoManager->SetVolumeAttribute("SP","colo",15); TGeoVolume *AP = gGeoManager -> MakeBox("AP",medium[ap_medium-1],ap_dim[0],ap_dim[1],ap_dim[2]); gGeoManager->SetVolumeAttribute("AP","seen",1); gGeoManager->SetVolumeAttribute("AP","colo",15); SP->AddNode(AP,j,new TGeoTranslation(ap_pos[0],ap_pos[1],ap_pos[2])); for(int i=0;i MakeBox("PLB",medium[plb_medium-1],pl_dim[0],pl_dim[1],pl_dim[2]); gGeoManager->SetVolumeAttribute("PLB","seen",1); gGeoManager->SetVolumeAttribute("PLB","colo",15); AP->AddNode(PLB,j+10*i,new TGeoTranslation(plb_pos[0],plb_pos[1],plb_pos[2])); } PLCH->AddNode(SP,j,new TGeoCombiTrans(sp_pos[0],sp_pos[1],sp_pos[2],new TGeoRotation("rot1",plb_rot[0],plb_rot[1],plb_rot[2],plb_rot[3],plb_rot[4],plb_rot[5]))); } } }