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