本文整理汇总了C++中TGeoVolume::VisibleDaughters方法的典型用法代码示例。如果您正苦于以下问题:C++ TGeoVolume::VisibleDaughters方法的具体用法?C++ TGeoVolume::VisibleDaughters怎么用?C++ TGeoVolume::VisibleDaughters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TGeoVolume
的用法示例。
在下文中一共展示了TGeoVolume::VisibleDaughters方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: m
drawFGT(TString volName="")
{
gSystem->Load("libGeom");
gSystem->Load("libGdml");
TGeoManager::Import("fgt.gdml");
gGeoManager->DefaultColors();
bool allSolid=true;
char topVol[] ="volWorld";
//char topVol[] ="volDetEnclosure";
//char topVol[] ="volDetector";
//char topVol[] ="volMuIDDownstream";
//char topVol[] ="volMuIDBarrel";
//char topVol[] ="volRPCMod";
//char topVol[] ="volRPCTray_End";
//char topVol[] ="volECALDownstream";
//char topVol[] ="volECALUpstream";
//char topVol[] ="volBarrelECAL";
//char topVol[] ="volSBPlane";
//char topVol[] ="volSTT";
//char topVol[] ="volSTPlaneTarget";
//char topVol[] ="volSTPlaneRadiator";
//char topVol[] ="volTargetPlaneArgon";
gGeoManager->GetVolume("volDetEnclosure")->SetLineColor(kGray);
gGeoManager->GetVolume("volDetEnclosure")->SetVisibility(1);
gGeoManager->GetVolume("volDetEnclosure")->SetTransparency(20);
gGeoManager->GetVolume("volDirtLayer")->SetTransparency(20);
gGeoManager->GetVolume("volServiceBuilding")->SetLineColor(kGray);
gGeoManager->GetVolume("volServiceBuilding")->SetVisibility(1);
gGeoManager->GetVolume("volServiceBuilding")->SetTransparency(20);
gGeoManager->GetVolume("volSky")->SetLineColor(kWhite);
gGeoManager->GetVolume("volSky")->SetVisibility(1);
gGeoManager->GetVolume("volSky")->SetTransparency(20);
gGeoManager->GetVolume("volMagnet")->SetLineColor(kGreen-1);
gGeoManager->GetVolume("volMagnet")->SetVisibility(1);
if(!allSolid) gGeoManager->GetVolume("volMagnet")->SetTransparency(10);
gGeoManager->GetVolume("volECALBarrelMod")->SetLineColor(kRed);
gGeoManager->GetVolume("volECALBarrelMod")->SetVisibility(1);
if(!allSolid) gGeoManager->GetVolume("volECALBarrelMod")->SetTransparency(75);
gGeoManager->GetVolume("volSBPlane")->SetLineColor(kRed-3);
gGeoManager->GetVolume("volSBPlane")->SetVisibility(1);
if(!allSolid) gGeoManager->GetVolume("volSBPlane")->SetTransparency(80);
/*
gGeoManager->GetVolume("volECALUpstream")->SetLineColor(kYellow-3);
gGeoManager->GetVolume("volECALUpstream")->SetVisibility(1);
gGeoManager->GetVolume("volECALUpstream")->SetTransparency(20);
gGeoManager->GetVolume("volECALDownstream")->SetLineColor(kYellow-3);
gGeoManager->GetVolume("volECALDownstream")->SetVisibility(1);
gGeoManager->GetVolume("volECALDownstream")->SetTransparency(20);
*/
TObjArray* va = gGeoManager->GetListOfVolumes();
int nv = va->GetEntries();
for (int i=0; i<nv; ++i) {
TGeoVolume* v = (TGeoVolume*)va->At(i);
std::string m(v->GetMaterial()->GetName());
//cout << v->GetMaterial()->GetName() << endl;
int lc, vi, tr, vd;
if (m == "Scintillator") {
lc = kGreen-7 ; vi = 1; tr = 0; vd = 1;
v->SetLineColor(lc);
v->SetVisibility(vi);
v->VisibleDaughters(vd);
v->SetTransparency(tr);
}
//else {
// continue;
//std::cout << "'" << m << "' has no defaults" << std::endl;
//lc = kOrange; vi = 0; tr = 50; vd = 1;
//}
}
//gGeoManager->GetTopNode();
gGeoManager->CheckOverlaps(1e-5,"d");
gGeoManager->PrintOverlaps();
//gGeoManager->FindVolumeFast(topVol)->CheckOverlaps(1e-5,"d");
//gGeoManager->FindVolumeFast(topVol)->GetNode(0)->PrintOverlaps();
gGeoManager->SetMaxVisNodes(70000);
gGeoManager->FindVolumeFast(topVol)->Draw("ogl");
//.........这里部分代码省略.........