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.1.p2)


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