@weller : Thanks, based on your suggestion I tried the following. To make it simplistic, I am interested in sampling/confining the events to 1-cm annular region (subtracted volume) of two spheres:
//Subtraction of two spheres, giving 1-cm annular region
G4VSolid*
Sphere_out = new G4Sphere("Sphere_out",0.*cm, 10.*cm,0.0*deg,360.0*deg,0.*deg,180.*deg); // outside sphere
G4VSolid* Sphere_in = new G4Sphere("Sphere_in",0.*cm, 9.*cm,0.0*deg,360.0*deg,0.*deg,180.*deg); // inside sphere
G4SubtractionSolid *Sphere_net = new G4SubtractionSolid("SphereNet",Sphere_out,Sphere_in); // sample subtracted volume
fSS_sphere_logic = new G4LogicalVolume(Sphere_net,fWorldMater,"SphereNet");
new G4PVPlacement(0,
G4ThreeVector(0.,0.,0.0*cm),
fSS_sphere_logic,
"SphereNet_Phys",
fWorldLogical,
false,
0,
checkForOverlaps);
Then I use the following in macro, note that the dimension/position of this sphere matches to the outer sphere as you mentioned.
/gps/pos/type Volume
/gps/pos/shape Sphere
/gps/pos/centre 0. 0. 0. cm
/gps/pos/radius 10 cm
/gps/pos/confine SphereNet_Phys
Plotting the initial position of each event, however, still gives me a 10-cm sphere, not the annular region. What am I doing wrong?