![]() |
HepPDT Reference DocumentationHepPDT |
00001 // ---------------------------------------------------------------------- 00002 // 00003 // HeavyIonUnknownID.cc 00004 // Author: Lynn Garren 00005 // 00006 // ---------------------------------------------------------------------- 00007 #include "HepPDT/HeavyIonUnknownID.hh" 00008 #include "HepPDT/ParticleDataTable.hh" 00009 00010 namespace HepPDT { 00011 00012 ParticleData * HeavyIonUnknownID::processUnknownID 00013 ( ParticleID key, const ParticleDataTable & pdt ) 00014 { 00015 if( ! key.isNucleus() ) return 0; 00016 // have to create a TempParticleData with all properties first 00017 TempParticleData tpd(key); 00018 // calculate approximate mass 00019 // WARNING: any calls to particle() from here MUST reference 00020 // a ParticleData which is already in the table 00021 // This convention is enforced. 00022 const ParticleData * proton = pdt.particle(2212); 00023 if( ! proton ) return 0; 00024 double protonMass = proton->mass(); 00025 tpd.tempMass = Measurement(key.A()*protonMass, 0.); 00026 return new ParticleData(tpd); 00027 } 00028 00029 } // HepPDT