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: G4Eta.cc,v 1.11 2001/10/28 05:01:33 kurasige Exp $ >> 25 // GEANT4 tag $Name: geant4-05-00 $ >> 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 // H.Kurashige 33 // H.Kurashige 7 Jul 96 32 // ******************************************* << 34 // ------------------------------------------------------------ 33 // New impelemenataion as an utility class M << 35 34 // ------------------------------------------- << 36 #include "g4std/fstream" 35 // Update mass (PDG2006) Oct << 37 #include "g4std/iomanip" 36 // << 37 38 38 #include "G4Eta.hh" 39 #include "G4Eta.hh" 39 40 40 #include "G4DecayTable.hh" << 41 #include "G4ParticleTable.hh" << 42 #include "G4PhaseSpaceDecayChannel.hh" 41 #include "G4PhaseSpaceDecayChannel.hh" 43 #include "G4String.hh" << 42 #include "G4DecayTable.hh" 44 #include "G4SystemOfUnits.hh" << 45 #include "G4Types.hh" << 46 #include "G4VDecayChannel.hh" << 47 << 48 G4Eta* G4Eta::theInstance = nullptr; << 49 43 50 G4Eta* G4Eta::Definition() << 44 // ###################################################################### >> 45 // ### ETA ### >> 46 // ###################################################################### >> 47 >> 48 >> 49 G4Eta::G4Eta( >> 50 const G4String& aName, G4double mass, >> 51 G4double width, G4double charge, >> 52 G4int iSpin, G4int iParity, >> 53 G4int iConjugation, G4int iIsospin, >> 54 G4int iIsospin3, G4int gParity, >> 55 const G4String& pType, G4int lepton, >> 56 G4int baryon, G4int encoding, >> 57 G4bool stable, G4double lifetime, >> 58 G4DecayTable *decaytable ) >> 59 : G4VMeson( aName,mass,width,charge,iSpin,iParity, >> 60 iConjugation,iIsospin,iIsospin3,gParity,pType, >> 61 lepton,baryon,encoding,stable,lifetime,decaytable ) 51 { 62 { 52 if (theInstance != nullptr) return theInstan << 63 SetParticleSubType("eta"); 53 const G4String name = "eta"; << 64 // Anti-particle of Eta is Eta itself 54 // search in particle table] << 65 SetAntiPDGEncoding(encoding); 55 G4ParticleTable* pTable = G4ParticleTable::G << 66 56 G4ParticleDefinition* anInstance = pTable->F << 67 SetPDGStable(false); 57 if (anInstance == nullptr) { << 68 //create Decay Table 58 // create particle << 69 G4DecayTable* table = GetDecayTable(); 59 // << 70 if (table!=NULL) delete table; 60 // Arguments for constructor are as fol << 71 table = new G4DecayTable(); 61 // name mass << 72 62 // 2*spin parity C- << 73 // create decay channels 63 // 2*Isospin 2*Isospin3 << 74 G4VDecayChannel** mode = new G4VDecayChannel*[4]; 64 // type lepton number ba << 75 // eta -> gamma + gamma 65 // stable lifetime << 76 mode[0] = new G4PhaseSpaceDecayChannel("eta",0.393,2,"gamma","gamma"); 66 // shortlived subType << 77 // eta -> pi0 + pi0 + pi0 67 << 78 mode[1] = new G4PhaseSpaceDecayChannel("eta",0.321,3,"pi0","pi0","pi0"); 68 // clang-format off << 79 // eta -> pi0 + pi+ + pi- 69 anInstance = new G4ParticleDefinition( << 80 mode[2] = new G4PhaseSpaceDecayChannel("eta",0.232,3,"pi0","pi+","pi-"); 70 name, 0.547862*GeV, 1 << 81 // eta -> gamma + pi+ + pi- 71 0, -1, << 82 mode[3] = new G4PhaseSpaceDecayChannel("eta",0.048,3,"gamma","pi+","pi-"); 72 0, 0, << 73 "meson", 0, << 74 false, 0.0*ns, << 75 false, "eta", << 76 // clang-format on << 77 << 78 // create Decay Table << 79 auto table = new G4DecayTable(); << 80 << 81 // create decay channels << 82 auto mode = new G4VDecayChannel*[4]; << 83 // eta -> gamma + gamma << 84 mode[0] = new G4PhaseSpaceDecayChannel("et << 85 // eta -> pi0 + pi0 + pi0 << 86 mode[1] = new G4PhaseSpaceDecayChannel("et << 87 // eta -> pi0 + pi+ + pi- << 88 mode[2] = new G4PhaseSpaceDecayChannel("et << 89 // eta -> gamma + pi+ + pi- << 90 mode[3] = new G4PhaseSpaceDecayChannel("et << 91 << 92 for (G4int index = 0; index < 4; index++) << 93 table->Insert(mode[index]); << 94 delete[] mode; << 95 << 96 anInstance->SetDecayTable(table); << 97 } << 98 theInstance = static_cast<G4Eta*>(anInstance << 99 return theInstance; << 100 } << 101 83 102 G4Eta* G4Eta::EtaDefinition() << 84 for (G4int index=0; index <4; index++ ) table->Insert(mode[index]); 103 { << 85 delete [] mode; 104 return Definition(); << 86 >> 87 SetDecayTable(table); 105 } 88 } 106 89 107 G4Eta* G4Eta::Eta() << 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 G4Eta G4Eta::theEta( >> 102 "eta", 0.54730*GeV, 1.18*keV, 0.0, >> 103 0, -1, +1, >> 104 0, 0, +1, >> 105 "meson", 0, 0, 221, >> 106 false, 0.0*ns, NULL >> 107 ); >> 108 >> 109 G4Eta* G4Eta::EtaDefinition(){return &theEta;} >> 110 G4Eta* G4Eta::Eta(){return &theEta;} >> 111 >> 112 // ********************************************************************** >> 113 // **************************** SetCuts ********************************* >> 114 // ********************************************************************** >> 115 >> 116 void G4Eta::CalcEnergyCuts( const G4Material* ) 108 { 117 { 109 return Definition(); << 118 >> 119 >> 120 // Set Energy Cut values to lowest for all materials >> 121 SetEnergyCutValues(LowestEnergy); 110 } 122 } >> 123 >> 124 >> 125 111 126