Message: Nameless particles Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Nameless particles 

Forum: Biasing and Scoring
Date: 02 Nov, 2018
From: <fceraudo>

Hello,

the output of my simulation is a .root file with (more than) a ROOT tree inside, whose branches are composed mostly of doubles, except for one branch with the names of the interacting particles:

G4String name = step->GetTrack()->
      GetDefinition()->GetParticleName();

stored in a

analysisManager->CreateNtupleSColumn(0, "Name");

All the double values are fine, but if I visualize the TBrowser histogram of the branch with the names, I sometimes get columns with no label (i.e. particles apparently without a name). If I import the TTree in ROOT and then print the content of the aforementioned branch with Scan(), I may get blank names as well (this also happens when the associated TBrowser histogram is completely reasonable). Since I also have similar issues importing the strings into Python (the same entries, as far as I can tell), I am starting to think that the problem is with how the data are saved by GEANT4. Are there any precedents?

I have observed this behavior in multiple files, multiple simulations and multiple installations of GEANT4. However, the files have always been written by me (more or less same code, except for geometry and other parts, but almost identical RunAction and SensitiveDetector classes). Am I doing something wrong every time or is this a real issue?

This has become quite a serious issue for me, as I really need to know the distribution of the particles involved in my simulations.

Thank you for your help.

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Nameless particles   (Makoto Asai - 05 Nov, 2018)
 Add Message Add Message
to: "Nameless particles"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews