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: G4MuonPlus.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, 10 May 1996 >> 22 // Operators (+=, *=, ++, -> etc.) correctly used, P. Urban, 26/6/96 >> 23 // Add MuonPlusDefinition(), H.Kurashige 4 July 1996 33 // ------------------------------------------- 24 // ---------------------------------------------------------------------- 34 25 >> 26 #include "g4std/fstream" >> 27 #include "g4std/iomanip" >> 28 35 #include "G4MuonPlus.hh" 29 #include "G4MuonPlus.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 G4MuonPlus* G4MuonPlus::theInstance = nullptr; << 47 33 48 G4MuonPlus* G4MuonPlus::Definition() << 34 // ###################################################################### >> 35 // ### MUONPLUS ### >> 36 // ###################################################################### >> 37 >> 38 G4MuonPlus::G4MuonPlus( >> 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] << 53 G4ParticleTable* pTable = G4ParticleTable::G << 54 G4ParticleDefinition* anInstance = pTable->F << 55 if (anInstance == nullptr) { << 56 // create particle << 57 // << 58 // Arguments for constructor are as fol << 59 // name mass << 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, nullpt << 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 // create a decay channel << 85 G4VDecayChannel* mode = new G4MuonDecayCha << 86 table->Insert(mode); << 87 anInstance->SetDecayTable(table); << 88 } << 89 theInstance = static_cast<G4MuonPlus*>(anIns << 90 return theInstance; << 91 } << 92 54 93 G4MuonPlus* G4MuonPlus::MuonPlusDefinition() << 55 //create Decay Table 94 { << 56 G4DecayTable* table = GetDecayTable(); 95 return Definition(); << 57 if (table!=NULL) delete table; 96 } << 58 table = new G4DecayTable(); >> 59 >> 60 // create a decay channel >> 61 G4VDecayChannel* mode = new G4MuonDecayChannel("mu+",1.00); >> 62 table->Insert(mode); 97 63 98 G4MuonPlus* G4MuonPlus::MuonPlus() << 64 SetDecayTable(table); 99 { << 100 return Definition(); << 101 } 65 } >> 66 >> 67 // ...................................................................... >> 68 // ... static member definitions ... >> 69 // ...................................................................... >> 70 // >> 71 // Arguments for constructor are as follows >> 72 // name mass width charge >> 73 // 2*spin parity C-conjugation >> 74 // 2*Isospin 2*Isospin3 G-parity >> 75 // type lepton number baryon number PDG encoding >> 76 // stable lifetime decay table >> 77 G4MuonPlus G4MuonPlus::theMuonPlus( >> 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 G4MuonPlus* G4MuonPlus::MuonPlusDefinition() {return &theMuonPlus;} >> 86 // initialization for static cut values >> 87 G4double G4MuonPlus::theMuonPlusLengthCut = -1.0; >> 88 G4double* G4MuonPlus::theMuonPlusKineticEnergyCuts = NULL; >> 89 >> 90 >> 91 >> 92 >> 93 >> 94 >> 95 >> 96 >> 97 >> 98 >> 99 102 100