23{
26
28 double epsilon;
30
31 try {
32
33 JParser<> zap(
"Auxiliary program histogram plot EM-equivalent energy for hadrons."\
34 "\nNote that the results have a small offset to effectively be visualised.");
35
39
40 zap(argc, argv);
41 }
42 catch(const exception &error) {
43 FATAL(error.what() << endl);
44 }
45
46
47 JManager<int, TH1D> zmap(new TH1D("E[%]", NULL, 500, -0.8, 9.0));
48
49 const int buffer[] = {
52
57 -1 };
58
60
61 for (const int *type = buffer; *type != -1; ++type) {
62 Y[*type] = epsilon * (type - buffer);
63 }
64
65 for (int i = 1; i <= zmap->GetNbinsX(); ++i) {
66
67 const double x = zmap->GetBinCenter(i);
68 const double E =
pow(10.0, x);
69
70 for (const int *type = buffer; *type != -1; ++type) {
71 zmap[*type]->SetBinContent(i,
pythia(*type, E)/E + Y[*type]);
72 }
73 }
74
76}
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Utility class to parse command line options.
@ TRACK_TYPE_CHARGED_PION_MINUS
@ TRACK_TYPE_CHARGED_PION_PLUS
@ TRACK_TYPE_NEUTRAL_PION
@ TRACK_TYPE_ANTIELECTRON
T pow(const T &x, const double y)
Power .
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.