47 auto analysisManager = G4AnalysisManager::Instance();
49 analysisManager->SetDefaultFileType(
"root");
50 analysisManager->SetVerboseLevel(1);
51 G4cout <<
"Using " << analysisManager->GetType() << G4endl;
53 analysisManager->CreateH1(
"Energy",
"Energy of optical photon", 100,
54 2.*CLHEP::eV, 3.2*CLHEP::eV);
55 analysisManager->CreateH1(
"Time",
"Arrival time", 100, 0., 100.*CLHEP::ns);
56 analysisManager->CreateH1(
"Number of photons",
"Number of photons", 100, 0., 100.);
78 auto analysisManager = G4AnalysisManager::Instance();
79 if (analysisManager->GetH1(0)) {
80 G4cout << G4endl <<
" ----> print histograms statistics ";
83 G4cout <<
"for the entire run " << G4endl << G4endl;
86 G4cout <<
"for the local thread " << G4endl << G4endl;
89 G4cout <<
" Mean number of photons detected/event: "
90 << analysisManager->GetH1(2)->mean()
92 << analysisManager->GetH1(2)->rms() << G4endl;
95 analysisManager->Write();
96 analysisManager->CloseFile();