G4QParticle.cc File Reference

#include "G4QParticleVector.hh"

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &lhs, G4QParticle &rhs)


Function Documentation

std::ostream& operator<< ( std::ostream &  lhs,
G4QParticle rhs 
)

Definition at line 129 of file G4QParticle.cc.

References G4endl, G4QParticle::GetDecayVector(), G4QParticle::GetMass(), G4QParticle::GetQContent(), G4QParticle::GetQPDG(), G4QParticle::GetSpin(), G4QParticle::GetWidth(), and CLHEP::detail::n.

00130 {
00131   G4QPDGCode rhsQPDG = rhs.GetQPDG();
00132   lhs << G4endl << "Particle with PDG=" << rhsQPDG << ", Spin=" << rhs.GetSpin()
00133       << ", mass=" << rhs.GetMass() << ", width=" << rhs.GetWidth() << G4endl;
00134   lhs<<" Quark Content of the Particle="<<rhs.GetQContent()<<", Decay Channels:"<<G4endl;
00135   G4QDecayChanVector DCV = rhs.GetDecayVector();
00136   G4int n = DCV.size();
00137   for (int i=0; i<n; i++)
00138   {
00139     lhs << DCV[i]->GetDecayChanLimit() << "PDG codes";
00140     G4QPDGCodeVector PCV=DCV[i]->GetVecOfSecHadrons();
00141     G4int m_value = PCV.size();
00142     for (int j=0; j<m_value; j++)
00143     {
00144       if(!j) lhs << ":";
00145       else   lhs << ",";
00146       lhs << PCV[j]->GetPDGCode() ;
00147     }
00148   }
00149   return lhs;
00150 }


Generated on Mon May 27 17:51:04 2013 for Geant4 by  doxygen 1.4.7