HepPDT Reference Documentation

HepPDT

hasMethods.cc

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------
00002 //
00003 // hasMethods.cc
00004 // Author: Lynn Garren
00005 //
00006 //  check to see if this ParticleData has a particular constituent
00007 //  look at Constituents, not PID
00008 //
00009 // ----------------------------------------------------------------------
00010 
00011 #include "HepPDT/defs.h"
00012 #include "HepPDT/ParticleData.hh"
00013 
00014 namespace HepPDT {
00015 
00016 bool ParticleData::hasUp( ) const
00017 {
00018     unsigned int i;
00019     if( itsQuarks.size() == 0 ) { return false; }
00020     for( i=0; i<itsQuarks.size(); ++i ) {
00021        if( itsQuarks[i].isUp() ) { return true; }
00022     }
00023     return false;
00024 }
00025 
00026 bool ParticleData::hasDown( ) const
00027 {
00028     unsigned int i;
00029     if( itsQuarks.size() == 0 ) { return false; }
00030     for( i=0; i<itsQuarks.size(); ++i ) {
00031        if( itsQuarks[i].isDown() ) { return true; }
00032     }
00033     return false;
00034 }
00035 
00036 bool ParticleData::hasStrange( ) const
00037 {
00038     unsigned int i;
00039     if( itsQuarks.size() == 0 ) { return false; }
00040     for( i=0; i<itsQuarks.size(); ++i ) {
00041        if( itsQuarks[i].isStrange() ) { return true; }
00042     }
00043     return false;
00044 }
00045 
00046 bool ParticleData::hasCharm( ) const
00047 {
00048     unsigned int i;
00049     if( itsQuarks.size() == 0 ) { return false; }
00050     for( i=0; i<itsQuarks.size(); ++i ) {
00051        if( itsQuarks[i].isCharm() ) { return true; }
00052     }
00053     return false;
00054 }
00055 
00056 bool ParticleData::hasBottom( ) const
00057 {
00058     unsigned int i;
00059     if( itsQuarks.size() == 0 ) { return false; }
00060     for( i=0; i<itsQuarks.size(); ++i ) {
00061        if( itsQuarks[i].isBottom() ) { return true; }
00062     }
00063     return false;
00064 }
00065 
00066 bool ParticleData::hasTop( ) const
00067 {
00068     unsigned int i;
00069     if( itsQuarks.size() == 0 ) { return false; }
00070     for( i=0; i<itsQuarks.size(); ++i ) {
00071        if( itsQuarks[i].isTop() ) { return true; }
00072     }
00073     return false;
00074 }
00075 
00076 } // HepPDT

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