{ gSystem->Load("libGeom"); /* c1 = new TCanvas("c1","3D Viewer",100,500,1200,600); */ /* c1->SetFillColor(0); */ /* c1->cd(); */ const float ColLength50L = 32.; // cm. const float IndLength50L = 32.; // cm. const float DriftLength50L = 47.; // cm. // 50L placed in WANF beam. Angles respect NOMAD const float Theta50L = -.532; // rad. = 30.48 deg. const float Phi50L = .024; // rad. = 1.375 deg. // const float Coor50L[3] = {3.,-51.,-418.}; // cm. // This values come from FPP fortran file NomadTo50LTPC.f // and are respect to NOMAD RS. const float Coor50L[3] = {2.08,-31.69,-418.}; // cm. //--- Definition of a simple geometry TGeoManager *geom = new TGeoManager("50L Geometry", "Simple geometry"); // define the vacuum material TGeoMaterial *matVacuum = new TGeoMaterial("Vacuum", 0,0,0); TGeoMedium *Vacuum = new TGeoMedium("Vacuum",1, matVacuum); // Shapes dimensions (half lengths) in cm. float TopDim[3] = {1000.,210.,210.}; float NomadRoomDim[3] = { 500., 205., 205.}; float NomadCalDim[3] = {50.,180., 180.}; float NomadDriftDim[3] = {250.,180., 180.}; float the50LChamberDim[3] = {ColLength50L/2.,IndLength50L/2.,DriftLength50L/2.}; float Cryo50LDim[3] = {25.,30.,40.}; // Shapes definitions TGeoVolume *top = geom->MakeBox("TOP", Vacuum, TopDim[0],TopDim[1],TopDim[2]); TGeoVolume *NomadRoom = geom->MakeBox("NomadRoom", Vacuum,NomadRoomDim[0],NomadRoomDim[1],NomadRoomDim[2]); TGeoVolume *NomadCal = geom->MakeBox("NomadCal", Vacuum,NomadCalDim[0],NomadCalDim[1],NomadCalDim[2]); TGeoVolume *NomadDrift = geom->MakeBox("Nomad", Vacuum,NomadDriftDim[0],NomadDriftDim[1],NomadDriftDim[2]); TGeoVolume *Cryo50L = geom->MakeTube("Cryo50L",Vacuum,Cryo50LDim[0],Cryo50LDim[1],Cryo50LDim[2]); TGeoVolume *the50Lchamber = geom->MakeBox("the50LChamber",Vacuum,the50LChamberDim[0],the50LChamberDim[1],the50LChamberDim[2]); NomadRoom->SetLineColor(kBlue); NomadCal->SetLineColor(kBlack); NomadDrift->SetLineColor(kRed); Cryo50L->SetLineColor(kCyan); the50Lchamber->SetLineColor(kGreen); // Traslations and rotations TGeoRotation *identity = new TGeoRotation("identity", 0., 0., 0.); // Repect to Nomad SR the first Cal was placed at -279 cm. in Z axis. // and the 50L chamber at -418 cm. const double CalZPos = -279.; // cm. // Position of NOMAD RS respect to top TGeoTranslation *trasNomad = new TGeoTranslation("trasNomad",200.,0,0); // Position of the Nomamd iron TGeoTranslation *trasCal = new TGeoTranslation("trasCal",CalZPos+NomadCalDim[0],0,0); // Position of Nomamd driftchambers TGeoTranslation *trasDrift = new TGeoTranslation("trasDrift",CalZPos+2.*NomadCalDim[0]+NomadDriftDim[0],0,0); // 50L rotation TGeoRotation *rot1 = new TGeoRotation("rot1", Theta50L*180./TMath::Pi(), 0., 0.); // Position of 50L TGeoTranslation *tras50l = new TGeoTranslation("tras50l",Coor50L[2],Coor50L[0],Coor50L[1]); TGeoCombiTrans *t50l = new TGeoCombiTrans(*tras50l, *rot1); top->AddNode(NomadRoom,1,trasNomad); NomadRoom->AddNode(NomadCal,1,trasCal); NomadRoom->AddNode(NomadDrift,1,trasDrift); NomadRoom->AddNode(Cryo50L,1,t50l); Cryo50L->AddNode(the50Lchamber,1,identity); geom->SetTopVolume(top); //--- close the geometry geom->CloseGeometry(); geom->SetVisOption(0); geom->SetVisLevel(4); top->Draw(); }