34 #include "AIDA/AIDA.h"
40 :af(0),
tree(0),factoryOn(false)
44 af = AIDA_createAnalysisFactory();
46 G4cout <<
" MicrobeamHistoManager::MicrobeamHistoManager() :"
47 <<
" problem creating the AIDA analysis factory."
52 fileName[0] =
"microbeam";
80 fileName[1] = fileName[0] +
"." + fileType;
83 AIDA::ITreeFactory* tf = af->createTreeFactory();
84 tree = tf->create(fileName[1], fileType, readOnly, createNew, fileOption);
87 G4cout <<
"MicrobeamHistoManager::book() :"
88 <<
" problem creating the AIDA tree with "
89 <<
" storeName = " << fileName[1]
90 <<
" storeType = " << fileType
91 <<
" readOnly = " << readOnly
92 <<
" createNew = " << createNew
93 <<
" options = " << fileOption
99 AIDA::IHistogramFactory*
hf = af->createHistogramFactory(*tree);
100 AIDA::ITupleFactory* ntf = af->createTupleFactory(*tree);
102 ntupl0 = ntf->create(
"ntuple0",
"Stopping power",
"double e, sp");
103 ntupl1 = ntf->create(
"ntuple1",
"Beam position",
"double x, y");
104 ntupl2 = ntf->create(
"ntuple2",
"Range",
"double x, y, z");
105 ntupl3 = ntf->create(
"ntuple3",
"Doses",
"double doseN, doseC");
106 ntupl4 = ntf->create(
"ntuple4",
"3D",
"double x, y, z, doseV");
113 G4cout <<
"\n----> Histogram Tree is opened in " << fileName[1] <<
G4endl;
121 #ifdef G4ANALYSIS_USE
126 G4cout <<
"\n----> Histogram Tree is saved in " << fileName[1] <<
G4endl;
140 G4cout <<
"---> warning from MicrobeamHistoManager::FillNtuple() : Ntuple " << nt
141 <<
" does not exist " << column << value <<
G4endl;
144 #ifdef G4ANALYSIS_USE
145 if(nt==0) ntupl0->fill(column, value);
146 if(nt==1) ntupl1->fill(column, value);
147 if(nt==2) ntupl2->fill(column, value);
148 if(nt==3) ntupl3->fill(column, value);
149 if(nt==4) ntupl4->fill(column, value);
158 G4cout <<
"---> warning from MicrobeamHistoManager::AddRowNtuple() : Ntuple " << nt
159 <<
" do not exist" <<
G4endl;
162 #ifdef G4ANALYSIS_USE
163 if(nt==0) ntupl0->addRow();
164 if(nt==1) ntupl1->addRow();
165 if(nt==2) ntupl2->addRow();
166 if(nt==3) ntupl3->addRow();
167 if(nt==4) ntupl4->addRow();