Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/particles/utils/src/G4HtmlPPReporter.cc

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /particles/utils/src/G4HtmlPPReporter.cc (Version 11.3.0) and /particles/utils/src/G4HtmlPPReporter.cc (Version 10.7)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25                                                <<  25 //
                                                   >>  26 // the GEANT4 collaboration.
                                                   >>  27 //
                                                   >>  28 // By copying, distributing or modifying the Program (or any work
                                                   >>  29 // based on the Program) you indicate your acceptance of this statement,
                                                   >>  30 // and all its terms.
                                                   >>  31 //
                                                   >>  32 //
                                                   >>  33 // 
                                                   >>  34 // ---------------------------------------------------------------
 26 #include "G4HtmlPPReporter.hh"                     35 #include "G4HtmlPPReporter.hh"
 27                                                << 
 28 #include "G4DecayTable.hh"                     << 
 29 #include "G4ParticleDefinition.hh"             << 
 30 #include "G4ParticleTable.hh"                  << 
 31 #include "G4SystemOfUnits.hh"                  << 
 32 #include "G4Tokenizer.hh"                      << 
 33 #include "G4VDecayChannel.hh"                  << 
 34 #include "G4ios.hh"                                36 #include "G4ios.hh"
 35 #include "globals.hh"                              37 #include "globals.hh"
 36                                                <<  38 #include "G4SystemOfUnits.hh"
                                                   >>  39 #include "G4ParticleDefinition.hh"  
                                                   >>  40 #include "G4ParticleTable.hh"  
                                                   >>  41 #include "G4DecayTable.hh"  
                                                   >>  42 #include "G4VDecayChannel.hh"  
                                                   >>  43 #include "G4Tokenizer.hh"
 37 #include <iomanip>                                 44 #include <iomanip>
 38                                                    45 
 39 void G4HtmlPPReporter::Print(const G4String& o <<  46  G4HtmlPPReporter::G4HtmlPPReporter():G4VParticlePropertyReporter()
 40 {                                                  47 {
 41   SparseOption(option);                        <<  48  
                                                   >>  49 }
                                                   >>  50 
                                                   >>  51  G4HtmlPPReporter::~G4HtmlPPReporter()
                                                   >>  52 {
                                                   >>  53 }    
                                                   >>  54 
                                                   >>  55  void G4HtmlPPReporter::Print(const G4String& option)
                                                   >>  56 {
                                                   >>  57   SparseOption( option );
 42                                                    58 
 43   GenerateIndex();                                 59   GenerateIndex();
 44                                                    60 
 45   for (const auto& i : pList) {                <<  61   for (size_t i=0; i< pList.size(); i++){
 46     G4ParticleDefinition* particle =           <<  62     G4ParticleDefinition* particle  = G4ParticleTable::GetParticleTable()->FindParticle( pList[i]->GetParticleName() ); 
 47       G4ParticleTable::GetParticleTable()->Fin << 
 48     GeneratePropertyTable(particle);               63     GeneratePropertyTable(particle);
 49   }                                                64   }
 50 }                                              <<  65 }    
                                                   >>  66 
 51                                                    67 
 52 void G4HtmlPPReporter::SparseOption(const G4St     68 void G4HtmlPPReporter::SparseOption(const G4String& option)
 53 {                                                  69 {
 54   G4Tokenizer savedToken(option);              <<  70   G4Tokenizer savedToken( option );
 55                                                <<  71   
 56   // 1st option : base directory                   72   // 1st option : base directory
 57   baseDir = savedToken();                          73   baseDir = savedToken();
 58   if (!baseDir.empty()) {                      <<  74   if (!baseDir.isNull()) {
 59     if (baseDir.back() != '/') {               <<  75     if(baseDir(baseDir.length()-1)!='/') {
 60       baseDir += "/";                              76       baseDir += "/";
 61     }                                              77     }
 62   }                                                78   }
 63   comment = savedToken();                      <<  79   comment =  savedToken();
 64 }                                                  80 }
 65                                                    81 
 66 void G4HtmlPPReporter::GenerateIndex()         <<  82  void G4HtmlPPReporter::GenerateIndex()
 67 {                                                  83 {
 68   //--- open index file -----                      84   //--- open index file -----
 69   G4String fileName = baseDir + "index.html";      85   G4String fileName = baseDir + "index.html";
 70   std::ofstream outFile(fileName, std::ios::ou <<  86   std::ofstream outFile(fileName, std::ios::out );
 71   outFile.setf(std::ios::scientific, std::ios: <<  87   outFile.setf( std::ios:: scientific, std::ios::floatfield );
 72                                                <<  88   
 73   // header                                        89   // header
 74   PrintHeader(outFile);                            90   PrintHeader(outFile);
 75                                                <<  91   
 76   // comment                                       92   // comment
 77   outFile << "<! -- " << comment << " -- !> "      93   outFile << "<! -- " << comment << " -- !> " << G4endl;
 78   outFile << G4endl;                               94   outFile << G4endl;
 79                                                <<  95   
                                                   >>  96   
 80   outFile << sTABLE << '"' << "80%" << '"' <<      97   outFile << sTABLE << '"' << "80%" << '"' << " > " << G4endl;
 81                                                <<  98   
 82   // Raw #1                                        99   // Raw #1
 83   outFile << sTR;                                 100   outFile << sTR;
 84   outFile << sTD << sLFONT << "Code" << eLFONT << 101   outFile << sTD << sLFONT << "Code" << eLFONT<< eTD; 
 85   outFile << sTD << sLFONT << "Name" << eLFONT << 102   outFile << sTD << sLFONT << "Name" << eLFONT<< eTD; 
 86   outFile << sTD << sLFONT << "Mass" << eLFONT    103   outFile << sTD << sLFONT << "Mass" << eLFONT << eTD;
 87   outFile << sTD << sLFONT << "Charge" << eLFO    104   outFile << sTD << sLFONT << "Charge" << eLFONT << eTD;
 88   outFile << sTD << sLFONT << "Life Time" << e    105   outFile << sTD << sLFONT << "Life Time" << eLFONT << eTD;
 89   outFile << sTD << sLFONT << "Anti-Particle"  << 106   outFile << sTD << sLFONT << "Anti-Particle" << eLFONT<< eTD; 
 90   outFile << eTR << G4endl;                    << 107   outFile << eTR << G4endl;;
 91   ;                                            << 108   
 92                                                << 
 93   // Raw #2                                       109   // Raw #2
 94   outFile << sTR;                                 110   outFile << sTR;
 95   outFile << sTD << " " << eTD;                << 111   outFile << sTD << " " << eTD; 
 96   outFile << sTD << " " << eTD;                << 112   outFile << sTD << " " << eTD; 
 97   outFile << sTD << " [GeV/c" << sSUP << "2" < << 113   outFile << sTD <<  " [GeV/c" << sSUP << "2" << eSUP << "]" << eTD;
 98   outFile << sTD << " " << eTD;                << 114   outFile << sTD << " " << eTD; 
 99   outFile << sTD << " [ns]" << eTD;            << 115   outFile << sTD <<  " [ns]" << eTD;
100   outFile << sTD << " " << eTD;                << 116   outFile << sTD << " " << eTD; 
101   outFile << eTR << G4endl;                    << 117   outFile << eTR << G4endl;;
102   ;                                            << 
103                                                   118 
104   for (const auto& i : pList) {                << 119   for (size_t i=0; i< pList.size(); i++){
105     if (i->GetPDGEncoding() < 0) continue;     << 120     if (pList[i]->GetPDGEncoding()<0) continue;
106                                                   121 
107     outFile << sTR << G4endl;                  << 122     outFile << sTR << G4endl;;
108     ;                                          << 
109     // column 1  : endcoding                      123     // column 1  : endcoding
110     outFile << sTD << i->GetPDGEncoding() << e << 124     outFile << sTD << pList[i]->GetPDGEncoding() << eTD << G4endl;; 
111     ;                                          << 125     // column 2  : name 
112     // column 2  : name                        << 126     G4String name = pList[i]->GetParticleName();
113     G4String name = i->GetParticleName();      << 127     
114                                                << 128     G4String fname = name +".html";
115     G4String fname = name + ".html";           << 
116     // exception                                  129     // exception
117     if (name == "J/psi") fname = "jpsi.html";     130     if (name == "J/psi") fname = "jpsi.html";
118                                                << 131     
119     outFile << sTD;                               132     outFile << sTD;
120     outFile << "<A HREF=" << '"' << fname << '    133     outFile << "<A HREF=" << '"' << fname << '"' << ">";
121     outFile << name << "</A>" << eTD << G4endl    134     outFile << name << "</A>" << eTD << G4endl;
122                                                << 135    
123     // column 3 mass                              136     // column 3 mass
124     outFile << sTD << i->GetPDGMass() / GeV << << 137     outFile << sTD <<  pList[i]->GetPDGMass()/GeV << eTD << G4endl;
125                                                   138 
126     // column 4 charge                            139     // column 4 charge
127     outFile << sTD << i->GetPDGCharge() / eplu << 140     outFile << sTD <<  pList[i]->GetPDGCharge()/eplus << eTD << G4endl;
128                                                   141 
129     // column 5 life time                         142     // column 5 life time
130     outFile << sTD << i->GetPDGLifeTime() / ns << 143     outFile << sTD <<  pList[i]->GetPDGLifeTime()/ns << eTD << G4endl;
131                                                << 144     
132     // column 6 AntiParticle                      145     // column 6 AntiParticle
133     if ((i->GetAntiPDGEncoding() != 0) && (i-> << 146     if  ( (pList[i]->GetAntiPDGEncoding()!= 0) &&
134       G4ParticleDefinition* anti_particle =    << 147           (pList[i]->GetAntiPDGEncoding() != pList[i]->GetPDGEncoding() ) ) {
135         G4ParticleTable::GetParticleTable()->F << 148       G4ParticleDefinition* anti_particle  = G4ParticleTable::GetParticleTable()->FindParticle( pList[i]->GetAntiPDGEncoding() ); 
136                                                << 149       
137       outFile << sTD << anti_particle->GetPart << 150       outFile << sTD <<  anti_particle->GetParticleName() << eTD << G4endl;;
138       ;                                        << 
139     }                                             151     }
140                                                   152 
141     // end raw                                    153     // end raw
142     outFile << eTR << G4endl;                  << 154     outFile << eTR << G4endl;;
143     ;                                          << 
144   }                                               155   }
145                                                << 156   
146   outFile << eTABLE << G4endl;                    157   outFile << eTABLE << G4endl;
147                                                << 158   
148   // footer                                       159   // footer
149   PrintFooter(outFile);                        << 160   PrintFooter(outFile); 
                                                   >> 161   
150 }                                                 162 }
151                                                   163 
152 void G4HtmlPPReporter::GeneratePropertyTable(c << 164  void  G4HtmlPPReporter::GeneratePropertyTable(const G4ParticleDefinition* particle)
153 {                                                 165 {
154   if (particle->GetPDGEncoding() < 0) return;  << 166   if (particle->GetPDGEncoding()<0) return;
155                                                   167 
156   G4String name = particle->GetParticleName();    168   G4String name = particle->GetParticleName();
157   //--- open index file -----                     169   //--- open index file -----
158   G4String fileName = baseDir + name + ".html"    170   G4String fileName = baseDir + name + ".html";
159   // exception                                    171   // exception
160   if (name == "J/psi") fileName = baseDir + "j << 172   if (name == "J/psi") fileName = baseDir +"jpsi.html";
161   std::ofstream outFile(fileName, std::ios::ou << 173   std::ofstream outFile(fileName, std::ios::out );
162   outFile.setf(std::ios::scientific, std::ios: << 174   outFile.setf( std::ios:: scientific, std::ios::floatfield );
163   outFile << std::setprecision(7) << G4endl;      175   outFile << std::setprecision(7) << G4endl;
164                                                   176 
165   PrintHeader(outFile);                           177   PrintHeader(outFile);
166                                                << 178    
167   // particle name                                179   // particle name
168   outFile << "<H2>" << name << "</H2>" << G4en    180   outFile << "<H2>" << name << "</H2>" << G4endl;
169   outFile << "<HR>" << G4endl;                    181   outFile << "<HR>" << G4endl;
170                                                   182 
171   // encoding, type                               183   // encoding, type
172   outFile << sTABLE << '"' << "40%" << '"' <<     184   outFile << sTABLE << '"' << "40%" << '"' << " > " << G4endl;
173   outFile << sTR << sTD << sB << "PDG encoding    185   outFile << sTR << sTD << sB << "PDG encoding" << eB << eTD;
174   outFile << sTD << particle->GetPDGEncoding() << 186   outFile << sTD <<  particle->GetPDGEncoding() << eTD << eTR << G4endl;
175   outFile << sTR << sTD << sB << "Type" << eB     187   outFile << sTR << sTD << sB << "Type" << eB << eTD;
176   outFile << sTD << particle->GetParticleType( << 188   outFile << sTD <<  particle->GetParticleType() << eTD << eTR << G4endl;
177   outFile << eTABLE << G4endl;                    189   outFile << eTABLE << G4endl;
178   outFile << "<HR>" << G4endl;                    190   outFile << "<HR>" << G4endl;
179                                                   191 
180   // Properties                                << 192   // Properties  
181   outFile << sTABLE << '"' << "60%" << '"' <<     193   outFile << sTABLE << '"' << "60%" << '"' << " > " << G4endl;
182   // mass                                         194   // mass
183   outFile << sTR << sTD << sB << "Mass" << eB     195   outFile << sTR << sTD << sB << "Mass" << eB << eTD;
184   outFile << sTD << particle->GetPDGMass() / G << 196   outFile << sTD <<  particle->GetPDGMass()/GeV;
185   outFile << " [GeV/c" << sSUP << "2" << eSUP     197   outFile << " [GeV/c" << sSUP << "2" << eSUP << "]" << eTD << eTR << G4endl;
186   // width                                        198   // width
187   outFile << sTR << sTD << sB << "Width" << eB    199   outFile << sTR << sTD << sB << "Width" << eB << eTD;
188   outFile << sTD << particle->GetPDGWidth() /  << 200   outFile << sTD <<  particle->GetPDGWidth()/GeV;
189   outFile << " [GeV/c" << sSUP << "2" << eSUP     201   outFile << " [GeV/c" << sSUP << "2" << eSUP << "]" << eTD << eTR << G4endl;
190   // IJPC                                         202   // IJPC
191   outFile << sTR << sTD << sB << "I J" << sSUP << 203   outFile << sTR << sTD << sB << "I J" << sSUP << "PC"<< eSUP << eB << eTD;
192   if (particle->GetPDGiIsospin() < 0) {        << 204   if ( particle->GetPDGiIsospin() <0 ) {
193     outFile << sTD << "    ";                     205     outFile << sTD << "    ";
194   }                                            << 206   } else if ( particle->GetPDGiIsospin() == 1) {
195   else if (particle->GetPDGiIsospin() == 1) {  << 
196     outFile << sTD << "1/2 ";                     207     outFile << sTD << "1/2 ";
                                                   >> 208   } else if ( particle->GetPDGiIsospin() == 3) {
                                                   >> 209     outFile << sTD << "3/2 "; 
                                                   >> 210   } else {
                                                   >> 211     outFile << sTD << particle->GetPDGiIsospin()/2 << " ";
197   }                                               212   }
198   else if (particle->GetPDGiIsospin() == 3) {  << 213   if ( particle->GetPDGiSpin() == 1) {
199     outFile << sTD << "3/2 ";                  << 
200   }                                            << 
201   else {                                       << 
202     outFile << sTD << particle->GetPDGiIsospin << 
203   }                                            << 
204   if (particle->GetPDGiSpin() == 1) {          << 
205     outFile << "1/2";                             214     outFile << "1/2";
206   }                                            << 215   } else if ( particle->GetPDGiSpin() == 3) {
207   else if (particle->GetPDGiSpin() == 3) {     << 216     outFile << "3/2"; 
208     outFile << "3/2";                          << 217   } else if ( particle->GetPDGiSpin() == 5) {
209   }                                            << 218     outFile << "5/2"; 
210   else if (particle->GetPDGiSpin() == 5) {     << 219   } else if ( particle->GetPDGiSpin() == 7) {
211     outFile << "5/2";                          << 220     outFile << "7/2"; 
212   }                                            << 221   } else if ( particle->GetPDGiSpin() == 9) {
213   else if (particle->GetPDGiSpin() == 7) {     << 222     outFile << "9/2"; 
214     outFile << "7/2";                          << 223   } else if ( particle->GetPDGiSpin() == 11) {
215   }                                            << 224     outFile << "11/2"; 
216   else if (particle->GetPDGiSpin() == 9) {     << 225   } else if ( particle->GetPDGiSpin() == 13) {
217     outFile << "9/2";                          << 226     outFile << "13/2"; 
218   }                                            << 227   } else {
219   else if (particle->GetPDGiSpin() == 11) {    << 228     outFile << particle->GetPDGiSpin()/2;
220     outFile << "11/2";                         << 
221   }                                            << 
222   else if (particle->GetPDGiSpin() == 13) {    << 
223     outFile << "13/2";                         << 
224   }                                            << 
225   else {                                       << 
226     outFile << particle->GetPDGiSpin() / 2;    << 
227   }                                               229   }
228   outFile << sSUP << sSYMBOL;                     230   outFile << sSUP << sSYMBOL;
229   if (particle->GetPDGiParity() == +1) {       << 231   if (particle->GetPDGiParity() == +1 ){
230     outFile << "+";                            << 232   outFile << "+";
231   }                                            << 233   } else if (particle->GetPDGiParity() == -1 ){
232   else if (particle->GetPDGiParity() == -1) {  << 234   outFile << "-";
233     outFile << "-";                            << 235   } else {
234   }                                            << 
235   else {                                       << 
236     outFile << " ";                               236     outFile << " ";
237   }                                               237   }
238   if (particle->GetPDGiConjugation() == +1) {  << 238   if (particle->GetPDGiConjugation() == +1 ){
239     outFile << "+";                            << 239   outFile << "+";
240   }                                            << 240   } else if (particle->GetPDGiConjugation() == -1 ){
241   else if (particle->GetPDGiConjugation() == - << 241   outFile << "-";
242     outFile << "-";                            << 242   } else {
243   }                                            << 
244   else {                                       << 
245     outFile << " ";                               243     outFile << " ";
246   }                                               244   }
247   outFile << eSYMBOL << eSUP;                     245   outFile << eSYMBOL << eSUP;
248   outFile << eTD << eTR << G4endl;             << 246   outFile <<  eTD << eTR << G4endl;
249   // charge                                       247   // charge
250   outFile << sTR << sTD << sB << "Charge" << e    248   outFile << sTR << sTD << sB << "Charge" << eB << eTD;
251   outFile << sTD << particle->GetPDGCharge() / << 249   outFile << sTD <<  particle->GetPDGCharge()/eplus;
252   outFile << eTD << eTR << G4endl;                250   outFile << eTD << eTR << G4endl;
253   // Magnetic Moment                              251   // Magnetic Moment
254   outFile << sTR << sTD << sB << "Magnetic Mom    252   outFile << sTR << sTD << sB << "Magnetic Moment" << eB << eTD;
255   if (particle->GetPDGMagneticMoment() != 0.0) << 253   if  (particle->GetPDGMagneticMoment() != 0.0){
256     outFile << sTD << particle->GetPDGMagnetic << 254     outFile << sTD <<  particle->GetPDGMagneticMoment()/MeV*tesla;
257     outFile << "[MeV/T]" << eTD << eTR << G4en    255     outFile << "[MeV/T]" << eTD << eTR << G4endl;
258   }                                            << 256   } else {
259   else {                                       << 257     outFile << sTD <<  " not defined ";
260     outFile << sTD << " not defined ";         << 
261     outFile << eTD << eTR << G4endl;              258     outFile << eTD << eTR << G4endl;
262   }                                               259   }
263   // life time                                    260   // life time
264   outFile << sTR << sTD << sB << "Life Time" <    261   outFile << sTR << sTD << sB << "Life Time" << eB << eTD;
265   if (particle->GetPDGLifeTime() > 0.0) {      << 262   if ( particle->GetPDGLifeTime() >0.0 ) {
266     outFile << sTD << particle->GetPDGLifeTime << 263     outFile << sTD <<  particle->GetPDGLifeTime()/second;
267     outFile << "[sec]" << eTD << G4endl;          264     outFile << "[sec]" << eTD << G4endl;
268   }                                            << 265   } else {
269   else {                                       << 
270     if (particle->GetPDGStable()) {               266     if (particle->GetPDGStable()) {
271       outFile << sTD << "stable" << eTD;          267       outFile << sTD << "stable" << eTD;
272     }                                          << 268     } else if (particle->IsShortLived()) {
273     else if (particle->IsShortLived()) {       << 
274       outFile << sTD << "short-lived" << eTD;     269       outFile << sTD << "short-lived" << eTD;
275     }                                          << 270     } else {
276     else {                                     << 271       outFile << sTD <<  "not Defined" << eTD;
277       outFile << sTD << "not Defined" << eTD;  << 
278     }                                             272     }
279   }                                               273   }
280   outFile << eTR << G4endl;                       274   outFile << eTR << G4endl;
281                                                   275 
282   outFile << eTABLE << G4endl;                    276   outFile << eTABLE << G4endl;
283   outFile << "<HR>" << G4endl;                    277   outFile << "<HR>" << G4endl;
284                                                   278 
285   // Qurak content                             << 279   // Qurak content 
286   outFile << "<H2>"                            << 280   outFile << "<H2>" << " Quark Content " << "</H2>" << G4endl;
287           << " Quark Content "                 << 
288           << "</H2>" << G4endl;                << 
289                                                   281 
290   outFile << sTABLE << '"' << "60%" << '"' <<     282   outFile << sTABLE << '"' << "60%" << '"' << " > " << G4endl;
291                                                << 283  
292   outFile << sTR;                                 284   outFile << sTR;
293   outFile << sTD << sB << "flavour " << eB <<  << 285   outFile << sTD << sB << "flavour " << eB << eTD ;
294   outFile << sTD << sB << " quark " << eB << e << 286   outFile << sTD << sB << " quark " << eB << eTD; 
295   outFile << sTD << sB << " anti-quark " << eB << 287   outFile << sTD << sB << " anti-quark " << eB << eTD; 
296   outFile << eTR;                                 288   outFile << eTR;
297                                                   289 
298   static const char* quarkName[6] = {"d", "u", << 290   static const char* quarkName[6] = { "d", "u", "s", "c", "b", "t" };
299   for (G4int flv = 0; flv < 6; flv++) {        << 291   for (G4int flv = 0; flv <6 ; flv++ ){
300     outFile << sTR;                               292     outFile << sTR;
301     outFile << sTD << sB << quarkName[flv] <<  << 293     outFile << sTD << sB << quarkName[flv] << eB << eTD ;
302     outFile << sTD << sB << particle->GetQuark << 294     outFile << sTD << sB << particle->GetQuarkContent(flv+1) << eB << eTD ;
303     outFile << sTD << sB << particle->GetAntiQ << 295     outFile << sTD << sB << particle->GetAntiQuarkContent(flv+1) << eB << eTD ;
304     outFile << eTR;                               296     outFile << eTR;
305   }                                               297   }
306   outFile << eTABLE << G4endl;                    298   outFile << eTABLE << G4endl;
307   outFile << "<HR>" << G4endl;                    299   outFile << "<HR>" << G4endl;
308                                                   300 
309   // Decay Table                               << 301  // Decay Table  
310   G4DecayTable* dcyTable = particle->GetDecayT << 302   G4DecayTable* dcyTable = particle->GetDecayTable(); 
311   if (dcyTable != nullptr) {                   << 303   if (dcyTable != 0) { 
312     outFile << "<H2>"                          << 304     outFile << "<H2>" << " Decay Table " << "</H2>" << G4endl;
313             << " Decay Table "                 << 
314             << "</H2>" << G4endl;              << 
315                                                   305 
316     outFile << sTABLE << '"' << "80%" << '"' <    306     outFile << sTABLE << '"' << "80%" << '"' << " > " << G4endl;
317                                                << 307     
318     outFile << sTR;                               308     outFile << sTR;
319     outFile << sTD << sB << "BR" << eB << eTD; << 309     outFile << sTD << sB << "BR" << eB << eTD ;
320     outFile << sTD << sB << "kinematics" << eB << 310     outFile << sTD << sB << "kinematics" << eB << eTD; 
321     outFile << eTR;                               311     outFile << eTR;
322                                                   312 
323     for (G4int i = 0; i < dcyTable->entries(); << 313     for (G4int i=0; i< dcyTable->entries(); i++){
324       G4VDecayChannel* channel = dcyTable->Get << 314       G4VDecayChannel * channel = dcyTable->GetDecayChannel(i);
325       outFile << sTR << G4endl;                << 315       outFile << sTR << G4endl;;
326       ;                                        << 
327       // column 1  : BR                           316       // column 1  : BR
328       outFile << sTD << channel->GetBR() << eT    317       outFile << sTD << channel->GetBR() << eTD;
329       // column 2 : Kinematics                    318       // column 2 : Kinematics
330       outFile << sTD << channel->GetKinematics    319       outFile << sTD << channel->GetKinematicsName() << eTD;
331       // column 3..  : daughters                  320       // column 3..  : daughters
332       for (G4int j = 0; j < channel->GetNumber << 321       for (G4int j=0; j< channel->GetNumberOfDaughters(); j++){
333         outFile << sTD << channel->GetDaughter    322         outFile << sTD << channel->GetDaughter(j)->GetParticleName() << eTD;
334       }                                           323       }
335       outFile << eTR << G4endl;                   324       outFile << eTR << G4endl;
336     }                                             325     }
337     outFile << eTABLE << G4endl;                  326     outFile << eTABLE << G4endl;
338     outFile << "<HR>" << G4endl;                  327     outFile << "<HR>" << G4endl;
339   }                                               328   }
340                                                << 329   
341   outFile << sB;                                  330   outFile << sB;
342   outFile << "<A HREF=" << '"' << "index.html" << 331   outFile << "<A HREF=" << '"' <<  "index.html" << '"' << ">back to index</A>";
343   outFile << eB << G4endl;                        332   outFile << eB << G4endl;
344                                                   333 
345   PrintFooter(outFile);                        << 334   PrintFooter(outFile); 
346 }                                                 335 }
347                                                   336 
348 void G4HtmlPPReporter::PrintHeader(std::ofstre << 337  void G4HtmlPPReporter::PrintHeader(std::ofstream& outFile)
349 {                                                 338 {
350   outFile << "<HTML>" << G4endl;                  339   outFile << "<HTML>" << G4endl;
351   outFile << "<HEAD>" << G4endl;                  340   outFile << "<HEAD>" << G4endl;
352   outFile << " <META HTTP-EQUIV="              << 341   outFile << " <META HTTP-EQUIV=" << "\"" << " Content-Type" << "\"";
353           << "\""                              << 342   outFile << " CONTENT=" 
354           << " Content-Type"                   << 343     << "\"" << "text/html; charset=iso-8859-1" 
355           << "\"";                             << 344     << "\"" << ">" << G4endl;
356   outFile << " CONTENT="                       << 
357           << "\""                              << 
358           << "text/html; charset=iso-8859-1"   << 
359           << "\""                              << 
360           << ">" << G4endl;                    << 
361   outFile << " <TITLE>Geant4 Particle List </T    345   outFile << " <TITLE>Geant4 Particle List </TITLE>" << G4endl;
362   outFile << "</HEAD>" << G4endl;                 346   outFile << "</HEAD>" << G4endl;
363   outFile << "<! -- Generated automatically by    347   outFile << "<! -- Generated automatically by Geant4, "
364           << " -- !>" << G4endl;               << 348     << " -- !>" << G4endl;
365   outFile << "<BODY>" << G4endl;                  349   outFile << "<BODY>" << G4endl;
366 }                                                 350 }
367                                                   351 
368 void G4HtmlPPReporter::PrintFooter(std::ofstre << 352  void G4HtmlPPReporter::PrintFooter(std::ofstream& outFile)
369 {                                                 353 {
370   outFile << "<HR>" << G4endl;                    354   outFile << "<HR>" << G4endl;
371   outFile << "</BODY>" << G4endl;                 355   outFile << "</BODY>" << G4endl;
372   outFile << "</HTML>" << G4endl;                 356   outFile << "</HTML>" << G4endl;
373 }                                                 357 }
374                                                   358 
375 const char* G4HtmlPPReporter::sTABLE = "<TABLE << 359 const char*  G4HtmlPPReporter::sTABLE = "<TABLE WIDTH=";
376 const char* G4HtmlPPReporter::eTABLE = "</TABL << 360 const char*  G4HtmlPPReporter::eTABLE = "</TABLE>";
377 const char* G4HtmlPPReporter::sTR = "<TR>";    << 361 const char*  G4HtmlPPReporter::sTR = "<TR>";
378 const char* G4HtmlPPReporter::eTR = "</TR>";   << 362 const char*  G4HtmlPPReporter::eTR = "</TR>";
379 const char* G4HtmlPPReporter::sTD = "<TD>";    << 363 const char*  G4HtmlPPReporter::sTD = "<TD>";
380 const char* G4HtmlPPReporter::eTD = "</TD>";   << 364 const char*  G4HtmlPPReporter::eTD = "</TD>";
381 const char* G4HtmlPPReporter::sB = "<B>";      << 365 const char*  G4HtmlPPReporter::sB = "<B>";
382 const char* G4HtmlPPReporter::eB = "</B>";     << 366 const char*  G4HtmlPPReporter::eB = "</B>";
383 const char* G4HtmlPPReporter::sLFONT = "<FONT  << 367 const char*  G4HtmlPPReporter::sLFONT = "<FONT SIZE = +1>";
384 const char* G4HtmlPPReporter::eLFONT = "</FONT << 368 const char*  G4HtmlPPReporter::eLFONT = "</FONT>";
385 const char* G4HtmlPPReporter::sSYMBOL = "<FONT << 369 const char*  G4HtmlPPReporter::sSYMBOL = "<FONT FACE = \"symbol\" >";
386 const char* G4HtmlPPReporter::eSYMBOL = "</FON << 370 const char*  G4HtmlPPReporter::eSYMBOL = "</FONT>";
387 const char* G4HtmlPPReporter::sSUP = "<SUP>";  << 371 const char*  G4HtmlPPReporter::sSUP = "<SUP>";
388 const char* G4HtmlPPReporter::eSUP = "</SUP>"; << 372 const char*  G4HtmlPPReporter::eSUP = "</SUP>";
389 const char* G4HtmlPPReporter::sSUB = "<SUB>";  << 373 const char*  G4HtmlPPReporter::sSUB = "<SUB>";
390 const char* G4HtmlPPReporter::eSUB = "</SUB>"; << 374 const char*  G4HtmlPPReporter::eSUB = "</SUB>";
                                                   >> 375  
                                                   >> 376  
391                                                   377