void Create_TOF_Geometry_v12a() { // Load the necessary FairRoot libraries gROOT->LoadMacro("$VMCWORKDIR/gconfig/basiclibs.C"); basiclibs(); gSystem->Load("libGeoBase"); gSystem->Load("libParBase"); gSystem->Load("libBase"); // Load needed material definition from media.geo file create_materials_from_media_file(); // Get the GeoManager for later usage gGeoMan = (TGeoManager*) gROOT->FindObject("FAIRGeom"); gGeoMan->SetVisLevel(7); // Create the top volume /* TGeoBBox* topbox= new TGeoBBox("", 1000., 1000., 1000.); TGeoVolume* top = new TGeoVolume("top", topbox, gGeoMan->GetMedium("air")); gGeoMan->SetTopVolume(top); */ TGeoVolume* top = new TGeoVolumeAssembly("TOP"); gGeoMan->SetTopVolume(top); TGeoVolume* tof = new TGeoVolumeAssembly(geoVersion); top->AddNode(tof, 1); for(Int_t counterType = 0; counterType < NumberOfDifferentCounterTypes; counterType++) { gCounter = create_new_counter(counterType); } for(Int_t moduleType = 0; moduleType < NofModuleTypes; moduleType++) { gModules[moduleType] = create_new_tof_module(moduleType); } gPole = create_tof_pole(); position_tof_poles(); position_inner_tof_modules(); position_outer_tof_modules(); gGeoMan->CloseGeometry(); gGeoMan->CheckOverlaps(0.001); gGeoMan->PrintOverlaps(); gGeoMan->Test(); TFile* outfile = new TFile(FileName,"RECREATE"); top->Write(); //gGeoMan->Write(); outfile->Close(); // top->Draw("ogl"); //top->Raytrace(); }
void ATTPC_d2He() { // Load the necessary FairRoot libraries //gROOT->LoadMacro("$VMCWORKDIR/gconfig/basiclibs.C"); //basiclibs(); //gSystem->Load("libGeoBase"); //gSystem->Load("libParBase"); //gSystem->Load("libBase"); // Load needed material definition from media.geo file create_materials_from_media_file(); // Get the GeoManager for later usage gGeoMan = (TGeoManager*) gROOT->FindObject("FAIRGeom"); gGeoMan->SetVisLevel(7); // Create the top volume TGeoVolume* top = new TGeoVolumeAssembly("TOP"); gGeoMan->SetTopVolume(top); TGeoMedium* gas = gGeoMan->GetMedium(MediumVacuum); TGeoVolume* tpcvac = new TGeoVolumeAssembly(geoVersion); tpcvac -> SetMedium(gas); top->AddNode(tpcvac, 1); gModules = create_detector(); //position_detector(); cout<<"Voxelizing."<<endl; top->Voxelize(""); gGeoMan->CloseGeometry(); //add_alignable_volumes(); gGeoMan->CheckOverlaps(0.001); gGeoMan->PrintOverlaps(); gGeoMan->Test(); TFile* outfile = new TFile(FileName,"RECREATE"); top->Write(); outfile->Close(); TFile* outfile1 = new TFile(FileName1,"RECREATE"); gGeoMan->Write(); outfile1->Close(); top->Draw("ogl"); //top->Raytrace(); }