G4TScoreNtupleWriter doesn't provide /analysis/ macros

I have a very simple program. In line https://github.com/jintonic/mingle/blob/main/mingle.cc#L55, I use G4TScoreNtupleWriter<G4AnalysisManager> writer; to create an ntuple writer. I believe a G4AnalysisManager should be created internally. But its associated messenger is not created somehow. The /analysis/* macros are not available in this program. I cannot use /analysis/setFileName to change the default file name scoring.root. Is it a good idea to enable /analysis/* automatically when an ntuple writer is created?

You can use

/score/ntuple/writerFileName name

The analysis manager is not created with the G4TScoreNtupleWriter, that’s why the /analysis/* commands are not available as if you work directly with G4AnalysisManager.

Please, note also, that this command is documented in Book For Application Developers 11.2 documentation. When searching for a particular topic, you can use the search window on the left; if you type G4TScoreNtupleWriter here you will get this page.

Best regards,

1 Like

Sorry for missing the obvious documentation. Thank you for explaining the underlying relation between G4TScoreNtupleWriter and G4AnalysisManager.