00001 // $Header: /nfs/slac/g/glast/ground/cvs/GlastEvent/src/MonteCarlo/McParticle.cxx,v 1.5 2001/01/31 11:31:51 ozaki Exp $ 00002 00003 #include <iostream> 00004 #include "GlastEvent/MonteCarlo/McParticle.h" 00005 #include "GlastEvent/Utilities/CLHEPStreams.h" 00006 00007 00008 // FIXME!!: 00009 // The next `using' directive is an ad-hoc declaration for the transition 00010 // phase to the namespace `GlastEvent'. 00011 // After the transition is completed, it should be removed and each 00012 // function definition should have the namespace identifier. 00013 using namespace GlastEvent; 00014 00016 00018 ParticleID McParticle::particleID() const 00019 { 00020 return m_particleID; 00021 } 00022 00023 00025 void McParticle::setParticleID( ParticleID value ) 00026 { 00027 m_particleID = value; 00028 } 00029 00030 00032 McParticle::StdHepId McParticle::particleProperty() const 00033 { 00034 return m_particleProperty; 00035 } 00036 00037 00039 void McParticle::setParticleProperty( McParticle::StdHepId value ) 00040 { 00041 m_particleProperty = value; 00042 } 00043 00044 00046 bool McParticle::primaryParticle() const 00047 { 00048 using GlastEvent::McConstants::PRIMARY; 00049 return m_statusFlags & PRIMARY; 00050 } 00051 00052 00054 void McParticle::setPrimaryParticleFlag( bool value ) 00055 { 00056 using GlastEvent::McConstants::PRIMARY; 00057 if (value){ 00058 m_statusFlags |= PRIMARY; 00059 } else { 00060 m_statusFlags &= ~PRIMARY; 00061 } 00062 } 00063 00064 00066 const McVertex* McParticle::mcVertex() const 00067 { 00068 return m_mcVertex; 00069 } 00070 McVertex* McParticle::mcVertex() 00071 { 00072 return m_mcVertex; 00073 } 00074 00075 00077 void McParticle::setMcVertex( McVertex* value ) 00078 { 00079 m_mcVertex = value; 00080 } 00081 void McParticle::setMcVertex( SmartRef<McVertex> value ) 00082 { 00083 m_mcVertex = value; 00084 } 00085 00086 00088 short McParticle::subEvtID() const 00089 { 00090 return m_subEvtID; 00091 } 00092 00093 00095 void McParticle::setSubEvtID( short value ) 00096 { 00097 m_subEvtID = value; 00098 }
1.2.3 written by Dimitri van Heesch,
© 1997-2000