Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4MonopolePhysics.cc
이 파일의 문서화 페이지로 가기
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
28 //
29 // $Id: G4MonopolePhysics.cc 107526 2017-11-21 07:17:43Z gcosmo $
30 //
31 //---------------------------------------------------------------------------
32 //
33 // ClassName: G4MonopolePhysics
34 //
35 // Author: V.Ivanchenko 13.03.2005
36 //
37 // Modified:
38 //
39 // 12.07.10 S.Burdin (changed the magnetic and electric charge variables
40 // from integer to double)
41 //----------------------------------------------------------------------------
42 //
43 //
44 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
45 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
46 
47 #include "G4MonopolePhysics.hh"
49 
50 #include "G4Monopole.hh"
51 #include "G4ParticleDefinition.hh"
52 #include "G4ProcessManager.hh"
53 #include "G4ProcessVector.hh"
54 
55 #include "G4StepLimiter.hh"
56 #include "G4Transportation.hh"
58 #include "G4hMultipleScattering.hh"
59 #include "G4mplIonisation.hh"
61 #include "G4hhIonisation.hh"
62 #include "G4hIonisation.hh"
63 
64 #include "G4PhysicsListHelper.hh"
65 
66 #include "G4BuilderType.hh"
67 #include "G4SystemOfUnits.hh"
68 
69 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
70 
72  : G4VPhysicsConstructor(nam), fMpl(nullptr)
73 {
74  fMagCharge = 1.0;
75  // fMagCharge = -1.0;
76  // fElCharge = -50.0;
77  fElCharge = 0.0;
78  fMonopoleMass = 100.*GeV;
81 }
82 
83 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
84 
86 {
87  delete fMessenger;
88 }
89 
90 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
91 
93 {
95 }
96 
97 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
98 
100 {
101  if(verboseLevel > 0) {
102  G4cout << "G4MonopolePhysics::ConstructProcess" << G4endl;
103  }
104 
106  G4ProcessManager* pmanager = fMpl->GetProcessManager();
107 
108  // defined monopole parameters and binning
109 
110  G4double magn = fMpl->MagneticCharge();
111  G4double emin = fMonopoleMass/20000.;
112  if(emin < keV) { emin = keV; }
113  G4double emax = std::max(10.*TeV, fMonopoleMass*100);
114  G4int nbin = G4lrint(10*std::log10(emax/emin));
115 
116  // dedicated trasporation
117  if(magn != 0.0) {
118  pmanager->RemoveProcess(0);
119  pmanager->AddProcess(new G4MonopoleTransportation(fMpl),-1, 0, 0);
120  }
121 
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 G4mplIonisation(magn);
131  mplioni->SetDEDXBinning(nbin);
132  mplioni->SetMinKinEnergy(emin);
133  mplioni->SetMaxKinEnergy(emax);
134  ph->RegisterProcess(mplioni, fMpl);
135  }
136  ph->RegisterProcess(new G4StepLimiter(), fMpl);
137 }
138 
139 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
140 
142 {
143  fMagCharge = val;
144 }
145 
146 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
147 
149 {
150  fElCharge = val;
151 }
152 
153 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
154 
156 {
157  fMonopoleMass = mass;
158 }
159 
160 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
161 
T max(const T t1, const T t2)
brief Return the largest of the two arguments
void SetMinKinEnergy(G4double e)
static constexpr double keV
Definition: G4SIunits.hh:216
#define G4endl
Definition: G4ios.hh:61
void SetElectricCharge(G4double)
G4MonopolePhysics(const G4String &nam="Monopole Physics")
G4double GetPDGCharge() const
virtual void ConstructProcess()
static const G4double emax
Definition of the G4Monopole class.
void SetDEDXBinning(G4int nbins)
static constexpr double TeV
Definition: G4SIunits.hh:218
G4MonopolePhysicsMessenger * fMessenger
double G4double
Definition: G4Types.hh:76
G4int AddProcess(G4VProcess *aProcess, G4int ordAtRestDoIt=ordInActive, G4int ordAlongSteptDoIt=ordInActive, G4int ordPostStepDoIt=ordInActive)
G4double MagneticCharge() const
Definition: G4Monopole.cc:125
static G4Monopole * MonopoleDefinition(G4double mass=100.*CLHEP::GeV, G4double magCharge=1.0, G4double elCharge=0.0)
Definition: G4Monopole.cc:93
Definition of the G4MonopolePhysics class.
Definition of the G4MonopoleTransportation class.
void SetMaxKinEnergy(G4double e)
void SetMonopoleMass(G4double)
void SetMagneticCharge(G4double)
G4bool RegisterProcess(G4VProcess *process, G4ParticleDefinition *particle)
int G4lrint(double ad)
Definition: templates.hh:151
static G4PhysicsListHelper * GetPhysicsListHelper()
int G4int
Definition: G4Types.hh:78
G4ProcessManager * GetProcessManager() const
virtual void ConstructParticle()
G4VProcess * RemoveProcess(G4VProcess *aProcess)
G4GLOB_DLL std::ostream G4cout
Definition of the G4MonopolePhysicsMessenger class.
static constexpr double GeV
Definition: G4SIunits.hh:217