{ float cell_thickness = 0.005 ; float target_dim[3] = { 0.0, 1.5, 2.0 }; float targetcellfront_dim[6] = { (pow(target_dim[2]/4,2)+pow(target_dim[1],2))/(target_dim[2]/2) , (pow((target_dim[2]+cell_thickness)/4,2)+pow((target_dim[1]+cell_thickness),2))/((target_dim[2]+cell_thickness)/2) , 0. , 180/3.14*asin(target_dim[1]/(pow(target_dim[2]/4,2)+pow(target_dim[1],2))/(2*target_dim[2]/4)) , 0. , 360. }; float targetcellback_dim[6] = { (pow(target_dim[2]/4,2)+pow(target_dim[1],2))/(target_dim[2]/2) , (pow((target_dim[2]+cell_thickness)/4,2)+pow((target_dim[1]+cell_thickness),2))/((target_dim[2]+cell_thickness)/2) , 180-180/3.14*asin(target_dim[1]/(pow(target_dim[2]/4,2)+pow(target_dim[1],2))/(2*target_dim[2]/4)) , 180. , 0. , 360. }; float targetcellfront_pos[3]= { 0. , 0. , -((-pow(target_dim[2]/4,2)+pow(target_dim[1],2))/(2*target_dim[2]/4)-target_dim[2]/4) }; float targetcellback_pos[3] = { 0. , 0. , ((-pow(target_dim[2]/4,2)+pow(target_dim[1],2))/(2*target_dim[2]/4)-target_dim[2]/4) }; int medium_targetcell = 36; TGeoVolume *Tarc = gGeoManager -> MakeTube("tarc",medium[medium_targetcell-1],target_dim[1],target_dim[1]+cell_thickness,target_dim[2]/4); TGeoVolume *Tarcf = gGeoManager -> MakeSphere("tarcf" , medium[medium_targetcell-1] , targetcellfront_dim[0] , targetcellfront_dim[1] , targetcellfront_dim[2] , targetcellfront_dim[3] , targetcellfront_dim[4] , targetcellfront_dim[5] ); TGeoVolume *Tarcb = gGeoManager -> MakeSphere("tarcb" , medium[medium_targetcell-1] , targetcellback_dim[0] , targetcellback_dim[1] , targetcellback_dim[2] , targetcellback_dim[3] , targetcellback_dim[4] , targetcellback_dim[5] ); float targetfront_dim[6] = { (pow(target_dim[2]/4,2)+pow(target_dim[1],2))/(target_dim[2]/2)-target_dim[2]/2. , (pow(target_dim[2]/4,2)+pow(target_dim[1],2))/(target_dim[2]/2) , 0. , 180/3.14*asin(target_dim[1]/(pow(target_dim[2]/4,2)+pow(target_dim[1],2))/(2*target_dim[2]/4)) , 0. , 360. }; float targetback_dim[6] = { (pow(target_dim[2]/4,2)+pow(target_dim[1],2))/(target_dim[2]/2)-target_dim[2]/2. , (pow(target_dim[2]/4,2)+pow(target_dim[1],2))/(target_dim[2]/2) , 180-180/3.14*asin(target_dim[1]/(pow(target_dim[2]/4,2)+pow(target_dim[1],2))/(2*target_dim[2]/4)) , 180. , 0. , 360. }; float targetfront_pos[3]= { 0. , 0. , -((-pow(target_dim[2]/4,2)+pow(target_dim[1],2))/(2*target_dim[2]/4)-target_dim[2]/4) }; float targetback_pos[3] = { 0. , 0. , ((-pow(target_dim[2]/4,2)+pow(target_dim[1],2))/(2*target_dim[2]/4)-target_dim[2]/4) }; int medium_target = 36; TGeoVolume *Tar = gGeoManager -> MakeTube("tar",medium[medium_target-1],0.,target_dim[1],target_dim[2]/4); TGeoVolume *Tarf = gGeoManager -> MakeSphere("tarf" , medium[medium_target-1] , targetfront_dim[0] , targetfront_dim[1] , targetfront_dim[2] , targetfront_dim[3] , targetfront_dim[4] , targetfront_dim[5] ); TGeoVolume *Tarb = gGeoManager -> MakeSphere("tarb" , medium[medium_target-1] , targetback_dim[0] , targetback_dim[1] , targetback_dim[2] , targetback_dim[3] , targetback_dim[4] , targetback_dim[5] ); STUB->AddNode(Tarc,1.,new TGeoTranslation( 0. , 0. , 0. )); STUB->AddNode(Tarcf,1.,new TGeoTranslation( targetcellfront_pos[0] , targetcellfront_pos[1] , targetcellfront_pos[2] )); STUB->AddNode(Tarcb,1.,new TGeoTranslation( targetcellback_pos[0] , targetcellback_pos[1] , targetcellback_pos[2] )); STUB->AddNode(Tar,1.,new TGeoTranslation( 0. , 0. , 0. )); STUB->AddNode(Tarf,1.,new TGeoTranslation( targetfront_pos[0] , targetfront_pos[1] , targetfront_pos[2] )); STUB->AddNode(Tarb,1.,new TGeoTranslation( targetback_pos[0] , targetback_pos[1] , targetback_pos[2] )); }