Rev 14 | Rev 134 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 14 | Rev 15 | ||
|---|---|---|---|
| Line 6... | Line 6... | ||
| 6 | // garren@fnal.gov, February 2006
|
6 | // garren@fnal.gov, February 2006
|
| 7 | //
|
7 | //
|
| 8 | // Additional information storage for Heavy Ion generators
|
8 | // Additional information storage for Heavy Ion generators
|
| 9 | //////////////////////////////////////////////////////////////////////////
|
9 | //////////////////////////////////////////////////////////////////////////
|
| 10 | //
|
10 | //
|
| 11 | // int hard_scatters; // Number of hard scatterings
|
- | |
| 12 | // int projectile_participants; // Number of projectiles participants
|
- | |
| 13 | // int target_participants; // Number of target participants
|
- | |
| 14 | // int N_N_collisions; // Number of N-N collisions
|
- | |
| 15 | // int N_Nwounded_collisions; // Number of N-Nwounded collisions
|
- | |
| 16 | // int Nwounded_N_collisions; // Number of Nwounded-N collisons
|
- | |
| 17 | // int Nwounded_Nwounded_collisions; // Number of Nwounded-Nwounded collisions
|
- | |
| 18 | // int spectator_neutrons; // Number of spectators neutrons
|
- | |
| 19 | // int spectator_protons; // Number of spectators protons
|
- | |
| 20 | // float impact_parameter; // Impact Parameter
|
- | |
| 21 | // float event_plane_angle;
|
- | |
| - | 11 | // int Ncoll_hard // Number of hard scatterings
|
|
| - | 12 | // int Npart_proj // Number of projectile participants
|
|
| - | 13 | // int Npart_targ // Number of target participants
|
|
| - | 14 | // int Ncoll // Number of NN (nucleon-nucleon) collisions
|
|
| - | 15 | // int N_Nwounded_collisions // Number of N-Nwounded collisions
|
|
| - | 16 | // int Nwounded_N_collisions // Number of Nwounded-N collisons
|
|
| - | 17 | // int Nwounded_Nwounded_collisions // Number of Nwounded-Nwounded collisions
|
|
| - | 18 | // int spectator_neutrons // Number of spectators neutrons
|
|
| - | 19 | // int spectator_protons // Number of spectators protons
|
|
| - | 20 | // float impact_parameter // Impact Parameter(fm) of collision
|
|
| - | 21 | // float event_plane_angle // Azimuthal angle of event plane
|
|
| - | 22 | // float eccentricity // eccentricity of participating nucleons
|
|
| - | 23 | // in the transverse plane
|
|
| - | 24 | // (as in phobos nucl-ex/0510031)
|
|
| - | 25 | // float sigma_inel_NN // nucleon-nucleon inelastic
|
|
| - | 26 | // (including diffractive) cross-section
|
|
| 22 | //
|
27 | //
|
| 23 | //////////////////////////////////////////////////////////////////////////
|
28 | //////////////////////////////////////////////////////////////////////////
|
| 24 | // Feb. 7, 2006: first pass at making method names consistent with existing
|
- | |
| 25 | // HepMC code
|
- | |
| - | 29 | // Feb. 17, 2006: adjust names according to suggestions from Heavy Ion users
|
|
| - | 30 | // Feb. 7, 2006: first pass at making method names consistent with existing
|
|
| - | 31 | // HepMC code
|
|
| 26 | //////////////////////////////////////////////////////////////////////////
|
32 | //////////////////////////////////////////////////////////////////////////
|
| 27 | 33 | ||
| 28 | namespace HepMC { |
34 | namespace HepMC { |
| 29 | 35 | ||
| 30 | class HeavyIon { |
36 | class HeavyIon { |
| 31 | 37 | ||
| 32 | public: |
38 | public: |
| 33 | // --- birth/death:
|
39 | // --- birth/death:
|
| 34 | //
|
40 | //
|
| 35 | HeavyIon() |
41 | HeavyIon() |
| 36 | : m_hard_scatters(0), |
- | |
| 37 | m_projectile_participants(0), |
- | |
| 38 | m_target_participants(0), |
- | |
| 39 | m_N_N_collisions(0), |
- | |
| - | 42 | : m_Ncoll_hard(0), |
|
| - | 43 | m_Npart_proj(0), |
|
| - | 44 | m_Npart_targ(0), |
|
| - | 45 | m_Ncoll(0), |
|
| - | 46 | m_spectator_neutrons(0), |
|
| - | 47 | m_spectator_protons(0), |
|
| 40 | m_N_Nwounded_collisions(0), |
48 | m_N_Nwounded_collisions(0), |
| 41 | m_Nwounded_N_collisions(0), |
49 | m_Nwounded_N_collisions(0), |
| 42 | m_Nwounded_Nwounded_collisions(0), |
50 | m_Nwounded_Nwounded_collisions(0), |
| 43 | m_spectator_neutrons(0), |
- | |
| 44 | m_spectator_protons(0), |
- | |
| 45 | m_impact_parameter(0), |
51 | m_impact_parameter(0), |
| 46 | m_event_plane_angle(0) |
- | |
| - | 52 | m_event_plane_angle(0), |
|
| - | 53 | m_eccentricity(0), |
|
| - | 54 | m_sigma_inel_NN(0) |
|
| 47 | {} |
55 | {} |
| - | 56 | ||
| - | 57 | inline HeavyIon( int nh, int np, int nt, int nc, int ns, int nsp, |
|
| - | 58 | int nnw, int nwn, int nwnw, |
|
| - | 59 | float im, float pl, float ec, float s ); |
|
| 48 | 60 | ||
| 49 | ~HeavyIon() {} |
61 | ~HeavyIon() {} |
| 50 | 62 | ||
| 51 | // --- copying:
|
63 | // --- copying:
|
| 52 | //
|
64 | //
|
| Line 58... | Line 70... | ||
| 58 | //
|
70 | //
|
| 59 | inline bool operator==( const HeavyIon& ) const; |
71 | inline bool operator==( const HeavyIon& ) const; |
| 60 | inline bool operator!=( const HeavyIon& ) const; |
72 | inline bool operator!=( const HeavyIon& ) const; |
| 61 | 73 | ||
| 62 | // --- accessors:
|
74 | // --- accessors:
|
| 63 | int hard_scatters() const { return m_hard_scatters; } |
- | |
| 64 | int projectile_participants() const { return m_projectile_participants; } |
- | |
| 65 | int target_participants() const { return m_target_participants; } |
- | |
| 66 | int N_N_collisions() const { return m_N_N_collisions; } |
- | |
| - | 75 | int Ncoll_hard() const { return m_Ncoll_hard; } |
|
| - | 76 | int Npart_proj() const { return m_Npart_proj; } |
|
| - | 77 | int Npart_targ() const { return m_Npart_targ; } |
|
| - | 78 | int Ncoll() const { return m_Ncoll; } |
|
| - | 79 | int spectator_neutrons() const { return m_spectator_neutrons; } |
|
| - | 80 | int spectator_protons() const { return m_spectator_protons; } |
|
| 67 | int N_Nwounded_collisions() const { return m_N_Nwounded_collisions; } |
81 | int N_Nwounded_collisions() const { return m_N_Nwounded_collisions; } |
| 68 | int Nwounded_N_collisions() const { return m_Nwounded_N_collisions; } |
82 | int Nwounded_N_collisions() const { return m_Nwounded_N_collisions; } |
| 69 | int Nwounded_Nwounded_collisions() const { return m_Nwounded_Nwounded_collisions; } |
83 | int Nwounded_Nwounded_collisions() const { return m_Nwounded_Nwounded_collisions; } |
| 70 | int spectator_neutrons() const { return m_spectator_neutrons; } |
- | |
| 71 | int spectator_protons() const { return m_spectator_protons; } |
- | |
| 72 | float impact_parameter() const { return m_impact_parameter; } |
84 | float impact_parameter() const { return m_impact_parameter; } |
| 73 | float event_plane_angle() const { return m_event_plane_angle; } |
85 | float event_plane_angle() const { return m_event_plane_angle; } |
| - | 86 | float eccentricity() const { return m_eccentricity; } |
|
| - | 87 | float sigma_inel_NN() const { return m_sigma_inel_NN; } |
|
| 74 | 88 | ||
| 75 | // --- mutators:
|
89 | // --- mutators:
|
| 76 | void set_hard_scatters(const int &i) { m_hard_scatters=i; } |
- | |
| 77 | void set_projectile_participants(const int &i) { m_projectile_participants=i; } |
- | |
| 78 | void set_target_participants(const int &i) { m_target_participants=i; } |
- | |
| 79 | void set_N_N_collisions(const int &i) { m_N_N_collisions=i; } |
- | |
| - | 90 | void set_Ncoll_hard(const int &i) { m_Ncoll_hard=i; } |
|
| - | 91 | void set_Npart_proj(const int &i) { m_Npart_proj=i; } |
|
| - | 92 | void set_Npart_targ(const int &i) { m_Npart_targ=i; } |
|
| - | 93 | void set_Ncoll(const int &i) { m_Ncoll=i; } |
|
| - | 94 | void set_spectator_neutrons(const int &i) { m_spectator_neutrons=i; } |
|
| - | 95 | void set_spectator_protons(const int &i) { m_spectator_protons=i; } |
|
| 80 | void set_N_Nwounded_collisions(const int &i) { m_N_Nwounded_collisions=i; } |
96 | void set_N_Nwounded_collisions(const int &i) { m_N_Nwounded_collisions=i; } |
| 81 | void set_Nwounded_N_collisions(const int &i) { m_Nwounded_N_collisions=i; } |
97 | void set_Nwounded_N_collisions(const int &i) { m_Nwounded_N_collisions=i; } |
| 82 | void set_Nwounded_Nwounded_collisions(const int &i) |
98 | void set_Nwounded_Nwounded_collisions(const int &i) |
| 83 | { m_Nwounded_Nwounded_collisions=i; } |
99 | { m_Nwounded_Nwounded_collisions=i; } |
| 84 | void set_spectator_neutrons(const int &i) { m_spectator_neutrons=i; } |
- | |
| 85 | void set_spectator_protons(const int &i) { m_spectator_protons=i; } |
- | |
| 86 | void set_impact_parameter(const float &f) { m_impact_parameter=f; } |
100 | void set_impact_parameter(const float &f) { m_impact_parameter=f; } |
| 87 | void set_event_plane_angle(const float &f) { m_event_plane_angle=f; } |
101 | void set_event_plane_angle(const float &f) { m_event_plane_angle=f; } |
| - | 102 | void set_eccentricity(const float &f) { m_eccentricity=f; } |
|
| - | 103 | void set_sigma_inel_NN(const float &f) { m_sigma_inel_NN=f; } |
|
| 88 | 104 | ||
| 89 | private: // data members |
105 | private: // data members |
| 90 | int m_hard_scatters; |
- | |
| 91 | int m_projectile_participants; |
- | |
| 92 | int m_target_participants; |
- | |
| 93 | int m_N_N_collisions; |
- | |
| - | 106 | int m_Ncoll_hard; |
|
| - | 107 | int m_Npart_proj; |
|
| - | 108 | int m_Npart_targ; |
|
| - | 109 | int m_Ncoll; |
|
| - | 110 | int m_spectator_neutrons; |
|
| - | 111 | int m_spectator_protons; |
|
| 94 | int m_N_Nwounded_collisions; |
112 | int m_N_Nwounded_collisions; |
| 95 | int m_Nwounded_N_collisions; |
113 | int m_Nwounded_N_collisions; |
| 96 | int m_Nwounded_Nwounded_collisions; |
114 | int m_Nwounded_Nwounded_collisions; |
| 97 | int m_spectator_neutrons; |
- | |
| 98 | int m_spectator_protons; |
- | |
| 99 | float m_impact_parameter; |
115 | float m_impact_parameter; |
| 100 | float m_event_plane_angle; |
116 | float m_event_plane_angle; |
| - | 117 | float m_eccentricity; |
|
| - | 118 | float m_sigma_inel_NN; |
|
| 101 | 119 | ||
| 102 | }; |
120 | }; |
| 103 | 121 | ||
| 104 | // inline operators
|
122 | // inline operators
|
| - | 123 | HeavyIon::HeavyIon( int nh, int np, int nt, int nc, int ns, int nsp, |
|
| - | 124 | int nnw=0, int nwn=0, int nwnw=0, |
|
| - | 125 | float im=0., float pl=0., float ec=0., float s=0. ) |
|
| - | 126 | : m_Ncoll_hard(nh), |
|
| - | 127 | m_Npart_proj(np), |
|
| - | 128 | m_Npart_targ(nt), |
|
| - | 129 | m_Ncoll(nc), |
|
| - | 130 | m_spectator_neutrons(ns), |
|
| - | 131 | m_spectator_protons(nsp), |
|
| - | 132 | m_N_Nwounded_collisions(nnw), |
|
| - | 133 | m_Nwounded_N_collisions(nwn), |
|
| - | 134 | m_Nwounded_Nwounded_collisions(nwnw), |
|
| - | 135 | m_impact_parameter(im), |
|
| - | 136 | m_event_plane_angle(pl), |
|
| - | 137 | m_eccentricity(ec), |
|
| - | 138 | m_sigma_inel_NN(s) |
|
| - | 139 | {} |
|
| - | 140 | ||
| 105 | HeavyIon::HeavyIon( HeavyIon const & orig ) |
141 | HeavyIon::HeavyIon( HeavyIon const & orig ) |
| 106 | : m_hard_scatters(orig.m_hard_scatters), |
- | |
| 107 | m_projectile_participants(orig.m_projectile_participants), |
- | |
| 108 | m_target_participants(orig.m_target_participants), |
- | |
| 109 | m_N_N_collisions(orig.m_N_N_collisions), |
- | |
| - | 142 | : m_Ncoll_hard(orig.m_Ncoll_hard), |
|
| - | 143 | m_Npart_proj(orig.m_Npart_proj), |
|
| - | 144 | m_Npart_targ(orig.m_Npart_targ), |
|
| - | 145 | m_Ncoll(orig.m_Ncoll), |
|
| - | 146 | m_spectator_neutrons(orig.m_spectator_neutrons), |
|
| - | 147 | m_spectator_protons(orig.m_spectator_protons), |
|
| 110 | m_N_Nwounded_collisions(orig.m_N_Nwounded_collisions), |
148 | m_N_Nwounded_collisions(orig.m_N_Nwounded_collisions), |
| 111 | m_Nwounded_N_collisions(orig.m_Nwounded_N_collisions), |
149 | m_Nwounded_N_collisions(orig.m_Nwounded_N_collisions), |
| 112 | m_Nwounded_Nwounded_collisions(orig.m_Nwounded_Nwounded_collisions), |
150 | m_Nwounded_Nwounded_collisions(orig.m_Nwounded_Nwounded_collisions), |
| 113 | m_spectator_neutrons(orig.m_spectator_neutrons), |
- | |
| 114 | m_spectator_protons(orig.m_spectator_protons), |
- | |
| 115 | m_impact_parameter(orig.m_impact_parameter), |
151 | m_impact_parameter(orig.m_impact_parameter), |
| 116 | m_event_plane_angle(orig.m_event_plane_angle) |
- | |
| - | 152 | m_event_plane_angle(orig.m_event_plane_angle), |
|
| - | 153 | m_eccentricity(orig.m_eccentricity), |
|
| - | 154 | m_sigma_inel_NN(orig.m_sigma_inel_NN) |
|
| 117 | {} |
155 | {} |
| 118 | 156 | ||
| 119 | HeavyIon & HeavyIon::operator = ( HeavyIon const & rhs ) |
157 | HeavyIon & HeavyIon::operator = ( HeavyIon const & rhs ) |
| 120 | {
|
158 | {
|
| 121 | HeavyIon temp( rhs ); |
159 | HeavyIon temp( rhs ); |
| Line 123... | Line 161... | ||
| 123 | return *this; |
161 | return *this; |
| 124 | }
|
162 | }
|
| 125 | 163 | ||
| 126 | void HeavyIon::swap( HeavyIon & other ) |
164 | void HeavyIon::swap( HeavyIon & other ) |
| 127 | {
|
165 | {
|
| 128 | std::swap(m_hard_scatters, other.m_hard_scatters); |
- | |
| 129 | std::swap(m_projectile_participants, other.m_projectile_participants); |
- | |
| 130 | std::swap(m_target_participants, other.m_target_participants); |
- | |
| 131 | std::swap(m_N_N_collisions, other.m_N_N_collisions); |
- | |
| - | 166 | std::swap(m_Ncoll_hard, other.m_Ncoll_hard); |
|
| - | 167 | std::swap(m_Npart_proj, other.m_Npart_proj); |
|
| - | 168 | std::swap(m_Npart_targ, other.m_Npart_targ); |
|
| - | 169 | std::swap(m_Ncoll, other.m_Ncoll); |
|
| 132 | std::swap(m_N_Nwounded_collisions, other.m_N_Nwounded_collisions); |
170 | std::swap(m_N_Nwounded_collisions, other.m_N_Nwounded_collisions); |
| 133 | std::swap(m_Nwounded_N_collisions, other.m_Nwounded_N_collisions); |
171 | std::swap(m_Nwounded_N_collisions, other.m_Nwounded_N_collisions); |
| 134 | std::swap(m_Nwounded_Nwounded_collisions, other.m_Nwounded_Nwounded_collisions); |
172 | std::swap(m_Nwounded_Nwounded_collisions, other.m_Nwounded_Nwounded_collisions); |
| 135 | std::swap(m_spectator_neutrons, other.m_spectator_neutrons); |
173 | std::swap(m_spectator_neutrons, other.m_spectator_neutrons); |
| 136 | std::swap(m_spectator_protons, other.m_spectator_protons); |
174 | std::swap(m_spectator_protons, other.m_spectator_protons); |
| 137 | std::swap(m_impact_parameter, other.m_impact_parameter); |
175 | std::swap(m_impact_parameter, other.m_impact_parameter); |
| 138 | std::swap(m_event_plane_angle, other.m_event_plane_angle); |
176 | std::swap(m_event_plane_angle, other.m_event_plane_angle); |
| - | 177 | std::swap(m_eccentricity, other.m_eccentricity); |
|
| - | 178 | std::swap(m_sigma_inel_NN, other.m_sigma_inel_NN); |
|
| 139 | }
|
179 | }
|
| 140 | 180 | ||
| 141 | bool HeavyIon::operator==( const HeavyIon& a ) const |
181 | bool HeavyIon::operator==( const HeavyIon& a ) const |
| 142 | {
|
182 | {
|
| 143 | return ( a.hard_scatters() == this->hard_scatters() |
- | |
| 144 | && a.projectile_participants() == this->projectile_participants() |
- | |
| 145 | && a.target_participants() == this->target_participants() |
- | |
| 146 | && a.N_N_collisions() == this->N_N_collisions() |
- | |
| - | 183 | return ( a.Ncoll_hard() == this->Ncoll_hard() |
|
| - | 184 | && a.Npart_proj() == this->Npart_proj() |
|
| - | 185 | && a.Npart_targ() == this->Npart_targ() |
|
| - | 186 | && a.Ncoll() == this->Ncoll() |
|
| 147 | && a.N_Nwounded_collisions() == this->N_Nwounded_collisions() |
187 | && a.N_Nwounded_collisions() == this->N_Nwounded_collisions() |
| 148 | && a.Nwounded_N_collisions() == this->Nwounded_N_collisions() |
188 | && a.Nwounded_N_collisions() == this->Nwounded_N_collisions() |
| 149 | && a.Nwounded_Nwounded_collisions() == this->Nwounded_Nwounded_collisions() |
189 | && a.Nwounded_Nwounded_collisions() == this->Nwounded_Nwounded_collisions() |
| 150 | && a.spectator_neutrons() == this->spectator_neutrons() |
190 | && a.spectator_neutrons() == this->spectator_neutrons() |
| 151 | && a.spectator_protons() == this->spectator_protons() |
191 | && a.spectator_protons() == this->spectator_protons() |
| 152 | && a.impact_parameter() == this->impact_parameter() |
192 | && a.impact_parameter() == this->impact_parameter() |
| 153 | && a.event_plane_angle() == this->event_plane_angle() ); |
- | |
| - | 193 | && a.event_plane_angle() == this->event_plane_angle() |
|
| - | 194 | && a.eccentricity() == this->eccentricity() |
|
| - | 195 | && a.sigma_inel_NN() == this->sigma_inel_NN() ); |
|
| 154 | }
|
196 | }
|
| 155 | 197 | ||
| 156 | bool HeavyIon::operator!=( const HeavyIon& a ) const |
198 | bool HeavyIon::operator!=( const HeavyIon& a ) const |
| 157 | {
|
199 | {
|
| 158 | return !( a == *this ); |
200 | return !( a == *this ); |