File indexing completed on 2026-09-08 08:28:53
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 #include "HistoManager.hh"
0030
0031 #include "G4UnitsTable.hh"
0032
0033
0034
0035 HistoManager::HistoManager()
0036 {
0037 Book();
0038 }
0039
0040
0041
0042 void HistoManager::Book()
0043 {
0044
0045 G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
0046 analysisManager->SetDefaultFileType("root");
0047 analysisManager->SetFileName(fFileName);
0048 analysisManager->SetVerboseLevel(1);
0049 analysisManager->SetActivation(true);
0050
0051
0052 const G4int kMaxHisto = 25;
0053 const G4String id[] = {"0", "1", "2", "3", "4", "5", "6", "7", "8",
0054 "9", "10", "11", "12", "13", "14", "15", "16", "17",
0055 "18", "19", "20", "21", "22", "23", "24"};
0056 const G4String title[] = {
0057 "dummy",
0058 "total energy deposit",
0059 "Edep (MeV/mm) along absorber",
0060 "total kinetic energy flow",
0061 "energy spectrum of gamma at creation",
0062 "energy spectrum of e+- at creation",
0063 "energy spectrum of neutrons at creation",
0064 "energy spectrum of protons at creation",
0065 "energy spectrum of deuterons at creation",
0066 "energy spectrum of alphas at creation",
0067 "energy spectrum of all others ions at creation",
0068 "energy spectrum of all others baryons at creation",
0069 "energy spectrum of all others mesons at creation",
0070 "energy spectrum of all others leptons (neutrinos) at creation",
0071 "energy spectrum of emerging gamma",
0072 "energy spectrum of emerging e+-",
0073 "energy spectrum of emerging neutrons",
0074 "energy spectrum of emerging protons",
0075 "energy spectrum of emerging deuterons",
0076 "energy spectrum of emerging alphas",
0077 "energy spectrum of all others emerging ions",
0078 "energy spectrum of all others emerging baryons",
0079 "energy spectrum of all others emerging mesons",
0080 "energy spectrum of all others emerging leptons (neutrinos)",
0081 "total energy released : edep + eflow"
0082 };
0083
0084
0085 G4int nbins = 100;
0086 G4double vmin = 0.;
0087 G4double vmax = 100.;
0088
0089
0090
0091 for (G4int k = 0; k < kMaxHisto; k++) {
0092 G4int ih = analysisManager->CreateH1(id[k], title[k], nbins, vmin, vmax);
0093 analysisManager->SetH1Activation(ih, false);
0094 }
0095 }
0096
0097