Message: Re: Determining extent of an arbitrary G4LogicalVolume Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Re: Determining extent of an arbitrary G4LogicalVolume 

Forum: Geometry
Re: Question Determining extent of an arbitrary G4LogicalVolume (Kareem Kazkaz)
Date: 13 May, 2009
From: Kareem Kazkaz <Kareem Kazkaz>

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:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Determining extent of an arbitrary G4LogicalVolume   (John Allison - 14 May, 2009)
 Add Message Add Message
to: "Re: Determining extent of an arbitrary G4LogicalVolume"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]