Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/processes/scoring/src/G4ScoreSplittingProcess.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 /processes/scoring/src/G4ScoreSplittingProcess.cc (Version 11.3.0) and /processes/scoring/src/G4ScoreSplittingProcess.cc (Version 9.5.p1)


  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 //                                                 26 //
                                                   >>  27 // $Id: G4ScoreSplittingProcess.cc,v 1.9 2010-12-15 13:55:35 gcosmo Exp $
                                                   >>  28 // GEANT4 tag $Name: not supported by cvs2svn $
 27 //                                                 29 //
 28                                                    30 
                                                   >>  31 #include "G4ios.hh"
 29 #include "G4ScoreSplittingProcess.hh"              32 #include "G4ScoreSplittingProcess.hh"
 30                                                << 
 31 #include "G4EnergySplitter.hh"                 << 
 32 #include "G4ParticleChange.hh"                 << 
 33 #include "G4RegularNavigationHelper.hh"        << 
 34 #include "G4SDManager.hh"                      << 
 35 #include "G4Step.hh"                               33 #include "G4Step.hh"
 36 #include "G4StepPoint.hh"                      <<  34 #include "G4VTouchable.hh"
 37 #include "G4SystemOfUnits.hh"                  << 
 38 #include "G4TouchableHistory.hh"               << 
 39 #include "G4TransportationManager.hh"          << 
 40 #include "G4VPhysicalVolume.hh"                    35 #include "G4VPhysicalVolume.hh"
                                                   >>  36 #include "G4ParticleChange.hh"
                                                   >>  37 #include "G4TransportationManager.hh"
                                                   >>  38 #include "G4ParticleChange.hh"
                                                   >>  39 #include "G4StepPoint.hh"
                                                   >>  40 
                                                   >>  41 #include "G4SDManager.hh"
 41 #include "G4VSensitiveDetector.hh"                 42 #include "G4VSensitiveDetector.hh"
 42 #include "G4VTouchable.hh"                     <<  43 
 43 #include "G4ios.hh"                            <<  44 #include "G4EnergySplitter.hh"
                                                   >>  45 #include "G4TouchableHistory.hh"
 44                                                    46 
 45 //--------------------------------                 47 //--------------------------------
 46 // Constructor with name and type:                 48 // Constructor with name and type:
 47 //--------------------------------                 49 //--------------------------------
 48 G4ScoreSplittingProcess::G4ScoreSplittingProce <<  50 G4ScoreSplittingProcess::
 49   : G4VProcess(processName, theType)           <<  51 G4ScoreSplittingProcess(const G4String& processName,G4ProcessType theType)
                                                   >>  52   :G4VProcess(processName,theType),
                                                   >>  53    fOldTouchableH(),  fNewTouchableH(), fInitialTouchableH(), fFinalTouchableH()
 50 {                                                  54 {
 51   pParticleChange = &xParticleChange;              55   pParticleChange = &xParticleChange;
 52                                                    56 
 53   fSplitStep = new G4Step();                       57   fSplitStep = new G4Step();
 54   fSplitPreStepPoint = fSplitStep->GetPreStepP <<  58   fSplitPreStepPoint =  fSplitStep->GetPreStepPoint();
 55   fSplitPostStepPoint = fSplitStep->GetPostSte     59   fSplitPostStepPoint = fSplitStep->GetPostStepPoint();
 56                                                    60 
 57   if (verboseLevel > 0) {                      <<  61   if (verboseLevel>0)
                                                   >>  62   {
 58     G4cout << GetProcessName() << " is created     63     G4cout << GetProcessName() << " is created " << G4endl;
 59   }                                                64   }
 60   fpEnergySplitter = new G4EnergySplitter();   <<  65   fpEnergySplitter = new G4EnergySplitter(); 
 61 }                                                  66 }
 62                                                    67 
 63 // -----------                                     68 // -----------
 64 // Destructor:                                     69 // Destructor:
 65 // -----------                                     70 // -----------
 66 G4ScoreSplittingProcess::~G4ScoreSplittingProc     71 G4ScoreSplittingProcess::~G4ScoreSplittingProcess()
 67 {                                                  72 {
 68   delete fSplitStep;                               73   delete fSplitStep;
 69   delete fpEnergySplitter;                     <<  74   delete fpEnergySplitter; 
 70 }                                                  75 }
 71                                                    76 
 72 //--------------------------------------------     77 //------------------------------------------------------
 73 //                                                 78 //
 74 // StartTracking                                   79 // StartTracking
 75 //                                                 80 //
 76 //--------------------------------------------     81 //------------------------------------------------------
 77 void G4ScoreSplittingProcess::StartTracking(G4     82 void G4ScoreSplittingProcess::StartTracking(G4Track* trk)
 78 {                                                  83 {
 79   // Setup initial touchables for the first st <<  84 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 80   const G4Step* pStep = trk->GetStep();        <<  85 // Setup initial touchables for the first step
                                                   >>  86 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                                   >>  87   const G4Step* pStep= trk->GetStep();
 81                                                    88 
 82   fOldTouchableH = trk->GetTouchableHandle();      89   fOldTouchableH = trk->GetTouchableHandle();
 83   *fSplitPreStepPoint = *(pStep->GetPreStepPoi <<  90   *fSplitPreStepPoint = *(pStep->GetPreStepPoint()); // Best to copy, so as to initialise
 84   fSplitPreStepPoint->SetTouchableHandle(fOldT     91   fSplitPreStepPoint->SetTouchableHandle(fOldTouchableH);
 85   fNewTouchableH = fOldTouchableH;                 92   fNewTouchableH = fOldTouchableH;
 86   *fSplitPostStepPoint = *(pStep->GetPostStepP <<  93   *fSplitPostStepPoint= *(pStep->GetPostStepPoint()); // Best to copy, so as to initialise
 87   fSplitPostStepPoint->SetTouchableHandle(fNew     94   fSplitPostStepPoint->SetTouchableHandle(fNewTouchableH);
 88                                                    95 
 89   ///  Initialize                              <<  96   ///  Initialize 
 90   fSplitPreStepPoint->SetStepStatus(fUndefined <<  97   fSplitPreStepPoint ->SetStepStatus(fUndefined);
 91   fSplitPostStepPoint->SetStepStatus(fUndefine     98   fSplitPostStepPoint->SetStepStatus(fUndefined);
 92 }                                                  99 }
 93                                                   100 
                                                   >> 101 
 94 //--------------------------------------------    102 //----------------------------------------------------------
 95 //                                                103 //
 96 //  PostStepGetPhysicalInteractionLength()        104 //  PostStepGetPhysicalInteractionLength()
 97 //                                                105 //
 98 //--------------------------------------------    106 //----------------------------------------------------------
 99 G4double G4ScoreSplittingProcess::PostStepGetP << 107 G4double 
100   const G4Track& /*track*/, G4double /*previou << 108 G4ScoreSplittingProcess::PostStepGetPhysicalInteractionLength(
                                                   >> 109          const G4Track& /*track*/, 
                                                   >> 110          G4double   /*previousStepSize*/, 
                                                   >> 111          G4ForceCondition* condition)
101 {                                                 112 {
102   // This process must be invoked anyway to sc    113   // This process must be invoked anyway to score the hit
103   //   - to do the scoring if the current volu    114   //   - to do the scoring if the current volume is a regular structure, or
104   //   - else to toggle the flag so that the S    115   //   - else to toggle the flag so that the SteppingManager does the scoring.
105   *condition = StronglyForced;                    116   *condition = StronglyForced;
106                                                   117 
107   // Future optimisation: check whether in reg << 118   // Future optimisation: check whether in regular structure.  
108   //  If it is in regular structure,  be Stron    119   //  If it is in regular structure,  be StronglyForced
109   //  If  not  in regular structure,           << 120   //  If  not  in regular structure, 
110   //         ask to be called only if Stepping    121   //         ask to be called only if SteppingControl is AvoidHitInvocation
111   //         in order to reset it to NormalCon    122   //         in order to reset it to NormalCondition
112                                                   123 
113   return DBL_MAX;                                 124   return DBL_MAX;
114 }                                                 125 }
115                                                   126 
116 //------------------------------------            127 //------------------------------------
117 //                                                128 //
118 //             PostStepDoIt()                     129 //             PostStepDoIt()
119 //                                                130 //
120 //------------------------------------            131 //------------------------------------
121 G4VParticleChange* G4ScoreSplittingProcess::Po << 132 G4VParticleChange* G4ScoreSplittingProcess::PostStepDoIt(
122 {                                              << 133      const G4Track& track,
123   G4VPhysicalVolume* pCurrentVolume = track.Ge << 134      const G4Step& step)
124   G4LogicalVolume* pLogicalVolume = pCurrentVo << 135 { 
                                                   >> 136   G4VPhysicalVolume*    pCurrentVolume= track.GetVolume(); 
                                                   >> 137   G4LogicalVolume*      pLogicalVolume= pCurrentVolume->GetLogicalVolume(); 
125   G4VSensitiveDetector* ptrSD = pLogicalVolume    138   G4VSensitiveDetector* ptrSD = pLogicalVolume->GetSensitiveDetector();
126                                                   139 
127   pParticleChange->Initialize(track);          << 140   pParticleChange->Initialize(track); 
128   if ((!pCurrentVolume->IsRegularStructure())  << 141   if(  ( ! pCurrentVolume->IsRegularStructure() ) || ( !ptrSD ) 
129       || G4RegularNavigationHelper::Instance() << 142     || G4RegularNavigationHelper::theStepLengths.size() <= 1) {
130   {                                            << 143      // Set the flag to make sure that Stepping Manager does the scoring
131     // Set the flag to make sure that Stepping << 144      pParticleChange->ProposeSteppingControl( NormalCondition );     
132     pParticleChange->ProposeSteppingControl(No << 145   } else { 
133   }                                            << 146      G4ThreeVector preStepPosition, postStepPosition, direction, finalPostStepPosition;
134   else {                                       << 147      pParticleChange->ProposeSteppingControl( AvoidHitInvocation );
135     G4ThreeVector preStepPosition, postStepPos << 148  
136     pParticleChange->ProposeSteppingControl(Av << 149      G4double totalEnergyDeposit=  step.GetTotalEnergyDeposit();
137                                                << 150      G4StepStatus  fullStepStatus= step.GetPostStepPoint()->GetStepStatus(); 
138     G4double totalEnergyDeposit = step.GetTota << 151 
139     G4StepStatus fullStepStatus = step.GetPost << 152      CopyStepStart(step);
140                                                << 153      fSplitPreStepPoint->SetSensitiveDetector(ptrSD);
141     CopyStepStart(step);                       << 154      fOldTouchableH = fInitialTouchableH;
142     fSplitPreStepPoint->SetSensitiveDetector(p << 155      fNewTouchableH=  fOldTouchableH; 
143     fOldTouchableH = fInitialTouchableH;       << 156      *fSplitPostStepPoint= *(step.GetPreStepPoint()); 
144     fNewTouchableH = fOldTouchableH;           << 157      
145     *fSplitPostStepPoint = *(step.GetPreStepPo << 158      // Split the energy
146                                                << 159      // ----------------
147     // Split the energy                        << 160      G4int numberVoxelsInStep= fpEnergySplitter->SplitEnergyInVolumes( &step );
148     // ----------------                        << 161 
149     G4int numberVoxelsInStep = fpEnergySplitte << 162      preStepPosition= step.GetPreStepPoint()->GetPosition();
150                                                << 163      finalPostStepPosition= step.GetPostStepPoint()->GetPosition(); 
151     preStepPosition = step.GetPreStepPoint()-> << 164      direction= (finalPostStepPosition - preStepPosition).unit(); 
152     finalPostStepPosition = step.GetPostStepPo << 165 
153     direction = (finalPostStepPosition - preSt << 166      fFinalTouchableH= track.GetNextTouchableHandle(); 
154                                                << 167 
155     fFinalTouchableH = track.GetNextTouchableH << 168      postStepPosition= preStepPosition;
156                                                << 169      // Loop over the sub-parts of this step
157     postStepPosition = preStepPosition;        << 170      G4int iStep;
158     // Loop over the sub-parts of this step    << 171      for ( iStep=0; iStep < numberVoxelsInStep; iStep++ ){ 
159     G4int iStep;                               << 172         G4int     idVoxel=  -1;  // Voxel ID
160     for (iStep = 0; iStep < numberVoxelsInStep << 173         G4double  stepLength=0.0, energyLoss= 0.0;
161       G4int idVoxel = -1;  // Voxel ID         << 174 
162       G4double stepLength = 0.0, energyLoss =  << 175         *fSplitPreStepPoint  = *fSplitPostStepPoint;
163                                                << 176         fOldTouchableH = fNewTouchableH; 
164       *fSplitPreStepPoint = *fSplitPostStepPoi << 177 
165       fOldTouchableH = fNewTouchableH;         << 178         preStepPosition= postStepPosition;
166                                                << 179         fSplitPreStepPoint->SetPosition( preStepPosition );
167       preStepPosition = postStepPosition;      << 180         fSplitPreStepPoint->SetTouchableHandle(fOldTouchableH);
168       fSplitPreStepPoint->SetPosition(preStepP << 181         
169       fSplitPreStepPoint->SetTouchableHandle(f << 182         fpEnergySplitter->GetLengthAndEnergyDeposited( iStep, idVoxel, stepLength, energyLoss);
170                                                << 183 
171       fpEnergySplitter->GetLengthAndEnergyDepo << 184         // Correct the material, so that the track->GetMaterial gives correct answer
172                                                << 185         pLogicalVolume->SetMaterial( fpEnergySplitter->GetVoxelMaterial( iStep) );  // idVoxel) ); 
173       // Correct the material, so that the tra << 186 
174       pLogicalVolume->SetMaterial(fpEnergySpli << 187         postStepPosition= preStepPosition + stepLength * direction; 
175                                                << 188         fSplitPostStepPoint->SetPosition(postStepPosition); 
176       postStepPosition = preStepPosition + ste << 189 
177       fSplitPostStepPoint->SetPosition(postSte << 190         // Load the Step with the new values
178                                                << 191         fSplitStep->SetStepLength(stepLength);
179       // Load the Step with the new values     << 192         fSplitStep->SetTotalEnergyDeposit(energyLoss);
180       fSplitStep->SetStepLength(stepLength);   << 193         if( iStep < numberVoxelsInStep -1 ){ 
181       fSplitStep->SetTotalEnergyDeposit(energy << 194           fSplitStep->GetPostStepPoint()->SetStepStatus( fGeomBoundary );
182       if (iStep < numberVoxelsInStep - 1) {    << 195           G4int  nextVoxelId= -1;
183         fSplitStep->GetPostStepPoint()->SetSte << 196           fpEnergySplitter->GetVoxelID( iStep+1, nextVoxelId );
184         G4int nextVoxelId = -1;                << 197 
185         fpEnergySplitter->GetVoxelID(iStep + 1 << 198           // Create new "next" touchable for each section ??
186                                                << 199           G4VTouchable* fNewTouchablePtr= 
187         // Create new "next" touchable for eac << 200               CreateTouchableForSubStep( nextVoxelId, postStepPosition );
188         G4VTouchable* fNewTouchablePtr = Creat << 201           fNewTouchableH= G4TouchableHandle(fNewTouchablePtr); 
189         fNewTouchableH = G4TouchableHandle(fNe << 202           fSplitPostStepPoint->SetTouchableHandle( fNewTouchableH );
190         fSplitPostStepPoint->SetTouchableHandl << 203         } else { 
191       }                                        << 204           fSplitStep->GetPostStepPoint()->SetStepStatus( fullStepStatus );
192       else {                                   << 205           fSplitPostStepPoint->SetTouchableHandle( fFinalTouchableH );
193         fSplitStep->GetPostStepPoint()->SetSte << 206         }
194         fSplitPostStepPoint->SetTouchableHandl << 207 
195       }                                        << 208 
196                                                << 209         // As first approximation, split the NIEL in the same fractions as the energy deposit
197       // As first approximation, split the NIE << 210         G4double eLossFraction; 
198       G4double eLossFraction;                  << 211         eLossFraction= (totalEnergyDeposit>0.0) ? energyLoss / totalEnergyDeposit : 1.0 ; 
199       eLossFraction = (totalEnergyDeposit > 0. << 212         fSplitStep->SetNonIonizingEnergyDeposit(step.GetNonIonizingEnergyDeposit()*eLossFraction);
200       fSplitStep->SetNonIonizingEnergyDeposit( << 213         
201                                                << 214         fSplitPostStepPoint->SetSensitiveDetector( ptrSD ); 
202       fSplitPostStepPoint->SetSensitiveDetecto << 
203                                                   215 
204       // Call the Sensitive Detector           << 216         // Call the Sensitive Detector
205       ptrSD->Hit(fSplitStep);                  << 217         ptrSD->Hit(fSplitStep);
206                                                   218 
207       if (verboseLevel > 1) Verbose(step);     << 219         if (verboseLevel>1) Verbose(step);
208     }                                          << 220      }
209   }                                               221   }
210                                                   222 
211   // This must change the Stepping Control        223   // This must change the Stepping Control
212   return pParticleChange;                         224   return pParticleChange;
213 }                                                 225 }
214                                                   226 
215 G4TouchableHistory* G4ScoreSplittingProcess::C << 227 G4TouchableHistory*
216                                                << 228 G4ScoreSplittingProcess::CreateTouchableForSubStep( G4int newVoxelNum, G4ThreeVector )
217 {                                                 229 {
218   auto oldTouchableHistory = dynamic_cast<G4To << 230   // G4cout << " Creating touchable handle for voxel-no " << newVoxelNum << G4endl;
219   G4TouchableHistory* ptrTouchableHistory =    << 
220     G4TransportationManager::GetTransportation << 
221       ->GetNavigatorForTracking()              << 
222       ->CreateTouchableHistory(oldTouchableHis << 
223                                                   231 
                                                   >> 232   G4TouchableHistory*  oldTouchableHistory= dynamic_cast<G4TouchableHistory*>(fOldTouchableH());
                                                   >> 233   G4TouchableHistory*  ptrTouchableHistory= G4TransportationManager::GetTransportationManager()->
                                                   >> 234                                             GetNavigatorForTracking()->CreateTouchableHistory(oldTouchableHistory->GetHistory());
                                                   >> 235   
224   // Change the history                           236   // Change the history
225   auto ptrNavHistory = const_cast<G4Navigation << 237   G4NavigationHistory* ptrNavHistory= const_cast<G4NavigationHistory*>(ptrTouchableHistory->GetHistory());
226   G4VPhysicalVolume* curPhysicalVol = ptrNavHi << 238   G4VPhysicalVolume*   curPhysicalVol= ptrNavHistory->GetTopVolume();
227                                                   239 
228   EVolume curVolumeType = ptrNavHistory->GetTo << 240   EVolume curVolumeType=  ptrNavHistory->GetTopVolumeType();
229   if (curVolumeType == kParameterised) {       << 241   if( curVolumeType == kParameterised )
230     ptrNavHistory->BackLevel();                << 242   { 
                                                   >> 243     ptrNavHistory->BackLevel(); 
231     // G4VPVParameterised parameterisedPV= pNe    244     // G4VPVParameterised parameterisedPV= pNewMother
232     G4VPVParameterisation* curParamstn = curPh << 245     G4VPVParameterisation* curParamstn=  curPhysicalVol->GetParameterisation();
233                                                   246 
234     // From G4ParameterisedNavigation::Identif    247     // From G4ParameterisedNavigation::IdentifyAndPlaceSolid() inline method
235     G4VSolid* sampleSolid = curParamstn->Compu    248     G4VSolid* sampleSolid = curParamstn->ComputeSolid(newVoxelNum, curPhysicalVol);
236     sampleSolid->ComputeDimensions(curParamstn    249     sampleSolid->ComputeDimensions(curParamstn, newVoxelNum, curPhysicalVol);
237     curParamstn->ComputeTransformation(newVoxe    250     curParamstn->ComputeTransformation(newVoxelNum, curPhysicalVol);
238                                                   251 
239     ptrNavHistory->NewLevel(curPhysicalVol, kP << 252     ptrNavHistory->NewLevel( curPhysicalVol, kParameterised, newVoxelNum );
240   }                                               253   }
241   else {                                       << 254   else
242     G4cout << " Current volume type is not Par << 255   {
243     G4Exception(                               << 256     G4cout << " Current volume type is not Parameterised. " << G4endl; 
244       "G4ScoreSplittingProcess::CreateTouchabl << 257     G4Exception("G4ScoreSplittingProcess::CreateTouchableForSubStep",
245       JustWarning,                             << 258           "ErrorRegularParamaterisation", JustWarning,
246       "Score Splitting Process is used for Reg << 259          "Score Splitting Process is used for Regular Structure - but did not find one here.");
247   }                                               260   }
248   return ptrTouchableHistory;                  << 261   return ptrTouchableHistory; 
249 }                                                 262 }
250                                                   263 
251 void G4ScoreSplittingProcess::CopyStepStart(co << 264 void G4ScoreSplittingProcess::CopyStepStart(const G4Step & step)
252 {                                                 265 {
253   fSplitStep->SetTrack(step.GetTrack());          266   fSplitStep->SetTrack(step.GetTrack());
254   fSplitStep->SetStepLength(step.GetStepLength    267   fSplitStep->SetStepLength(step.GetStepLength());
255   fSplitStep->SetTotalEnergyDeposit(step.GetTo    268   fSplitStep->SetTotalEnergyDeposit(step.GetTotalEnergyDeposit());
256   fSplitStep->SetNonIonizingEnergyDeposit(step    269   fSplitStep->SetNonIonizingEnergyDeposit(step.GetNonIonizingEnergyDeposit());
257   fSplitStep->SetControlFlag(step.GetControlFl    270   fSplitStep->SetControlFlag(step.GetControlFlag());
258                                                   271 
259   *fSplitPreStepPoint = *(step.GetPreStepPoint << 272   *fSplitPreStepPoint  = *(step.GetPreStepPoint());
260                                                   273 
261   fInitialTouchableH = (step.GetPreStepPoint() << 274   fInitialTouchableH=  (step.GetPreStepPoint()) ->GetTouchableHandle();
262   fFinalTouchableH = (step.GetPostStepPoint()) << 275   fFinalTouchableH =   (step.GetPostStepPoint())->GetTouchableHandle();
263 }                                                 276 }
264                                                   277 
265 void G4ScoreSplittingProcess::Verbose(const G4    278 void G4ScoreSplittingProcess::Verbose(const G4Step& step) const
266 {                                                 279 {
267   G4cout << "In mass geometry ----------------    280   G4cout << "In mass geometry ------------------------------------------------" << G4endl;
268   G4cout << " StepLength : " << step.GetStepLe << 281   G4cout << " StepLength : " << step.GetStepLength()/mm << "      TotalEnergyDeposit : "
269          << "      TotalEnergyDeposit : " << s << 282          << step.GetTotalEnergyDeposit()/MeV << G4endl;
270   G4cout << " PreStepPoint : " << step.GetPreS << 283   G4cout << " PreStepPoint : "
271   if (step.GetPreStepPoint()->GetProcessDefine << 284          << step.GetPreStepPoint()->GetPhysicalVolume()->GetName() << " - ";
272     G4cout << step.GetPreStepPoint()->GetProce << 285   if(step.GetPreStepPoint()->GetProcessDefinedStep())
273   }                                            << 286   { G4cout << step.GetPreStepPoint()->GetProcessDefinedStep()->GetProcessName(); }
274   else {                                       << 287   else
275     G4cout << "NoProcessAssigned";             << 288   { G4cout << "NoProcessAssigned"; }
276   }                                            << 
277   G4cout << G4endl;                               289   G4cout << G4endl;
278   G4cout << "                " << step.GetPreS    290   G4cout << "                " << step.GetPreStepPoint()->GetPosition() << G4endl;
279   G4cout << " PostStepPoint : ";                  291   G4cout << " PostStepPoint : ";
280   if (step.GetPostStepPoint()->GetPhysicalVolu << 292   if(step.GetPostStepPoint()->GetPhysicalVolume()) 
281     G4cout << step.GetPostStepPoint()->GetPhys << 293   { G4cout << step.GetPostStepPoint()->GetPhysicalVolume()->GetName(); }
282   }                                            << 294   else
283   else {                                       << 295   { G4cout << "OutOfWorld"; }
284     G4cout << "OutOfWorld";                    << 
285   }                                            << 
286   G4cout << " - ";                                296   G4cout << " - ";
287   if (step.GetPostStepPoint()->GetProcessDefin << 297   if(step.GetPostStepPoint()->GetProcessDefinedStep())
288     G4cout << step.GetPostStepPoint()->GetProc << 298   { G4cout << step.GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName(); }
289   }                                            << 299   else
290   else {                                       << 300   { G4cout << "NoProcessAssigned"; }
291     G4cout << "NoProcessAssigned";             << 
292   }                                            << 
293   G4cout << G4endl;                               301   G4cout << G4endl;
294   G4cout << "                 " << step.GetPos    302   G4cout << "                 " << step.GetPostStepPoint()->GetPosition() << G4endl;
295                                                   303 
296   G4cout << "In ghost geometry ---------------    304   G4cout << "In ghost geometry ------------------------------------------------" << G4endl;
297   G4cout << " StepLength : " << fSplitStep->Ge << 305   G4cout << " StepLength : " << fSplitStep->GetStepLength()/mm
298          << "      TotalEnergyDeposit : " << f << 306          << "      TotalEnergyDeposit : "
299   G4cout << " PreStepPoint : " << fSplitStep-> << 307          << fSplitStep->GetTotalEnergyDeposit()/MeV << G4endl;
300          << " [" << fSplitStep->GetPreStepPoin << 308   G4cout << " PreStepPoint : "
301          << " - ";                             << 309          << fSplitStep->GetPreStepPoint()->GetPhysicalVolume()->GetName() << " ["
302   if (fSplitStep->GetPreStepPoint()->GetProces << 310            << fSplitStep->GetPreStepPoint()->GetTouchable()->GetReplicaNumber()
303     G4cout << fSplitStep->GetPreStepPoint()->G << 311            << " ]" << " - ";
304   }                                            << 312   if(fSplitStep->GetPreStepPoint()->GetProcessDefinedStep())
305   else {                                       << 313   { G4cout << fSplitStep->GetPreStepPoint()->GetProcessDefinedStep()->GetProcessName(); }
306     G4cout << "NoProcessAssigned";             << 314   else
307   }                                            << 315   { G4cout << "NoProcessAssigned"; }
308   G4cout << G4endl;                               316   G4cout << G4endl;
309   G4cout << "                " << fSplitStep->    317   G4cout << "                " << fSplitStep->GetPreStepPoint()->GetPosition() << G4endl;
310   G4cout << " PostStepPoint : ";                  318   G4cout << " PostStepPoint : ";
311   if (fSplitStep->GetPostStepPoint()->GetPhysi << 319   if(fSplitStep->GetPostStepPoint()->GetPhysicalVolume()) 
                                                   >> 320   {
312     G4cout << fSplitStep->GetPostStepPoint()->    321     G4cout << fSplitStep->GetPostStepPoint()->GetPhysicalVolume()->GetName() << " ["
313            << fSplitStep->GetPostStepPoint()-> << 322            << fSplitStep->GetPostStepPoint()->GetTouchable()->GetReplicaNumber()
314   }                                            << 323            << " ]";
315   else {                                       << 
316     G4cout << "OutOfWorld";                    << 
317   }                                               324   }
                                                   >> 325   else
                                                   >> 326   { G4cout << "OutOfWorld"; }
318   G4cout << " - ";                                327   G4cout << " - ";
319   if (fSplitStep->GetPostStepPoint()->GetProce << 328   if(fSplitStep->GetPostStepPoint()->GetProcessDefinedStep())
320     G4cout << fSplitStep->GetPostStepPoint()-> << 329   { G4cout << fSplitStep->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName(); }
321   }                                            << 330   else
322   else {                                       << 331   { G4cout << "NoProcessAssigned"; }
323     G4cout << "NoProcessAssigned";             << 
324   }                                            << 
325   G4cout << G4endl;                               332   G4cout << G4endl;
326   G4cout << "                 " << fSplitStep- << 333   G4cout << "                 " << fSplitStep->GetPostStepPoint()->GetPosition() << " == "
327          << " == " << fSplitStep->GetTrack()-> << 334          << fSplitStep->GetTrack()->GetMomentumDirection() 
                                                   >> 335          << G4endl;
                                                   >> 336 
328 }                                                 337 }
329                                                   338 
                                                   >> 339 
330 //--------------------------------------------    340 //----------------------------------------------------------
331 //                                                341 //
332 //  AtRestGetPhysicalInteractionLength()          342 //  AtRestGetPhysicalInteractionLength()
333 //                                                343 //
334 //--------------------------------------------    344 //----------------------------------------------------------
335 G4double G4ScoreSplittingProcess::AtRestGetPhy << 345 G4double 
336                                                << 346 G4ScoreSplittingProcess::AtRestGetPhysicalInteractionLength(
                                                   >> 347          const G4Track& /*track*/, 
                                                   >> 348          G4ForceCondition* condition)
337 {                                                 349 {
338   *condition = NotForced;  // Was Forced          350   *condition = NotForced;  // Was Forced
339   return DBL_MAX;                                 351   return DBL_MAX;
340 }                                                 352 }
341                                                   353 
                                                   >> 354 
342 //---------------------------------------         355 //---------------------------------------
343 //  AlongStepGetPhysicalInteractionLength         356 //  AlongStepGetPhysicalInteractionLength
344 //---------------------------------------         357 //---------------------------------------
345 G4double                                       << 358 G4double G4ScoreSplittingProcess::AlongStepGetPhysicalInteractionLength(
346 G4ScoreSplittingProcess::AlongStepGetPhysicalI << 359             const G4Track&   , // track, 
347                                                << 360             G4double         , // previousStepSize, 
348                                                << 361             G4double         , // currentMinimumStep,
349                                                << 362             G4double&        , // proposedSafety, 
350                                                << 363             G4GPILSelection* selection)
351 {                                                 364 {
352   *selection = NotCandidateForSelection;          365   *selection = NotCandidateForSelection;
353   return DBL_MAX;                                 366   return DBL_MAX;
354 }                                                 367 }
355                                                   368 
356 //------------------------------------            369 //------------------------------------
357 //             AlongStepDoIt()                    370 //             AlongStepDoIt()
358 //------------------------------------            371 //------------------------------------
359                                                   372 
360 G4VParticleChange* G4ScoreSplittingProcess::Al << 373 G4VParticleChange* G4ScoreSplittingProcess::AlongStepDoIt(
                                                   >> 374     const G4Track& track, const G4Step& )
361 {                                                 375 {
362   // Dummy ParticleChange ie: does nothing        376   // Dummy ParticleChange ie: does nothing
363   // Expecting G4Transportation to move the tr    377   // Expecting G4Transportation to move the track
364   dummyParticleChange.Initialize(track);          378   dummyParticleChange.Initialize(track);
365   return &dummyParticleChange;                    379   return &dummyParticleChange;
366 }                                                 380 }
367                                                   381 
368 //------------------------------------            382 //------------------------------------
369 //             AtRestDoIt()                       383 //             AtRestDoIt()
370 //------------------------------------            384 //------------------------------------
371 G4VParticleChange* G4ScoreSplittingProcess::At << 385 G4VParticleChange* G4ScoreSplittingProcess::AtRestDoIt(
372 {                                              << 386      const G4Track& track,
                                                   >> 387      const G4Step&)
                                                   >> 388 { 
373   pParticleChange->Initialize(track);             389   pParticleChange->Initialize(track);
374   return pParticleChange;                         390   return pParticleChange;
375 }                                                 391 }
376                                                   392