source: trunk/source/physics_lists/builders/src/G4IonPhysics.cc @ 1315

Last change on this file since 1315 was 1315, checked in by garnier, 14 years ago

update geant4-09-04-beta-cand-01 interfaces-V09-03-09 vis-V09-03-08

File size: 3.9 KB
Line 
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//
26// $Id: G4IonPhysics.cc,v 1.2 2010/06/03 14:37:24 gunter Exp $
27// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
28//
29//---------------------------------------------------------------------------
30//
31// ClassName:   G4IonPhysics
32//
33// Author:      V.Ivanchenko 09.11.2005
34//
35// Modified:
36//
37//----------------------------------------------------------------------------
38//
39
40#include "G4IonPhysics.hh"
41
42#include "G4DeuteronInelasticProcess.hh"
43#include "G4LEDeuteronInelastic.hh"
44
45#include "G4TritonInelasticProcess.hh"
46#include "G4LETritonInelastic.hh"
47
48#include "G4AlphaInelasticProcess.hh"
49#include "G4LEAlphaInelastic.hh"
50
51#include "G4ParticleDefinition.hh"
52#include "G4ParticleTable.hh"
53#include "G4ProcessManager.hh"
54
55// Nuclei
56#include "G4IonConstructor.hh"
57
58G4IonPhysics::G4IonPhysics(G4int)
59                  :  G4VPhysicsConstructor("IonPhysics")
60                   , wasActivated(false)
61{
62}
63
64G4IonPhysics::G4IonPhysics(const G4String& name)
65                  :  G4VPhysicsConstructor(name), wasActivated(false)
66{
67}
68
69G4IonPhysics::~G4IonPhysics()
70{
71  if(wasActivated) {
72
73    delete fDeuteronProcess;
74    delete fDeuteronModel;
75    delete fTritonProcess;
76    delete fTritonModel;
77    delete fAlphaProcess;
78    delete fAlphaModel;
79
80   }
81 }
82
83void G4IonPhysics::ConstructProcess()
84{
85  G4ProcessManager * pManager = 0;
86
87 // Deuteron
88  pManager = G4Deuteron::Deuteron()->GetProcessManager();
89  // add process
90  fDeuteronModel = new G4LEDeuteronInelastic();
91  fDeuteronProcess = new G4DeuteronInelasticProcess();
92  fDeuteronProcess->RegisterMe(fDeuteronModel);
93  pManager->AddDiscreteProcess(fDeuteronProcess);
94
95  // Triton
96  pManager = G4Triton::Triton()->GetProcessManager();
97  // add process
98  fTritonModel = new G4LETritonInelastic();
99  fTritonProcess = new G4TritonInelasticProcess();
100  fTritonProcess->RegisterMe(fTritonModel);
101  pManager->AddDiscreteProcess(fTritonProcess);
102
103  // Alpha
104  pManager = G4Alpha::Alpha()->GetProcessManager();
105  // add process
106  fAlphaModel = new G4LEAlphaInelastic();
107  fAlphaProcess = new G4AlphaInelasticProcess();
108  fAlphaProcess->RegisterMe(fAlphaModel);
109  pManager->AddDiscreteProcess(fAlphaProcess);
110
111  wasActivated = true;
112}
113
114 void G4IonPhysics::ConstructParticle()
115 {
116   //  Construct light ions
117   G4IonConstructor pConstructor;
118   pConstructor.ConstructParticle(); 
119 }
Note: See TracBrowser for help on using the repository browser.