Cosmic rays simulation

I have used fluka extensively for simulations related to the Compass experiment at CERN without any problems. The test with the package example works without any problems.
However, I cannot get fluka+flair to work with the Tsukuba example provided in AllParticleExample.
Flair give the following message:

e> ERROR: list index out of range
e> ERROR: Traceback (most recent call last):
File “/usr/local/flair/Project.py”, line 3988, in save
fn = self.saveInput()
File “/usr/local/flair/Project.py”, line 4089, in saveInput
self.input.save(filename, backup=keepBackup, **kwargs)
File “/usr/local/flair/fluka/input.py”, line 1180, in save
super().save(filename, backup)
File “/usr/local/flair/deck/input.py”, line 1396, in save
if self._save(): return False
File “/usr/local/flair/fluka/input.py”, line 2051, in _save
return self._saveWithInclude()
File “/usr/local/flair/fluka/input.py”, line 2276, in _saveWithInclude
self.writeCard(card, self.format)
File “/usr/local/flair/fluka/input.py”, line 2338, in writeCard
self.writeline(card.toStr(fmt=fmt, properties=False))
File “/usr/local/flair/deck/input.py”, line 1480, in writeline
self.write(f"{s}\n")
File “/usr/local/flair/deck/input.py”, line 1475, in write
self._files[-1].write(s)
IndexError: list index out of range
e> ERROR: Error during saving the input
File: /home/angelo/Hardware/Amelie/Fluka/CosmicRay/Tsukuba/gcrexampleAllParticle.flair
Look the output
And running the package, also with 2 primary and 2 runs, Flair will hangup forever without any message. No signal on Cycles bar, no signal on Primaries bar.
Thank to everybody for any help
Angelo

1 Like

Thank you @maggiora for reporting.
It’s a new bug that went unnoticed on the parsing of geometries where the region-names have a space character in front.
I’ve just uploaded a bug fix version of flair that corrects the parsing

Thank you Vasilis for jour help. I just download the version 3.2.4.4 od 22 May 2023.
No more errors. And fluka + flairs do not hangup anymore.
Thanks again