Command-based scoring: cylinder surface flux

Hello,
I would like to use command-based scoring to obtain the flow passing through a
cylindrical mesh.
In the geant4 source code (version 10.07) I found the required command
(/score/quantity/cylinderSurfaceFlux). However, it was commented out.
I removed the β€œ//” in G4ScoreQuantityMessengerQCmd.cc,
G4ScoreQuantityMessenger.hh and G4ScoreQuantityMessenger.cc and reinstalled
Geant. Now I can use the scorer. However, the output does not contain any
values, while /score/quantity/flatSurfaceFlux used with a box mesh contains
them.

Is this a known problem and the reason why cylinderSurfaceFlux was commented
out? Is there an other option to get the surface flux on a cylindrical mesh?

Thanks in advance!

1 Like

Hello, MRosa
I also encountered this problem, have you solved it now?

In case of command based scoring it is recommended to define arbitrary number of primitive
scorers to score physics quantities and filters to be associated to each primitive scorer.
Scoring Manager is a singleton object. Once the primitive scorer is assigned to the scoring volume
you can further define,
/score/quantity/sName primitiveName itsunit

where sName = flatSurfaceFlux
This will provide information on Ek of a particle in units MeV .

Particle filter can also be used.

Hi! drvijayraj
I would like to record the energy spectrum of photons passing through the bottom surface of a cylinder(recording the energy of the photons, not the deposited energy). How can I achieve this? The primitive scorer flatSurfaceFlux is only applicable to boxes,and there is no cylinderSurfaceFlux available here.

In my suggestion if it cylindrical, you can use direct method by using the GetKineticEnergy(); method from a concrete class G4step to score particle at the bottom of the cylinder.
You can create a hitlabel using stepID and then invoke it in an eventAction [CounterParticleMethod] to check how many particles crossing a certain area. And indeed you can generate spectra.
This is a non primitive scoring method.

If you are restricting to mesh concept via command based scoring then you need to define
/score/create/cylinderMesh
/score/mesh/cylinderSize
Parameters to define cylinder size as a mesh
β€œ0 : z-phi, 1: r-phi, 2: r-z for cylinder mesh”

And afterwards you can followup the quantity you need to score.

Ref. [G4ScoringMessenger.cc]

I hope it helps.

VRS

Thank you very much! drvijayraj