HepMC event record
include/HepMC/GenHeavyIon.h
1 // -*- C++ -*-
2 //
3 // This file is part of HepMC
4 // Copyright (C) 2014-2015 The HepMC collaboration (see AUTHORS for details)
5 //
6 #ifndef HEPMC_HEAVYION_H
7 #define HEPMC_HEAVYION_H
8 /**
9  * @file GenHeavyIon.h
10  * @brief Definition of attribute \b class GenHeavyIon
11  *
12  * @class HepMC::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 "HepMC/Attribute.h"
22 
23 namespace HepMC {
24 
25 
26 class GenHeavyIon : public Attribute {
27 
28 //
29 // Fields
30 //
31 public:
32  int Ncoll_hard; ///< Number of hard collisions
33  int Npart_proj; ///< Number of participating nucleons in the projectile
34  int Npart_targ; ///< Number of participating nucleons in the target
35  int Ncoll; ///< Number of collisions
36  int spectator_neutrons; ///< Number of spectator neutrons
37  int spectator_protons; ///< Number of spectator protons
38  int N_Nwounded_collisions; ///< @todo Describe!
39  int Nwounded_N_collisions; ///< @todo Describe!
40  int Nwounded_Nwounded_collisions; ///< @todo Describe!
41  double impact_parameter; ///< Impact parameter
42  double event_plane_angle; ///< Event plane angle
43  double eccentricity; ///< Eccentricity
44  double sigma_inel_NN; ///< Assumed nucleon-nucleon cross-section
45  double centrality; ///< Centrality
46 
47 //
48 // Functions
49 //
50 public:
51  /** @brief Implementation of Attribute::from_string */
52  bool from_string(const string &att);
53 
54  /** @brief Implementation of Attribute::to_string */
55  bool to_string(string &att) const;
56 
57  /** @brief Set all fields */
58  void set( int nh, int np, int nt, int nc, int ns, int nsp,
59  int nnw=0, int nwn=0, int nwnw=0,
60  float im=0., float pl=0., float ec=0., float s=0., float cent=0. );
61 
62  bool operator==( const GenHeavyIon& ) const; ///< Operator ==
63  bool operator!=( const GenHeavyIon& ) const; ///< Operator !=
64  bool is_valid() const; ///< Verify that the instance contains non-zero information
65 };
66 
67 
68 #ifndef HEPMC_NO_DEPRECATED
69 typedef GenHeavyIon HeavyIon; ///< Backward compatibility typedef
70 #endif
71 
72 
73 } // namespace HepMC
74 
75 #endif
int spectator_neutrons
Number of spectator neutrons.
bool is_valid() const
Verify that the instance contains non-zero information.
Definition: GenHeavyIon.cc:116
bool operator!=(const GenHeavyIon &) const
Operator !=.
Definition: GenHeavyIon.cc:112
double event_plane_angle
Event plane angle.
bool from_string(const string &att)
Implementation of Attribute::from_string.
Definition: GenHeavyIon.cc:18
bool operator==(const GenHeavyIon &) const
Operator ==.
Definition: GenHeavyIon.cc:108
int Ncoll_hard
Number of hard collisions.
int Npart_proj
Number of participating nucleons in the projectile.
bool to_string(string &att) const
Implementation of Attribute::to_string.
Definition: GenHeavyIon.cc:65
int spectator_protons
Number of spectator protons.
double sigma_inel_NN
Assumed nucleon-nucleon cross-section.
Definition of template class SmartPointer.
GenHeavyIon HeavyIon
Backward compatibility typedef.
int Npart_targ
Number of participating nucleons in the target.