ACTARSim
ACTAR TPC Simulation Reference Guide
HadrontherapyIonStandard.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * DISCLAIMER *
4 // * *
5 // * The following disclaimer summarizes all the specific disclaimers *
6 // * of contributors to this software. The specific disclaimers,which *
7 // * govern, are listed with their locations in: *
8 // * http://cern.ch/geant4/license *
9 // * *
10 // * Neither the authors of this software system, nor their employing *
11 // * institutes,nor the agencies providing financial support for this *
12 // * work make any representation or warranty, express or implied, *
13 // * regarding this software system or assume any liability for its *
14 // * use. *
15 // * *
16 // * This code implementation is the intellectual property of the *
17 // * GEANT4 collaboration. *
18 // * By copying, distributing or modifying the Program (or any work *
19 // * based on the Program) you indicate your acceptance of this *
20 // * statement, and all its terms. *
21 // ********************************************************************
22 // $Id: HadrontherapyIonStandard.cc; May 2005
23 // ----------------------------------------------------------------------------
24 // GEANT 4 - Hadrontherapy example
25 // ----------------------------------------------------------------------------
26 // Code developed by:
27 //
28 // G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
29 //
30 // (a) Laboratori Nazionali del Sud
31 // of the National Institute for Nuclear Physics, Catania, Italy
32 // (b) National Institute for Nuclear Physics Section of Genova, genova, Italy
33 //
34 // * cirrone@lns.infn.it
35 // ----------------------------------------------------------------------------
36 
38 #include "G4ProcessManager.hh"
39 #include "G4ParticleDefinition.hh"
40 #include "G4ParticleTable.hh"
41 #include "G4hMultipleScattering.hh"
42 #include "G4hIonisation.hh"
43 #include "G4ionIonisation.hh"
44 #include "G4hMultipleScattering.hh"
45 #include "G4StepLimiter.hh"
46 
47 HadrontherapyIonStandard::HadrontherapyIonStandard(const G4String& name): G4VPhysicsConstructor(name)
48 { }
49 
51 { }
52 
54 {
55  G4ParticleTable::G4PTblDicIterator* theParticleIterator = G4ParticleTable::GetParticleTable()->GetIterator();
56  theParticleIterator -> reset();
57 
58  while( (*theParticleIterator)() )
59  {
60  G4ParticleDefinition* particle = theParticleIterator -> value();
61  G4ProcessManager* manager = particle -> GetProcessManager();
62  G4String particleName = particle -> GetParticleName();
63  G4double charge = particle -> GetPDGCharge();
64 
65  if (particleName == "GenericIon")
66  {
67  G4ionIonisation* ionisation = new G4ionIonisation();
68  G4VProcess* multipleScattering = new G4hMultipleScattering();
69  manager -> AddProcess(multipleScattering, -1,1,1);
70  manager -> AddProcess(ionisation, -1,2,2);
71  manager -> AddProcess(new G4StepLimiter(),-1,-1, 3);
72 
73  }
74  //protons and generic hadrons
75  if (( charge != 0. ) && particleName != "e+" && particleName != "mu+" &&
76  particleName != "e-" && particleName != "mu-" && particleName !="GenericIon")
77  {
78  if((!particle -> IsShortLived()) &&
79  (particle -> GetParticleName() != "chargedgeantino"))
80  {
81  G4hIonisation* ionisation = new G4hIonisation();
82  G4VProcess* multipleScattering = new G4hMultipleScattering();
83  manager -> AddProcess(multipleScattering, -1,1,1);
84  manager -> AddProcess(ionisation, -1,2,2);
85  manager -> AddProcess(new G4StepLimiter(),-1,-1, 3);
86  }
87  }
88  }
89 }
HadrontherapyIonStandard(const G4String &name="ion-standard")