00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #include <iostream>
00011
00012 #include "HepPID/Version.hh"
00013 #include "HepPID/ParticleIDTranslations.hh"
00014 #include "HepPID/ParticleIDMethods.hh"
00015
00016 #define IDMAX 49
00017
00018 namespace HepPID {
00019
00020 int translateGeanttoPDT( const int id )
00021 {
00022 static int IDG2H[IDMAX] = {
00023 22,
00024 -11,
00025 11,
00026 12,
00027 -13,
00028 13,
00029 111,
00030 211,
00031 -211,
00032 130,
00033 321,
00034 -321,
00035 2112,
00036 2212,
00037 -2212,
00038 310,
00039 221,
00040 3122,
00041 3222,
00042 3212,
00043 3112,
00044 3322,
00045 3312,
00046 3334,
00047 -2112,
00048 -3122,
00049 -3112,
00050 -3212,
00051 -3222,
00052 -3322,
00053 -3312,
00054 -3334,
00055 -15,
00056 15,
00057 411,
00058 -411,
00059 421,
00060 -421,
00061 431,
00062 -431,
00063 4122,
00064 24,
00065 -24,
00066 23,
00067 1000010020,
00068 1000010030,
00069 1000020040,
00070 0,
00071 1000020030 };
00072 static int nwhine_max = 10;
00073 int nwhine = 0;
00074 int gtran = 0;
00075
00076
00077 if( id == 48 ) {
00078 nwhine = nwhine + 1;
00079 if( nwhine <= nwhine_max ) {
00080 std::cout << "GTRAN: geantino " << id
00081 << " not known to HEP (set to 0)" << std::endl;
00082 }
00083
00084 } else if( id <= IDMAX ) {
00085 gtran = IDG2H[id-1];
00086
00087 } else {
00088 nwhine = nwhine + 1;
00089 if( nwhine <= nwhine_max ) {
00090 std::cout << "GTRAN: GEANT particle " << id
00091 << " not known to HEP (set to 0)" << std::endl;
00092 }
00093 }
00094 return gtran;
00095 }
00096
00097 }