Geant4  10.00.p02
G4MonopolePhysics.cc
Go to the documentation of this file.
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 68036 2013-03-13 14:13:45Z 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 from integer to double)
40 //----------------------------------------------------------------------------
41 //
42 //
43 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
44 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
45 
46 #include "G4MonopolePhysics.hh"
48 
49 #include "G4Monopole.hh"
50 #include "G4ParticleDefinition.hh"
51 #include "G4ProcessManager.hh"
52 #include "G4ProcessVector.hh"
53 
54 #include "G4StepLimiter.hh"
55 #include "G4Transportation.hh"
57 #include "G4hMultipleScattering.hh"
58 #include "G4mplIonisation.hh"
60 #include "G4hhIonisation.hh"
61 #include "G4hIonisation.hh"
62 
63 #include "G4PhysicsListHelper.hh"
64 
65 #include "G4BuilderType.hh"
66 #include "G4SystemOfUnits.hh"
67 
68 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
69 
71  : G4VPhysicsConstructor(nam),
72  fMessenger(0), fMpl(0)
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 
void SetElectricCharge(G4double)
void SetMonopoleMass(G4double)
virtual void ConstructProcess()
void SetMagneticCharge(G4double)
Definition of the G4MonopoleTransportation class.
G4ProcessManager * GetProcessManager() const
int G4int
Definition: G4Types.hh:78
Definition of the G4Monopole class.
G4GLOB_DLL std::ostream G4cout
G4double MagneticCharge() const
Definition: G4Monopole.cc:125
G4bool RegisterProcess(G4VProcess *process, G4ParticleDefinition *particle)
static G4Monopole * MonopoleDefinition(G4double mass=100.*CLHEP::GeV, G4double magCharge=1.0, G4double elCharge=0.0)
Definition: G4Monopole.cc:93
G4int AddProcess(G4VProcess *aProcess, G4int ordAtRestDoIt=ordInActive, G4int ordAlongSteptDoIt=ordInActive, G4int ordPostStepDoIt=ordInActive)
G4MonopolePhysics(const G4String &nam="Monopole Physics")
virtual void ConstructParticle()
static const double GeV
Definition: G4SIunits.hh:196
void SetMaxKinEnergy(G4double e)
int G4lrint(double ad)
Definition: templates.hh:163
T max(const T t1, const T t2)
brief Return the largest of the two arguments
Definition of the G4MonopolePhysicsMessenger class.
static G4PhysicsListHelper * GetPhysicsListHelper()
Definition of the G4MonopolePhysics class.
#define G4endl
Definition: G4ios.hh:61
static const double TeV
Definition: G4SIunits.hh:197
static const double keV
Definition: G4SIunits.hh:195
double G4double
Definition: G4Types.hh:76
G4double GetPDGCharge() const
G4MonopolePhysicsMessenger * fMessenger
G4VProcess * RemoveProcess(G4VProcess *aProcess)
void SetDEDXBinning(G4int nbins)
void SetMinKinEnergy(G4double e)