15 #include "HepMC/HeavyIon.h"
16 #include "HepMC/StreamHelpers.h"
17 #include "HepMC/IO_Exception.h"
23 std::ostream & operator << (std::ostream & os,
HeavyIon const * ion)
26 std::cerr <<
"HeavyIon output stream !os, "
27 <<
" setting badbit" << std::endl;
28 os.clear(std::ios::badbit);
34 detail::output( os, 0 );
35 detail::output( os, 0 );
36 detail::output( os, 0 );
37 detail::output( os, 0 );
38 detail::output( os, 0 );
39 detail::output( os, 0 );
40 detail::output( os, 0 );
41 detail::output( os, 0 );
42 detail::output( os, 0 );
43 detail::output( os, 0. );
44 detail::output( os, 0. );
45 detail::output( os, 0. );
46 detail::output( os, 0. );
47 detail::output( os,
'\n');
54 detail::output( os, ion->
Ncoll() );
64 detail::output( os,
'\n');
71 std::istream & operator >> (std::istream & is,
HeavyIon * ion)
75 std::cerr <<
"HeavyIon input stream setting badbit." << std::endl;
76 is.clear(std::ios::badbit);
81 std::getline(is,line);
82 std::istringstream iline(line);
87 std::cerr <<
"HeavyIon input stream invalid line type: "
88 << firstc << std::endl;
90 throw IO_Exception(
"HeavyIon input stream encounterd invalid data");
93 int nh =0, np =0, nt =0, nc =0,
94 neut = 0, prot = 0, nw =0, nwn =0, nwnw =0;
95 float impact = 0., plane = 0., xcen = 0., inel = 0.;
97 if(!iline)
throw IO_Exception(
"HeavyIon input stream encounterd invalid data");
99 if(!iline)
throw IO_Exception(
"HeavyIon input stream encounterd invalid data");
101 if(!iline)
throw IO_Exception(
"HeavyIon input stream encounterd invalid data");
103 if(!iline)
throw IO_Exception(
"HeavyIon input stream encounterd invalid data");
105 if(!iline)
throw IO_Exception(
"HeavyIon input stream encounterd invalid data");
107 if(!iline)
throw IO_Exception(
"HeavyIon input stream encounterd invalid data");
109 if(!iline)
throw IO_Exception(
"HeavyIon input stream encounterd invalid data");
111 if(!iline)
throw IO_Exception(
"HeavyIon input stream encounterd invalid data");
113 if(!iline)
throw IO_Exception(
"HeavyIon input stream encounterd invalid data");
115 if(!iline)
throw IO_Exception(
"HeavyIon input stream encounterd invalid data");
117 if(!iline)
throw IO_Exception(
"HeavyIon input stream encounterd invalid data");
119 if(!iline)
throw IO_Exception(
"HeavyIon input stream encounterd invalid data");
121 if(!iline)
throw IO_Exception(
"HeavyIon input stream encounterd invalid data");
void set_N_Nwounded_collisions(const int &i)
set number of N-Nwounded collisions
float impact_parameter() const
Impact Parameter(in fm) of collision.
void set_Nwounded_Nwounded_collisions(const int &i)
set number of Nwounded-Nwounded collisions
float event_plane_angle() const
Azimuthal angle of event plane.
void set_impact_parameter(const float &f)
set Impact Parameter in fm
void set_Npart_proj(const int &i)
set number of projectile participants
int Npart_targ() const
Number of target participants.
void set_sigma_inel_NN(const float &f)
set nucleon-nucleon inelastic cross-section
void set_event_plane_angle(const float &f)
set azimuthal angle of event plane
void set_Npart_targ(const int &i)
set number of target participants
void set_Ncoll(const int &i)
set number of NN (nucleon-nucleon) collisions
int N_Nwounded_collisions() const
Number of N-Nwounded collisions.
int Ncoll_hard() const
Number of hard scatterings.
int Ncoll() const
Number of NN (nucleon-nucleon) collisions.
void set_eccentricity(const float &f)
set eccentricity of participating nucleons in the transverse plane
float eccentricity() const
int spectator_neutrons() const
Number of spectator neutrons.
int Npart_proj() const
Number of projectile participants.
void set_Ncoll_hard(const int &i)
set number of hard scatterings
int spectator_protons() const
Number of spectator protons.
int Nwounded_Nwounded_collisions() const
Number of Nwounded-Nwounded collisions.
int Nwounded_N_collisions() const
Number of Nwounded-N collisons.
The HeavyIon class stores information about heavy ions.
void set_Nwounded_N_collisions(const int &i)
set number of Nwounded-N collisons
void set_spectator_neutrons(const int &i)
set number of spectator neutrons
float sigma_inel_NN() const
nucleon-nucleon inelastic (including diffractive) cross-section
void set_spectator_protons(const int &i)
set number of spectator protons