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( isDyon() ) { return q; }
00020     if( fundamentalID() <= 100 && fundamentalID() > 0 ) { return q; }
00021     q.nq1 = digit(nq1);
00022     q.nq2 = digit(nq2);
00023     q.nq3 = digit(nq3);
00024     int js = abspid()%10;
00025     if( abspid() == 130 || abspid() == 310 ) {  // Ks and KL
00026         if ( itsPID < 0 ) {
00027             q.nq3=-q.nq3; 
00028         } else {
00029             q.nq2=-q.nq2;
00030         }
00031         return q;
00032     }
00033     if( js == 0 ) { return q; }
00034     if( q.nq3 > 0 && q.nq2 > 0 && q.nq1 == 0 ) {                // meson
00035         if( q.nq2 == 3 || q.nq2 == 5 ) {                // strange and beauty
00036             if ( itsPID < 0 ) {
00037                 q.nq3=-q.nq3; 
00038             } else {
00039                 q.nq2=-q.nq2;
00040             }
00041         } else {
00042             if ( itsPID < 0 ) {
00043                 q.nq2=-q.nq2; 
00044             } else {
00045                 q.nq3=-q.nq3;
00046             }
00047         }
00048         return q;
00049     } else if( q.nq3 == 0 && q.nq2 > 0 && q.nq1 > 0 ) { // diquark
00050         if ( itsPID < 0 ) {
00051             q.nq2=-q.nq2;
00052             q.nq1=-q.nq1; 
00053         }
00054         return q;
00055     } else if( q.nq1 > 0 && q.nq2 > 0 && q.nq3 > 0 ) {  // baryon
00056         if ( itsPID < 0 ) {
00057             q.nq1=-q.nq1;
00058             q.nq2=-q.nq2;
00059             q.nq3=-q.nq3; 
00060         }
00061     }
00062     return q;
00063 }
00064 
00065 } // HepPDT

Generated on Fri Dec 4 14:05:23 2009 for HepPDT by  doxygen 1.4.7