Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/examples/extended/medical/dna/dnaphysics/src/SteppingAction.cc

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /examples/extended/medical/dna/dnaphysics/src/SteppingAction.cc (Version 11.3.0) and /examples/extended/medical/dna/dnaphysics/src/SteppingAction.cc (Version 11.0)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 // This example is provided by the Geant4-DNA      26 // This example is provided by the Geant4-DNA collaboration
 27 // Any report or published results obtained us <<  27 // Any report or published results obtained using the Geant4-DNA software 
 28 // shall cite the following Geant4-DNA collabo <<  28 // shall cite the following Geant4-DNA collaboration publication:
 29 // Med. Phys. 45 (2018) e722-e739              << 
 30 // Phys. Med. 31 (2015) 861-874                << 
 31 // Med. Phys. 37 (2010) 4692-4708                  29 // Med. Phys. 37 (2010) 4692-4708
 32 // Int. J. Model. Simul. Sci. Comput. 1 (2010) << 
 33 //                                             << 
 34 // The Geant4-DNA web site is available at htt     30 // The Geant4-DNA web site is available at http://geant4-dna.org
 35 //                                                 31 //
                                                   >>  32 //
 36 /// \file SteppingAction.cc                        33 /// \file SteppingAction.cc
 37 /// \brief Implementation of the SteppingActio     34 /// \brief Implementation of the SteppingAction class
 38                                                    35 
 39 #include "SteppingAction.hh"                       36 #include "SteppingAction.hh"
 40                                                <<  37 #include "RunAction.hh"
 41 #include "DetectorConstruction.hh"                 38 #include "DetectorConstruction.hh"
 42 #include "PrimaryGeneratorAction.hh"               39 #include "PrimaryGeneratorAction.hh"
 43 #include "RunAction.hh"                        << 
 44                                                    40 
 45 #include "G4Alpha.hh"                          << 
 46 #include "G4AnalysisManager.hh"                    41 #include "G4AnalysisManager.hh"
 47 #include "G4DNAGenericIonsManager.hh"          <<  42 #include "G4SystemOfUnits.hh"
                                                   >>  43 #include "G4SteppingManager.hh"
                                                   >>  44 
 48 #include "G4Electron.hh"                           45 #include "G4Electron.hh"
 49 #include "G4Event.hh"                          << 
 50 #include "G4EventManager.hh"                   << 
 51 #include "G4Gamma.hh"                          << 
 52 #include "G4Proton.hh"                             46 #include "G4Proton.hh"
 53 #include "G4SteppingManager.hh"                <<  47 #include "G4Gamma.hh"
 54 #include "G4SystemOfUnits.hh"                  <<  48 #include "G4Alpha.hh"
                                                   >>  49 #include "G4DNAGenericIonsManager.hh"
                                                   >>  50 #include "G4EventManager.hh"
                                                   >>  51 #include "G4Event.hh"
 55                                                    52 
 56 //....oooOO0OOooo........oooOO0OOooo........oo     53 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 57                                                    54 
 58 SteppingAction::SteppingAction() : G4UserStepp <<  55 SteppingAction::SteppingAction(): G4UserSteppingAction()
                                                   >>  56 {}
 59                                                    57 
 60 //....oooOO0OOooo........oooOO0OOooo........oo     58 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 61                                                    59 
 62 SteppingAction::~SteppingAction() {}           <<  60 SteppingAction::~SteppingAction()
                                                   >>  61 {}
 63                                                    62 
 64 //....oooOO0OOooo........oooOO0OOooo........oo     63 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 65                                                    64 
 66 void SteppingAction::UserSteppingAction(const      65 void SteppingAction::UserSteppingAction(const G4Step* step)
 67 {                                              <<  66 { 
 68   // Protection                                    67   // Protection
                                                   >>  68 
 69   if (!step->GetPostStepPoint()) return;           69   if (!step->GetPostStepPoint()) return;
 70   if (!step->GetPostStepPoint()->GetProcessDef     70   if (!step->GetPostStepPoint()->GetProcessDefinedStep()) return;
 71                                                    71 
 72   //                                               72   //
 73   G4double flagParticle = -1.;                 <<  73 
 74   G4double flagProcess = -1.;                  <<  74   G4double flagParticle=-1.;
 75   G4double x, y, z, xp, yp, zp;                <<  75   G4double flagProcess=-1.;
                                                   >>  76   G4double x,y,z,xp,yp,zp;
 76                                                    77 
 77   // Particle identification                       78   // Particle identification
 78                                                    79 
 79   // The following method avoids the usage of  <<  80   // The following method avoids the usage of string comparison 
 80   G4ParticleDefinition* partDef = step->GetTra << 
 81                                                    81 
 82   if (partDef == G4Gamma::GammaDefinition()) f <<  82   G4ParticleDefinition * partDef = 
                                                   >>  83    step->GetTrack()->GetDynamicParticle()->GetDefinition();
 83                                                    84 
 84   if (partDef == G4Electron::ElectronDefinitio <<  85   if (partDef == G4Gamma::GammaDefinition())
                                                   >>  86      flagParticle = 0; 
 85                                                    87 
 86   if (partDef == G4Proton::ProtonDefinition()) <<  88   if (partDef == G4Electron::ElectronDefinition())
                                                   >>  89      flagParticle = 1; 
 87                                                    90 
 88   if (partDef == G4Alpha::AlphaDefinition()) f <<  91   if (partDef == G4Proton::ProtonDefinition())
                                                   >>  92      flagParticle = 2; 
 89                                                    93 
 90   G4DNAGenericIonsManager* instance;           <<  94   if (partDef == G4Alpha::AlphaDefinition())
 91   instance = G4DNAGenericIonsManager::Instance <<  95      flagParticle = 4; 
 92                                                    96 
                                                   >>  97   G4DNAGenericIonsManager *instance;
                                                   >>  98   instance = G4DNAGenericIonsManager::Instance();
                                                   >>  99   
 93   // Usage example                                100   // Usage example
 94   /*                                              101   /*
 95   G4ParticleDefinition* protonDef = G4Proton::    102   G4ParticleDefinition* protonDef = G4Proton::ProtonDefinition();
 96   G4ParticleDefinition* hydrogenDef = instance    103   G4ParticleDefinition* hydrogenDef = instance->GetIon("hydrogen");
 97   G4ParticleDefinition* alphaPlusPlusDef = ins    104   G4ParticleDefinition* alphaPlusPlusDef = instance->GetIon("alpha++");
 98   G4ParticleDefinition* alphaPlusDef = instanc    105   G4ParticleDefinition* alphaPlusDef = instance->GetIon("alpha+");
 99   G4ParticleDefinition* heliumDef = instance->    106   G4ParticleDefinition* heliumDef = instance->GetIon("helium");
100   */                                              107   */
101                                                   108 
102   if (partDef == instance->GetIon("hydrogen")) << 109   if (partDef == instance->GetIon("hydrogen"))
                                                   >> 110      flagParticle = 3; 
103                                                   111 
104   if (partDef == instance->GetIon("alpha+")) f << 112   if (partDef == instance->GetIon("alpha+"))
                                                   >> 113      flagParticle = 5; 
105                                                   114 
106   if (partDef == instance->GetIon("helium")) f << 115   if (partDef == instance->GetIon("helium"))
                                                   >> 116      flagParticle = 6; 
107                                                   117 
108   // Alternative method (based on string compa    118   // Alternative method (based on string comparison)
109                                                << 119   
110   /*                                              120   /*
111   const G4String& particleName = step->GetTrac    121   const G4String& particleName = step->GetTrack()->GetDynamicParticle()->
112       GetDefinition()->GetParticleName();         122       GetDefinition()->GetParticleName();
113                                                << 123       
114   if (particleName == "gamma")         flagPar    124   if (particleName == "gamma")         flagParticle = 0;
115   else if (particleName == "e-")       flagPar    125   else if (particleName == "e-")       flagParticle = 1;
116   else if (particleName == "proton")   flagPar    126   else if (particleName == "proton")   flagParticle = 2;
117   else if (particleName == "hydrogen") flagPar    127   else if (particleName == "hydrogen") flagParticle = 3;
118   else if (particleName == "alpha")    flagPar    128   else if (particleName == "alpha")    flagParticle = 4;
119   else if (particleName == "alpha+")   flagPar    129   else if (particleName == "alpha+")   flagParticle = 5;
120   else if (particleName == "helium")   flagPar    130   else if (particleName == "helium")   flagParticle = 6;
121   */                                              131   */
122                                                   132 
123   // Process identification                       133   // Process identification
124                                                   134 
125   // Process sub-types are listed in G4Physics    135   // Process sub-types are listed in G4PhysicsListHelper.cc
126   // or in Geant4-DNA process class implementa    136   // or in Geant4-DNA process class implementation files (*.cc)
127                                                   137 
128   G4StepPoint* preStep = step->GetPreStepPoint << 138   G4StepPoint * preStep = step->GetPreStepPoint();
129   G4StepPoint* postStep = step->GetPostStepPoi << 139   G4StepPoint * postStep = step->GetPostStepPoint();
130   G4int procID = postStep->GetProcessDefinedSt    140   G4int procID = postStep->GetProcessDefinedStep()->GetProcessSubType();
131                                                   141 
132   const G4String& processName = postStep->GetP << 142   const G4String& processName = postStep->
                                                   >> 143       GetProcessDefinedStep()->GetProcessName();
133                                                   144 
134   if (processName == "Capture") flagProcess =  << 145   if (processName=="Capture") flagProcess =1;
135   // (no subType and procID exists at the mome    146   // (no subType and procID exists at the moment for this process)
136   // used to kill ions below tracking cut      << 
137                                                   147 
138   else if (flagParticle == 0) {                << 148   else if (flagParticle == 1)
139     if (procID == 12)                          << 
140       flagProcess = 81;                        << 
141     else if (procID == 13)                     << 
142       flagProcess = 82;                        << 
143     else if (procID == 14)                     << 
144       flagProcess = 83;                        << 
145     else if (procID == 11)                     << 
146       flagProcess = 84;                        << 
147   }                                            << 
148                                                   149 
149   else if (flagParticle == 1) {                << 150   {
150     if (procID == 58)                          << 151     if      (procID==58) flagProcess =10;
151       flagProcess = 10;                        << 152     else if (procID==51) flagProcess =11;
152     else if (procID == 51)                     << 153     else if (procID==52) flagProcess =12;
153       flagProcess = 11;                        << 154     else if (procID==53) flagProcess =13;
154     else if (procID == 52)                     << 155     else if (procID==55) flagProcess =14;
155       flagProcess = 12;                        << 156     else if (procID==54) flagProcess =15;
156     else if (procID == 53)                     << 157     else if (procID==10) flagProcess =110;
157       flagProcess = 13;                        << 158     else if (procID==1)  flagProcess =120;
158     else if (procID == 55)                     << 159     else if (procID==2)  flagProcess =130;
159       flagProcess = 14;                        << 
160     else if (procID == 54)                     << 
161       flagProcess = 15;                        << 
162     else if (procID == 10)                     << 
163       flagProcess = 110;                       << 
164     else if (procID == 1)                      << 
165       flagProcess = 120;                       << 
166     else if (procID == 2)                      << 
167       flagProcess = 130;                       << 
168   }                                               160   }
                                                   >> 161         
                                                   >> 162   else if (flagParticle == 2)
169                                                   163 
170   else if (flagParticle == 2) {                << 164   {
171     if (procID == 51)                          << 165     if      (procID==51) flagProcess =21;
172       flagProcess = 21;                        << 166     else if (procID==52) flagProcess =22;
173     else if (procID == 52)                     << 167     else if (procID==53) flagProcess =23;
174       flagProcess = 22;                        << 168     else if (procID==56) flagProcess =24;
175     else if (procID == 53)                     << 169     else if (procID==10) flagProcess =210;
176       flagProcess = 23;                        << 170     else if (procID==1)  flagProcess =220;
177     else if (procID == 56)                     << 171     else if (procID==2)  flagProcess =230;
178       flagProcess = 24;                        << 172     else if (procID==8)  flagProcess =240;
179     else if (procID == 10)                     << 
180       flagProcess = 210;                       << 
181     else if (procID == 1)                      << 
182       flagProcess = 220;                       << 
183     else if (procID == 2)                      << 
184       flagProcess = 230;                       << 
185     else if (procID == 8)                      << 
186       flagProcess = 240;                       << 
187   }                                               173   }
                                                   >> 174         
                                                   >> 175   else if (flagParticle == 3)
188                                                   176 
189   else if (flagParticle == 3) {                << 177   {
190     if (procID == 51)                          << 178     if      (procID==51) flagProcess =31;
191       flagProcess = 31;                        << 179     else if (procID==52) flagProcess =32;
192     else if (procID == 52)                     << 180     else if (procID==53) flagProcess =33;
193       flagProcess = 32;                        << 181     else if (procID==57) flagProcess =35;
194     else if (procID == 53)                     << 
195       flagProcess = 33;                        << 
196     else if (procID == 57)                     << 
197       flagProcess = 35;                        << 
198   }                                               182   }
                                                   >> 183         
                                                   >> 184   else if (flagParticle == 4)
199                                                   185 
200   else if (flagParticle == 4) {                << 186   {
201     if (procID == 51)                          << 187     if      (procID==51) flagProcess =41;
202       flagProcess = 41;                        << 188     else if (procID==52) flagProcess =42;
203     else if (procID == 52)                     << 189     else if (procID==53) flagProcess =43;
204       flagProcess = 42;                        << 190     else if (procID==56) flagProcess =44;
205     else if (procID == 53)                     << 191     else if (procID==10) flagProcess =410;
206       flagProcess = 43;                        << 192     else if (procID==1)  flagProcess =420;
207     else if (procID == 56)                     << 193     else if (procID==2)  flagProcess =430;
208       flagProcess = 44;                        << 194     else if (procID==8)  flagProcess =440;
209     else if (procID == 10)                     << 
210       flagProcess = 410;                       << 
211     else if (procID == 1)                      << 
212       flagProcess = 420;                       << 
213     else if (procID == 2)                      << 
214       flagProcess = 430;                       << 
215     else if (procID == 8)                      << 
216       flagProcess = 440;                       << 
217   }                                               195   }
                                                   >> 196         
                                                   >> 197   else if (flagParticle == 5)
218                                                   198 
219   else if (flagParticle == 5) {                << 199   {
220     if (procID == 51)                          << 200     if      (procID==51) flagProcess =51;
221       flagProcess = 51;                        << 201     else if (procID==52) flagProcess =52;
222     else if (procID == 52)                     << 202     else if (procID==53) flagProcess =53;
223       flagProcess = 52;                        << 203     else if (procID==56) flagProcess =54;
224     else if (procID == 53)                     << 204     else if (procID==57) flagProcess =55;
225       flagProcess = 53;                        << 205     else if (procID==10) flagProcess =510;
226     else if (procID == 56)                     << 206     else if (procID==1)  flagProcess =520;
227       flagProcess = 54;                        << 207     else if (procID==2)  flagProcess =530;
228     else if (procID == 57)                     << 208     else if (procID==8)  flagProcess =540;
229       flagProcess = 55;                        << 
230     else if (procID == 10)                     << 
231       flagProcess = 510;                       << 
232     else if (procID == 1)                      << 
233       flagProcess = 520;                       << 
234     else if (procID == 2)                      << 
235       flagProcess = 530;                       << 
236     else if (procID == 8)                      << 
237       flagProcess = 540;                       << 
238   }                                               209   }
                                                   >> 210         
                                                   >> 211   else if (flagParticle == 6)
                                                   >> 212 
                                                   >> 213   {
                                                   >> 214     if      (procID==51) flagProcess =61;
                                                   >> 215     else if (procID==52) flagProcess =62;
                                                   >> 216     else if (procID==53) flagProcess =63;
                                                   >> 217     else if (procID==57) flagProcess =65;
239                                                   218 
240   else if (flagParticle == 6) {                << 
241     if (procID == 51)                          << 
242       flagProcess = 61;                        << 
243     else if (procID == 52)                     << 
244       flagProcess = 62;                        << 
245     else if (procID == 53)                     << 
246       flagProcess = 63;                        << 
247     else if (procID == 57)                     << 
248       flagProcess = 65;                        << 
249   }                                               219   }
250                                                   220 
251   else if (processName == "GenericIon_G4DNAIon << 221   else if (processName=="GenericIon_G4DNAIonisation") flagProcess =73;
252     flagProcess = 73;                          << 222   else if (processName=="msc")                        flagProcess =710;
253   else if (processName == "msc")               << 223   else if (processName=="CoulombScat")                flagProcess =720;
254     flagProcess = 710;                         << 224   else if (processName=="ionIoni")                    flagProcess =730;
255   else if (processName == "CoulombScat")       << 225   else if (processName=="nuclearStopping")            flagProcess =740;
256     flagProcess = 720;                         << 
257   else if (processName == "ionIoni")           << 
258     flagProcess = 730;                         << 
259   else if (processName == "nuclearStopping")   << 
260     flagProcess = 740;                         << 
261   // (for all GenericIons)                        226   // (for all GenericIons)
262                                                << 227       
263   // Alternatively, using process names           228   // Alternatively, using process names
264                                                   229 
265   /*                                              230   /*
266   else if (processName=="e-_G4DNAElectronSolva    231   else if (processName=="e-_G4DNAElectronSolvation")    flagProcess =10;
267   else if (processName=="e-_G4DNAElastic")        232   else if (processName=="e-_G4DNAElastic")              flagProcess =11;
268   else if (processName=="e-_G4DNAExcitation")     233   else if (processName=="e-_G4DNAExcitation")           flagProcess =12;
269   else if (processName=="e-_G4DNAIonisation")     234   else if (processName=="e-_G4DNAIonisation")           flagProcess =13;
270   else if (processName=="e-_G4DNAAttachment")     235   else if (processName=="e-_G4DNAAttachment")           flagProcess =14;
271   else if (processName=="e-_G4DNAVibExcitation    236   else if (processName=="e-_G4DNAVibExcitation")        flagProcess =15;
272                                                   237 
273   else if (processName=="proton_G4DNAElastic")    238   else if (processName=="proton_G4DNAElastic")          flagProcess =21;
274   else if (processName=="proton_G4DNAExcitatio    239   else if (processName=="proton_G4DNAExcitation")       flagProcess =22;
275   else if (processName=="proton_G4DNAIonisatio    240   else if (processName=="proton_G4DNAIonisation")       flagProcess =23;
276   else if (processName=="proton_G4DNAChargeDec    241   else if (processName=="proton_G4DNAChargeDecrease")   flagProcess =24;
277                                                   242 
278   else if (processName=="hydrogen_G4DNAElastic    243   else if (processName=="hydrogen_G4DNAElastic")        flagProcess =31;
279   else if (processName=="hydrogen_G4DNAExcitat    244   else if (processName=="hydrogen_G4DNAExcitation")     flagProcess =32;
280   else if (processName=="hydrogen_G4DNAIonisat    245   else if (processName=="hydrogen_G4DNAIonisation")     flagProcess =33;
281   else if (processName=="hydrogen_G4DNAChargeI    246   else if (processName=="hydrogen_G4DNAChargeIncrease") flagProcess =35;
282                                                   247 
283   else if (processName=="alpha_G4DNAElastic")     248   else if (processName=="alpha_G4DNAElastic")           flagProcess =41;
284   else if (processName=="alpha_G4DNAExcitation    249   else if (processName=="alpha_G4DNAExcitation")        flagProcess =42;
285   else if (processName=="alpha_G4DNAIonisation    250   else if (processName=="alpha_G4DNAIonisation")        flagProcess =43;
286   else if (processName=="alpha_G4DNAChargeDecr    251   else if (processName=="alpha_G4DNAChargeDecrease")    flagProcess =44;
287                                                   252 
288   else if (processName=="alpha+_G4DNAElastic")    253   else if (processName=="alpha+_G4DNAElastic")          flagProcess =51;
289   else if (processName=="alpha+_G4DNAExcitatio    254   else if (processName=="alpha+_G4DNAExcitation")       flagProcess =52;
290   else if (processName=="alpha+_G4DNAIonisatio    255   else if (processName=="alpha+_G4DNAIonisation")       flagProcess =53;
291   else if (processName=="alpha+_G4DNAChargeDec    256   else if (processName=="alpha+_G4DNAChargeDecrease")   flagProcess =54;
292   else if (processName=="alpha+_G4DNAChargeInc    257   else if (processName=="alpha+_G4DNAChargeIncrease")   flagProcess =55;
293                                                   258 
294   else if (processName=="helium_G4DNAElastic")    259   else if (processName=="helium_G4DNAElastic")          flagProcess =61;
295   else if (processName=="helium_G4DNAExcitatio    260   else if (processName=="helium_G4DNAExcitation")       flagProcess =62;
296   else if (processName=="helium_G4DNAIonisatio    261   else if (processName=="helium_G4DNAIonisation")       flagProcess =63;
297   else if (processName=="helium_G4DNAChargeInc    262   else if (processName=="helium_G4DNAChargeIncrease")   flagProcess =65;
298                                                   263 
299   else if (processName=="GenericIon_G4DNAIonis    264   else if (processName=="GenericIon_G4DNAIonisation")   flagProcess =73;
300                                                   265 
301   */                                              266   */
302                                                   267 
303   if (processName != "Transportation") {       << 268   if (processName!="Transportation")
304     x = preStep->GetPosition().x() / nanometer << 269   {
305     y = preStep->GetPosition().y() / nanometer << 270     x=preStep->GetPosition().x()/nanometer;
306     z = preStep->GetPosition().z() / nanometer << 271     y=preStep->GetPosition().y()/nanometer;
307                                                << 272     z=preStep->GetPosition().z()/nanometer;
308     xp = postStep->GetPosition().x() / nanomet << 273 
309     yp = postStep->GetPosition().y() / nanomet << 274     xp=postStep->GetPosition().x()/nanometer;
310     zp = postStep->GetPosition().z() / nanomet << 275     yp=postStep->GetPosition().y()/nanometer;
                                                   >> 276     zp=postStep->GetPosition().z()/nanometer;
311                                                   277 
312     // get analysis manager                       278     // get analysis manager
313                                                   279 
314     G4AnalysisManager* analysisManager = G4Ana    280     G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
315                                                   281 
316     // fill ntuple                                282     // fill ntuple
317     analysisManager->FillNtupleDColumn(0, flag    283     analysisManager->FillNtupleDColumn(0, flagParticle);
318     analysisManager->FillNtupleDColumn(1, flag    284     analysisManager->FillNtupleDColumn(1, flagProcess);
319     analysisManager->FillNtupleDColumn(2, xp); << 285     analysisManager->FillNtupleDColumn(2, x);
320     analysisManager->FillNtupleDColumn(3, yp); << 286     analysisManager->FillNtupleDColumn(3, y);
321     analysisManager->FillNtupleDColumn(4, zp); << 287     analysisManager->FillNtupleDColumn(4, z);
322     analysisManager->FillNtupleDColumn(5, step << 288     analysisManager->FillNtupleDColumn(5, 
323                                                << 289                                      step->GetTotalEnergyDeposit()/eV);
324     analysisManager->FillNtupleDColumn(        << 290 
325       6, std::sqrt((x - xp) * (x - xp) + (y -  << 291     analysisManager->FillNtupleDColumn(6,
326                                                << 292                                           std::sqrt((x-xp)*(x-xp)+
327     analysisManager->FillNtupleDColumn(        << 293                                            (y-yp)*(y-yp)+(z-zp)*(z-zp)));
328       7, (preStep->GetKineticEnergy() - postSt << 294 
329                                                << 295     analysisManager->FillNtupleDColumn(7,
330     analysisManager->FillNtupleDColumn(8, preS << 296                                           (preStep->
331                                                << 297                                            GetKineticEnergy() -
332     analysisManager->FillNtupleDColumn(9, preS << 298                                            postStep->
333                                             *  << 299                                            GetKineticEnergy())/eV );
334                                                << 300 
335     analysisManager->FillNtupleIColumn(        << 301     analysisManager->FillNtupleDColumn(8, preStep->
336       10, G4EventManager::GetEventManager()->G << 302                                            GetKineticEnergy()/eV);
                                                   >> 303 
                                                   >> 304     analysisManager->FillNtupleDColumn(9, 
                                                   >> 305          preStep->GetMomentumDirection()
                                                   >> 306         *postStep->GetMomentumDirection() );
                                                   >> 307 
                                                   >> 308     analysisManager->FillNtupleIColumn(10, 
                                                   >> 309                                    G4EventManager::GetEventManager()->
                                                   >> 310                                    GetConstCurrentEvent()->GetEventID());
337                                                   311 
338     analysisManager->FillNtupleIColumn(11, ste    312     analysisManager->FillNtupleIColumn(11, step->GetTrack()->GetTrackID());
339                                                   313 
340     analysisManager->FillNtupleIColumn(12, ste    314     analysisManager->FillNtupleIColumn(12, step->GetTrack()->GetParentID());
341                                                   315 
342     analysisManager->FillNtupleIColumn(13, ste << 316     analysisManager->FillNtupleIColumn(13, 
                                                   >> 317                                    step->GetTrack()->GetCurrentStepNumber());
343                                                   318 
344     analysisManager->AddNtupleRow();              319     analysisManager->AddNtupleRow();
345   }                                               320   }
346 }                                              << 321 }    
347                                                   322