本文整理汇总了C++中TGeoVolume::Voxelize方法的典型用法代码示例。如果您正苦于以下问题:C++ TGeoVolume::Voxelize方法的具体用法?C++ TGeoVolume::Voxelize怎么用?C++ TGeoVolume::Voxelize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TGeoVolume
的用法示例。
在下文中一共展示了TGeoVolume::Voxelize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ATTPC_d2He
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();
}