Message: payload in a open box with G4SubtractionSolid Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None payload in a open box with G4SubtractionSolid  

Forum: Geometry
Date: 31 Mar, 2009
From: Juan <Juan>

Hi,

I have created an open box using G4SubtractionSolid. I did not know which was the owner of the center of the box so I try the two possibilities. Place the payload inside the box logical volume and inside the word volume

payload place in volume cube1LV (open box)

  G4double worldX=3*m,worldY=3*m,worldZ=3*m;
  G4Box* worldS = new G4Box("World",worldX/2.,worldY/2.,worldZ/2.);
  Mat  = m_nistMan->FindOrBuildMaterial("G4_AIR");
  G4LogicalVolume* worldLV = new G4LogicalVolume(worldS, Mat, "World");
  m_physiWorld = new G4PVPlacement(0,G4ThreeVector(),"World",worldLV, 0,false,0,true);

  Mat  = m_nistMan->FindOrBuildMaterial("G4_Al");
  G4VSolid* cube1S = new G4Box("S/Cout",0.5*m,0.5*m,0.75*m);
  G4VSolid* cube2S = new G4Box("S/Cin",0.49*m,0.49*m,0.74*m);
  G4VSolid* diffS  = new G4SubtractionSolid("S/C",cube1S,cube2S,0,G4ThreeVector(0.01*m,0,0));
  G4LogicalVolume* cube1LV = new G4LogicalVolume(diffS,Mat,"S/C",0,0,0);
  new G4PVPlacement(0,G4ThreeVector(),cube1LV,"S/C shield",worldLV,false,0,true);

  G4VSolid* cube3S = new G4Box("S/Cout",0.05*m,0.05*m,0.075*m);
  G4LogicalVolume* cube3LV = new G4LogicalVolume(cube3S,Mat,"payload",0,0,0);
  new G4PVPlacement(0,G4ThreeVector(),cube3LV,"payload",cube1LV,false,0,true);

Sending a geantino in the Z direction I have this result
Checking overlaps for volume S/C shield ... OK! 
Checking overlaps for volume payload ... 
WARNING - G4PVPlacement::CheckOverlaps()
          Overlap is detected for volume payload
          with its mother volume S/C
          at mother local point (-24.4815,45.3833,75), overlapping by at least: 44.4617 cm 

*** G4Exception : InvalidSetup
*********************************************************************************************************
* G4Track Information:   Particle = geantino,   Track ID = 1,   Parent ID = 0
*********************************************************************************************************

Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng  NextVolume ProcName
    0        0        0        0         1        0        0         0       World initStep
    1        0        0      740         1        0      740       740  S/C shield Transportation
    2        0        0      750         1        0       10       750       World Transportation
    3        0        0  1.5e+03         1        0      750   1.5e+03  OutOfWorld Transportation

the payload is not see by the geantino

The G4PVPlacement test has detected an error

But !!

payload appears in wired and DAWN !!!

/geometry/test do not see the error !!!

DAVID test do not see the error !!!

Same geometry but payload placed in the mother volume new G4PVPlacement(0,G4ThreeVector(),cube3LV,"payload",worldLV,false,0,true);

*********************************************************************************************************
* G4Track Information:   Particle = geantino,   Track ID = 1,   Parent ID = 0
*********************************************************************************************************

Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng  NextVolume ProcName
    0        0        0        0         1        0        0         0     payload initStep
    1        0        0       75         1        0       75        75       World Transportation
    2        0        0      740         1        0      665       740  S/C shield Transportation
    3        0        0      750         1        0       10       750       World Transportation
    4        0        0  1.5e+03         1        0      750   1.5e+03  OutOfWorld Transportation
===========================================    

now payload is see by the geantino.

I suppose that the correct case is the second one but it is dangerous that the geometry test and geometry visualization do not see the error.

Juan

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 More: Re: payload in a open box with G4SubtractionSolid   (Gabriele Cosmo - 14 Apr, 2009)
 Add Message Add Message
to: "payload in a open box with G4SubtractionSolid "

 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 ]