Jpp 20.0.0-rc.2
the software that should make you happy
Loading...
Searching...
No Matches
getPythia.cc File Reference

Main program to get equivalent electro-magnetic energy. More...

#include <iostream>
#include <iomanip>
#include "JSirene/pythia.hh"
#include "JPhysics/JPhysicsToolkit.hh"
#include "JAAnet/JPDB.hh"
#include "JLang/JManip.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Detailed Description

Main program to get equivalent electro-magnetic energy.

Author
mdejong

Definition in file getPythia.cc.

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

Definition at line 18 of file getPythia.cc.

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}
#define ERROR(A)
Definition JMessage.hh:66
#define FATAL(A)
Definition JMessage.hh:67
int debug
debug level
Definition JSirene.cc:72
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition JParser.hh:2142
Utility class to parse command line options.
Definition JParser.hh:1698
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
double pythia(const int type, const double E)
Get equivalent EM-energy for given pion energy.
Definition pythia.hh:245
Auxiliary data structure for floating point format specification.
Definition JManip.hh:488