52 XrayTelAnalysis::XrayTelAnalysis()
65 histFileName =
"xraytel";
66 histFileType =
"hbook";
69 asciiFileName=
"xraytel.out";
71 if(asciiFile.is_open()) {
72 asciiFile <<
"Energy (keV) x (mm) y (mm) z (mm)" <<
G4endl <<
G4endl;
85 if (tupleFactory)
delete tupleFactory;
88 if (histoFactory)
delete histoFactory;
94 if (analysisFactory)
delete analysisFactory;
108 #ifdef G4ANALYSIS_USE
110 analysisFactory = AIDA_createAnalysisFactory();
111 if(analysisFactory) {
115 AIDA::ITreeFactory* treeFactory = analysisFactory->createTreeFactory();
118 histFileNameComplete = histFileName+
".hbook";
119 tree = treeFactory->create(histFileNameComplete,
"hbook", readOnly, fileExists);
120 G4cout <<
" Histogramfile: " << histFileNameComplete <<
G4endl;
127 histoFactory = analysisFactory->createHistogramFactory ( *
tree );
128 tupleFactory = analysisFactory->createTupleFactory ( *
tree );
131 h1 = histoFactory->createHistogram1D(
"1",
"Energy, all /keV", 100,0.,100.);
132 h2 = histoFactory->createHistogram2D(
"2",
"y-z, all /mm", 100,-500.,500.,100,-500.,500.);
133 h3 = histoFactory->createHistogram1D(
"3",
"Energy, entering detector /keV", 500,0.,500.);
134 h4 = histoFactory->createHistogram2D(
"4",
"y-z, entering detector /mm", 200,-50.,50.,200,-50.,50.);
137 ntuple = tupleFactory->create(
"10",
"Track ntuple",
138 "double energy,x,y,z,dirx,diry,dirz" );
149 #ifdef G4ANALYSIS_USE
169 if (tupleFactory)
delete tupleFactory;
170 if (histoFactory)
delete histoFactory;
172 if (analysisFactory)
delete analysisFactory;
187 #ifdef G4ANALYSIS_USE
229 if(asciiFile.is_open()) {
230 asciiFile << std::setiosflags(std::ios::fixed)
231 << std::setprecision(3)
235 asciiFile << std::setiosflags(std::ios::fixed)
236 << std::setprecision(3)
240 asciiFile << std::setiosflags(std::ios::fixed)
241 << std::setprecision(3)
245 asciiFile << std::setiosflags(std::ios::fixed)
246 << std::setprecision(3)