00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #include <map>
00024 #include <utility>
00025
00026 #include "HepPID/Version.hh"
00027 #include "HepPID/ParticleIDTranslations.hh"
00028 #include "HepPID/ParticleIDMethods.hh"
00029 #include "HepPID/ParticleName.hh"
00030
00031 namespace HepPID {
00032
00033 typedef std::map< int, int > PythiaPDTMap;
00034 typedef std::map< int, int > PDTPythiaMap;
00035
00036 namespace {
00037
00038 PythiaPDTMap const & getPythiaPDTMap();
00039 PDTPythiaMap const & getPDTPythiaMap();
00040
00041 PythiaPDTMap const & PythiaPDTMapInit()
00042 {
00043
00044 static PythiaPDTMap m;
00045
00046 static const struct {
00047 int hid;
00048 int pid;
00049 } SList[] = {
00050 { 1, 1 },
00051 { -1, -1 },
00052 { 2, 2 },
00053 { -2, -2 },
00054 { 3, 3 },
00055 { -3, -3 },
00056 { 4, 4 },
00057 { -4, -4 },
00058 { 5, 5 },
00059 { -5, -5 },
00060 { 6, 6 },
00061 { -6, -6 },
00062 { 7, 7 },
00063 { -7, -7 },
00064 { 8, 8 },
00065 { -8, -8 },
00066 { 11, 11 },
00067 { -11, -11 },
00068 { 12, 12 },
00069 { -12, -12 },
00070 { 13, 13 },
00071 { -13, -13 },
00072 { 14, 14 },
00073 { -14, -14 },
00074 { 15, 15 },
00075 { -15, -15 },
00076 { 16, 16 },
00077 { -16, -16 },
00078 { 17, 17 },
00079 { -17, -17 },
00080 { 18, 18 },
00081 { -18, -18 },
00082 { 21, 21 },
00083 { 22, 22 },
00084 { 23, 23 },
00085 { 24, 24 },
00086 { -24, -24 },
00087 { 25, 25 },
00088 { 32, 32 },
00089 { 33, 33 },
00090 { 34, 34 },
00091 { -34, -34 },
00092 { 35, 35 },
00093 { 36, 36 },
00094 { 37, 37 },
00095 { -37, -37 },
00096 { 39, 39 },
00097 { 41, 41 },
00098 { -41, -41 },
00099 { 42, 42 },
00100 { -42, -42 },
00101 { 81, 81 },
00102 { 82, 82 },
00103 { -82, -82 },
00104 { 83, 83 },
00105 { 84, 84 },
00106 { -84, -84 },
00107 { 85, 85 },
00108 { -85, -85 },
00109 { 88, 88 },
00110 { 90, 90 },
00111 { 91, 91 },
00112 { 92, 92 },
00113 { 93, 93 },
00114 { 94, 94 },
00115 { 95, 95 },
00116 { 96, 96 },
00117 { 97, 97 },
00118 { 98, 98 },
00119 { 99, 99 },
00120 { 110, 110 },
00121 { 990, 990 },
00122 { 111, 111 },
00123 { 113, 113 },
00124 { 115, 115 },
00125 { 130, 130 },
00126 { 211, 211 },
00127 { -211, -211 },
00128 { 213, 213 },
00129 { -213, -213 },
00130 { 215, 215 },
00131 { -215, -215 },
00132 { 221, 221 },
00133 { 223, 223 },
00134 { 225, 225 },
00135 { 310, 310 },
00136 { 311, 311 },
00137 { -311, -311 },
00138 { 313, 313 },
00139 { -313, -313 },
00140 { 315, 315 },
00141 { -315, -315 },
00142 { 321, 321 },
00143 { -321, -321 },
00144 { 323, 323 },
00145 { -323, -323 },
00146 { 325, 325 },
00147 { -325, -325 },
00148 { 331, 331 },
00149 { 333, 333 },
00150 { 335, 335 },
00151 { 411, 411 },
00152 { -411, -411 },
00153 { 413, 413 },
00154 { -413, -413 },
00155 { 415, 415 },
00156 { -415, -415 },
00157 { 421, 421 },
00158 { -421, -421 },
00159 { 423, 423 },
00160 { -423, -423 },
00161 { 425, 425 },
00162 { -425, -425 },
00163 { 431, 431 },
00164 { -431, -431 },
00165 { 433, 433 },
00166 { -433, -433 },
00167 { 435, 435 },
00168 { -435, -435 },
00169 { 441, 441 },
00170 { 443, 443 },
00171 { 445, 445 },
00172 { 511, 511 },
00173 { -511, -511 },
00174 { 513, 513 },
00175 { -513, -513 },
00176 { 515, 515 },
00177 { -515, -515 },
00178 { 521, 521 },
00179 { -521, -521 },
00180 { 523, 523 },
00181 { -523, -523 },
00182 { 525, 525 },
00183 { -525, -525 },
00184 { 531, 531 },
00185 { -531, -531 },
00186 { 533, 533 },
00187 { -533, -533 },
00188 { 535, 535 },
00189 { -535, -535 },
00190 { 541, 541 },
00191 { -541, -541 },
00192 { 543, 543 },
00193 { -543, -543 },
00194 { 545, 545 },
00195 { -545, -545 },
00196 { 551, 551 },
00197 { 553, 553 },
00198 { 555, 555 },
00199 { 1103, 1103 },
00200 { -1103, -1103 },
00201 { 1114, 1114 },
00202 { -1114, -1114 },
00203 { 2101, 2101 },
00204 { -2101, -2101 },
00205 { 2103, 2103 },
00206 { -2103, -2103 },
00207 { 2112, 2112 },
00208 { -2112, -2112 },
00209 { 2114, 2114 },
00210 { -2114, -2114 },
00211 { 2203, 2203 },
00212 { -2203, -2203 },
00213 { 2212, 2212 },
00214 { -2212, -2212 },
00215 { 2214, 2214 },
00216 { -2214, -2214 },
00217 { 2224, 2224 },
00218 { -2224, -2224 },
00219 { 3101, 3101 },
00220 { -3101, -3101 },
00221 { 3103, 3103 },
00222 { -3103, -3103 },
00223 { 3112, 3112 },
00224 { -3112, -3112 },
00225 { 3114, 3114 },
00226 { -3114, -3114 },
00227 { 3122, 3122 },
00228 { -3122, -3122 },
00229 { 3201, 3201 },
00230 { -3201, -3201 },
00231 { 3203, 3203 },
00232 { -3203, -3203 },
00233 { 3212, 3212 },
00234 { -3212, -3212 },
00235 { 3214, 3214 },
00236 { -3214, -3214 },
00237 { 3222, 3222 },
00238 { -3222, -3222 },
00239 { 3224, 3224 },
00240 { -3224, -3224 },
00241 { 3303, 3303 },
00242 { -3303, -3303 },
00243 { 3312, 3312 },
00244 { -3312, -3312 },
00245 { 3314, 3314 },
00246 { -3314, -3314 },
00247 { 3322, 3322 },
00248 { -3322, -3322 },
00249 { 3324, 3324 },
00250 { -3324, -3324 },
00251 { 3334, 3334 },
00252 { -3334, -3334 },
00253 { 4101, 4101 },
00254 { -4101, -4101 },
00255 { 4103, 4103 },
00256 { -4103, -4103 },
00257 { 4112, 4112 },
00258 { -4112, -4112 },
00259 { 4114, 4114 },
00260 { -4114, -4114 },
00261 { 4122, 4122 },
00262 { -4122, -4122 },
00263 { 4132, 4132 },
00264 { -4132, -4132 },
00265 { 4201, 4201 },
00266 { -4201, -4201 },
00267 { 4203, 4203 },
00268 { -4203, -4203 },
00269 { 4212, 4212 },
00270 { -4212, -4212 },
00271 { 4214, 4214 },
00272 { -4214, -4214 },
00273 { 4222, 4222 },
00274 { -4222, -4222 },
00275 { 4224, 4224 },
00276 { -4224, -4224 },
00277 { 4232, 4232 },
00278 { -4232, -4232 },
00279 { 4301, 4301 },
00280 { -4301, -4301 },
00281 { 4303, 4303 },
00282 { -4303, -4303 },
00283 { 4312, 4312 },
00284 { -4312, -4312 },
00285 { 4314, 4314 },
00286 { -4314, -4314 },
00287 { 4322, 4322 },
00288 { -4322, -4322 },
00289 { 4324, 4324 },
00290 { -4324, -4324 },
00291 { 4332, 4332 },
00292 { -4332, -4332 },
00293 { 4334, 4334 },
00294 { -4334, -4334 },
00295 { 4403, 4403 },
00296 { -4403, -4403 },
00297 { 4412, 4412 },
00298 { -4412, -4412 },
00299 { 4414, 4414 },
00300 { -4414, -4414 },
00301 { 4422, 4422 },
00302 { -4422, -4422 },
00303 { 4424, 4424 },
00304 { -4424, -4424 },
00305 { 4432, 4432 },
00306 { -4432, -4432 },
00307 { 4434, 4434 },
00308 { -4434, -4434 },
00309 { 4444, 4444 },
00310 { -4444, -4444 },
00311 { 5101, 5101 },
00312 { -5101, -5101 },
00313 { 5103, 5103 },
00314 { -5103, -5103 },
00315 { 5112, 5112 },
00316 { -5112, -5112 },
00317 { 5114, 5114 },
00318 { -5114, -5114 },
00319 { 5122, 5122 },
00320 { -5122, -5122 },
00321 { 5132, 5132 },
00322 { -5132, -5132 },
00323 { 5142, 5142 },
00324 { -5142, -5142 },
00325 { 5201, 5201 },
00326 { -5201, -5201 },
00327 { 5203, 5203 },
00328 { -5203, -5203 },
00329 { 5212, 5212 },
00330 { -5212, -5212 },
00331 { 5214, 5214 },
00332 { -5214, -5214 },
00333 { 5222, 5222 },
00334 { -5222, -5222 },
00335 { 5224, 5224 },
00336 { -5224, -5224 },
00337 { 5232, 5232 },
00338 { -5232, -5232 },
00339 { 5242, 5242 },
00340 { -5242, -5242 },
00341 { 5301, 5301 },
00342 { -5301, -5301 },
00343 { 5303, 5303 },
00344 { -5303, -5303 },
00345 { 5312, 5312 },
00346 { -5312, -5312 },
00347 { 5314, 5314 },
00348 { -5314, -5314 },
00349 { 5322, 5322 },
00350 { -5322, -5322 },
00351 { 5324, 5324 },
00352 { -5324, -5324 },
00353 { 5332, 5332 },
00354 { -5332, -5332 },
00355 { 5334, 5334 },
00356 { -5334, -5334 },
00357 { 5342, 5342 },
00358 { -5342, -5342 },
00359 { 5401, 5401 },
00360 { -5401, -5401 },
00361 { 5403, 5403 },
00362 { -5403, -5403 },
00363 { 5412, 5412 },
00364 { -5412, -5412 },
00365 { 5414, 5414 },
00366 { -5414, -5414 },
00367 { 5422, 5422 },
00368 { -5422, -5422 },
00369 { 5424, 5424 },
00370 { -5424, -5424 },
00371 { 5432, 5432 },
00372 { -5432, -5432 },
00373 { 5434, 5434 },
00374 { -5434, -5434 },
00375 { 5442, 5442 },
00376 { -5442, -5442 },
00377 { 5444, 5444 },
00378 { -5444, -5444 },
00379 { 5503, 5503 },
00380 { -5503, -5503 },
00381 { 5512, 5512 },
00382 { -5512, -5512 },
00383 { 5514, 5514 },
00384 { -5514, -5514 },
00385 { 5522, 5522 },
00386 { -5522, -5522 },
00387 { 5524, 5524 },
00388 { -5524, -5524 },
00389 { 5532, 5532 },
00390 { -5532, -5532 },
00391 { 5534, 5534 },
00392 { -5534, -5534 },
00393 { 5542, 5542 },
00394 { -5542, -5542 },
00395 { 5544, 5544 },
00396 { -5544, -5544 },
00397 { 5554, 5554 },
00398 { -5554, -5554 },
00399 { 10111, 9000111 },
00400 { 10113, 10113 },
00401 { 10211, 9000211 },
00402 { -10211, -9000211 },
00403 { 10213, 10213 },
00404 { -10213, -10213 },
00405 { 10221, 9010221 },
00406 { 10223, 10223 },
00407 { 10311, 10311 },
00408 { -10311, -10311 },
00409 { 10313, 10313 },
00410 { -10313, -10313 },
00411 { 10321, 10321 },
00412 { -10321, -10321 },
00413 { 10323, 10323 },
00414 { -10323, -10323 },
00415 { 10331, 10221 },
00416 { 10333, 10333 },
00417 { 10411, 10411 },
00418 { -10411, -10411 },
00419 { 10413, 10413 },
00420 { -10413, -10413 },
00421 { 10421, 10421 },
00422 { -10421, -10421 },
00423 { 10423, 10423 },
00424 { -10423, -10423 },
00425 { 10431, 10431 },
00426 { -10431, -10431 },
00427 { 10433, 10433 },
00428 { -10433, -10433 },
00429 { 10441, 10441 },
00430 { 10443, 10443 },
00431 { 10511, 10511 },
00432 { -10511, -10511 },
00433 { 10513, 10513 },
00434 { -10513, -10513 },
00435 { 10521, 10521 },
00436 { -10521, -10521 },
00437 { 10523, 10523 },
00438 { -10523, -10523 },
00439 { 10531, 10531 },
00440 { -10531, -10531 },
00441 { 10533, 10533 },
00442 { -10533, -10533 },
00443 { 10541, 10541 },
00444 { -10541, -10541 },
00445 { 10543, 10543 },
00446 { -10543, -10543 },
00447 { 10551, 10551 },
00448 { 10553, 10553 },
00449 { 20113, 20113 },
00450 { 20213, 20213 },
00451 { -20213, -20213 },
00452 { 20223, 20223 },
00453 { 20313, 20313 },
00454 { -20313, -20313 },
00455 { 20323, 20323 },
00456 { -20323, -20323 },
00457 { 20333, 20333 },
00458 { 20413, 20413 },
00459 { -20413, -20413 },
00460 { 20423, 20423 },
00461 { -20423, -20423 },
00462 { 20433, 20433 },
00463 { -20433, -20433 },
00464 { 20443, 20443 },
00465 { 20513, 20513 },
00466 { -20513, -20513 },
00467 { 20523, 20523 },
00468 { -20523, -20523 },
00469 { 20533, 20533 },
00470 { -20533, -20533 },
00471 { 20543, 20543 },
00472 { -20543, -20543 },
00473 { 20553, 20553 },
00474 { 100443, 100443 },
00475 { 100553, 100553 },
00476 { 1000001, 1000001 },
00477 { -1000001, -1000001 },
00478 { 1000002, 1000002 },
00479 { -1000002, -1000002 },
00480 { 1000003, 1000003 },
00481 { -1000003, -1000003 },
00482 { 1000004, 1000004 },
00483 { -1000004, -1000004 },
00484 { 1000005, 1000005 },
00485 { -1000005, -1000005 },
00486 { 1000006, 1000006 },
00487 { -1000006, -1000006 },
00488 { 1000011, 1000011 },
00489 { -1000011, -1000011 },
00490 { 1000012, 1000012 },
00491 { -1000012, -1000012 },
00492 { 1000013, 1000013 },
00493 { -1000013, -1000013 },
00494 { 1000014, 1000014 },
00495 { -1000014, -1000014 },
00496 { 1000015, 1000015 },
00497 { -1000015, -1000015 },
00498 { 1000016, 1000016 },
00499 { -1000016, -1000016 },
00500 { 1000021, 1000021 },
00501 { 1000022, 1000022 },
00502 { 1000023, 1000023 },
00503 { 1000024, 1000024 },
00504 { -1000024, -1000024 },
00505 { 1000025, 1000025 },
00506 { 1000035, 1000035 },
00507 { 1000037, 1000037 },
00508 { -1000037, -1000037 },
00509 { 1000039, 1000039 },
00510 { 2000001, 2000001 },
00511 { -2000001, -2000001 },
00512 { 2000002, 2000002 },
00513 { -2000002, -2000002 },
00514 { 2000003, 2000003 },
00515 { -2000003, -2000003 },
00516 { 2000004, 2000004 },
00517 { -2000004, -2000004 },
00518 { 2000005, 2000005 },
00519 { -2000005, -2000005 },
00520 { 2000006, 2000006 },
00521 { -2000006, -2000006 },
00522 { 2000011, 2000011 },
00523 { -2000011, -2000011 },
00524 { 2000012, 2000012 },
00525 { -2000012, -2000012 },
00526 { 2000013, 2000013 },
00527 { -2000013, -2000013 },
00528 { 2000014, 2000014 },
00529 { -2000014, -2000014 },
00530 { 2000015, 2000015 },
00531 { -2000015, -2000015 },
00532 { 2000016, 2000016 },
00533 { -2000016, -2000016 },
00534 { 3000111, 3000111 },
00535 { 3000211, 3000211 },
00536 { -3000211, -3000211 },
00537 { 3000115, 3000115 },
00538 { 3000215, 3000215 },
00539 { -3000215, -3000215 },
00540 { 3000221, 3000221 },
00541 { 3000331, 3100221 },
00542 { 3000113, 3000113 },
00543 { 3000213, 3000213 },
00544 { -3000213, -3000213 },
00545 { 3000223, 3000223 },
00546 { 3100021, 3100021 },
00547 { 3100111, 3060111 },
00548 { 3200111, 3160111 },
00549 { 3100113, 3130113 },
00550 { 3200113, 3140113 },
00551 { 3300113, 3150113 },
00552 { 3400113, 3160113 },
00553 { 4000001, 4000001 },
00554 { -4000001, -4000001 },
00555 { 4000002, 4000002 },
00556 { -4000002, -4000002 },
00557 { 4000011, 4000011 },
00558 { -4000011, -4000011 },
00559 { 4000012, 4000012 },
00560 { -4000012, -4000012 },
00561 { 5000039, 4000039 },
00562 { 9900012, 9900012 },
00563 { 9900014, 9900014 },
00564 { 9900016, 9900016 },
00565 { 9900023, 9900023 },
00566 { 9900024, 9900024 },
00567 { -9900024, -9900024 },
00568 { 9900041, 9900041 },
00569 { -9900041, -9900041 },
00570 { 9900042, 9900042 },
00571 { -9900042, -9900042 },
00572 { 9900110, 9910113 },
00573 { 9900210, 9910211 },
00574 { -9900210, -9910211 },
00575 { 9900220, 9910223 },
00576 { 9900330, 9910333 },
00577 { 9900440, 9910443 },
00578 { 9902110, 9912112 },
00579 { -9902110, -9912112 },
00580 { 9902210, 9912212 },
00581 { -9902210, -9912212 },
00582 { 9900441, 9900441 },
00583 { 9910441, 9910441 },
00584 { 9900443, 9900443 },
00585 { 9900551, 9900551 },
00586 { 9910551, 9910551 },
00587 { 9900553, 9900553 },
00588 { 1000010020, 1000010020 },
00589 { -1000010020, -1000010020 },
00590 { 1000010030, 1000010030 },
00591 { -1000010030, -1000010030 },
00592 { 1000020030, 1000020030 },
00593 { -1000020030, -1000020030 },
00594 { 1000020040, 1000020040 },
00595 { -1000020040, -1000020040 }
00596 };
00597
00598 int listSize = sizeof(SList)/sizeof(SList[0]);
00599 for( int k=0; k!=listSize; ++k) {
00600 m.insert( std::make_pair( SList[k].hid, SList[k].pid) );
00601 }
00602 return m;
00603 }
00604
00605 PDTPythiaMap const & PDTPythiaMapInit()
00606 {
00607 static PDTPythiaMap m;
00608 static PythiaPDTMap const & hmap = getPythiaPDTMap();
00609
00610 for(PythiaPDTMap::const_iterator cit=hmap.begin(), mend=hmap.end(); cit!=mend; ++cit ) {
00611 m.insert( std::make_pair( cit->second, cit->first ));
00612 }
00613 return m;
00614 }
00615
00616
00617
00618
00619 PythiaPDTMap const & getPythiaPDTMap()
00620 {
00621 static PythiaPDTMap const & hmap = PythiaPDTMapInit();
00622 return hmap;
00623 }
00624
00625
00626
00627
00628 PDTPythiaMap const & getPDTPythiaMap()
00629 {
00630 static PDTPythiaMap const & hmap = PDTPythiaMapInit();
00631 return hmap;
00632 }
00633
00634 }
00635
00636 int translatePythiatoPDT( const int id )
00637 {
00638 static PythiaPDTMap const & hmap = getPythiaPDTMap();
00639
00640 PythiaPDTMap::const_iterator const cit = hmap.find( id );
00641
00642 if ( cit != hmap.end() ) { return cit->second; }
00643
00644
00645 if( isValid(id) ) { return id; }
00646 return 0;
00647 }
00648
00649 int translatePDTtoPythia( const int id )
00650 {
00651 static PDTPythiaMap const & pmap = getPDTPythiaMap();
00652
00653 PDTPythiaMap::const_iterator const cit = pmap.find( id );
00654
00655 if ( cit != pmap.end() ) { return cit->second; }
00656
00657
00658 if( isValid(id) ) { return id; }
00659 return 0;
00660 }
00661
00662 void writePythiaTranslationLine( int i, std::ostream & os )
00663 {
00664
00665 static PythiaPDTMap const & hmap = getPythiaPDTMap();
00666
00667 PythiaPDTMap::const_iterator const cit = hmap.find( i );
00668
00669 if ( cit != hmap.end() ) {
00670 int id = cit->second;
00671 os << " Pythia number: " ;
00672 os.width(10);
00673 os << i << " HepPID number: " ;
00674 os.width(10);
00675 os << id << " " << particleName(id) << std::endl;
00676
00677 int iback = translatePDTtoPythia(id);
00678 if(iback != i) {
00679 os << " WARNING: " << id << " translates back to "
00680 << iback << " not to " << i << std::endl;
00681 }
00682 }
00683 return;
00684 }
00685
00686 void writePythiaTranslation( std::ostream & os )
00687 {
00688 writeVersion( os );
00689 os << " HepPID Particle List" << std::endl;
00690 os << std::endl;
00691
00692 int id, i, j, q1, q2, q3, l, m, n;
00693
00694 for( id=1; id<101; ++id) {
00695 writePythiaTranslationLine( id, os );
00696 writePythiaTranslationLine( -id, os );
00697 }
00698 for( i=11; i<1000; ++i) {
00699 id = i*10;
00700 writePythiaTranslationLine( id, os );
00701 writePythiaTranslationLine( -id, os );
00702 }
00703
00704 for( n=1; n<3; ++n) {
00705 for( i=1; i<40; ++i) {
00706 id = 1000000*n+i;
00707 writePythiaTranslationLine( id, os );
00708 writePythiaTranslationLine( -id, os );
00709 }
00710 }
00711
00712 for( q2=1; q2<4; ++q2) {
00713 for( q1=1; q1<4; ++q1) {
00714 for( j=1; j<6; ++j) {
00715 for( m=0; m<5; ++m) {
00716 id = 3000000+100000*m+100*q2+10*q1+j;
00717 writePythiaTranslationLine( id, os );
00718 writePythiaTranslationLine( -id, os );
00719 }
00720 }
00721 }
00722 }
00723
00724 for( n=4; n<6; ++n) {
00725 for( i=1; i<40; ++i) {
00726 id = 1000000*n+i;
00727 writePythiaTranslationLine( id, os );
00728 writePythiaTranslationLine( -id, os );
00729 }
00730 }
00731
00732 for( l=0; l<9; ++l) {
00733 for( q3=0; q3<10; ++q3) {
00734 for( q2=0; q2<10; ++q2) {
00735 for( q1=0; q1<10; ++q1) {
00736 for( j=0; j<10; ++j) {
00737 id = 9900000+10000*l+1000*q3+100*q2+10*q1+j;
00738 writePythiaTranslationLine( id, os );
00739 writePythiaTranslationLine( -id, os );
00740 }
00741 }
00742 }
00743 }
00744 }
00745
00746 for( i=11; i<100; ++i) {
00747 for( j=0; j<10; ++j) {
00748 id = 100*i+j;
00749 writePythiaTranslationLine( id, os );
00750 writePythiaTranslationLine( -id, os );
00751 }
00752 }
00753
00754 for( q2=1; q2<10; ++q2) {
00755 for( q1=1; q1<10; ++q1) {
00756 for( j=1; j<10; ++j) {
00757 for( m=0; m<9; ++m) {
00758 for( l=0; l<10; ++l) {
00759 id = 100000*m+10000*l+100*q2+10*q1+j;
00760 writePythiaTranslationLine( id, os );
00761 writePythiaTranslationLine( -id, os );
00762 id = 9000000+100000*m+10000*l+100*q2+10*q1+j;
00763 writePythiaTranslationLine( id, os );
00764 writePythiaTranslationLine( -id, os );
00765 }
00766 }
00767 }
00768 }
00769 }
00770
00771 for( q3=1; q3<10; ++q3) {
00772 for( q2=1; q2<10; ++q2) {
00773 for( q1=1; q1<10; ++q1) {
00774 for( j=1; j<10; ++j) {
00775 id = 1000*q3+100*q2+10*q1+j;
00776 writePythiaTranslationLine( id, os );
00777 writePythiaTranslationLine( -id, os );
00778 }
00779 }
00780 }
00781 }
00782
00783 for( l=1; l<9; ++l ) {
00784 for ( m=1; m<9; ++m ) {
00785 for( q3=1; q3<9; ++q3) {
00786 for( q2=1; q2<9; ++q2) {
00787 for( q1=1; q1<9; ++q1) {
00788 id = 9*1000000+l*100000+m*10000+1000*q3+100*q2+10*q1+2;
00789 writePythiaTranslationLine( id, os );
00790 writePythiaTranslationLine( -id, os );
00791 }
00792 }
00793 }
00794 }
00795 }
00796 return;
00797 }
00798
00799 }