Define a meniscus solid

Sorry @evc I define the meniscus

G4double pRMin = 0., pRMax = 0.75*cm, pDz = 0.35*cm, pSPhi = 0., pDPhi = 2*pi;  
 G4double pMenRmax1 = 1.90*cm, pMenRmax2 = 1.2*cm;
    G4Orb* MenOrb1 =    new G4Orb("MenOrb1", pMenRmax1);
    G4Orb* MenOrb2 =    new G4Orb("MenOrb2", pMenRmax2);
    G4Tubs* MenTub =    
    new G4Tubs("MenTube",                    //its name
        pRMin, pRMax, pDz, pSPhi, pDPhi);    //its size*/
    G4RotationMatrix identity;
	G4ThreeVector positionMenOrb1(0,0,1.55*cm);
	G4ThreeVector positionMenOrb2(0,0,1.15*cm);
	G4VSolid* MenTmp = new G4IntersectionSolid("MenTmp", MenTub, MenOrb1, &identity, positionMenOrb1);
	G4VSolid* Meniscus = new G4SubtractionSolid("Meniscus", MenTmp, MenOrb2, &identity, positionMenOrb2);

in order to have a thickness 3mm at (x,y)=(0,0) . Now I’ve to get the scoring mesh to my targets (i.e. to study the deposited energy in the targets). The scoring mesh just allows to use cylindrical or box scoring volume, then I’ve to put my targets in 2 cylindrical scoring volumes, but I would like to build the scoing volume having thickness value equivalent to maximum thickness of the meniscus (i.e. it must contain all the meniscus, but it must not be higher than the meniscus…for example I can build a scoing volume having thickness 0.7cm as the G4Tube that I used to build the meniscus, but in that way I will have a piece of the scoring volume in which there isn’t the meniscus). Is there a way to measure that ?
Thank you

To calculate what part of the of the tube does not contain the meniscus just calculate the volume of the tube and the meniscus. Volume of any solid can be calculated by CubicVolume() method.

Thank you @evc …can you check if I understood, please?

  1. I build the meniscus starting from a G4tube having radius 7.5mm and thickness 7mm then it’s volume is Vtube=pir^2h=pi7.5^27=1236,38mm^3

  2. In the stepping action I wrote
    G4LogicalVolume* volume = step->GetPreStepPoint()->GetTouchableHandle() ->GetVolume()->GetLogicalVolume();
    if (volume == fScoringVolume) {
    G4double MeniscusVolume = volume->GetSolid()->GetCubicVolume();
    G4cout << "MeniscusVolume = " << MeniscusVolume << G4endl;

  3. Running the simulation, I read on the terminal
    MeniscusVolume = 618.437
    i.e. the meniscus volume is 618.437mm^3

  4. Now I’ve to draw the scoring volume to get the scoring mesh…did you mean that I’ve to build a cylinder having a volume equivalent to the meniscus volume? I.e. my meniscus volume is Vmeniscus =618.437, then I need a scoring volume 618.437mm^3, so I’ve to build a cyilinder having Vscore=618.437=pi7.5^2h, then h=618.437/(pi*7.5^2)=3.5mm ?
    Is it ok in order to contain all the meniscus and to not contain a lot of vacuum?

Isn’t there a way to get the maximum and minimum z values of the meniscus?
Thank you

I am not a right person to ask question on scoring volume. I just answered the question on how to measure what part of the tube is not occupied by the meniscus.

Z coordinate of the intersection of a cylinder with a sphere can be calculated by applying the Pythagoras’s theorem: Z = sqrt(R^2 - r^2), where R and r are the radii of the sphere and the cylinder, provided that the sphere is located at the origin.

Hello @evc thank you. It isn’t a scoring mesh problem…it was just a problem to build a cylinder having dimensions in order to contain all the meniscus, but not so big to contain a lot of vacuum. Anyway, thanks to your help, calculating the meniscus volume I thought to build a fake cyinder solid and to check by visualization if dimension could be fine…

image

by the visualization, I think that this volume is good.
Thank you for your precious help!

Sorry @evc, I forgot to wish you happy new year in my previous message!

Thank you! Stay safe and All the best for coming new year!