Scintillation Yield as a function of dE/dx

I want to simulate a material that follows a very specific scintillation yield, depended on external parameters and the energy deposit over the track length (dE/dx).
If I understand the Developer’s manual correctly,

  MPT->AddProperty("ALPHASCINTILLATIONYIELD", energy, scintYield, 15);

sets the scintillation yield (in this case for alphas) as a function of the deposited energy in a given step (dE).
As I said, I have a parametrisation of the scintillation yield as a function of dE/dx, and not dE.
I looked through the developer’s manual but did not find any mention on something like this.
Is there a way to set the scintillation yield as a function of the step size in for example the stepping action?

Thanks a lot in advance!
Best,
Till

It sounds like you want to express Birks’ law:

You can set the Birks’ constant like this:
https://geant4.kek.jp/lxr/source/examples/extended/optical/OpNovice/src/OpNoviceDetectorConstruction.cc#L214

Hei,
No, I would want to model the light and charge yield in a different way, not using Birks law directly, but an extension to it - which requires different parameters.
Best,
Till

You’d need to modify the G4Scintillation class. If you like I could try to point you in the right direction–but I don’t understand the yield function, i.e. what’s the equation.

I don’t believe stepping action will work. You’ll need a process (i.e. a physics process) to generate particles.

Hei,
If you could point me to the correct place, that would be great!

The yield function would be a model called LArQL, where you add a correction function to Birks law to adjust for an anti-correlation between ionisation and scintillation. ([2202.08905v2] LArQL: A phenomenological model for treating light and charge generation in liquid argon)

Best,
Till

Hi,

I would change this line in G4Scintillation.cc:
https://geant4.kek.jp/lxr/source/processes/electromagnetic/xrays/src/G4Scintillation.cc#L416

to call your code. You could either write the code there, call a new method in G4Scintillation, or follow the EmSaturation method and have a new class.

In any case, I suggest copying G4Scintillation and G4OpticalPhysics to your local code, and rename them (and changing class names inside files). Then, update the new OpticalPhysics to use your new Scintillation, and in your main change the AddPhysics to add your new optical physics.

– Daren.

Hei,

Just to summarize if I get it right,
I would copy the header and source files for G4Scintillation and G4OpticalPhysics, rename them to MyScintillation.xx.
In G4Scintillation I implement the LArQL code instead of the emSaturation/Birks law and rename my classes to lets say MyScintillation and MyOpticalPhysics.
In MyOpticalPhysics.xx, I call this new scintillation class instead of the currenlty used G4Scinitllation.
(Geant4/physics_lists/constructors/electromagnetic/src/G4OpticalPhysics.cc)

In the main I then basically run
MyOpticalPhysics optical_physics = new MyOpticalPhysics();
and register it in my physics list
physics_list->RegisterPhysics(optical_physics);

Is that the outline?

Thanks a lot! I think I mostly got it.
Best,
Till

Yes, that’s correct. Post back if you run into difficulties.

Hei,
It worked, but I get an error message which states that states


-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : TRACK101
      issued by : G4VParticleChange::AddSecondary()
Secondary buffer is full. The track is deleted!
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

I guess that this is due to a wrong understanding of what MeanNumberOfPhotons means. I currently interpret the things written in the Toolkit and Application Manuals of Geant4 such that the PostStepDoIt function that I altered should create the Number of photons equivalent to the energy deposit of a single hit in the simulation.
So when I have an energy deposit of 0.5MeV in one step of the width of 3cm, I use my parametrisation which tells me that I have ~20.000 photons produced in this single step.
These 20k photons are then pushed to the G4VParticleChange class, which creates the particles and keeps track of them. This is where I get the error from, right?

Is my interpretation of what PostStepDoIt should do wrong? And if no, how can I increase the secondary buffer?

Edit:
Never mind - this seemed to be an issue with wrongly set yield1, yield2 and yield3.
I just replaced the NumberOfPhotons without resetting the yield parameters, which ended up in an infinite loop.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.