HepPDT Reference Documentation

HepPDT

quarks.cc

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------
00002 //
00003 // quarks.cc
00004 //
00005 //  returns a list of charged quarks
00006 //
00007 // ----------------------------------------------------------------------
00008 
00009 #include "HepPDT/defs.h"
00010 #include "HepPDT/ParticleID.hh"
00011 
00012 namespace HepPDT {
00013 
00014 Quarks ParticleID::quarks( ) const
00015 {
00016     struct Quarks q;
00017     q.nq1 = q.nq2 = q.nq3 = 0;
00018     if( abspid() <= 100 || extraBits() > 0 ) { return q; }
00019     if( fundamentalID() <= 100 && fundamentalID() > 0 ) { return q; }
00020     q.nq1 = digit(nq1);
00021     q.nq2 = digit(nq2);
00022     q.nq3 = digit(nq3);
00023     int js = abspid()%10;
00024     if( abspid() == 130 || abspid() == 310 ) {  // Ks and KL
00025         if ( itsPID < 0 ) {
00026             q.nq3=-q.nq3; 
00027         } else {
00028             q.nq2=-q.nq2;
00029         }
00030         return q;
00031     }
00032     if( js == 0 ) { return q; }
00033     if( q.nq3 > 0 && q.nq2 > 0 && q.nq1 == 0 ) {                // meson
00034         if( q.nq2 == 3 || q.nq2 == 5 ) {                // strange and beauty
00035             if ( itsPID < 0 ) {
00036                 q.nq3=-q.nq3; 
00037             } else {
00038                 q.nq2=-q.nq2;
00039             }
00040         } else {
00041             if ( itsPID < 0 ) {
00042                 q.nq2=-q.nq2; 
00043             } else {
00044                 q.nq3=-q.nq3;
00045             }
00046         }
00047         return q;
00048     } else if( q.nq3 == 0 && q.nq2 > 0 && q.nq1 > 0 ) { // diquark
00049         if ( itsPID < 0 ) {
00050             q.nq2=-q.nq2;
00051             q.nq1=-q.nq1; 
00052         }
00053         return q;
00054     } else if( q.nq1 > 0 && q.nq2 > 0 && q.nq3 > 0 ) {  // baryon
00055         if ( itsPID < 0 ) {
00056             q.nq1=-q.nq1;
00057             q.nq2=-q.nq2;
00058             q.nq3=-q.nq3; 
00059         }
00060     }
00061     return q;
00062 }
00063 
00064 } // HepPDT

Generated on Fri Oct 24 13:41:36 2008 for HepPDT by  doxygen 1.5.1-3