Jpp 20.0.0-rc.2
the software that should make you happy
Loading...
Searching...
No Matches
getPythia.cc
Go to the documentation of this file.
1#include <iostream>
2#include <iomanip>
3
4#include "JSirene/pythia.hh"
6#include "JAAnet/JPDB.hh"
7#include "JLang/JManip.hh"
8
9#include "Jeep/JParser.hh"
10#include "Jeep/JMessage.hh"
11
12/**
13 * \file
14 * Main program to get equivalent electro-magnetic energy.
15 *
16 * \author mdejong
17 */
18int main(int argc, char **argv)
19{
20 using namespace std;
21 using namespace JPP;
22
23 int type;
24 double E_GeV;
25 int debug;
26
27 try {
28
29 JParser<> zap("Main program to get equivalent electro-magnetic energy.");
30
31 zap['P'] = make_field(type, "PDG particle type");
32 zap['E'] = make_field(E_GeV, "energy [GeV]");
33 zap['d'] = make_field(debug) = 1;
34
35 zap(argc, argv);
36 }
37 catch(const exception &error) {
38 FATAL(error.what() << endl);
39 }
40
41 double E = E_GeV;
42
43 try {
44 E = getKineticEnergy(E, JPDB::getInstance().getPDG(type).mass);
45 }
46 catch(const exception& error) {
47 ERROR(error.what() << endl);
48 }
49
50 E = pythia(type, E);
51
52 cout << SCIENTIFIC(12,3) << E << endl;
53}
I/O manipulators.
General purpose messaging.
#define ERROR(A)
Definition JMessage.hh:66
#define FATAL(A)
Definition JMessage.hh:67
int debug
debug level
Definition JSirene.cc:72
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition JParser.hh:2142
Auxiliary methods for physics calculations.
Utility class to parse command line options.
Definition JParser.hh:1698
int main(int argc, char **argv)
Definition getPythia.cc:18
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
This file contains converted Fortran code from km3.
Auxiliary data structure for floating point format specification.
Definition JManip.hh:488