Length Scale of Axes

Hi everyone,

In my example I fix the world size of my box like this :

worldSizeXY =70*cm;
According to this and the axes ; if I get the Z position of a particule at the beginning of the box ( right Side of the screen ) , I should have -350 but I have -700.

I’m quite lost then ; Does that mean that my box is in realty 140*cm ? (-700 and +700 )

Also , the total cylinders length is about 30cm which can confirm that my box is 70cm…

Thank you !

Without more details we cannot tell, but be aware that the arguments in the constructor of a G4Box are half-lengths. See Application Developers Guide, Solids — Book For Application Developers 10.7 documentation. Also from G4Box.hh:

G4Box(const G4String& pName, G4double pX, G4double pY, G4double pZ);
  // Construct a box with name, and half lengths pX,pY,pZ

I’m curious to know why your axes do not have any annotation (text saying how long the axes are). What graphics system are you using? Are there any messages that say, “Text not implemented,” or something?

1 Like

Thank You very much for your answer ! Which Data will be useful for you ?
My code is :
auto worldS
= new G4Box(“World”, // its name
worldSizeXY, worldSizeXY, worldSizeZ) ; // its size
auto worldSizeXY =70cm;
auto worldSizeZ =70

According to G4Box , it will in fact create a 140*cm box and this one explain why I get for Z axes +700mm in the left and -700mm in the right.

I also read the part for “G4Tubs” ; Am I doing the same mistake ? If I want 10*cm I just have to put the half length ? ( G4Tubs(const G4String& pName,
G4double pRMin,
G4double pRMax,
G4double pDz,
G4double pSPhi,
G4double pDPhi))

The code for plot the axes : /vis/scene/add/axes 0 0 0 1 m

Thank you again,
Best Regards

Can you not answer this yourself by reading our documentation? Is there something wrong with our documentation?

I’m new with G4 I juste wanted to be sure.
No need to be angry.
Thank you again,