12.1.2010 - Kamil Sedlak

Histogram "hGeantParameters" added to the output file.  This can be helpful
when more output files are merged together by "hadd" command, and info about
the number of events is needed by the analysis program.
The documentation was updated accordingly.
This commit is contained in:
sedlak 2010-01-12 15:34:34 +00:00
parent d5db8dea3b
commit 00263998df
3 changed files with 27 additions and 1 deletions

Binary file not shown.

View File

@ -599,7 +599,7 @@ Three special volumes ``Target, M0, M1 and M2''.
value, that in musrSim coordinate system corresponds to the point, at which the TURTLE
file was exported. For example -- if the TURTLE file was exported just after the last
quadrupole of a beam-pipe, and in the simulation the edge of the last quadrupole corresponds
to 100\,cm, than the \emph{z0\_InitialTurtle} should be also set to 100\,cm.\\
to -100\,cm, than the \emph{z0\_InitialTurtle} should be also set to -100\,cm.\\
\item{\bf /gun/turtleInterpretAxes \emph{axesWithSign}}\\
Normally it is expected that the coordinates in TURTLE are x, xprime, y and yprime.
@ -893,6 +893,26 @@ The list of variables that can be stored in the Root tree:
\item{\bf save\_ke[save\_n]} (array of Double\_t) -- kinetic energy of the particle when it
entered the save volume (in MeV).
\end{description}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Other outputs of the simulation}
The output of the simulation is stored in the file ``data/musr\_RUNNUMBER.root''. There are four
kind of objects stored in this file:
%
\begin{description}
\item{\bf Tree ``t1''} -- tree containing simulated information for all events.
\item{\bf Vector ``geantParametersD''} -- vector containing information valid for the whole run,
e.g.\ the run number of the given run, number of generated events, ...
\item{\bf Histogram ``hGeantParameters''} -- contains the same information as ``geantParametersD'',
but in the form of histogram. The (only) reason for storing the same information in two different ways
(TVector and histogram TH1D) is the feature of the root ``hadd'' command, used for merging two or more different
simulated results into one file. The command ``hadd'' will sum-up variables stored in ``hGeantParameters'',
while it will do nothing for variables stored in ``geantParametersD''.
Both ways are useful for different type of information.
\item{\bf Other histograms} -- some other histograms can be filled during the simulation for debugging purposes.
These are typically not interesting for the analysis of the results of the simulation.
\end{description}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Visualisation}

View File

@ -294,6 +294,12 @@ void musrRootOutput::EndOfRunAction() {
TVector_GeantParametersD[i]=GeantParametersD[i];
}
TVector_GeantParametersD.Write("geantParametersD");
//
TH1D* hGeantParameters = new TH1D("hGeantParameters","hGeantParameters",maxNGeantParameters,0.,float(maxNGeantParameters));
for (Int_t i=0; i<maxNGeantParameters+1; i++) {
hGeantParameters->SetBinContent(i,GeantParametersD[i]);
}
hGeantParameters->Write();
rootFile->Close();
G4cout<<"musrRootOutput::EndOfRunAction() - Root tree written out."<<G4endl;
}