| Message: Re: Determining extent of an arbitrary G4LogicalVolume | Not Logged In (login) |
|
Hello again.
I implemented my algorithm, so I've solved this problem. Unfortunately, during running there are a large number of overlap warnings printed to the screen. This is somewhat annoying, since I am explicitly creating volumes intended to overlap. I am passing "false" at what I thought were the appropriate times to either not perform the overlap test (when instantiating "test") or to turn off verbosity (when calling the "CheckOverlaps"). Yet I still get the overlap warnings. Is there any way to turn off the warnings? Here is the relevant bit of code:
G4double smallRadius = 0., bigRadius = 1.*m;
G4double difference = bigRadius - smallRadius;
G4Sphere *testSphereSolid;
G4LogicalVolume *testSphereLogical;
G4PVPlacement *test;
while( difference > 1.*mm ) {
testSphereSolid = new G4Sphere( "testSphereSolid", 0, bigRadius, 0,
360.*deg, 0, 180.*deg );
testSphereLogical = new G4LogicalVolume( testSphereSolid,
vacuum, "testSphereLogical" );
test = new G4PVPlacement( 0, G4ThreeVector(), theLogicalVolume,
"test", testSphereLogical, 0, 0, false );
if( test->CheckOverlaps(1000,0.,false) ) {
smallRadius = bigRadius;
bigRadius *= 2;
} else
bigRadius = (bigRadius+smallRadius)/2;
difference = bigRadius - smallRadius;
// Clean up G4PhysicalVolumeStore::GetInstance()->DeRegister( test ); G4LogicalVolumeStore::GetInstance()->DeRegister( testSphereLogical ); G4SolidStore::GetInstance()->DeRegister( testSphereSolid ); delete test; delete testSphereLogical; delete testSphereSolid; }
|
| Inline Depth: | Outline Depth: | Add message: |
|
to: |