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.2)


  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();
                                                   >>  84 
                                                   >>  85   if (partDef == G4Gamma::GammaDefinition())
                                                   >>  86      flagParticle = 0;
 83                                                    87 
 84   if (partDef == G4Electron::ElectronDefinitio <<  88   if (partDef == G4Electron::ElectronDefinition())
                                                   >>  89      flagParticle = 1;
 85                                                    90 
 86   if (partDef == G4Proton::ProtonDefinition()) <<  91   if (partDef == G4Proton::ProtonDefinition())
                                                   >>  92      flagParticle = 2;
 87                                                    93 
 88   if (partDef == G4Alpha::AlphaDefinition()) f <<  94   if (partDef == G4Alpha::AlphaDefinition())
                                                   >>  95      flagParticle = 4;
 89                                                    96 
 90   G4DNAGenericIonsManager* instance;           <<  97   G4DNAGenericIonsManager *instance;
 91   instance = G4DNAGenericIonsManager::Instance     98   instance = G4DNAGenericIonsManager::Instance();
 92                                                    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 == 0)
139     if (procID == 12)                          << 149 
140       flagProcess = 81;                        << 150   {
141     else if (procID == 13)                     << 151     if      (procID==12) flagProcess =81;
142       flagProcess = 82;                        << 152     else if (procID==13) flagProcess =82;
143     else if (procID == 14)                     << 153     else if (procID==14) flagProcess =83;
144       flagProcess = 83;                        << 154     else if (procID==11) flagProcess =84;
145     else if (procID == 11)                     << 
146       flagProcess = 84;                        << 
147   }                                               155   }
148                                                   156 
149   else if (flagParticle == 1) {                << 157 else if (flagParticle == 1)
150     if (procID == 58)                          << 158 
151       flagProcess = 10;                        << 159   {
152     else if (procID == 51)                     << 160     if      (procID==58) flagProcess =10;
153       flagProcess = 11;                        << 161     else if (procID==51) flagProcess =11;
154     else if (procID == 52)                     << 162     else if (procID==52) flagProcess =12;
155       flagProcess = 12;                        << 163     else if (procID==53) flagProcess =13;
156     else if (procID == 53)                     << 164     else if (procID==55) flagProcess =14;
157       flagProcess = 13;                        << 165     else if (procID==54) flagProcess =15;
158     else if (procID == 55)                     << 166     else if (procID==10) flagProcess =110;
159       flagProcess = 14;                        << 167     else if (procID==1)  flagProcess =120;
160     else if (procID == 54)                     << 168     else if (procID==2)  flagProcess =130;
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   }                                               169   }
169                                                   170 
170   else if (flagParticle == 2) {                << 171   else if (flagParticle == 2)
171     if (procID == 51)                          << 172 
172       flagProcess = 21;                        << 173   {
173     else if (procID == 52)                     << 174     if      (procID==51) flagProcess =21;
174       flagProcess = 22;                        << 175     else if (procID==52) flagProcess =22;
175     else if (procID == 53)                     << 176     else if (procID==53) flagProcess =23;
176       flagProcess = 23;                        << 177     else if (procID==56) flagProcess =24;
177     else if (procID == 56)                     << 178     else if (procID==10) flagProcess =210;
178       flagProcess = 24;                        << 179     else if (procID==1)  flagProcess =220;
179     else if (procID == 10)                     << 180     else if (procID==2)  flagProcess =230;
180       flagProcess = 210;                       << 181     else if (procID==8)  flagProcess =240;
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   }                                               182   }
188                                                   183 
189   else if (flagParticle == 3) {                << 184   else if (flagParticle == 3)
190     if (procID == 51)                          << 185 
191       flagProcess = 31;                        << 186   {
192     else if (procID == 52)                     << 187     if      (procID==51) flagProcess =31;
193       flagProcess = 32;                        << 188     else if (procID==52) flagProcess =32;
194     else if (procID == 53)                     << 189     else if (procID==53) flagProcess =33;
195       flagProcess = 33;                        << 190     else if (procID==57) flagProcess =35;
196     else if (procID == 57)                     << 
197       flagProcess = 35;                        << 
198   }                                               191   }
199                                                   192 
200   else if (flagParticle == 4) {                << 193   else if (flagParticle == 4)
201     if (procID == 51)                          << 194 
202       flagProcess = 41;                        << 195   {
203     else if (procID == 52)                     << 196     if      (procID==51) flagProcess =41;
204       flagProcess = 42;                        << 197     else if (procID==52) flagProcess =42;
205     else if (procID == 53)                     << 198     else if (procID==53) flagProcess =43;
206       flagProcess = 43;                        << 199     else if (procID==56) flagProcess =44;
207     else if (procID == 56)                     << 200     else if (procID==10) flagProcess =410;
208       flagProcess = 44;                        << 201     else if (procID==1)  flagProcess =420;
209     else if (procID == 10)                     << 202     else if (procID==2)  flagProcess =430;
210       flagProcess = 410;                       << 203     else if (procID==8)  flagProcess =440;
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   }                                               204   }
218                                                   205 
219   else if (flagParticle == 5) {                << 206   else if (flagParticle == 5)
220     if (procID == 51)                          << 207 
221       flagProcess = 51;                        << 208   {
222     else if (procID == 52)                     << 209     if      (procID==51) flagProcess =51;
223       flagProcess = 52;                        << 210     else if (procID==52) flagProcess =52;
224     else if (procID == 53)                     << 211     else if (procID==53) flagProcess =53;
225       flagProcess = 53;                        << 212     else if (procID==56) flagProcess =54;
226     else if (procID == 56)                     << 213     else if (procID==57) flagProcess =55;
227       flagProcess = 54;                        << 214     else if (procID==10) flagProcess =510;
228     else if (procID == 57)                     << 215     else if (procID==1)  flagProcess =520;
229       flagProcess = 55;                        << 216     else if (procID==2)  flagProcess =530;
230     else if (procID == 10)                     << 217     else if (procID==8)  flagProcess =540;
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   }                                               218   }
239                                                   219 
240   else if (flagParticle == 6) {                << 220   else if (flagParticle == 6)
241     if (procID == 51)                          << 221 
242       flagProcess = 61;                        << 222   {
243     else if (procID == 52)                     << 223     if      (procID==51) flagProcess =61;
244       flagProcess = 62;                        << 224     else if (procID==52) flagProcess =62;
245     else if (procID == 53)                     << 225     else if (procID==53) flagProcess =63;
246       flagProcess = 63;                        << 226     else if (procID==57) flagProcess =65;
247     else if (procID == 57)                     << 227 
248       flagProcess = 65;                        << 
249   }                                               228   }
250                                                   229 
251   else if (processName == "GenericIon_G4DNAIon << 230   else if (processName=="GenericIon_G4DNAIonisation") flagProcess =73;
252     flagProcess = 73;                          << 231   else if (processName=="msc")                        flagProcess =710;
253   else if (processName == "msc")               << 232   else if (processName=="CoulombScat")                flagProcess =720;
254     flagProcess = 710;                         << 233   else if (processName=="ionIoni")                    flagProcess =730;
255   else if (processName == "CoulombScat")       << 234   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)                        235   // (for all GenericIons)
262                                                   236 
263   // Alternatively, using process names           237   // Alternatively, using process names
264                                                   238 
265   /*                                              239   /*
266   else if (processName=="e-_G4DNAElectronSolva    240   else if (processName=="e-_G4DNAElectronSolvation")    flagProcess =10;
267   else if (processName=="e-_G4DNAElastic")        241   else if (processName=="e-_G4DNAElastic")              flagProcess =11;
268   else if (processName=="e-_G4DNAExcitation")     242   else if (processName=="e-_G4DNAExcitation")           flagProcess =12;
269   else if (processName=="e-_G4DNAIonisation")     243   else if (processName=="e-_G4DNAIonisation")           flagProcess =13;
270   else if (processName=="e-_G4DNAAttachment")     244   else if (processName=="e-_G4DNAAttachment")           flagProcess =14;
271   else if (processName=="e-_G4DNAVibExcitation    245   else if (processName=="e-_G4DNAVibExcitation")        flagProcess =15;
272                                                   246 
273   else if (processName=="proton_G4DNAElastic")    247   else if (processName=="proton_G4DNAElastic")          flagProcess =21;
274   else if (processName=="proton_G4DNAExcitatio    248   else if (processName=="proton_G4DNAExcitation")       flagProcess =22;
275   else if (processName=="proton_G4DNAIonisatio    249   else if (processName=="proton_G4DNAIonisation")       flagProcess =23;
276   else if (processName=="proton_G4DNAChargeDec    250   else if (processName=="proton_G4DNAChargeDecrease")   flagProcess =24;
277                                                   251 
278   else if (processName=="hydrogen_G4DNAElastic    252   else if (processName=="hydrogen_G4DNAElastic")        flagProcess =31;
279   else if (processName=="hydrogen_G4DNAExcitat    253   else if (processName=="hydrogen_G4DNAExcitation")     flagProcess =32;
280   else if (processName=="hydrogen_G4DNAIonisat    254   else if (processName=="hydrogen_G4DNAIonisation")     flagProcess =33;
281   else if (processName=="hydrogen_G4DNAChargeI    255   else if (processName=="hydrogen_G4DNAChargeIncrease") flagProcess =35;
282                                                   256 
283   else if (processName=="alpha_G4DNAElastic")     257   else if (processName=="alpha_G4DNAElastic")           flagProcess =41;
284   else if (processName=="alpha_G4DNAExcitation    258   else if (processName=="alpha_G4DNAExcitation")        flagProcess =42;
285   else if (processName=="alpha_G4DNAIonisation    259   else if (processName=="alpha_G4DNAIonisation")        flagProcess =43;
286   else if (processName=="alpha_G4DNAChargeDecr    260   else if (processName=="alpha_G4DNAChargeDecrease")    flagProcess =44;
287                                                   261 
288   else if (processName=="alpha+_G4DNAElastic")    262   else if (processName=="alpha+_G4DNAElastic")          flagProcess =51;
289   else if (processName=="alpha+_G4DNAExcitatio    263   else if (processName=="alpha+_G4DNAExcitation")       flagProcess =52;
290   else if (processName=="alpha+_G4DNAIonisatio    264   else if (processName=="alpha+_G4DNAIonisation")       flagProcess =53;
291   else if (processName=="alpha+_G4DNAChargeDec    265   else if (processName=="alpha+_G4DNAChargeDecrease")   flagProcess =54;
292   else if (processName=="alpha+_G4DNAChargeInc    266   else if (processName=="alpha+_G4DNAChargeIncrease")   flagProcess =55;
293                                                   267 
294   else if (processName=="helium_G4DNAElastic")    268   else if (processName=="helium_G4DNAElastic")          flagProcess =61;
295   else if (processName=="helium_G4DNAExcitatio    269   else if (processName=="helium_G4DNAExcitation")       flagProcess =62;
296   else if (processName=="helium_G4DNAIonisatio    270   else if (processName=="helium_G4DNAIonisation")       flagProcess =63;
297   else if (processName=="helium_G4DNAChargeInc    271   else if (processName=="helium_G4DNAChargeIncrease")   flagProcess =65;
298                                                   272 
299   else if (processName=="GenericIon_G4DNAIonis    273   else if (processName=="GenericIon_G4DNAIonisation")   flagProcess =73;
300                                                   274 
301   */                                              275   */
302                                                   276 
303   if (processName != "Transportation") {       << 277   if (processName!="Transportation")
304     x = preStep->GetPosition().x() / nanometer << 278   {
305     y = preStep->GetPosition().y() / nanometer << 279     x=preStep->GetPosition().x()/nanometer;
306     z = preStep->GetPosition().z() / nanometer << 280     y=preStep->GetPosition().y()/nanometer;
307                                                << 281     z=preStep->GetPosition().z()/nanometer;
308     xp = postStep->GetPosition().x() / nanomet << 282 
309     yp = postStep->GetPosition().y() / nanomet << 283     xp=postStep->GetPosition().x()/nanometer;
310     zp = postStep->GetPosition().z() / nanomet << 284     yp=postStep->GetPosition().y()/nanometer;
                                                   >> 285     zp=postStep->GetPosition().z()/nanometer;
311                                                   286 
312     // get analysis manager                       287     // get analysis manager
313                                                   288 
314     G4AnalysisManager* analysisManager = G4Ana    289     G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
315                                                   290 
316     // fill ntuple                                291     // fill ntuple
317     analysisManager->FillNtupleDColumn(0, flag    292     analysisManager->FillNtupleDColumn(0, flagParticle);
318     analysisManager->FillNtupleDColumn(1, flag    293     analysisManager->FillNtupleDColumn(1, flagProcess);
319     analysisManager->FillNtupleDColumn(2, xp);    294     analysisManager->FillNtupleDColumn(2, xp);
320     analysisManager->FillNtupleDColumn(3, yp);    295     analysisManager->FillNtupleDColumn(3, yp);
321     analysisManager->FillNtupleDColumn(4, zp);    296     analysisManager->FillNtupleDColumn(4, zp);
322     analysisManager->FillNtupleDColumn(5, step << 297     analysisManager->FillNtupleDColumn(5,
323                                                << 298                                      step->GetTotalEnergyDeposit()/eV);
324     analysisManager->FillNtupleDColumn(        << 
325       6, std::sqrt((x - xp) * (x - xp) + (y -  << 
326                                                << 
327     analysisManager->FillNtupleDColumn(        << 
328       7, (preStep->GetKineticEnergy() - postSt << 
329                                                << 
330     analysisManager->FillNtupleDColumn(8, preS << 
331                                                << 
332     analysisManager->FillNtupleDColumn(9, preS << 
333                                             *  << 
334                                                   299 
335     analysisManager->FillNtupleIColumn(        << 300     analysisManager->FillNtupleDColumn(6,
336       10, G4EventManager::GetEventManager()->G << 301                                           std::sqrt((x-xp)*(x-xp)+
                                                   >> 302                                            (y-yp)*(y-yp)+(z-zp)*(z-zp)));
                                                   >> 303 
                                                   >> 304     analysisManager->FillNtupleDColumn(7,
                                                   >> 305                                           (preStep->
                                                   >> 306                                            GetKineticEnergy() -
                                                   >> 307                                            postStep->
                                                   >> 308                                            GetKineticEnergy())/eV );
                                                   >> 309 
                                                   >> 310     analysisManager->FillNtupleDColumn(8, preStep->
                                                   >> 311                                            GetKineticEnergy()/eV);
                                                   >> 312 
                                                   >> 313     analysisManager->FillNtupleDColumn(9,
                                                   >> 314          preStep->GetMomentumDirection()
                                                   >> 315         *postStep->GetMomentumDirection() );
                                                   >> 316 
                                                   >> 317     analysisManager->FillNtupleIColumn(10,
                                                   >> 318                                    G4EventManager::GetEventManager()->
                                                   >> 319                                    GetConstCurrentEvent()->GetEventID());
337                                                   320 
338     analysisManager->FillNtupleIColumn(11, ste    321     analysisManager->FillNtupleIColumn(11, step->GetTrack()->GetTrackID());
339                                                   322 
340     analysisManager->FillNtupleIColumn(12, ste    323     analysisManager->FillNtupleIColumn(12, step->GetTrack()->GetParentID());
341                                                   324 
342     analysisManager->FillNtupleIColumn(13, ste << 325     analysisManager->FillNtupleIColumn(13,
                                                   >> 326                                    step->GetTrack()->GetCurrentStepNumber());
343                                                   327 
344     analysisManager->AddNtupleRow();              328     analysisManager->AddNtupleRow();
345   }                                               329   }
346 }                                                 330 }
347                                                   331