Geant4  10.02
G4EmUserPhysics.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: G4EmUserPhysics.cc 70761 2013-06-05 12:30:51Z gcosmo $
30 //
31 //---------------------------------------------------------------------------
32 //
33 // ClassName: G4EmUserPhysics
34 //
35 // Author: V.Ivanchenko 11.07.2012
36 //
37 // Modified:
38 //
39 //----------------------------------------------------------------------------
40 //
41 
42 #include "G4EmUserPhysics.hh"
43 #include "G4ParticleDefinition.hh"
44 #include "G4LossTableManager.hh"
45 #include "G4VEnergyLossProcess.hh"
46 #include "G4VProcess.hh"
47 #include "G4EmProcessOptions.hh"
48 #include "G4AntiProton.hh"
49 #include "G4ProcessManager.hh"
50 #include "G4ProcessVector.hh"
51 #include "G4EmProcessSubType.hh"
52 #include "G4SystemOfUnits.hh"
53 
54 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
55 
57  : G4VPhysicsConstructor("User EM Options"), fVerbose(ver)
58 {
60 }
61 
62 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
63 
65 {}
66 
67 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
68 
70 {
72 }
73 
74 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
75 
77 {
79  G4ProcessManager* pmanager = pbar->GetProcessManager();
80  G4ProcessVector* pv = pmanager->GetProcessList();
81  size_t nn = pv->size();
82  for(size_t i=0; i<nn; ++i) {
83  G4VProcess* proc = (*pv)[i];
84  if(fIonisation == proc->GetProcessSubType()) {
85  G4VEnergyLossProcess* eloss = static_cast<G4VEnergyLossProcess*>(proc);
86  G4double elim = 1.e-6*eV;
87  eloss->SetLowestEnergyLimit(elim);
88  G4cout << "### G4EmUserPhysics::ConstructProcess: "
89  << "set new lowest energy limit " << elim/eV << " eV for "
90  << pbar->GetParticleName() << G4endl;
91  break;
92  }
93  }
94 
96  opt.SetVerbose(fVerbose);
97 }
98 
99 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
static G4LossTableManager * Instance()
G4EmUserPhysics(G4int ver=1)
virtual void ConstructParticle()
G4ProcessManager * GetProcessManager() const
int G4int
Definition: G4Types.hh:78
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
static G4AntiProton * AntiProton()
Definition: G4AntiProton.cc:93
Definition of the G4EmUserPhysics class.
void SetVerbose(G4int val)
virtual void ConstructProcess()
G4int size() const
static const double eV
Definition: G4SIunits.hh:212
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
void SetLowestEnergyLimit(G4double)
G4int GetProcessSubType() const
Definition: G4VProcess.hh:426
G4ProcessVector * GetProcessList() const
virtual ~G4EmUserPhysics()