![]() |
HepPDT Reference DocumentationHepPDT |
00001 // ------------------------------------ 00002 // 00003 // translateEvtGent.cc 00004 // Author: Lynn Garren 00005 // 00006 // translate an ID number to or from the standard numbering scheme and EvtGen 00007 // use static maps 00008 // 00009 // The maps are initialized if and only if the public functions are called. 00010 // Because the maps are static, the initialization happens only once. 00011 // 00012 // The user NEVER calls EvtGenPDTMapInit() 00013 // We use a data table (struct SList) so that compile time is not impacted. 00014 // 00015 // public functions: 00016 // int translateEvtGentoPDT( const int id ) 00017 // int translatePDTtoEvtGen( const int id ) 00018 // EvtGenPDTMap const & getEvtGenPDTMap() 00019 // PDTEvtGenMap const & getPDTEvtGenMap() 00020 // 00021 // ------------------------------------ 00022 00023 #include <map> 00024 #include <utility> // make_pair 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 > EvtGenPDTMap; 00034 typedef std::map< int, int > PDTEvtGenMap; 00035 00036 namespace { // EvtGenPDTMapInit is private 00037 00038 EvtGenPDTMap const & getEvtGenPDTMap(); 00039 PDTEvtGenMap const & getPDTEvtGenMap(); 00040 00041 EvtGenPDTMap const & EvtGenPDTMapInit() 00042 { 00043 00044 static EvtGenPDTMap m; 00045 00046 static const struct { 00047 int hid; // EvtGen 00048 int pid; // PDT 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 { 21, 21 }, 00067 { 11, 11 }, 00068 { -11, -11 }, 00069 { 12, 12 }, 00070 { -12, -12 }, 00071 { 13, 13 }, 00072 { -13, -13 }, 00073 { 14, 14 }, 00074 { -14, -14 }, 00075 { 15, 15 }, 00076 { -15, -15 }, 00077 { 16, 16 }, 00078 { -16, -16 }, 00079 { 17, 17 }, 00080 { -17, -17 }, 00081 { 18, 18 }, 00082 { -18, -18 }, 00083 { 22, 22 }, 00084 { 10022, 10022 }, 00085 { 20022, 20022 }, 00086 { 23, 23 }, 00087 { 24, 24 }, 00088 { -24, -24 }, 00089 { 25, 25 }, 00090 { 28, 110 }, 00091 { 29, 990 }, 00092 { 32, 32 }, 00093 { 33, 33 }, 00094 { 34, 34 }, 00095 { -34, -34 }, 00096 { 35, 35 }, 00097 { 36, 36 }, 00098 { 37, 37 }, 00099 { -37, -37 }, 00100 { 40, 41 }, 00101 { -40, -41 }, 00102 { 41, 43 }, 00103 { 42, 44 }, 00104 { -42, -44 }, 00105 { 81, 81 }, 00106 { 82, 82 }, 00107 { -82, -82 }, 00108 { 83, 83 }, 00109 { 84, 84 }, 00110 { -84, -84 }, 00111 { 85, 85 }, 00112 { -85, -85 }, 00113 { 86, 86 }, 00114 { -86, -86 }, 00115 { 87, 87 }, 00116 { -87, -87 }, 00117 { 88, 88 }, 00118 { -88, -88 }, 00119 { 89, 89 }, 00120 { -89, -89 }, 00121 { 90, 90 }, 00122 { -90, -90 }, 00123 { 91, 91 }, 00124 { 92, 92 }, 00125 { 93, 93 }, 00126 { 94, 94 }, 00127 { 95, 95 }, 00128 { 96, 96 }, 00129 { 97, 97 }, 00130 { 98, 98 }, 00131 { 99, 99 }, 00132 { 111, 111 }, 00133 { 211, 211 }, 00134 { -211, -211 }, 00135 { 210, 9910211 }, 00136 { -210, -9910211 }, 00137 { 20111, 100111 }, 00138 { 20211, 100211 }, 00139 { -20211, -100211 }, 00140 { 221, 221 }, 00141 { 20221, 100221 }, 00142 { 331, 331 }, 00143 { 113, 113 }, 00144 { 110, 9910113 }, 00145 { 213, 213 }, 00146 { -213, -213 }, 00147 { 30113, 100113 }, 00148 { 30213, 100213 }, 00149 { -30213, -100213 }, 00150 { 40113, 30113 }, 00151 { 40213, 30213 }, 00152 { -40213, -30213 }, 00153 { 223, 223 }, 00154 { 220, 9910223 }, 00155 { 30223, 100223 }, 00156 { 333, 333 }, 00157 { 330, 9910333 }, 00158 { 10111, 9000111 }, 00159 { 10211, 9000211 }, 00160 { -10211, -9000211 }, 00161 { 10221, 9010221 }, 00162 { 10331, 10221 }, 00163 { 10113, 10113 }, 00164 { 10213, 10213 }, 00165 { -10213, -10213 }, 00166 { 10223, 10223 }, 00167 { 10333, 10333 }, 00168 { 20113, 20113 }, 00169 { 20213, 20213 }, 00170 { -20213, -20213 }, 00171 { 20223, 20223 }, 00172 { 20333, 20333 }, 00173 { 115, 115 }, 00174 { 215, 215 }, 00175 { -215, -215 }, 00176 { 225, 225 }, 00177 { 50221, 9030221 }, 00178 { 335, 335 }, 00179 { 311, 311 }, 00180 { -311, -311 }, 00181 { 310, 310 }, 00182 { 130, 130 }, 00183 { 321, 321 }, 00184 { -321, -321 }, 00185 { 313, 313 }, 00186 { -313, -313 }, 00187 { 323, 323 }, 00188 { -323, -323 }, 00189 { 10311, 10311 }, 00190 { -10311, -10311 }, 00191 { 10321, 10321 }, 00192 { -10321, -10321 }, 00193 { 10313, 10313 }, 00194 { -10313, -10313 }, 00195 { 10323, 10323 }, 00196 { -10323, -10323 }, 00197 { 315, 315 }, 00198 { -315, -315 }, 00199 { 325, 325 }, 00200 { -325, -325 }, 00201 { 20313, 20313 }, 00202 { -20313, -20313 }, 00203 { 20323, 20323 }, 00204 { -20323, -20323 }, 00205 { 100313, 100313 }, 00206 { -100313, -100313 }, 00207 { 100323, 100323 }, 00208 { -100323, -100323 }, 00209 { 30313, 30313 }, 00210 { -30313, -30313 }, 00211 { 30323, 30323 }, 00212 { -30323, -30323 }, 00213 { 317, 317 }, 00214 { -317, -317 }, 00215 { 327, 327 }, 00216 { -327, -327 }, 00217 { 319, 319 }, 00218 { -319, -319 }, 00219 { 329, 329 }, 00220 { -329, -329 }, 00221 { 411, 411 }, 00222 { -411, -411 }, 00223 { 421, 421 }, 00224 { -421, -421 }, 00225 { 413, 413 }, 00226 { -413, -413 }, 00227 { 423, 423 }, 00228 { -423, -423 }, 00229 { 10411, 10411 }, 00230 { -10411, -10411 }, 00231 { 10421, 10421 }, 00232 { -10421, -10421 }, 00233 { 10413, 10413 }, 00234 { -10413, -10413 }, 00235 { 10423, 10423 }, 00236 { -10423, -10423 }, 00237 { 415, 415 }, 00238 { -415, -415 }, 00239 { 425, 425 }, 00240 { -425, -425 }, 00241 { 20413, 20413 }, 00242 { -20413, -20413 }, 00243 { 20423, 20423 }, 00244 { -20423, -20423 }, 00245 { 431, 431 }, 00246 { -431, -431 }, 00247 { 433, 433 }, 00248 { -433, -433 }, 00249 { 10431, 10431 }, 00250 { -10431, -10431 }, 00251 { 10433, 10433 }, 00252 { -10433, -10433 }, 00253 { 435, 435 }, 00254 { -435, -435 }, 00255 { 20433, 20433 }, 00256 { -20433, -20433 }, 00257 { 30411, 100411 }, 00258 { -30411, -100411 }, 00259 { 30421, 100421 }, 00260 { -30421, -100421 }, 00261 { 30413, 100413 }, 00262 { -30413, -100413 }, 00263 { 30423, 100423 }, 00264 { -30423, -100423 }, 00265 { 511, 511 }, 00266 { -511, -511 }, 00267 { 150, 150 }, 00268 { 510, 510 }, 00269 { 521, 521 }, 00270 { -521, -521 }, 00271 { 513, 513 }, 00272 { -513, -513 }, 00273 { 523, 523 }, 00274 { -523, -523 }, 00275 { 10511, 10511 }, 00276 { -10511, -10511 }, 00277 { 10521, 10521 }, 00278 { -10521, -10521 }, 00279 { 10513, 10513 }, 00280 { -10513, -10513 }, 00281 { 10523, 10523 }, 00282 { -10523, -10523 }, 00283 { 515, 515 }, 00284 { -515, -515 }, 00285 { 525, 525 }, 00286 { -525, -525 }, 00287 { 20513, 20513 }, 00288 { -20513, -20513 }, 00289 { 20523, 20523 }, 00290 { -20523, -20523 }, 00291 { 531, 531 }, 00292 { -531, -531 }, 00293 { 350, 350 }, 00294 { 530, 530 }, 00295 { 533, 533 }, 00296 { -533, -533 }, 00297 { 10531, 10531 }, 00298 { -10531, -10531 }, 00299 { 10533, 10533 }, 00300 { -10533, -10533 }, 00301 { 535, 535 }, 00302 { -535, -535 }, 00303 { 20533, 20533 }, 00304 { -20533, -20533 }, 00305 { 541, 541 }, 00306 { -541, -541 }, 00307 { 543, 543 }, 00308 { -543, -543 }, 00309 { 10541, 10541 }, 00310 { -10541, -10541 }, 00311 { 10543, 10543 }, 00312 { -10543, -10543 }, 00313 { 545, 545 }, 00314 { -545, -545 }, 00315 { 20543, 20543 }, 00316 { -20543, -20543 }, 00317 { 441, 441 }, 00318 { 20441, 100441 }, 00319 { 443, 443 }, 00320 { 440, 9910443 }, 00321 { 30443, 100443 }, 00322 { 40443, 30443 }, 00323 { 50443, 9000443 }, 00324 { 60443, 9010443 }, 00325 { 70443, 9020443 }, 00326 { 10443, 10443 }, 00327 { 10441, 10441 }, 00328 { 20443, 20443 }, 00329 { 445, 445 }, 00330 { 551, 551 }, 00331 { 20551, 100551 }, 00332 { 40551, 200551 }, 00333 { 553, 553 }, 00334 { 30553, 100553 }, 00335 { 60553, 200553 }, 00336 { 70553, 300553 }, 00337 { 80553, 9000553 }, 00338 { 10553, 10553 }, 00339 { 40553, 110553 }, 00340 { 100553, 210553 }, 00341 { 10551, 10551 }, 00342 { 20553, 20553 }, 00343 { 555, 555 }, 00344 { 30551, 110551 }, 00345 { 50553, 120553 }, 00346 { 10555, 100555 }, 00347 { 50551, 210551 }, 00348 { 110553, 220553 }, 00349 { 20555, 200555 }, 00350 { 40555, 10555 }, 00351 { 60555, 110555 }, 00352 { 120553, 30553 }, 00353 { 30555, 20555 }, 00354 { 557, 557 }, 00355 { 130553, 130553 }, 00356 { 50555, 120555 }, 00357 { 10557, 100557 }, 00358 { 10222, 10222 }, 00359 { 1114, 1114 }, 00360 { -1114, -1114 }, 00361 { 2110, 9912112 }, 00362 { -2110, -9912112 }, 00363 { 2112, 2112 }, 00364 { -2112, -2112 }, 00365 { 2114, 2114 }, 00366 { -2114, -2114 }, 00367 { 2210, 9912212 }, 00368 { -2210, -9912212 }, 00369 { 2212, 2212 }, 00370 { -2212, -2212 }, 00371 { 2214, 2214 }, 00372 { -2214, -2214 }, 00373 { 2224, 2224 }, 00374 { -2224, -2224 }, 00375 { 3112, 3112 }, 00376 { -3112, -3112 }, 00377 { 3114, 3114 }, 00378 { -3114, -3114 }, 00379 { 3122, 3122 }, 00380 { -3122, -3122 }, 00381 { 13122, 13122 }, 00382 { -13122, -13122 }, 00383 { 3124, 3124 }, 00384 { -3124, -3124 }, 00385 { 23122, 23122 }, 00386 { -23122, -23122 }, 00387 { 33122, 33122 }, 00388 { -33122, -33122 }, 00389 { 13124, 13124 }, 00390 { -13124, -13124 }, 00391 { 43122, 43122 }, 00392 { -43122, -43122 }, 00393 { 53122, 53122 }, 00394 { -53122, -53122 }, 00395 { 3126, 3126 }, 00396 { -3126, -3126 }, 00397 { 13126, 13126 }, 00398 { -13126, -13126 }, 00399 { 13212, 13212 }, 00400 { -13212, -13212 }, 00401 { 13214, 13214 }, 00402 { -13214, -13214 }, 00403 { 23212, 23212 }, 00404 { -23212, -23212 }, 00405 { 3216, 3216 }, 00406 { -3216, -3216 }, 00407 { 3212, 3212 }, 00408 { -3212, -3212 }, 00409 { 3214, 3214 }, 00410 { -3214, -3214 }, 00411 { 3222, 3222 }, 00412 { -3222, -3222 }, 00413 { 3224, 3224 }, 00414 { -3224, -3224 }, 00415 { 3312, 3312 }, 00416 { -3312, -3312 }, 00417 { 3314, 3314 }, 00418 { -3314, -3314 }, 00419 { 3322, 3322 }, 00420 { -3322, -3322 }, 00421 { 3324, 3324 }, 00422 { -3324, -3324 }, 00423 { 3334, 3334 }, 00424 { -3334, -3334 }, 00425 { 14122, 14122 }, 00426 { -14122, -14122 }, 00427 { 14124, 14124 }, 00428 { -14124, -14124 }, 00429 { 4112, 4112 }, 00430 { -4112, -4112 }, 00431 { 4114, 4114 }, 00432 { -4114, -4114 }, 00433 { 4212, 4212 }, 00434 { -4212, -4212 }, 00435 { 4214, 4214 }, 00436 { -4214, -4214 }, 00437 { 4222, 4222 }, 00438 { -4222, -4222 }, 00439 { 4224, 4224 }, 00440 { -4224, -4224 }, 00441 { 4312, 4312 }, 00442 { -4312, -4312 }, 00443 { 4322, 4322 }, 00444 { -4322, -4322 }, 00445 { 4324, 4324 }, 00446 { -4324, -4324 }, 00447 { 4122, 4122 }, 00448 { -4122, -4122 }, 00449 { 4132, 4132 }, 00450 { -4132, -4132 }, 00451 { 4232, 4232 }, 00452 { -4232, -4232 }, 00453 { 4314, 4314 }, 00454 { -4314, -4314 }, 00455 { 4332, 4332 }, 00456 { -4332, -4332 }, 00457 { 4334, 4334 }, 00458 { -4334, -4334 }, 00459 { 5112, 5112 }, 00460 { -5112, -5112 }, 00461 { 5114, 5114 }, 00462 { -5114, -5114 }, 00463 { 5122, 5122 }, 00464 { -5122, -5122 }, 00465 { 5132, 5132 }, 00466 { -5132, -5132 }, 00467 { 5212, 5212 }, 00468 { -5212, -5212 }, 00469 { 5214, 5214 }, 00470 { -5214, -5214 }, 00471 { 5222, 5222 }, 00472 { -5222, -5222 }, 00473 { 5224, 5224 }, 00474 { -5224, -5224 }, 00475 { 5232, 5232 }, 00476 { -5232, -5232 }, 00477 { 5312, 5312 }, 00478 { -5312, -5312 }, 00479 { 5314, 5314 }, 00480 { -5314, -5314 }, 00481 { 5322, 5322 }, 00482 { -5322, -5322 }, 00483 { 5324, 5324 }, 00484 { -5324, -5324 }, 00485 { 5332, 5332 }, 00486 { -5332, -5332 }, 00487 { 5334, 5334 }, 00488 { -5334, -5334 }, 00489 { 1101, 1101 }, 00490 { -1101, -1101 }, 00491 { 2101, 2101 }, 00492 { -2101, -2101 }, 00493 { 2201, 2201 }, 00494 { -2201, -2201 }, 00495 { 3101, 3101 }, 00496 { -3101, -3101 }, 00497 { 3201, 3201 }, 00498 { -3201, -3201 }, 00499 { 3301, 3301 }, 00500 { -3301, -3301 }, 00501 { 4101, 4101 }, 00502 { -4101, -4101 }, 00503 { 4201, 4201 }, 00504 { -4201, -4201 }, 00505 { 4301, 4301 }, 00506 { -4301, -4301 }, 00507 { 4401, 4401 }, 00508 { -4401, -4401 }, 00509 { 5101, 5101 }, 00510 { -5101, -5101 }, 00511 { 5201, 5201 }, 00512 { -5201, -5201 }, 00513 { 5301, 5301 }, 00514 { -5301, -5301 }, 00515 { 5401, 5401 }, 00516 { -5401, -5401 }, 00517 { 5501, 5501 }, 00518 { -5501, -5501 }, 00519 { 1103, 1103 }, 00520 { -1103, -1103 }, 00521 { 2103, 2103 }, 00522 { -2103, -2103 }, 00523 { 2203, 2203 }, 00524 { -2203, -2203 }, 00525 { 3103, 3103 }, 00526 { -3103, -3103 }, 00527 { 3203, 3203 }, 00528 { -3203, -3203 }, 00529 { 3303, 3303 }, 00530 { -3303, -3303 }, 00531 { 4103, 4103 }, 00532 { -4103, -4103 }, 00533 { 4203, 4203 }, 00534 { -4203, -4203 }, 00535 { 4303, 4303 }, 00536 { -4303, -4303 }, 00537 { 4403, 4403 }, 00538 { -4403, -4403 }, 00539 { 5103, 5103 }, 00540 { -5103, -5103 }, 00541 { 5203, 5203 }, 00542 { -5203, -5203 }, 00543 { 5303, 5303 }, 00544 { -5303, -5303 }, 00545 { 5403, 5403 }, 00546 { -5403, -5403 }, 00547 { 5503, 5503 }, 00548 { -5503, -5503 }, 00549 { 1011, 1000010020 }, 00550 { -1011, -1000010020 }, 00551 { 1021, 1000010030 }, 00552 { -1021, -1000010030 }, 00553 { 1012, 1000020030 }, 00554 { -1012, -1000020030 }, 00555 { 1022, 1000020040 }, 00556 { -1022, -1000020040 }, 00557 { 100, 101 }, 00558 { 101, 102 }, 00559 { 30343, 30343 }, 00560 { -30343, -30343 }, 00561 { 30353, 30353 }, 00562 { -30353, -30353 }, 00563 { 30373, 30373 }, 00564 { -30373, -30373 }, 00565 { 30383, 30383 }, 00566 { -30383, -30383 }, 00567 { 30363, 30363 }, 00568 { -30363, -30363 }, 00569 { 51, 61 }, 00570 { 52, 62 }, 00571 { 53, 63 }, 00572 { 54, 64 }, 00573 { -51, -61 }, 00574 { -52, -62 }, 00575 { -53, -63 }, 00576 { -54, -64 }, 00577 { 55, 65 }, 00578 { 56, 66 }, 00579 { 57, 67 }, 00580 { 58, 68 }, 00581 { -55, -65 }, 00582 { -56, -66 }, 00583 { -57, -67 }, 00584 { -58, -68 } 00585 }; 00586 00587 int listSize = sizeof(SList)/sizeof(SList[0]); 00588 for( int k=0; k!=listSize; ++k) { 00589 m.insert( std::make_pair( SList[k].hid, SList[k].pid) ); 00590 } 00591 return m; 00592 } // EvtGenPDTMapInit() 00593 00594 PDTEvtGenMap const & PDTEvtGenMapInit() 00595 { 00596 static PDTEvtGenMap m; 00597 static EvtGenPDTMap const & hmap = getEvtGenPDTMap(); 00598 00599 for(EvtGenPDTMap::const_iterator cit=hmap.begin(), mend=hmap.end(); cit!=mend; ++cit ) { 00600 m.insert( std::make_pair( cit->second, cit->first )); 00601 } 00602 return m; 00603 } 00604 00605 // 00606 // getEvtGenPDTMap is the ONLY function allowed to call EvtGenPDTMapInit 00607 // 00608 EvtGenPDTMap const & getEvtGenPDTMap() 00609 { 00610 static EvtGenPDTMap const & hmap = EvtGenPDTMapInit(); 00611 return hmap; 00612 } // getEvtGenPDTMap() 00613 00614 // 00615 // getPDTEvtGenMap is the ONLY function allowed to call EvtGenPDTMapInit 00616 // 00617 PDTEvtGenMap const & getPDTEvtGenMap() 00618 { 00619 static PDTEvtGenMap const & hmap = PDTEvtGenMapInit(); 00620 return hmap; 00621 } // getPDTEvtGenMap() 00622 00623 } // unnamed namespace 00624 00625 int translateEvtGentoPDT( const int id ) 00626 { 00627 static EvtGenPDTMap const & hmap = getEvtGenPDTMap(); 00628 00629 EvtGenPDTMap::const_iterator const cit = hmap.find( id ); 00630 // found it in the map 00631 if ( cit != hmap.end() ) { return cit->second; } 00632 // check to see if someone has defined a valid particle type 00633 // that isn't in the map 00634 if( isValid(id) ) { return id; } 00635 return 0; 00636 } 00637 00638 int translatePDTtoEvtGen( const int id ) 00639 { 00640 static PDTEvtGenMap const & pmap = getPDTEvtGenMap(); 00641 00642 PDTEvtGenMap::const_iterator const cit = pmap.find( id ); 00643 // found it in the map 00644 if ( cit != pmap.end() ) { return cit->second; } 00645 // check to see if someone has defined a valid particle type 00646 // that isn't in the map 00647 if( isValid(id) ) { return id; } 00648 return 0; 00649 } 00650 00651 void writeEvtGenTranslationLine( int i, std::ostream & os ) 00652 { 00653 // only write map entries 00654 static EvtGenPDTMap const & hmap = getEvtGenPDTMap(); 00655 00656 EvtGenPDTMap::const_iterator const cit = hmap.find( i ); 00657 // found it in the map 00658 if ( cit != hmap.end() ) { 00659 int id = cit->second; 00660 os << " EvtGen number: " ; 00661 os.width(10); 00662 os << i << " HepPID number: " ; 00663 os.width(11); 00664 os << id << " " << particleName(id) << std::endl; 00665 // check reverse translation 00666 int iback = translatePDTtoEvtGen(id); 00667 if(iback != i) { 00668 os << " WARNING: " << id << " translates back to " 00669 << iback << " not to " << i << std::endl; 00670 } 00671 } 00672 return; 00673 } // writeEvtGenTranslationLine() 00674 00675 void writeEvtGenTranslation( std::ostream & os ) 00676 { 00677 writeVersion( os ); 00678 os << " HepPID Particle List" << std::endl; 00679 os << std::endl; 00680 00681 int id, i, j, q1, q2, q3, l, m; 00682 // special cases 00683 for( id=1; id<102; ++id) { 00684 writeEvtGenTranslationLine( id, os ); 00685 writeEvtGenTranslationLine( -id, os ); 00686 } 00687 for( i=11; i<1000; ++i) { 00688 id = i*10; 00689 writeEvtGenTranslationLine( id, os ); 00690 writeEvtGenTranslationLine( -id, os ); 00691 } 00692 // diquark 00693 for( q2=1; q2<7; ++q2) { 00694 for( q1=1; q1<7; ++q1) { 00695 for( j=1; j<4; ++j) { 00696 id = 1000*q2+100*q1+j; 00697 writeEvtGenTranslationLine( id, os ); 00698 writeEvtGenTranslationLine( -id, os ); 00699 } 00700 } 00701 } 00702 // mesons 00703 for( q2=1; q2<10; ++q2) { 00704 for( q1=1; q1<10; ++q1) { 00705 for( j=1; j<10; ++j) { 00706 for( m=0; m<9; ++m) { 00707 for( l=0; l<10; ++l) { 00708 id = 100000*m+10000*l+100*q2+10*q1+j; 00709 writeEvtGenTranslationLine( id, os ); 00710 writeEvtGenTranslationLine( -id, os ); 00711 } 00712 } 00713 } 00714 } 00715 } 00716 // baryons 00717 for( q3=1; q3<10; ++q3) { 00718 for( q2=1; q2<10; ++q2) { 00719 for( q1=1; q1<10; ++q1) { 00720 for( j=1; j<10; ++j) { 00721 for( m=0; m<9; ++m) { 00722 id = 10000*m+1000*q3+100*q2+10*q1+j; 00723 writeEvtGenTranslationLine( id, os ); 00724 writeEvtGenTranslationLine( -id, os ); 00725 } 00726 } 00727 } 00728 } 00729 } 00730 // ions 00731 for( i=1; i<3; ++i) { 00732 for( m=1; m<3; ++m) { 00733 id = 1000+10*i+m; 00734 writeEvtGenTranslationLine( id, os ); 00735 writeEvtGenTranslationLine( -id, os ); 00736 } 00737 } 00738 00739 return; 00740 } // writeEvtGenTranslation() 00741 00742 } // HepPID