Fork me on GitHub

source: git/external/HepMC3/GenHeavyIon.h@ 302624f

Last change on this file since 302624f was 95a917c, checked in by Pavel Demin <pavel.demin@…>, 4 years ago

add HepMC3 library

  • Property mode set to 100644
File size: 8.1 KB
Line 
1// -*- C++ -*-
2//
3// This file is part of HepMC
4// Copyright (C) 2014-2020 The HepMC collaboration (see AUTHORS for details)
5//
6#ifndef HEPMC3_HEAVYION_H
7#define HEPMC3_HEAVYION_H
8/**
9 * @file GenHeavyIon.h
10 * @brief Definition of attribute \b class GenHeavyIon
11 *
12 * @class HepMC3::GenHeavyIon
13 * @brief Stores additional information about Heavy Ion generator
14 *
15 * This is an example of event attribute used to store Heavy Ion information
16 *
17 * @ingroup attributes
18 *
19 */
20#include <iostream>
21#include <map>
22#include "HepMC3/Attribute.h"
23
24namespace HepMC3 {
25/** Deprecated */
26using namespace std;
27
28class GenHeavyIon : public Attribute {
29
30public:
31
32 /// Empty default constructor.
33 GenHeavyIon()
34 : Ncoll_hard(-1), Npart_proj(-1), Npart_targ(-1), Ncoll(-1),
35#ifndef HEPMC3_NO_DEPRECATED
36 spectator_neutrons(-1), spectator_protons(-1),
37#endif
38 N_Nwounded_collisions(-1), Nwounded_N_collisions(-1),
39 Nwounded_Nwounded_collisions(-1), impact_parameter(-1.0),
40 event_plane_angle(-1.0),
41#ifndef HEPMC3_NO_DEPRECATED
42 eccentricity(-1.0),
43#endif
44 sigma_inel_NN(-1.0), centrality(-1.0), user_cent_estimate(-1.0),
45 Nspec_proj_n(-1), Nspec_targ_n(-1),
46 Nspec_proj_p(-1), Nspec_targ_p(-1), forceoldformat(false) {}
47
48//
49// Fields
50//
51public:
52
53 ///
54 /// @brief the number of hard nucleon-nucleon collisions.
55 ///
56 /// Model-dependent. Usually the number of nucleon-nucleon
57 /// collisions containing a special signal process. A negative
58 /// value means that the information is not available.
59 int Ncoll_hard;
60
61 /// @brief the number of participating nucleons in the projectile.
62 ///
63 /// The number of nucleons in the projectile participating in an
64 /// inelastic collision (see Ncoll). A negative value means that
65 /// the information is not available.
66 int Npart_proj;
67
68 /// @brief the number of participating nucleons in the target.
69 ///
70 /// The number of nucleons in the target participating in an
71 /// inelastic collision (see Ncoll). A negative value means that
72 /// the information is not available.
73 int Npart_targ;
74
75 /// @brief the number of inelastic nucleon-nucleon collisions.
76 ///
77 /// Note that a one participating nucleon can be involved in many
78 /// inelastic collisions, and that inelastic also includes
79 /// diffractive excitation. A negative value means that the
80 /// information is not available.
81 ///
82 int Ncoll;
83
84#ifndef HEPMC3_NO_DEPRECATED
85 /// @brief Total number of spectator neutrons.
86 ///
87 /// HEPMC3_DEPRECATED("Use Nspec_proj_n and Nspec_targ_n instead.")
88 int spectator_neutrons;
89
90 /// @brief Total number of spectator protons.
91 ///
92 /// HEPMC3_DEPRECATED("Use Nspec_proj_p and Nspec_targ_p instead.")
93 int spectator_protons;
94#endif
95
96 /// @brief Collisions with a diffractively excited target nucleon.
97 ///
98 /// The number of single diffractive nucleon-nucleon collisions
99 /// where the target nucleon is excited. A negative value means
100 /// that the information is not available.
101 int N_Nwounded_collisions;
102
103 /// @brief Collisions with a diffractively excited projectile nucleon.
104 ///
105 /// The number of single diffractive nucleon-nucleon collisions
106 /// where the projectile nucleon is excited. A negative value
107 /// means that the information is not available.
108 int Nwounded_N_collisions;
109
110 /// @brief Non-diffractive or doubly diffractive collisions.
111 ///
112 /// The number of nucleon-nucleon collisions where both projectile
113 /// and target nucleons are wounded. A negative value means that
114 /// the information is not available.
115 int Nwounded_Nwounded_collisions;
116
117 /// @brief The impact parameter.
118 ///
119 /// The impact parameter given in units of femtometer. A negative
120 /// value means that the information is not available.
121 double impact_parameter;
122
123 /// @brief The event plane angle.
124 ///
125 /// The angle wrt. the x-axix of the impact parameter vector
126 /// (pointing frm the target to the projectile). A positive number
127 /// between 0 and two pi. A negative value means that the
128 /// information is not available.
129 double event_plane_angle;
130
131#ifndef HEPMC3_NO_DEPRECATED
132 /// @brief The eccentricity.
133 ///
134 /// HEPMC3_DEPRECATED("Use eccentricities insted.")
135 double eccentricity;
136#endif
137
138 /// @brief The assumed inelastic nucleon-nucleon cross section
139 ///
140 /// in units of millibarn. As used in a Glauber calculation to
141 /// simulate the distribution in Ncoll. A negative value means
142 /// that the information is not available.
143 double sigma_inel_NN;
144
145 /// @brief The centrality.
146 ///
147 /// The generated centrality in percentiles, where 0 is the
148 /// maximally central and 100 is the minimally central. A negative
149 /// value means that the information is not available.
150 double centrality;
151
152 /// @brief A user defined centrality estimator.
153 ///
154 /// This variable may contain anything a generator feels is
155 /// reasonable for estimating centrality. The value should be
156 /// non-negative, and a low value corresponds to a low
157 /// centrality. A negative value indicatess that the information
158 /// is not available.
159 double user_cent_estimate;
160
161
162 /// @brief The number of spectator neutrons in the projectile
163 ///
164 /// ie. those that thave not participated in any inelastic
165 /// nucleon-nucleon collision. A negative value indicatess that
166 /// the information is not available.
167 int Nspec_proj_n;
168
169 /// @brief The number of spectator neutrons in the target
170 ///
171 /// ie. those that thave not participated in any inelastic
172 /// nucleon-nucleon collision. A negative value indicatess that
173 /// the information is not available.
174 int Nspec_targ_n;
175
176 /// @brief The number of spectator protons in the projectile
177 ///
178 /// ie. those that thave not participated in any inelastic
179 /// nucleon-nucleon collision. A negative value indicatess that
180 /// the information is not available.
181 int Nspec_proj_p;
182
183 /// @brief The number of spectator protons in the target
184 ///
185 /// ie. those that thave not participated in any inelastic
186 /// nucleon-nucleon collision. A negative value indicatess that
187 /// the information is not available.
188 int Nspec_targ_p;
189
190 /// @brief Participant plane angles
191 ///
192 /// calculated to different orders. The key of the map specifies
193 /// the order, and the value gives to the angle wrt. the
194 /// event plane.
195 std::map<int,double> participant_plane_angles;
196
197 /// @brief Eccentricities
198 ///
199 /// Calculated to different orders. The key of the map specifies
200 /// the order, and the value gives the corresponding eccentricity.
201 std::map<int,double> eccentricities;
202
203//
204// Functions
205//
206public:
207
208 /// @brief Implementation of Attribute::from_string.
209 bool from_string(const std::string &att) override;
210
211 /// @brief Implementation of Attribute::to_string.
212 bool to_string(std::string &att) const override;
213
214#ifndef HEPMC3_NO_DEPRECATED
215
216 /// @brief Operator ==
217 ///
218 bool operator==( const GenHeavyIon& ) const;
219 /// @brief Operator !=
220 ///
221 bool operator!=( const GenHeavyIon& ) const;
222
223 /// @brief Set all fields.
224 ///
225 /// HEPMC3_DEPRECATED("Set individual fields directly instead.")
226 /** @brief Set all fields */
227 void set( const int&nh, const int&np, const int&nt, const int&nc, const int&ns, const int&nsp,
228 const int&nnw=0, const int&nwn=0, const int&nwnw=0,
229 const double& im=0., const double& pl=0., const double& ec=0., const double& s=0., const double& cent=0., const double& ucent=0. );
230
231 /// @brief Verify that the instance contains non-zero information.
232 ///
233 /// HEPMC3_DEPRECATED("Each filed now have default values meaning
234 /// that they have not been set")
235 bool is_valid() const;
236
237 /// @brief force writing in old format for compatibility purposes.
238 ///
239 /// HEPMC3_DEPRECATED("This should really not be needed");
240 bool forceoldformat;
241
242#endif
243
244};
245
246
247#ifndef HEPMC3_NO_DEPRECATED
248typedef GenHeavyIon HeavyIon; ///< Backward compatibility typedef
249#endif
250
251
252} // namespace HepMC3
253
254#endif
Note: See TracBrowser for help on using the repository browser.