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: G4AntiNeutron.cc,v 1.12 2002/12/16 11:15:38 gcosmo Exp $ >> 25 // GEANT4 tag $Name: geant4-05-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 // H.Kurashige 7 July 33 // H.Kurashige 7 July 1996 32 // ******************************************* 34 // ********************************************************************** 33 // New impelemenataion as an utility class M << 35 #include "g4std/fstream" 34 // ------------------------------------------- << 36 #include "g4std/iomanip" 35 37 36 #include "G4AntiNeutron.hh" 38 #include "G4AntiNeutron.hh" 37 39 38 #include "G4DecayTable.hh" << 40 // ###################################################################### 39 #include "G4NeutronBetaDecayChannel.hh" << 41 // ### ANTI NEUTRON ### 40 #include "G4ParticleTable.hh" << 42 // ###################################################################### 41 #include "G4PhysicalConstants.hh" << 43 42 #include "G4String.hh" << 44 G4AntiNeutron::G4AntiNeutron( 43 #include "G4SystemOfUnits.hh" << 45 const G4String& aName, G4double mass, 44 #include "G4Types.hh" << 46 G4double width, G4double charge, 45 #include "G4VDecayChannel.hh" << 47 G4int iSpin, G4int iParity, 46 << 48 G4int iConjugation, G4int iIsospin, 47 G4AntiNeutron* G4AntiNeutron::theInstance = nu << 49 G4int iIsospin3, G4int gParity, 48 << 50 const G4String& pType, G4int lepton, 49 G4AntiNeutron* G4AntiNeutron::Definition() << 51 G4int baryon, G4int encoding, >> 52 G4bool stable, G4double lifetime, >> 53 G4DecayTable *decaytable ) >> 54 : G4VBaryon( aName,mass,width,charge,iSpin,iParity, >> 55 iConjugation,iIsospin,iIsospin3,gParity,pType, >> 56 lepton,baryon,encoding,stable,lifetime,decaytable ) 50 { 57 { 51 if (theInstance != nullptr) return theInstan << 58 SetParticleSubType("nucleon"); 52 const G4String name = "anti_neutron"; << 59 } 53 // search in particle table] << 60 54 G4ParticleTable* pTable = G4ParticleTable::G << 61 // ...................................................................... 55 G4ParticleDefinition* anInstance = pTable->F << 62 // ... static member definitions ... 56 if (anInstance == nullptr) { << 63 // ...................................................................... 57 // create particle << 64 // 58 // << 65 // Arguments for constructor are as follows 59 // Arguments for constructor are as fol << 66 // name mass width charge 60 // name mass << 67 // 2*spin parity C-conjugation 61 // 2*spin parity C- << 68 // 2*Isospin 2*Isospin3 G-parity 62 // 2*Isospin 2*Isospin3 << 69 // type lepton number baryon number PDG encoding 63 // type lepton number ba << 70 // stable lifetime decay table 64 // stable lifetime << 71 // 65 // shortlived subType << 72 G4AntiNeutron G4AntiNeutron::theAntiNeutron( 66 // use constants in CLHEP << 73 "anti_neutron", 0.93956563*GeV, 0.0*MeV, 0.0, 67 // static const double neutron_mass_c2 = << 68 // clang-format off << 69 anInstance = new G4ParticleDefinition( << 70 name, neutron_mass_c2, 7.478e << 71 1, +1, 0, 74 1, +1, 0, 72 1, +1, 0, 75 1, +1, 0, 73 "baryon", 0, - 76 "baryon", 0, -1, -2112, 74 false, 880.2*second, nullptr, << 77 true, -1.0, NULL 75 false, "nucleon", 211 << 78 ); 76 ); << 79 G4AntiNeutron* G4AntiNeutron::AntiNeutronDefinition(){return &theAntiNeutron;} 77 // clang-format on << 80 G4AntiNeutron* G4AntiNeutron::AntiNeutron(){return &theAntiNeutron;} 78 81 79 // Magnetic Moment << 80 G4double mN = eplus * hbar_Planck / 2. / ( << 81 anInstance->SetPDGMagneticMoment(1.9130427 << 82 // create Decay Table << 83 auto table = new G4DecayTable(); << 84 // create a decay channel << 85 G4VDecayChannel* mode = new G4NeutronBetaD << 86 table->Insert(mode); << 87 anInstance->SetDecayTable(table); << 88 } << 89 theInstance = static_cast<G4AntiNeutron*>(an << 90 return theInstance; << 91 } << 92 << 93 G4AntiNeutron* G4AntiNeutron::AntiNeutronDefin << 94 { << 95 return Definition(); << 96 } << 97 << 98 G4AntiNeutron* G4AntiNeutron::AntiNeutron() << 99 { << 100 return Definition(); << 101 } << 102 82