I want to define a cylinder with inner radius 0, outer radius 0.25mm and height of 20 cm. I want to place it parallel to the x axis (that is the x coordinate from 0 to 20, or -10 to 10, for instance).
I used G4Tubs and wrote:
0, 0.25mm, 0.5fiber_X, 0., 360.);
fiber_X is 20 cm.
Is it correct? When I run my code, I cannot see what I’d like… it seems that fibers (I use replica) are correctly created, but I don’t see the x dimension.
It’s difficult to say it is correct or not,
FibreS is just a solid, it is not clear how it was placed.
A couple of remarks:
- the solid is defined in its local system of coordinates, so
0.5*fiber_X is a half-height along Z axis. If you want to position the cylinder along X axis, then it should be rotated by
pi/2 around Y axis when you place it (see
- angles should be specified in radians, not in degrees, the last parameter in
G4Tubs should be
You may have a look to examples/extended/geometry/transforms
Did you forget to place the cylinder?