Geant4 Cross Reference |
>> 1 // This code implementation is the intellectual property of >> 2 // the GEANT4 collaboration. 1 // 3 // 2 // ******************************************* << 4 // By copying, distributing or modifying the Program (or any work 3 // * License and Disclaimer << 5 // based on the Program) you indicate your acceptance of this statement, 4 // * << 6 // and all its terms. 5 // * The Geant4 software is copyright of th << 6 // * the Geant4 Collaboration. It is provided << 7 // * conditions of the Geant4 Software License << 8 // * LICENSE and available at http://cern.ch/ << 9 // * include a list of copyright holders. << 10 // * << 11 // * Neither the authors of this software syst << 12 // * institutes,nor the agencies providing fin << 13 // * work make any representation or warran << 14 // * regarding this software system or assum << 15 // * use. Please see the license in the file << 16 // * for the full disclaimer and the limitatio << 17 // * << 18 // * This code implementation is the result << 19 // * technical work of the GEANT4 collaboratio << 20 // * By using, copying, modifying or distri << 21 // * any work based on the software) you ag << 22 // * use in resulting scientific publicati << 23 // * acceptance of all terms of the Geant4 Sof << 24 // ******************************************* << 25 // 7 // >> 8 // $Id: G4MuonMinus.cc,v 1.4 2000/02/27 06:23:41 kurasige Exp $ >> 9 // GEANT4 tag $Name: geant4-03-00 $ >> 10 // >> 11 // 26 // ------------------------------------------- 12 // ---------------------------------------------------------------------- 27 // GEANT 4 class implementation file 13 // GEANT 4 class implementation file 28 // 14 // >> 15 // For information related to this code contact: >> 16 // CERN, CN Division, ASD Group 29 // History: first implementation, based o 17 // History: first implementation, based on object model of 30 // 4th April 1996, G.Cosmo 18 // 4th April 1996, G.Cosmo 31 // ******************************************* 19 // ********************************************************************** 32 // New impelemenataion as an utility class M << 20 // Added particle definitions, H.Kurashige, 19 April 1996 >> 21 // Added SetCuts implementation, L.Urban, 12 June 1996 >> 22 // Operators (+=, *=, ++, -> etc.) correctly used, P. Urban, 26/6/96 >> 23 // Add MuonMinusDefinition(), H.Kurashige 4 July 1996 33 // ------------------------------------------- 24 // ---------------------------------------------------------------------- 34 25 >> 26 #include "g4std/fstream" >> 27 #include "g4std/iomanip" >> 28 35 #include "G4MuonMinus.hh" 29 #include "G4MuonMinus.hh" 36 30 37 #include "G4DecayTable.hh" << 38 #include "G4MuonDecayChannel.hh" 31 #include "G4MuonDecayChannel.hh" 39 #include "G4ParticleTable.hh" << 32 #include "G4DecayTable.hh" 40 #include "G4PhysicalConstants.hh" << 41 #include "G4String.hh" << 42 #include "G4SystemOfUnits.hh" << 43 #include "G4Types.hh" << 44 #include "G4VDecayChannel.hh" << 45 << 46 G4MuonMinus* G4MuonMinus::theInstance = nullpt << 47 33 48 G4MuonMinus* G4MuonMinus::Definition() << 34 // ###################################################################### >> 35 // ### MUONMINUS ### >> 36 // ###################################################################### >> 37 >> 38 G4MuonMinus::G4MuonMinus( >> 39 const G4String& aName, G4double mass, >> 40 G4double width, G4double charge, >> 41 G4int iSpin, G4int iParity, >> 42 G4int iConjugation, G4int iIsospin, >> 43 G4int iIsospin3, G4int gParity, >> 44 const G4String& pType, G4int lepton, >> 45 G4int baryon, G4int encoding, >> 46 G4bool stable, G4double lifetime, >> 47 G4DecayTable *decaytable ) >> 48 : G4VLepton( aName,mass,width,charge,iSpin,iParity, >> 49 iConjugation,iIsospin,iIsospin3,gParity,pType, >> 50 lepton,baryon,encoding,stable,lifetime,decaytable ) 49 { 51 { 50 if (theInstance != nullptr) return theInstan << 52 SetParticleSubType("mu"); 51 const G4String name = "mu-"; << 53 SetPDGStable(false); 52 // search in particle table] << 54 //create Decay Table 53 G4ParticleTable* pTable = G4ParticleTable::G << 55 G4DecayTable* table = GetDecayTable(); 54 G4ParticleDefinition* anInstance = pTable->F << 56 if (table!=NULL) delete table; 55 if (anInstance == nullptr) { << 57 table = new G4DecayTable(); 56 // create particle << 58 57 // << 59 // create a decay channel 58 // Arguments for constructor are as fol << 60 G4VDecayChannel* mode = new G4MuonDecayChannel("mu-",1.00); 59 // name mass << 61 table->Insert(mode); 60 // 2*spin parity C- << 61 // 2*Isospin 2*Isospin3 << 62 // type lepton number ba << 63 // stable lifetime << 64 // shortlived subType << 65 << 66 // clang-format off << 67 anInstance = new G4ParticleDefinition( << 68 name, 0.1056583715*GeV, 2.995 << 69 1, 0, 0, << 70 0, 0, 0, << 71 "lepton", 1, << 72 false, 2196.98*ns, nullp << 73 false, "mu" << 74 ); << 75 // clang-format on << 76 << 77 // Bohr Magnetron << 78 G4double muB = -0.5 * eplus * hbar_Planck << 79 << 80 anInstance->SetPDGMagneticMoment(muB * 1.0 << 81 << 82 // create Decay Table << 83 auto table = new G4DecayTable(); << 84 << 85 // create a decay channel << 86 G4VDecayChannel* mode = new G4MuonDecayCha << 87 table->Insert(mode); << 88 anInstance->SetDecayTable(table); << 89 } << 90 theInstance = static_cast<G4MuonMinus*>(anIn << 91 return theInstance; << 92 } << 93 62 94 G4MuonMinus* G4MuonMinus::MuonMinusDefinition( << 63 SetDecayTable(table); 95 { << 96 return Definition(); << 97 } 64 } 98 65 99 G4MuonMinus* G4MuonMinus::MuonMinus() << 66 // ...................................................................... 100 { << 67 // ... static member definitions ... 101 return Definition(); << 68 // ...................................................................... 102 } << 69 // >> 70 // Arguments for constructor are as follows >> 71 // name mass width charge >> 72 // 2*spin parity C-conjugation >> 73 // 2*Isospin 2*Isospin3 G-parity >> 74 // type lepton number baryon number PDG encoding >> 75 // stable lifetime decay table >> 76 >> 77 G4MuonMinus G4MuonMinus::theMuonMinus( >> 78 "mu-", 0.1056584*GeV, 2.99591e-16*MeV, -1.*eplus, >> 79 1, 0, 0, >> 80 0, 0, 0, >> 81 "lepton", 1, 0, 13, >> 82 true, 2197.03*ns, NULL >> 83 ); >> 84 >> 85 G4MuonMinus* G4MuonMinus::MuonMinusDefinition() {return &theMuonMinus;} >> 86 G4double G4MuonMinus::theMuonMinusLengthCut = -1.0; >> 87 G4double* G4MuonMinus::theMuonMinusKineticEnergyCuts = NULL; 103 88