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 10.7)


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