12 *txtout <<
" > Event number: " << head.
evn << endl;
13 *txtout <<
" > Event type: " << head.
type << endl;
14 *txtout <<
" > Event Beam Pol: " << head.
beamPol ;
15 *txtout <<
", Target Pol: " << head.
targetPol << endl;
22 *txtout <<
" > Bank: " << SDName <<
" - id: " << bankid << endl;
31 for(
unsigned int i=0; i<MAXP && i<MGP.size(); i++)
33 *txtout <<
" Gen. Particle id: " << MGP[i].PID
34 <<
" - mom: " << MGP[i].momentum/MeV
35 <<
" MeV - vert: " << MGP[i].vertex/cm <<
" cm" << endl;
45 unsigned int nraws, ndigit;
47 for(
unsigned int i=0; i<mbank.
name.size(); i++)
49 if(mbank.
type[i] == 0) ndigit++;
50 if(mbank.
type[i] == 1) nraws++;
53 if(PHout.
raws.size() != nraws || PHout.
dgtz.size() != ndigit)
55 cout <<
" Output does not match bank definition. This hit won't be written in the output stream." << endl;
56 cout <<
" nraws size: " << nraws <<
" Output nraws: " << PHout.
raws.size() << endl;
57 cout <<
" ndgtz size: " << ndigit <<
" Output ndgt: " << PHout.
dgtz.size() << endl;
65 for(
unsigned int d=0;
d<ndigit;
d++)
66 *txtout << mbank.
name[
d+nraws] <<
": " << PHout.
dgtz[
d] <<
" " ;
74 for(
unsigned int r=0;
r<nraws;
r++)
75 *txtout << mbank.
name[
r] <<
": " << PHout.
raws[
r] <<
" " ;
85 *txtout <<
" Simulation Conditions: " << endl;
87 for(map<string, string>::iterator it = simcons.begin(); it != simcons.end(); it++)
88 *txtout <<
" > " << it->first <<
" " << it->second << endl;
90 *txtout <<
" End of Simulation Conditions" ;
void ProcessOutput(PH_output, MOutputs *, MBank)
Pure Virtual Method to process the output.
void WriteGenerated(MOutputs *, vector< MGeneratedParticle >)
Pure Virtual Method to write generated particles infos.
vector< double > raws
Raw information.
void SetBankHeader(int, string, MOutputs *)
Pure Virtual Method to set the bank header.
void SetOutpHeader(header, MOutputs *)
Pure Virtual Method to set the output header. MOutputs needed for some output (txt) ...
void SaveSimConditions(MOutputs *, map< string, string >)
Pure Virtual Method to save the simulation conditions on the file.
vector< string > name
Variable name.
vector< int > type
Type of variable: 0=int, 1=double.
map< string, opts > args
Options map.
vector< int > dgtz
Digitized information.