rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

MC_PRINTEVENT

Print out a dump of each event to standard output
Experiment: ()
Status: VALIDATED
Authors:
  • Andy Buckley
No references listed
Beams: * *
Beam energies: ANY
Run details:
  • Can be used with any event type.

Print out a dump of the event structure to the terminal standard output, in a conveniently human readable form with e.g. particle names in addition to the usual numerical ID codes.

Source code: MC_PRINTEVENT.cc
  1// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/FinalState.hh"
  4
  5namespace Rivet {
  6
  7
  8  /// @author Andy Buckley
  9  class MC_PRINTEVENT : public Analysis {
 10  public:
 11
 12    /// Constructor
 13    MC_PRINTEVENT()
 14      : Analysis("MC_PRINTEVENT")
 15    {    }
 16
 17
 18    /// @name Analysis methods
 19    /// @{
 20
 21    void init() {
 22
 23      /// Set up particle name map
 24      // quarks & gluons
 25      _pnames[1] = "d";
 26      _pnames[-1] = "d~";
 27      _pnames[2] = "u";
 28      _pnames[-2] = "u~";
 29      _pnames[3] = "s";
 30      _pnames[-3] = "s~";
 31      _pnames[4] = "c";
 32      _pnames[-4] = "c~";
 33      _pnames[5] = "b";
 34      _pnames[-5] = "b~";
 35      _pnames[6] = "t";
 36      _pnames[-6] = "t~";
 37      // bosons
 38      _pnames[21] = "g";
 39      _pnames[22] = "gamma";
 40      _pnames[23] = "Z0";
 41      _pnames[24] = "W+";
 42      _pnames[-24] = "W-";
 43      _pnames[25] = "h0";
 44      _pnames[26] = "h0";
 45      // leptons
 46      _pnames[11] = "e-";
 47      _pnames[-11] = "e+";
 48      _pnames[13] = "mu-";
 49      _pnames[-13] = "mu+";
 50      _pnames[15] = "tau-";
 51      _pnames[-15] = "tau+";
 52      _pnames[12] = "nu_e";
 53      _pnames[-12] = "nu_e~";
 54      _pnames[14] = "nu_mu";
 55      _pnames[-14] = "nu_mu~";
 56      _pnames[16] = "nu_tau";
 57      _pnames[-16] = "nu_tau~";
 58      // common hadrons
 59      _pnames[111] = "pi0";
 60      _pnames[211] = "pi+";
 61      _pnames[-211] = "pi-";
 62      _pnames[221] = "eta";
 63      _pnames[331] = "eta'";
 64      _pnames[113] = "rho0";
 65      _pnames[213] = "rho+";
 66      _pnames[-213] = "rho-";
 67      _pnames[223] = "omega";
 68      _pnames[333] = "phi";
 69      _pnames[130] = "K0L";
 70      _pnames[310] = "K0S";
 71      _pnames[311] = "K0";
 72      _pnames[-311] = "K0";
 73      _pnames[321] = "K+";
 74      _pnames[-321] = "K-";
 75      _pnames[313] = "K*0";
 76      _pnames[-313] = "K*0~";
 77      _pnames[323] = "K*+";
 78      _pnames[-323] = "K*-";
 79      _pnames[411] = "D+";
 80      _pnames[-411] = "D-";
 81      _pnames[421] = "D0";
 82      _pnames[-421] = "D0~";
 83      _pnames[413] = "D*+";
 84      _pnames[-413] = "D*-";
 85      _pnames[423] = "D*0";
 86      _pnames[-423] = "D*0~";
 87      _pnames[431] = "Ds+";
 88      _pnames[-431] = "Ds-";
 89      _pnames[433] = "Ds*+";
 90      _pnames[-433] = "Ds*-";
 91      _pnames[511] = "B0";
 92      _pnames[-511] = "B0~";
 93      _pnames[521] = "B+";
 94      _pnames[-521] = "B-";
 95      _pnames[513] = "B*0";
 96      _pnames[-513] = "B*0~";
 97      _pnames[523] = "B*+";
 98      _pnames[-523] = "B*-";
 99      _pnames[531] = "B0s";
100      _pnames[541] = "Bc+";
101      _pnames[-541] = "Bc-";
102      _pnames[441] = "eta_c(1S)";
103      _pnames[443] = "J/psi(1S)";
104      _pnames[551] = "eta_b(1S)";
105      _pnames[553] = "Upsilon(1S)";
106      _pnames[2212] = "p+";
107      _pnames[-2212] = "p-";
108      _pnames[2112] = "n";
109      _pnames[-2112] = "n~";
110      _pnames[2224] = "Delta++";
111      _pnames[2214] = "Delta+";
112      _pnames[2114] = "Delta0";
113      _pnames[1114] = "Delta-";
114      _pnames[3122] = "Lambda";
115      _pnames[-3122] = "Lambda~";
116      _pnames[3222] = "Sigma+";
117      _pnames[-3222] = "Sigma+~";
118      _pnames[3212] = "Sigma0";
119      _pnames[-3212] = "Sigma0~";
120      _pnames[3112] = "Sigma-";
121      _pnames[-3112] = "Sigma-~";
122      _pnames[4122] = "Lambda_c+";
123      _pnames[-4122] = "Lambda_c-";
124      _pnames[5122] = "Lambda_b";
125      // exotic
126      _pnames[32] = "Z'";
127      _pnames[34] = "W'+";
128      _pnames[-34] = "W'-";
129      _pnames[35] = "H0";
130      _pnames[36] = "A0";
131      _pnames[37] = "H+";
132      _pnames[-37] = "H-";
133      // shower-specific
134      _pnames[91] = "cluster";
135      _pnames[92] = "string";
136      _pnames[9922212] = "remn";
137      _pnames[1103] = "dd";
138      _pnames[2101] = "ud0";
139      _pnames[2103] = "ud1";
140      _pnames[2203] = "uu";
141
142    }
143
144
145    /// Perform the per-event analysis
146    void analyze(const Event& event) {
147
148      RivetHepMC::Print::content(*(event.genEvent()));
149
150    }
151
152
153    /// Normalise histograms etc., after the run
154    void finalize() {    }
155
156    /// @}
157
158  private:
159
160    map<long, string> _pnames;
161
162
163  };
164
165
166
167  RIVET_DECLARE_PLUGIN(MC_PRINTEVENT);
168
169}