Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
G4QParticle.cc File Reference

Go to the source code of this file.

Functions

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

Function Documentation

◆ operator<<()

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

Definition at line 129 of file G4QParticle.cc.

130{
131 G4QPDGCode rhsQPDG = rhs.GetQPDG();
132 lhs << G4endl << "Particle with PDG=" << rhsQPDG << ", Spin=" << rhs.GetSpin()
133 << ", mass=" << rhs.GetMass() << ", width=" << rhs.GetWidth() << G4endl;
134 lhs<<" Quark Content of the Particle="<<rhs.GetQContent()<<", Decay Channels:"<<G4endl;
136 G4int n = DCV.size();
137 for (int i=0; i<n; i++)
138 {
139 lhs << DCV[i]->GetDecayChanLimit() << "PDG codes";
140 G4QPDGCodeVector PCV=DCV[i]->GetVecOfSecHadrons();
141 G4int m_value = PCV.size();
142 for (int j=0; j<m_value; j++)
143 {
144 if(!j) lhs << ":";
145 else lhs << ",";
146 lhs << PCV[j]->GetPDGCode() ;
147 }
148 }
149 return lhs;
150}
std::vector< G4QDecayChan * > G4QDecayChanVector
std::vector< G4QPDGCode * > G4QPDGCodeVector
int G4int
Definition: G4Types.hh:66
#define G4endl
Definition: G4ios.hh:52
G4double GetMass()
Definition: G4QParticle.hh:110
G4QPDGCode GetQPDG() const
Definition: G4QParticle.hh:101
G4QContent GetQContent()
Definition: G4QParticle.hh:108
G4double GetWidth()
Definition: G4QParticle.hh:111
G4QDecayChanVector GetDecayVector()
Definition: G4QParticle.hh:109
G4int GetSpin() const
Definition: G4QParticle.hh:104