Pdt Class Reference

#include <Pdt.h>

List of all members.

Static Public Member Functions

static PdtEntrylookup (const std::string &name)
static PdtEntrylookup (PdtLund::LundType id)
static PdtEntrylookup (PdtGeant::GeantType id)
static PdtEntrylookup (PdtPdg::PdgType id)
static PdtEntrylookup (PdtPid::PidType id, int charge=-1)
static PdtEntrylookup (PdtPid::PidNeutralType id, int charge=0)
static bool sameOrConj (PdtLund::LundType id1, PdtLund::LundType id2)
static bool sameOrConj (PdtPdg::PdgType id1, PdtPdg::PdgType id2)
static bool sameOrConj (PdtEntry *id1, PdtEntry *id2)
static const PdtEntryconjugate (const PdtEntry *)
static float mass (PdtLund::LundType id)
static float mass (PdtGeant::GeantType id)
static float mass (PdtPid::PidType id)
static float mass (PdtPid::PidNeutralType id)
static float mass (const char *name)
static float width (PdtLund::LundType id)
static float width (PdtGeant::GeantType id)
static float width (PdtPid::PidType id)
static float width (PdtPid::PidNeutralType id)
static float width (const char *name)
static float lifetime (PdtLund::LundType id)
static float lifetime (PdtGeant::GeantType id)
static float lifetime (PdtPid::PidType id)
static float lifetime (PdtPid::PidNeutralType id)
static float lifetime (const char *name)
static float spin (PdtLund::LundType id)
static float spin (PdtGeant::GeantType id)
static float spin (PdtPid::PidType id)
static float spin (PdtPid::PidNeutralType id)
static float spin (const char *name)
static float charge (PdtLund::LundType id)
static float charge (PdtGeant::GeantType id)
static float charge (const char *name)
static PdtLund::LundType antiCode (PdtLund::LundType)
static void readMCppTable (std::string filenm)
static void deleteAll ()
static void printOn (std::ostream &)
static void addParticle (const char *pname, PdtLund::LundType id, float spin, float charge, float mass, float width=0.0, float cut=0.0)
static void addParticle (const char *pname, PdtGeant::GeantType id, float spin, float charge, float mass, float width=0.0, float cut=0.0)
static void addDecay (const char *pname, float bf, const char *child1, const char *child2=0, const char *child3=0, const char *child4=0, const char *child5=0)
static void addDecay (PdtLund::LundType id, float bf, PdtLund::LundType child1, PdtLund::LundType child2=PdtLund::null, PdtLund::LundType child3=PdtLund::null, PdtLund::LundType child4=PdtLund::null, PdtLund::LundType child5=PdtLund::null)
static PdtLund::LundType lundId (const PdtGeant::GeantType)
static PdtLund::LundType lundId (const PdtPdg::PdgType)
static PdtLund::LundType lundId (const PdtPid::PidType, int charge=-1)
static PdtLund::LundType lundId (const PdtPid::PidNeutralType, int charge=0)
static PdtPdg::PdgType pdgId (const PdtLund::LundType)
static PdtPdg::PdgType pdgId (const PdtPid::PidType pid, int charge=-1)
static PdtPdg::PdgType pdgId (const PdtPid::PidNeutralType pid, int charge=0)
static PdtPdg::PdgType pdgPid (const PdtGeant::GeantType geant)
static PdtGeant::GeantType geantId (const PdtLund::LundType)
static PdtGeant::GeantType geantId (const PdtPid::PidType, int charge=-1)
static PdtGeant::GeantType geantId (const PdtPid::PidNeutralType, int charge=0)
static PdtGeant::GeantType geantId (const PdtPdg::PdgType pdg)
static PdtPid::PidType pidId (const PdtLund::LundType)
static PdtPid::PidType pidId (const PdtGeant::GeantType)
static PdtPid::PidType pidId (const PdtPdg::PdgType pdg)
static PdtPid::PidNeutralType pidNeutId (const PdtLund::LundType)
static PdtPid::PidNeutralType pidNeutId (const PdtGeant::GeantType)
static PdtPid::PidNeutralType pidNeutId (const PdtPdg::PdgType pdg)
static PdtLund::LundType lundId (const int id)
static PdtGeant::GeantType geantId (const int id)
static PdtPid::PidType pidId (const int id)
static PdtPid::PidNeutralType pidNeutId (const int id)
static PdtPdg::PdgType pdgId (const int id)

Static Private Member Functions

static unsigned PdtNumHash (const int &num)
static unsigned PdtNameHash (const std::string &c)

Static Private Attributes

static std::map< int, PdtEntry * > * _entries = new map<int, PdtEntry*>
static AstStringMap< PdtEntry > * _entriesn = new AstStringMap< PdtEntry >
static std::map< int, PdtEntry * > * _entriesg = new map<int, PdtEntry*>
static std::map< int, PdtEntry * > * _entriesl = new map<int, PdtEntry*>
static PdtEntry_positiveEntries [5] = {0,0,0,0,0}
static PdtEntry_negativeEntries [5] = {0,0,0,0,0}
static PdtEntry_neutralEntries [5] = {0,0,0,0,0}


Detailed Description

Definition at line 49 of file Pdt.h.


Member Function Documentation

void Pdt::addDecay ( PdtLund::LundType  id,
float  bf,
PdtLund::LundType  child1,
PdtLund::LundType  child2 = PdtLund::null,
PdtLund::LundType  child3 = PdtLund::null,
PdtLund::LundType  child4 = PdtLund::null,
PdtLund::LundType  child5 = PdtLund::null 
) [static]

Definition at line 182 of file Pdt.cxx.

References PdtEntry::addDecay(), and lookup().

00187                                           {
00188  
00189   PdtEntry *primary = lookup(id);
00190   if (primary == 0) return;
00191 
00192   PdtLund::LundType children[5] = {child1, child2, child3, child4, child5};
00193   vector<PdtEntry*> *kids = new vector<PdtEntry*>;
00194   
00195   int nkids;
00196   for(nkids=0; nkids<5 && children[nkids]!=0; nkids++ )
00197   {  
00198     PdtEntry* secondary = lookup(children[nkids]);
00199     if( secondary ==0 ) break;
00200     kids->push_back(secondary);
00201   }
00202   
00203   primary->addDecay(bf, kids );
00204 
00205 }

void Pdt::addDecay ( const char *  pname,
float  bf,
const char *  child1,
const char *  child2 = 0,
const char *  child3 = 0,
const char *  child4 = 0,
const char *  child5 = 0 
) [static]

Definition at line 160 of file Pdt.cxx.

References PdtEntry::addDecay(), and lookup().

00162                                                           {
00163  
00164   PdtEntry *primary = lookup(pname);
00165   if (primary == 0) return;
00166   const char *children[5] = {child1, child2, child3, child4, child5};
00167 
00168   vector<PdtEntry*> *kids = new vector<PdtEntry*>;
00169   
00170   int nkids;
00171   for(nkids=0; nkids<5 && children[nkids]!=0; nkids++ )
00172   {  
00173     PdtEntry* secondary = lookup(children[nkids]);
00174     if( secondary ==0 ) break;
00175     kids->push_back(secondary);
00176   }
00177   
00178   primary->addDecay(bf, kids );
00179 
00180 }

void Pdt::addParticle ( const char *  pname,
PdtGeant::GeantType  id,
float  spin,
float  charge,
float  mass,
float  width = 0.0,
float  cut = 0.0 
) [static]

Definition at line 125 of file Pdt.cxx.

References _entriesg, _entriesn, _negativeEntries, _neutralEntries, _positiveEntries, PdtEntry::charge(), PdtEntry::geantId(), AstStringMap< T >::insert(), lundId(), PdtPid::none, PdtPid::null, PdtGeant::null, pdgId(), PdtEntry::pidId(), and PdtEntry::pidNeutId().

00127                                              {
00128 
00129   PdtEntry* nentry = new PdtEntry(pname, id, spin, charge, mass, width, cut);
00130 
00131   (*_entries)[pdgId(id)]=nentry;
00132   if ( (*_entriesn)[pname] != 0 ) {
00133     //cout << "Pdt::addParticle:adding existing particle:"<<pname<<endl;
00134   }
00135 
00136   _entriesn->insert( pname )=nentry;
00137   if(PdtGeant::null!=nentry->geantId()){
00138     (*_entriesg)[id]=nentry;
00139   }
00140 
00141   (*_entriesl)[lundId(id)]=nentry;
00142 
00143   if(PdtPid::null!=nentry->pidId()) {
00144     if(nentry->charge()>0) {
00145       _positiveEntries[nentry->pidId()]=nentry;
00146     }else{
00147       _negativeEntries[nentry->pidId()]=nentry;
00148     }
00149 
00150   }
00151 
00152   if(PdtPid::none!=nentry->pidNeutId()){
00153     if(nentry->charge()==0) {
00154       _neutralEntries[nentry->pidNeutId()]=nentry;
00155     }
00156   }
00157 
00158 }

void Pdt::addParticle ( const char *  pname,
PdtLund::LundType  id,
float  spin,
float  charge,
float  mass,
float  width = 0.0,
float  cut = 0.0 
) [static]

Definition at line 91 of file Pdt.cxx.

References _entriesg, _entriesn, _negativeEntries, _neutralEntries, _positiveEntries, PdtEntry::charge(), PdtEntry::geantId(), AstStringMap< T >::insert(), PdtPid::none, PdtPid::null, PdtGeant::null, pdgId(), PdtEntry::pidId(), and PdtEntry::pidNeutId().

00093                                              {
00094 
00095   PdtEntry* nentry = new PdtEntry(pname, id, spin, charge, mass, width, cut);
00096   (*_entries)[pdgId(id)]=nentry;
00097 
00098   if ( (*_entriesn)[pname] != 0 ) {
00099     //cout << "Pdt::addParticle:adding existing particle:"<<pname<<endl;
00100   }
00101 
00102   _entriesn->insert( pname )=nentry;
00103   if(PdtGeant::null!=nentry->geantId()){
00104     (*_entriesg)[nentry->geantId()]=nentry;
00105   }
00106 
00107   (*_entriesl)[id]=nentry;
00108 
00109   if(PdtPid::null!=nentry->pidId()) {
00110     if(nentry->charge()>0) {
00111       _positiveEntries[nentry->pidId()]=nentry;
00112     }else{
00113       _negativeEntries[nentry->pidId()]=nentry;
00114     }
00115   }
00116 
00117   if(PdtPid::none!=nentry->pidNeutId()){
00118     if(nentry->charge()==0){
00119       _neutralEntries[nentry->pidNeutId()]=nentry;
00120     }
00121   }
00122 
00123 }

PdtLund::LundType Pdt::antiCode ( PdtLund::LundType   )  [static]

Definition at line 73 of file Pdt.cxx.

References lundId().

00073                                                   {
00074 
00075   int kf = (int) kf_id;
00076   
00077   int i2 = (kf/10) % 10;
00078   int i3 = (kf/100) % 10;
00079   int i4 = (kf/1000) % 10;
00080   
00081   if (i2 == i3 && i4 == 0 && kf > 100)
00082     return lundId(kf);
00083   else if (kf >= 21 && kf <= 23) return lundId(kf);
00084   
00085   else if (kf == 310) return lundId(130);
00086   else if (kf == 130) return lundId(310);
00087   
00088   else return lundId(-kf);
00089 }

static float Pdt::charge ( const char *  name  )  [inline, static]

Definition at line 105 of file Pdt.h.

References PdtEntry::charge(), and lookup().

00105 { return lookup(name)->charge(); }

static float Pdt::charge ( PdtGeant::GeantType  id  )  [inline, static]

Definition at line 104 of file Pdt.h.

References PdtEntry::charge(), and lookup().

00104 { return lookup(id)->charge(); }

static float Pdt::charge ( PdtLund::LundType  id  )  [inline, static]

Definition at line 103 of file Pdt.h.

References PdtEntry::charge(), and lookup().

Referenced by pdgId().

00103 { return lookup(id)->charge(); }

const PdtEntry * Pdt::conjugate ( const PdtEntry  )  [static]

Definition at line 681 of file Pdt.cxx.

References _entries, key, and PdtEntry::pdgId().

Referenced by PdtEntry::conjugate().

00682 {
00683   if( pdt==0 ) return 0;
00684   PdtEntry* conjPdt = (PdtEntry*) pdt;
00685 
00686   // get the key
00687   int key = (int) pdt->pdgId();
00688 
00689   // switch the key
00690   key *= -1;
00691   
00692   // look for an entry in the dictionary
00693 
00694   map<int, PdtEntry*>::iterator iter=_entries->find(key);
00695   
00696   if ( iter!=_entries->end()  ) {
00697     //found a match.
00698     conjPdt=iter->second;
00699   }
00700   //otherwise its self conjugate - we should just return..
00701 
00702   // return the conjugate
00703   return conjPdt;
00704 }

void Pdt::deleteAll (  )  [static]

Definition at line 393 of file Pdt.cxx.

References _entries, _entriesg, _entriesl, _entriesn, and AstStringMap< T >::clear().

00393                    {
00394 
00395   PdtEntry *p;
00396 
00397   map<int, PdtEntry*>::iterator iter=_entries->begin();
00398 
00399   while ( iter != _entries->end()) {
00400     p = iter->second;
00401     assert(0!=p);
00402     delete p;
00403     ++iter;
00404   }
00405 
00406   _entries->clear();
00407   _entriesn->clear();
00408   _entriesg->clear();
00409   _entriesl->clear();
00410 }

static PdtGeant::GeantType Pdt::geantId ( const int  id  )  [inline, static]

Definition at line 181 of file Pdt.h.

00181 { return (PdtGeant::GeantType) id; }; 

static PdtGeant::GeantType Pdt::geantId ( const PdtPdg::PdgType  pdg  )  [inline, static]

Definition at line 160 of file Pdt.h.

References geantId(), and lundId().

00161     { return geantId(lundId(pdg)); }

PdtGeant::GeantType Pdt::geantId ( const PdtPid::PidNeutralType  ,
int  charge = 0 
) [static]

Definition at line 504 of file Pdt.cxx.

References geantId(), and lundId().

00504                                                                         {
00505   return geantId(lundId(pId, charge)); 
00506 }

PdtGeant::GeantType Pdt::geantId ( const PdtPid::PidType  ,
int  charge = -1 
) [static]

Definition at line 500 of file Pdt.cxx.

References geantId(), and lundId().

00500                                                                  {
00501   return geantId(lundId(pId, charge)); 
00502 }

PdtGeant::GeantType Pdt::geantId ( const PdtLund::LundType   )  [static]

Definition at line 427 of file Pdt.cxx.

References PdtGeant::_lundId, PdtGeant::_nGeantId, PdtLund::anti_nu_e, PdtLund::anti_nu_mu, PdtLund::anti_nu_tau, PdtGeant::nu_e, PdtLund::nu_e, PdtLund::nu_mu, PdtLund::nu_tau, and PdtGeant::null.

Referenced by geantId().

00427                                                        {
00428 
00429   //
00430   // special case:
00431   // GEANT has only one neutrino
00432   //
00433   if (lId == PdtLund::nu_e ||
00434       lId == PdtLund::anti_nu_e ||
00435       lId == PdtLund::nu_mu ||
00436       lId == PdtLund::anti_nu_mu ||
00437       lId == PdtLund::nu_tau ||
00438       lId == PdtLund::anti_nu_tau )
00439   { return PdtGeant::nu_e; }
00440   else
00441   {
00442     int i;
00443     for(i = 0; i< PdtGeant::_nGeantId; i++)
00444     { if (PdtGeant::_lundId[i] == lId) return geantId(i); }
00445     return PdtGeant::null;
00446   }
00447 }

static float Pdt::lifetime ( const char *  name  )  [inline, static]

Definition at line 93 of file Pdt.h.

References PdtEntry::lifetime(), and lookup().

00093 { return lookup(name)->lifetime(); }

static float Pdt::lifetime ( PdtPid::PidNeutralType  id  )  [inline, static]

Definition at line 92 of file Pdt.h.

References PdtEntry::lifetime(), and lookup().

00092 { return lookup(id)->lifetime(); }

static float Pdt::lifetime ( PdtPid::PidType  id  )  [inline, static]

Definition at line 91 of file Pdt.h.

References PdtEntry::lifetime(), and lookup().

00091 { return lookup(id)->lifetime(); }

static float Pdt::lifetime ( PdtGeant::GeantType  id  )  [inline, static]

Definition at line 90 of file Pdt.h.

References PdtEntry::lifetime(), and lookup().

00090 { return lookup(id)->lifetime(); }

static float Pdt::lifetime ( PdtLund::LundType  id  )  [inline, static]

Definition at line 89 of file Pdt.h.

References PdtEntry::lifetime(), and lookup().

00089 { return lookup(id)->lifetime(); }

PdtEntry * Pdt::lookup ( PdtPid::PidNeutralType  id,
int  charge = 0 
) [static]

Definition at line 235 of file Pdt.cxx.

References _neutralEntries, lookup(), PdtPid::none, and PdtLund::null.

00235                                                             {
00236 
00237   // look for the particle by PID code id and charge
00238 
00239   if(id==PdtPid::none) return lookup(PdtLund::null);
00240   return _neutralEntries[id];
00241 
00242 }

PdtEntry * Pdt::lookup ( PdtPid::PidType  id,
int  charge = -1 
) [static]

Definition at line 226 of file Pdt.cxx.

References _negativeEntries, _positiveEntries, lookup(), PdtLund::null, and PdtPid::null.

00226                                                  {
00227 
00228   // look for the particle by PID code id and charge
00229   if(id==PdtPid::null) return lookup(PdtLund::null);
00230   if(charge>0) return _positiveEntries[id];
00231   return _negativeEntries[id];
00232 
00233 }

PdtEntry * Pdt::lookup ( PdtPdg::PdgType  id  )  [static]

Definition at line 221 of file Pdt.cxx.

References _entries.

00221                                      {
00222   // look for the particle by PDG id
00223   return (*_entries)[id];
00224 }

PdtEntry * Pdt::lookup ( PdtGeant::GeantType  id  )  [static]

Definition at line 216 of file Pdt.cxx.

References _entriesg.

00216                                          {
00217   // look for the particle by GEANT id
00218   return (*_entriesg)[id];
00219 }

PdtEntry * Pdt::lookup ( PdtLund::LundType  id  )  [static]

Definition at line 211 of file Pdt.cxx.

References _entriesl.

00211                                        {
00212   // look for the particle by Particle Data Group id
00213   return (*_entriesl)[id];
00214 }

PdtEntry * Pdt::lookup ( const std::string name  )  [static]

Definition at line 207 of file Pdt.cxx.

References _entriesn.

Referenced by addDecay(), TrkLineRep::arrivalTime(), TrkRep::arrivalTime(), charge(), lifetime(), lookup(), mass(), sameOrConj(), spin(), and width().

00207                                             {
00208   return (*_entriesn)[name];
00209 }

static PdtLund::LundType Pdt::lundId ( const int  id  )  [inline, static]

Definition at line 180 of file Pdt.h.

00180 { return (PdtLund::LundType) id; }; 

PdtLund::LundType Pdt::lundId ( const PdtPid::PidNeutralType  ,
int  charge = 0 
) [static]

Definition at line 553 of file Pdt.cxx.

References PdtLund::anti_n0, PdtPid::anti_neutron, PdtLund::gamma, PdtPid::gamma, PdtPid::K0L, PdtLund::K_L0, PdtLund::n0, PdtPid::neutron, PdtLund::null, PdtLund::pi0, and PdtPid::pi0.

00553                                                                       {
00554   
00555   if (charge == 0)
00556     {
00557      switch(pId)
00558      {
00559        case PdtPid::gamma:
00560          return PdtLund::gamma;
00561        case PdtPid::pi0:
00562          return PdtLund::pi0;
00563        case PdtPid::K0L:
00564          return PdtLund::K_L0;
00565        case PdtPid::neutron:
00566          return PdtLund::n0;
00567        case PdtPid::anti_neutron:
00568          return PdtLund::anti_n0;
00569        default:
00570          return PdtLund::null;
00571      }
00572     }
00573   else
00574     {
00575       cerr << "error: wrong charge; must be +1 or -1" << endl;
00576       return PdtLund::null;
00577     }
00578 }

PdtLund::LundType Pdt::lundId ( const PdtPid::PidType  ,
int  charge = -1 
) [static]

Definition at line 508 of file Pdt.cxx.

References PdtLund::anti_p_minus, PdtLund::e_minus, PdtLund::e_plus, PdtPid::electron, PdtLund::K_minus, PdtLund::K_plus, PdtPid::kaon, PdtPid::muon, PdtLund::null, PdtLund::p_plus, PdtLund::pi_minus, PdtLund::pi_plus, PdtPid::pion, and PdtPid::proton.

00508                                                                {
00509  
00510   if(charge == -1)
00511     {
00512      switch(pId)
00513      {
00514        case PdtPid::electron:
00515          return PdtLund::e_minus;
00516        case PdtPid::muon:
00517          return PdtLund::pi_minus;
00518        case PdtPid::pion:
00519          return PdtLund::pi_minus;
00520        case PdtPid::kaon:
00521          return PdtLund::K_minus;
00522        case PdtPid::proton:
00523          return PdtLund::anti_p_minus;
00524        default:
00525          return PdtLund::null;
00526      } 
00527     }
00528   else if (charge == 1)
00529     {
00530      switch(pId)
00531      {
00532        case PdtPid::electron:
00533          return PdtLund::e_plus;
00534        case PdtPid::muon:
00535          return PdtLund::pi_plus;
00536        case PdtPid::pion:
00537          return PdtLund::pi_plus;
00538        case PdtPid::kaon:
00539          return PdtLund::K_plus;
00540        case PdtPid::proton:
00541          return PdtLund::p_plus;
00542        default:
00543          return PdtLund::null;
00544      } 
00545     }
00546   else
00547     {
00548       cerr << "error: wrong charge; must be +1 or -1" << endl;
00549       return PdtLund::null;
00550     }
00551 }

PdtLund::LundType Pdt::lundId ( const PdtPdg::PdgType   )  [static]

Definition at line 580 of file Pdt.cxx.

References lundId().

00580                                                      {
00581 
00582   int ret;
00583   switch ( (int) pdg ) {
00584   case 551:           // chi_0b
00585     ret = 10551 ;
00586   case 10443:         // chi_1c
00587     ret = 20443 ;
00588   case 20443:         // psi(2S) 
00589     ret = 30443 ;
00590   case 30443:         // psi(3770)
00591     ret = 40443 ;
00592   case 20553:         // Upsilon(2S)
00593     ret = 30553 ;
00594   case 4322:          // Xi_c+
00595     ret = 4232 ;
00596   case -4322:         // Anti Xi_c+
00597     ret = -4232 ;
00598   case 4232:          // Xi'_c+
00599     ret = 4322 ;
00600   case -4232:         // Anti Xi'_c+
00601     ret = -4322 ;
00602   default:            // All the rest is the same (hopefully)
00603     ret = (int) pdg;
00604   } 
00605   return lundId(ret);
00606 }

PdtLund::LundType Pdt::lundId ( const PdtGeant::GeantType   )  [static]

Definition at line 413 of file Pdt.cxx.

References PdtGeant::_firstGeantId, PdtGeant::_lundId, PdtGeant::alpha, PdtGeant::Cerenkov, PdtGeant::deuteron, PdtGeant::geantino, PdtGeant::He3, PdtLund::null, and PdtGeant::tritium.

Referenced by addParticle(), antiCode(), geantId(), lundId(), pdgId(), pdgPid(), pidId(), and pidNeutId().

00413                                                       { 
00414 
00415   if (gId == PdtGeant::deuteron ||
00416       gId == PdtGeant::tritium ||
00417       gId == PdtGeant::alpha ||
00418       gId == PdtGeant::geantino ||
00419       gId == PdtGeant::He3 ||
00420       gId == PdtGeant::Cerenkov)
00421   { return PdtLund::null; }
00422   else
00423   { return PdtGeant::_lundId[gId - PdtGeant::_firstGeantId]; }
00424 
00425 }

static float Pdt::mass ( const char *  name  )  [inline, static]

Definition at line 79 of file Pdt.h.

References lookup(), and PdtEntry::mass().

00079 { return lookup(name)->mass(); }

static float Pdt::mass ( PdtPid::PidNeutralType  id  )  [inline, static]

Definition at line 78 of file Pdt.h.

References lookup(), and PdtEntry::mass().

00078 { return lookup(id)->mass();}

static float Pdt::mass ( PdtPid::PidType  id  )  [inline, static]

Definition at line 77 of file Pdt.h.

References lookup(), and PdtEntry::mass().

00077 { return lookup(id)->mass();}

static float Pdt::mass ( PdtGeant::GeantType  id  )  [inline, static]

Definition at line 76 of file Pdt.h.

References lookup(), and PdtEntry::mass().

00076 { return lookup(id)->mass(); }

static float Pdt::mass ( PdtLund::LundType  id  )  [inline, static]

Definition at line 75 of file Pdt.h.

References lookup(), and PdtEntry::mass().

00075 { return lookup(id)->mass(); }

static PdtPdg::PdgType Pdt::pdgId ( const int  id  )  [inline, static]

Definition at line 184 of file Pdt.h.

00184 { return (PdtPdg::PdgType) id; };

static PdtPdg::PdgType Pdt::pdgId ( const PdtPid::PidNeutralType  pid,
int  charge = 0 
) [inline, static]

Definition at line 152 of file Pdt.h.

References charge(), lundId(), and pdgId().

00153     { return pdgId(lundId(pid, charge)); }

static PdtPdg::PdgType Pdt::pdgId ( const PdtPid::PidType  pid,
int  charge = -1 
) [inline, static]

Definition at line 150 of file Pdt.h.

References charge(), lundId(), and pdgId().

00151     { return pdgId(lundId(pid, charge)); }

PdtPdg::PdgType Pdt::pdgId ( const PdtLund::LundType   )  [static]

Definition at line 608 of file Pdt.cxx.

Referenced by addParticle(), pdgId(), and pdgPid().

00608                                                      {
00609 
00610   int ret;
00611   switch ( (int) lund ) {
00612   case 551:           // eta_b does not exist in PDG
00613     ret = 0 ;
00614   case 10551:         // chi_0b
00615     ret = 551 ;
00616   case 10443:         // h_1c does not exist in PDG
00617     ret = 0 ;
00618   case 20443:         // chi_1c
00619     ret = 10443 ;
00620   case 30443:         // psi(2S) 
00621     ret = 20443 ;
00622   case 40443:         // psi(3770)
00623     ret = 30443 ;
00624   case 30553:         // Upsilon(2S)
00625     ret = 20553 ;
00626   case 4232:          // Xi_c+
00627     ret = 4322 ;
00628   case -4232:         // Anti Xi_c+
00629     ret = -4322 ;
00630   case 4322:          // Xi'_c+
00631     ret = 4232 ;
00632   case -4322:         // Anti Xi'_c+
00633     ret = -4232 ;
00634   default:            // All the rest is the same (hopefully)
00635     ret = (int) lund ;
00636   }
00637   return pdgId(ret);
00638 }

static PdtPdg::PdgType Pdt::pdgPid ( const PdtGeant::GeantType  geant  )  [inline, static]

Definition at line 154 of file Pdt.h.

References lundId(), and pdgId().

00155     { return pdgId(lundId(geant)); }

static unsigned Pdt::PdtNameHash ( const std::string c  )  [static, private]

unsigned Pdt::PdtNumHash ( const int &  num  )  [static, private]

Definition at line 642 of file Pdt.cxx.

References PdtHashSize.

00642                                       {
00643 
00644   //Simple hash function from particle numbers
00645 
00646   if (num>0) return num%PdtHashSize;
00647   return (1-num)%PdtHashSize;
00648 }

static PdtPid::PidType Pdt::pidId ( const int  id  )  [inline, static]

Definition at line 182 of file Pdt.h.

00182 { return (PdtPid::PidType) id; }; 

static PdtPid::PidType Pdt::pidId ( const PdtPdg::PdgType  pdg  )  [inline, static]

Definition at line 165 of file Pdt.h.

References lundId(), and pidId().

00166     { return pidId(lundId(pdg)); }

PdtPid::PidType Pdt::pidId ( const PdtGeant::GeantType   )  [static]

Definition at line 492 of file Pdt.cxx.

References lundId(), and pidId().

00492                                                    {
00493   return pidId(lundId(gId)); 
00494 }

PdtPid::PidType Pdt::pidId ( const PdtLund::LundType   )  [static]

Definition at line 449 of file Pdt.cxx.

References PdtLund::anti_p_minus, PdtLund::e_minus, PdtLund::e_plus, PdtPid::electron, PdtLund::K_minus, PdtLund::K_plus, PdtPid::kaon, PdtLund::mu_minus, PdtLund::mu_plus, PdtPid::muon, PdtPid::null, PdtLund::p_plus, PdtLund::pi_minus, PdtLund::pi_plus, PdtPid::pion, and PdtPid::proton.

Referenced by pidId().

00449                                                  {
00450 
00451   switch (lId)
00452   {
00453     case PdtLund::e_minus:
00454     case PdtLund::e_plus:
00455       return PdtPid::electron;
00456     case PdtLund::mu_minus:
00457     case PdtLund::mu_plus:
00458       return PdtPid::muon;
00459     case PdtLund::pi_minus:
00460     case PdtLund::pi_plus:
00461       return PdtPid::pion;
00462     case  PdtLund::K_minus:
00463     case PdtLund::K_plus:
00464        return PdtPid::kaon;
00465     case PdtLund::p_plus:
00466     case PdtLund::anti_p_minus:
00467       return PdtPid::proton;
00468     default:
00469        return PdtPid::null;
00470   }
00471 }

static PdtPid::PidNeutralType Pdt::pidNeutId ( const int  id  )  [inline, static]

Definition at line 183 of file Pdt.h.

00183 { return (PdtPid::PidNeutralType) id; };

static PdtPid::PidNeutralType Pdt::pidNeutId ( const PdtPdg::PdgType  pdg  )  [inline, static]

Definition at line 169 of file Pdt.h.

References lundId(), and pidNeutId().

00170     { return pidNeutId(lundId(pdg)); }

PdtPid::PidNeutralType Pdt::pidNeutId ( const PdtGeant::GeantType   )  [static]

Definition at line 496 of file Pdt.cxx.

References lundId(), and pidNeutId().

00496                                                               { 
00497   return pidNeutId(lundId(gId)); 
00498 }

PdtPid::PidNeutralType Pdt::pidNeutId ( const PdtLund::LundType   )  [static]

Definition at line 473 of file Pdt.cxx.

References PdtLund::anti_n0, PdtPid::anti_neutron, PdtPid::gamma, PdtLund::gamma, PdtPid::K0L, PdtLund::K_L0, PdtLund::n0, PdtPid::neutron, PdtPid::none, PdtPid::pi0, and PdtLund::pi0.

Referenced by pidNeutId().

00473                                                             {
00474 
00475   switch (lId)
00476     {
00477     case PdtLund::gamma:
00478       return PdtPid::gamma;
00479     case PdtLund::pi0:
00480       return PdtPid::pi0;
00481     case PdtLund::K_L0:
00482       return PdtPid::K0L;
00483     case PdtLund::anti_n0:
00484       return PdtPid::anti_neutron;
00485     case PdtLund::n0:
00486       return PdtPid::neutron;
00487     default:
00488       return PdtPid::none;
00489     }
00490 }

static void Pdt::printOn ( std::ostream  )  [static]

static void Pdt::readMCppTable ( std::string  filenm  )  [static]

Referenced by MdcxTrackFinder::initialize(), MdcTrkRecon::initialize(), MdcHoughFinder::initialize(), and HoughValidUpdate::initialize().

bool Pdt::sameOrConj ( PdtEntry id1,
PdtEntry id2 
) [static]

Definition at line 671 of file Pdt.cxx.

References PdtEntry::conjugate(), and PdtEntry::pdgId().

00671                                                     {
00672   if ( (pdt1==0) || (pdt2==0) ) return false;
00673   if ( pdt1->pdgId() == pdt2->pdgId() ) return true;
00674   if ( pdt1->conjugate()->pdgId() == pdt2->pdgId() ) return true;
00675   return false;
00676 }

bool Pdt::sameOrConj ( PdtPdg::PdgType  id1,
PdtPdg::PdgType  id2 
) [static]

Definition at line 667 of file Pdt.cxx.

References lookup(), and sameOrConj().

00667                                                           {
00668   return Pdt::sameOrConj(Pdt::lookup(id1),Pdt::lookup(id2));
00669 }

bool Pdt::sameOrConj ( PdtLund::LundType  id1,
PdtLund::LundType  id2 
) [static]

Definition at line 663 of file Pdt.cxx.

References lookup().

Referenced by sameOrConj().

00663                                                               {
00664   return Pdt::sameOrConj(Pdt::lookup(id1),Pdt::lookup(id2));
00665 }

static float Pdt::spin ( const char *  name  )  [inline, static]

Definition at line 100 of file Pdt.h.

References lookup(), and PdtEntry::spin().

00100 { return lookup(name)->spin(); }

static float Pdt::spin ( PdtPid::PidNeutralType  id  )  [inline, static]

Definition at line 99 of file Pdt.h.

References lookup(), and PdtEntry::spin().

00099 { return lookup(id)->spin(); }

static float Pdt::spin ( PdtPid::PidType  id  )  [inline, static]

Definition at line 98 of file Pdt.h.

References lookup(), and PdtEntry::spin().

00098 { return lookup(id)->spin(); }

static float Pdt::spin ( PdtGeant::GeantType  id  )  [inline, static]

Definition at line 97 of file Pdt.h.

References lookup(), and PdtEntry::spin().

00097 { return lookup(id)->spin(); }

static float Pdt::spin ( PdtLund::LundType  id  )  [inline, static]

Definition at line 96 of file Pdt.h.

References lookup(), and PdtEntry::spin().

00096 { return lookup(id)->spin(); }

static float Pdt::width ( const char *  name  )  [inline, static]

Definition at line 86 of file Pdt.h.

References lookup(), and PdtEntry::width().

00086 { return lookup(name)->width(); }

static float Pdt::width ( PdtPid::PidNeutralType  id  )  [inline, static]

Definition at line 85 of file Pdt.h.

References lookup(), and PdtEntry::width().

00085 { return lookup(id)->width(); }

static float Pdt::width ( PdtPid::PidType  id  )  [inline, static]

Definition at line 84 of file Pdt.h.

References lookup(), and PdtEntry::width().

00084 { return lookup(id)->width(); }

static float Pdt::width ( PdtGeant::GeantType  id  )  [inline, static]

Definition at line 83 of file Pdt.h.

References lookup(), and PdtEntry::width().

00083 { return lookup(id)->width(); }

static float Pdt::width ( PdtLund::LundType  id  )  [inline, static]

Definition at line 82 of file Pdt.h.

References lookup(), and PdtEntry::width().

00082 { return lookup(id)->width(); }


Member Data Documentation

map< int, PdtEntry * > * Pdt::_entries = new map<int, PdtEntry*> [static, private]

Definition at line 184 of file Pdt.h.

Referenced by conjugate(), deleteAll(), and lookup().

map< int, PdtEntry * > * Pdt::_entriesg = new map<int, PdtEntry*> [static, private]

Definition at line 193 of file Pdt.h.

Referenced by addParticle(), deleteAll(), and lookup().

map< int, PdtEntry * > * Pdt::_entriesl = new map<int, PdtEntry*> [static, private]

Definition at line 194 of file Pdt.h.

Referenced by deleteAll(), and lookup().

AstStringMap< PdtEntry > * Pdt::_entriesn = new AstStringMap< PdtEntry > [static, private]

Definition at line 192 of file Pdt.h.

Referenced by addParticle(), deleteAll(), and lookup().

PdtEntry * Pdt::_negativeEntries = {0,0,0,0,0} [static, private]

Definition at line 203 of file Pdt.h.

Referenced by addParticle(), and lookup().

PdtEntry * Pdt::_neutralEntries = {0,0,0,0,0} [static, private]

Definition at line 204 of file Pdt.h.

Referenced by addParticle(), and lookup().

PdtEntry * Pdt::_positiveEntries = {0,0,0,0,0} [static, private]

Definition at line 202 of file Pdt.h.

Referenced by addParticle(), and lookup().


Generated on Tue Nov 29 23:20:39 2016 for BOSS_7.0.2 by  doxygen 1.4.7