Flag particles individually with LOUSE

Dear @tuneu,

I think the problem is related to the way you are setting the value of LOUSE.

First of all, who is LOUSE? LOUSE is a variable from the FLUKA COMMON FLKSTK, which contains information about the particles in the stack (not all of them). You can find more detailed information about the different stacks in FLUKA here: Particle stacks in FLUKA.

When you are trying to redefine the value of LOUSE, you are doing so to a variable in FLKSTK that is not even related to the muon you want to follow (and it may not necessarily be a muon). When you transport the muon, the information in the FLKSTK is copied to the COMMON ‘trackr’, and the stack index in FLKSTK is decreased by 1. This means that you are trying to modify the LOUSE value of another particle.

Therefore, I recommend that you properly define the value of LOUSE in your stupr.f routine. I noticed that you were trying to define a COMMON ‘FOLLOW’ with the variable LLOUSE_COM. Did this not work for you?

In the USDRAW routine, you should be dumping the LLOUSE variable. Here, you want the information from the TRACKR COMMON, where the value LOUSE was copied when the muon was unloaded to be transported.

Also, I did not understand why you need the USDRAW routine and why you want to increase the value of the muon there. Don’t you want to flag a muon when you start to transport it?

Here is one way you can proceed (if I understand correctly):

  1. In stupr.f, you can dump the information of the muon that was created (position, energy, etc.) and define the value of LOUSE that will be copied in LLOUSE.
  2. With the BXDRAW routine, you can catch the moment when the muons cross the regions and dump the relevant information plus LLOUSE to identify the muon.

I hope this has been clear. Let me know if you have any further questions.

Cheers, André

1 Like