Output to .csv for UI based scoring for Probe

Hi everyone,
I have some problems about the Probe of score output file.
i only get a Probes.csv like this :

# mesh name: Probes
# primitive scorer name: volFlux
# i, i, i, total(value) [NoUnit], total(val^2), entry
0,0,0,0,0,0

i have added the following to my RunAction::BeginofRunAction
auto analysisManager = G4AnalysisManager::Instance();
analysisManager->OpenFile("OutputCSV");

and the following to RunAction::EndofRunAction
auto analysisManager = G4AnalysisManager::Instance();
analysisManager->Write();
analysisManager->CloseFile();

but l cann’t get any other .csv file output.
Thanks a lot in advance!

1 Like

https://geant4-userdoc.web.cern.ch/UsersGuides/ForApplicationDeveloper/html/Detector/commandScore.html?#writing-scores-to-a-file

do you /score/dumpAllQuantitiesToFile (or /score/dumpQuantityToFile) after /run/beamOn? and do you /score/close the probe before you start the run?

The name “OutputCSV” does not match the name “Probes.csv”, did you rename them in this post, or are they two different files?

Hi weller,
Thank you for your reply,
It is yes for Q1,
edep.mac:

/score/create/probe Probes 5. cm
/score/probe/locate 0. -50. 1600. mm
/score/quantity/volumeFlux volFlux
/score/close
############################
/run/initialize
/control/verbose 0
/run/verbose 0
/run/beamOn 10000
############################
/analysis/h1/create volFlux Probes_volFlux 100 30 700. keV ! log
/score/fill1D 1 Probes volFlux
/score/dumpAllQuantitiesToFile Probes Probes.csv

about Q2, i change the name from "“OutputCSV” to “Probes.csv”, but the output of Probes.csv is same as above.

I change the position of beam on, now i can get more than one line data.

/score/create/probe Probes 5. cm
/score/probe/locate 0. -50. 1600. mm
/score/quantity/volumeFlux volFlux
/score/close

/analysis/h1/create volFlux Probes_volFlux 100 30 700. keV ! log
/score/fill1D 1 Probes volFlux
/score/dumpAllQuantitiesToFile Probes Probes.csv

############################
/run/initialize
/control/verbose 0
/run/verbose 0
/run/beamOn 10000
############################

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