Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer << 3 // * DISCLAIMER * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th << 5 // * The following disclaimer summarizes all the specific disclaimers * 6 // * the Geant4 Collaboration. It is provided << 6 // * of contributors to this software. The specific disclaimers,which * 7 // * conditions of the Geant4 Software License << 7 // * govern, are listed with their locations in: * 8 // * LICENSE and available at http://cern.ch/ << 8 // * http://cern.ch/geant4/license * 9 // * include a list of copyright holders. << 10 // * 9 // * * 11 // * Neither the authors of this software syst 10 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 11 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 12 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 13 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file << 14 // * use. * 16 // * for the full disclaimer and the limitatio << 17 // * 15 // * * 18 // * This code implementation is the result << 16 // * This code implementation is the intellectual property of the * 19 // * technical work of the GEANT4 collaboratio << 17 // * GEANT4 collaboration. * 20 // * By using, copying, modifying or distri << 18 // * By copying, distributing or modifying the Program (or any work * 21 // * any work based on the software) you ag << 19 // * based on the Program) you indicate your acceptance of this * 22 // * use in resulting scientific publicati << 20 // * statement, and all its terms. * 23 // * acceptance of all terms of the Geant4 Sof << 24 // ******************************************* 21 // ******************************************************************** 25 // 22 // >> 23 // >> 24 // $Id: G4PionZero.cc,v 1.11 2001/10/28 05:01:34 kurasige Exp $ >> 25 // GEANT4 tag $Name: geant4-04-01 $ >> 26 // >> 27 // 26 // ------------------------------------------- 28 // ---------------------------------------------------------------------- 27 // GEANT 4 class implementation file 29 // GEANT 4 class implementation file 28 // 30 // 29 // History: first implementation, based o 31 // History: first implementation, based on object model of 30 // 4th April 1996, G.Cosmo 32 // 4th April 1996, G.Cosmo 31 // ******************************************* 33 // ********************************************************************** 32 // New impelemenataion as an utility class M << 34 // Added particle definitions, H.Kurashige, 19 April 1996 >> 35 // Operators (+=, *=, ++, -> etc.) correctly used, P. Urban, 26/6/96 >> 36 // Add PionZeroDefinition(), H.Kurashige 4 July 1996 33 // ------------------------------------------- 37 // ---------------------------------------------------------------------- 34 38 >> 39 #include "g4std/fstream" >> 40 #include "g4std/iomanip" >> 41 35 #include "G4PionZero.hh" 42 #include "G4PionZero.hh" 36 43 >> 44 >> 45 #include "G4PhaseSpaceDecayChannel.hh" 37 #include "G4DalitzDecayChannel.hh" 46 #include "G4DalitzDecayChannel.hh" 38 #include "G4DecayTable.hh" 47 #include "G4DecayTable.hh" 39 #include "G4ParticleTable.hh" << 40 #include "G4PhaseSpaceDecayChannel.hh" << 41 #include "G4PhysicalConstants.hh" << 42 #include "G4String.hh" << 43 #include "G4SystemOfUnits.hh" << 44 #include "G4VDecayChannel.hh" << 45 48 46 G4PionZero* G4PionZero::theInstance = nullptr; << 49 // ###################################################################### 47 << 50 // ### PIONZERO ### 48 G4PionZero* G4PionZero::Definition() << 51 // ###################################################################### >> 52 >> 53 G4PionZero::G4PionZero( >> 54 const G4String& aName, G4double mass, >> 55 G4double width, G4double charge, >> 56 G4int iSpin, G4int iParity, >> 57 G4int iConjugation, G4int iIsospin, >> 58 G4int iIsospin3, G4int gParity, >> 59 const G4String& pType, G4int lepton, >> 60 G4int baryon, G4int encoding, >> 61 G4bool stable, G4double lifetime, >> 62 G4DecayTable *decaytable ) >> 63 : G4VMeson( aName,mass,width,charge,iSpin,iParity, >> 64 iConjugation,iIsospin,iIsospin3,gParity,pType, >> 65 lepton,baryon,encoding,stable,lifetime,decaytable ) 49 { 66 { 50 if (theInstance != nullptr) return theInstan << 67 SetParticleSubType("pi"); 51 const G4String name = "pi0"; << 68 // Anti-particle of Pi0 is pi0 itself 52 // search in particle table] << 69 SetAntiPDGEncoding(encoding); 53 G4ParticleTable* pTable = G4ParticleTable::G << 70 54 G4ParticleDefinition* anInstance = pTable->F << 71 SetPDGStable(false); 55 if (anInstance == nullptr) { << 72 56 // create particle << 73 //create Decay Table 57 // << 74 G4DecayTable* table = GetDecayTable(); 58 // Arguments for constructor are as fol << 75 if (table!=NULL) delete table; 59 // name mass << 76 table = new G4DecayTable(); 60 // 2*spin parity C- << 77 61 // 2*Isospin 2*Isospin3 << 78 // create a decay channel 62 // type lepton number ba << 79 G4VDecayChannel* mode; 63 // stable lifetime << 80 // pi0 -> gamma + gamma 64 // shortlived subType << 81 mode = new G4PhaseSpaceDecayChannel("pi0",0.988,2,"gamma","gamma"); 65 << 82 table->Insert(mode); 66 // clang-format off << 83 // pi0 -> gamma + e+ + e- 67 anInstance = new G4ParticleDefinition( << 84 mode = new G4DalitzDecayChannel("pi0",0.012,"e-","e+"); 68 name, 0.1349766*GeV, 7.73e << 85 table->Insert(mode); 69 0, -1, << 70 2, 0, << 71 "meson", 0, << 72 false, 8.52e-8*ns, << 73 false, "pi", << 74 // clang-format on << 75 << 76 // Life time is given from width << 77 anInstance->SetPDGLifeTime(hbar_Planck / ( << 78 << 79 // create Decay Table << 80 auto table = new G4DecayTable(); << 81 << 82 // create a decay channel << 83 G4VDecayChannel* mode; << 84 // pi0 -> gamma + gamma << 85 mode = new G4PhaseSpaceDecayChannel("pi0", << 86 table->Insert(mode); << 87 // pi0 -> gamma + e+ + e- << 88 mode = new G4DalitzDecayChannel("pi0", 0.0 << 89 table->Insert(mode); << 90 << 91 anInstance->SetDecayTable(table); << 92 } << 93 theInstance = static_cast<G4PionZero*>(anIns << 94 return theInstance; << 95 } << 96 86 97 G4PionZero* G4PionZero::PionZeroDefinition() << 87 SetDecayTable(table); 98 { << 99 return Definition(); << 100 } 88 } 101 89 102 G4PionZero* G4PionZero::PionZero() << 90 // ...................................................................... >> 91 // ... static member definitions ... >> 92 // ...................................................................... >> 93 // >> 94 // Arguments for constructor are as follows >> 95 // name mass width charge >> 96 // 2*spin parity C-conjugation >> 97 // 2*Isospin 2*Isospin3 G-parity >> 98 // type lepton number baryon number PDG encoding >> 99 // stable lifetime decay table >> 100 >> 101 G4PionZero G4PionZero::thePionZero( >> 102 "pi0", 0.1349764*GeV, 7.8e-06*MeV, 0.0, >> 103 0, -1, +1, >> 104 2, 0, -1, >> 105 "meson", 0, 0, 111, >> 106 false, 8.4e-8*ns, NULL >> 107 ); >> 108 >> 109 G4PionZero* G4PionZero::PionZeroDefinition(){return &thePionZero;} >> 110 >> 111 G4PionZero* G4PionZero::PionZero(){return &thePionZero;} >> 112 // ********************************************************************** >> 113 // **************************** SetCuts ********************************* >> 114 // ********************************************************************** >> 115 // In this version Input Cut Value is meaning less >> 116 // theKineticEnergyCuts for all materials are set to LowestEnergy >> 117 void G4PionZero::CalcEnergyCuts( const G4Material* ) 103 { 118 { 104 return Definition(); << 119 >> 120 >> 121 // Set Energy Cut values to lowest for all materials >> 122 SetEnergyCutValues(LowestEnergy); >> 123 105 } 124 } >> 125 >> 126 >> 127 >> 128 >> 129 >> 130 106 131