Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // 26 /// \file exoticphysics/monopole/src/G4Monopol << 27 /// \brief Implementation of the G4MonopolePhy << 28 // 26 // >> 27 // $Id: G4MonopolePhysics.cc,v 1.1 2007/08/16 10:32:04 vnivanch Exp $ >> 28 // GEANT4 tag $Name: geant4-09-02 $ 29 // 29 // 30 //-------------------------------------------- 30 //--------------------------------------------------------------------------- 31 // 31 // 32 // ClassName: G4MonopolePhysics 32 // ClassName: G4MonopolePhysics 33 // 33 // 34 // Author: V.Ivanchenko 13.03.2005 34 // Author: V.Ivanchenko 13.03.2005 35 // 35 // 36 // Modified: 36 // Modified: 37 // 37 // 38 // 12.07.10 S.Burdin (changed the magnetic a << 39 // from integer to double) << 40 //-------------------------------------------- 38 //---------------------------------------------------------------------------- 41 // 39 // 42 // 40 // 43 //....oooOO0OOooo........oooOO0OOooo........oo 41 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 44 //....oooOO0OOooo........oooOO0OOooo........oo 42 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 45 43 46 #include "G4MonopolePhysics.hh" << 47 << 48 #include "G4BuilderType.hh" << 49 #include "G4Monopole.hh" 44 #include "G4Monopole.hh" 50 #include "G4MonopolePhysicsMessenger.hh" << 45 #include "G4MonopolePhysics.hh" 51 #include "G4MonopoleTransportation.hh" << 52 #include "G4ParticleDefinition.hh" 46 #include "G4ParticleDefinition.hh" 53 #include "G4PhysicsListHelper.hh" << 54 #include "G4ProcessManager.hh" 47 #include "G4ProcessManager.hh" 55 #include "G4ProcessVector.hh" << 48 56 #include "G4StepLimiter.hh" 49 #include "G4StepLimiter.hh" 57 #include "G4SystemOfUnits.hh" << 58 #include "G4Transportation.hh" 50 #include "G4Transportation.hh" 59 #include "G4hIonisation.hh" << 51 #include "G4MultipleScattering.hh" 60 #include "G4hMultipleScattering.hh" << 61 #include "G4hhIonisation.hh" << 62 #include "G4mplIonisation.hh" 52 #include "G4mplIonisation.hh" 63 #include "G4mplIonisationWithDeltaModel.hh" << 53 #include "G4hhIonisation.hh" 64 54 65 //....oooOO0OOooo........oooOO0OOooo........oo 55 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 66 56 67 G4MonopolePhysics::G4MonopolePhysics(const G4S << 57 G4MonopolePhysics::G4MonopolePhysics(const G4String& name): G4VPhysicsConstructor(name) 68 : G4VPhysicsConstructor(nam), fMpl(nullptr) << 58 {} 69 { << 70 fMagCharge = 1.0; << 71 // fMagCharge = -1.0; << 72 // fElCharge = -50.0; << 73 fElCharge = 0.0; << 74 fMonopoleMass = 100. * GeV; << 75 SetPhysicsType(bUnknown); << 76 fMessenger = new G4MonopolePhysicsMessenger( << 77 } << 78 << 79 //....oooOO0OOooo........oooOO0OOooo........oo << 80 59 81 G4MonopolePhysics::~G4MonopolePhysics() 60 G4MonopolePhysics::~G4MonopolePhysics() 82 { << 61 {} 83 delete fMessenger; << 84 } << 85 << 86 //....oooOO0OOooo........oooOO0OOooo........oo << 87 62 88 void G4MonopolePhysics::ConstructParticle() 63 void G4MonopolePhysics::ConstructParticle() 89 { 64 { 90 if (!fMpl) { << 65 G4Monopole::MonopoleDefinition(); 91 fMpl = G4Monopole::MonopoleDefinition(fMon << 92 } << 93 else { << 94 G4Monopole::Monopole(); << 95 } << 96 } 66 } 97 67 98 //....oooOO0OOooo........oooOO0OOooo........oo << 99 68 >> 69 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 100 void G4MonopolePhysics::ConstructProcess() 70 void G4MonopolePhysics::ConstructProcess() 101 { 71 { 102 if (verboseLevel > 0) { << 103 G4cout << "G4MonopolePhysics::ConstructPro << 104 } << 105 72 106 G4PhysicsListHelper* ph = G4PhysicsListHelpe << 73 // Add standard EM Processes for gamma 107 G4ProcessManager* pmanager = fMpl->GetProces << 74 G4cout << "G4MonopolePhysics::ConstructProcess" << G4endl; 108 75 109 // defined monopole parameters and binning << 76 G4Monopole* mpl = G4Monopole::MonopoleDefinition(); 110 G4double magn = fMpl->MagneticCharge(); << 77 111 G4double emin = std::min(fMonopoleMass / 200 << 78 G4ProcessManager* pmanager = new G4ProcessManager(mpl); 112 G4double emax = std::max(10. * TeV, fMonopol << 79 mpl->SetProcessManager(pmanager); 113 G4int nbin = G4lrint(10 * std::log10(emax / << 80 114 << 81 pmanager->AddProcess( new G4Transportation(), -1, 0, 0); 115 // dedicated trasporation << 82 pmanager->AddProcess( new G4mplIonisation(mpl->MagneticCharge()), -1, 1, 1); 116 if (magn != 0.0) { << 83 pmanager->AddProcess( new G4StepLimiter(), -1, -1, 3); 117 G4int idxt(0); << 84 if(mpl->GetPDGCharge() != 0.0) { 118 pmanager->RemoveProcess(idxt); << 85 pmanager->AddProcess(new G4hhIonisation(), -1, 2, 2); 119 pmanager->AddProcess(new G4MonopoleTranspo << 120 } 86 } 121 87 122 if (fMpl->GetPDGCharge() != 0.0) { << 123 G4hIonisation* hhioni = new G4hIonisation( << 124 hhioni->SetDEDXBinning(nbin); << 125 hhioni->SetMinKinEnergy(emin); << 126 hhioni->SetMaxKinEnergy(emax); << 127 ph->RegisterProcess(hhioni, fMpl); << 128 } << 129 if (magn != 0.0) { << 130 G4mplIonisation* mplioni = new G4mplIonisa << 131 mplioni->SetDEDXBinning(nbin); << 132 mplioni->SetMinKinEnergy(emin); << 133 mplioni->SetMaxKinEnergy(emax); << 134 ph->RegisterProcess(mplioni, fMpl); << 135 } << 136 ph->RegisterProcess(new G4StepLimiter(), fMp << 137 } 88 } 138 89 139 //....oooOO0OOooo........oooOO0OOooo........oo 90 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 140 91 141 void G4MonopolePhysics::SetMagneticCharge(G4do << 142 { << 143 if (fMpl) { << 144 G4Exception("G4MonopolePhysics", "01", Jus << 145 "Cannot set value when monopol << 146 } << 147 else { << 148 fMagCharge = val; << 149 } << 150 } << 151 << 152 //....oooOO0OOooo........oooOO0OOooo........oo << 153 << 154 void G4MonopolePhysics::SetElectricCharge(G4do << 155 { << 156 if (fMpl) { << 157 G4Exception("G4MonopolePhysics", "01", Jus << 158 "Cannot set value when monopol << 159 } << 160 else { << 161 fElCharge = val; << 162 } << 163 } << 164 << 165 //....oooOO0OOooo........oooOO0OOooo........oo << 166 << 167 void G4MonopolePhysics::SetMonopoleMass(G4doub << 168 { << 169 if (fMpl) { << 170 G4Exception("G4MonopolePhysics", "01", Jus << 171 "Cannot set value when monopol << 172 } << 173 else { << 174 fMonopoleMass = mass; << 175 } << 176 } << 177 << 178 //....oooOO0OOooo........oooOO0OOooo........oo << 179 92