Construct detector based on text geometry description.
More...
Construct detector based on text geometry description.
Definition at line 328 of file gears.cc.
◆ TextDetectorBuilder()
TextDetectorBuilder::TextDetectorBuilder |
( |
| ) |
|
|
inline |
Definition at line 331 of file gears.cc.
332 G4tgbDetectorBuilder() { fLineProcessor =
new LineProcessor(); }
Extension to default text geometry file line processor.
◆ ~TextDetectorBuilder()
TextDetectorBuilder::~TextDetectorBuilder |
( |
| ) |
|
|
inline |
Definition at line 333 of file gears.cc.
333 {
delete fLineProcessor; }
◆ ConstructDetector()
G4VPhysicalVolume * TextDetectorBuilder::ConstructDetector |
( |
const G4tgrVolume * |
topVol | ) |
|
Construct detector based on text geometry description.
Definition at line 360 of file gears.cc.
363 G4VPhysicalVolume *world = G4tgbDetectorBuilder::ConstructDetector(topVol);
365 G4tgbVolumeMgr* tgbVolmgr = G4tgbVolumeMgr::GetInstance();
368 G4String physV1 = border->
v1.substr(0,border->
v1.find(
":"));
369 G4String physV2 = border->
v2.substr(0,border->
v2.find(
":"));
370 int copyNo1 = atoi(border->
v1.substr(border->
v1.find(
":")+1).data());
371 int copyNo2 = atoi(border->
v2.substr(border->
v2.find(
":")+1).data());
372 G4LogicalVolume *m1=tgbVolmgr->FindG4PhysVol(physV1)->GetMotherLogical();
373 G4LogicalVolume *m2=tgbVolmgr->FindG4PhysVol(physV2)->GetMotherLogical();
375 G4VPhysicalVolume *v1=0, *v2=0;
376 for (
int i=0; i<(int)m1->GetNoDaughters(); i++) {
377 v1 = m1->GetDaughter(i);
378 if (v1->GetCopyNo()==copyNo1)
break;
380 for (
int i=0; i<(int)m2->GetNoDaughters(); i++) {
381 v2 = m2->GetDaughter(i);
382 if (v2->GetCopyNo()==copyNo2)
break;
385 new G4LogicalBorderSurface(border->
name,v1,v2,border->
optic);
386 G4cout<<
"Border surface "<<border->
name<<
" in between " 387 <<physV1<<
":"<<copyNo1<<
" and "<<physV2<<
":"<<copyNo2
BorderSurface * Border
pointer to a BorderSurface object
G4String v1
name of volume 1
G4OpticalSurface * optic
point to G4OpticalSurface object
G4String v2
name of volume 2
A link list of G4LogicalBorderSurface.
G4String name
name of the surface
BorderSurface * next
link to next border surface
◆ ReadDetector()
const G4tgrVolume * TextDetectorBuilder::ReadDetector |
( |
| ) |
|
Read text geometry input.
Definition at line 348 of file gears.cc.
350 G4tgrFileReader* reader = G4tgrFileReader::GetInstance();
351 reader->SetLineProcessor(fLineProcessor);
353 G4tgrVolumeMgr* mgr = G4tgrVolumeMgr::GetInstance();
354 const G4tgrVolume* world = mgr->GetTopVolume();
The documentation for this class was generated from the following file: