Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/geometry/navigation/include/G4Navigator.icc

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 /geometry/navigation/include/G4Navigator.icc (Version 11.3.0) and /geometry/navigation/include/G4Navigator.icc (Version 8.0.p1)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                    <<   3 // * DISCLAIMER                                                       *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th <<   5 // * The following disclaimer summarizes all the specific disclaimers *
  6 // * the Geant4 Collaboration.  It is provided <<   6 // * of contributors to this software. The specific disclaimers,which *
  7 // * conditions of the Geant4 Software License <<   7 // * govern, are listed with their locations in:                      *
  8 // * LICENSE and available at  http://cern.ch/ <<   8 // *   http://cern.ch/geant4/license                                  *
  9 // * include a list of copyright holders.      << 
 10 // *                                                9 // *                                                                  *
 11 // * Neither the authors of this software syst     10 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     11 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     12 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     13 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file  <<  14 // * use.                                                             *
 16 // * for the full disclaimer and the limitatio << 
 17 // *                                               15 // *                                                                  *
 18 // * This  code  implementation is the result  <<  16 // * This  code  implementation is the  intellectual property  of the *
 19 // * technical work of the GEANT4 collaboratio <<  17 // * GEANT4 collaboration.                                            *
 20 // * By using,  copying,  modifying or  distri <<  18 // * By copying,  distributing  or modifying the Program (or any work *
 21 // * any work based  on the software)  you  ag <<  19 // * based  on  the Program)  you indicate  your  acceptance of  this *
 22 // * use  in  resulting  scientific  publicati <<  20 // * statement, and all its terms.                                    *
 23 // * acceptance of all terms of the Geant4 Sof << 
 24 // *******************************************     21 // ********************************************************************
 25 //                                                 22 //
 26 // G4Navigator class Inline implementation     << 
 27 //                                                 23 //
 28 // ------------------------------------------- <<  24 // $Id: G4Navigator.icc,v 1.7 2004/11/24 08:27:19 gcosmo Exp $
                                                   >>  25 // GEANT4 tag $Name: geant4-08-00-patch-01 $
                                                   >>  26 //
                                                   >>  27 // 
                                                   >>  28 // class G4Navigator Inline implementation
                                                   >>  29 //
                                                   >>  30 // ********************************************************************
 29                                                    31 
 30 // *******************************************     32 // ********************************************************************
 31 // GetCurrentLocalCoordinate                       33 // GetCurrentLocalCoordinate
 32 //                                                 34 //
 33 // Returns the local coordinate of the current     35 // Returns the local coordinate of the current track
 34 // *******************************************     36 // ********************************************************************
 35 //                                                 37 //
 36 inline                                             38 inline
 37 G4ThreeVector G4Navigator::GetCurrentLocalCoor     39 G4ThreeVector G4Navigator::GetCurrentLocalCoordinate() const
 38 {                                                  40 {
 39   return fLastLocatedPointLocal;                   41   return fLastLocatedPointLocal;
 40 }                                                  42 }
 41                                                    43 
 42 // *******************************************     44 // ********************************************************************
 43 // ComputeLocalAxis                                45 // ComputeLocalAxis
 44 //                                                 46 //
 45 // Returns local direction of vector direction     47 // Returns local direction of vector direction in world coord system
 46 // *******************************************     48 // ********************************************************************
 47 //                                                 49 //
 48 inline                                             50 inline
 49 G4ThreeVector G4Navigator::ComputeLocalAxis(co     51 G4ThreeVector G4Navigator::ComputeLocalAxis(const G4ThreeVector& pVec) const
 50 {                                                  52 {
 51   return fHistory.GetTopTransform().TransformA <<  53   return (fHistory.GetTopTransform().IsRotated())
                                                   >>  54          ? fHistory.GetTopTransform().TransformAxis(pVec) : pVec ;
 52 }                                                  55 }
 53                                                    56 
 54 // *******************************************     57 // ********************************************************************
 55 // ComputeLocalPoint                               58 // ComputeLocalPoint
 56 //                                                 59 //
 57 // Returns local coordinates of a point in the     60 // Returns local coordinates of a point in the world coord system
 58 // *******************************************     61 // ********************************************************************
 59 //                                                 62 //
 60 inline                                             63 inline
 61 G4ThreeVector                                      64 G4ThreeVector
 62 G4Navigator::ComputeLocalPoint(const G4ThreeVe     65 G4Navigator::ComputeLocalPoint(const G4ThreeVector& pGlobalPoint) const
 63 {                                                  66 {
 64   return fHistory.GetTopTransform().TransformP <<  67   return ( fHistory.GetTopTransform().TransformPoint(pGlobalPoint) ) ;
 65 }                                                  68 }
 66                                                    69 
 67 // *******************************************     70 // ********************************************************************
 68 // GetWorldVolume                                  71 // GetWorldVolume
 69 //                                                 72 //
 70 // Returns the current  world (`topmost') volu     73 // Returns the current  world (`topmost') volume
 71 // *******************************************     74 // ********************************************************************
 72 //                                                 75 //
 73 inline                                             76 inline
 74 G4VPhysicalVolume* G4Navigator::GetWorldVolume     77 G4VPhysicalVolume* G4Navigator::GetWorldVolume() const
 75 {                                                  78 {
 76   return fTopPhysical;                             79   return fTopPhysical;
 77 }                                                  80 }
 78                                                    81 
 79 // *******************************************     82 // ********************************************************************
 80 // SetWorldVolume                                  83 // SetWorldVolume
 81 //                                                 84 //
 82 // Sets the world (`topmost') volume               85 // Sets the world (`topmost') volume
 83 // *******************************************     86 // ********************************************************************
 84 //                                                 87 //
 85 inline                                             88 inline
 86 void G4Navigator::SetWorldVolume(G4VPhysicalVo     89 void G4Navigator::SetWorldVolume(G4VPhysicalVolume* pWorld)
 87 {                                                  90 {
 88   if ( !(pWorld->GetTranslation() == G4ThreeVe <<  91   if ( !(pWorld->GetTranslation()==G4ThreeVector(0,0,0)) )
 89   {                                                92   {
 90     G4Exception ("G4Navigator::SetWorldVolume( <<  93     G4Exception ("G4Navigator::SetWorldVolume()", "InvalidSetup",
 91                  FatalException, "Volume must      94                  FatalException, "Volume must be centered on the origin.");
 92   }                                                95   }
 93   const G4RotationMatrix* rm = pWorld->GetRota     96   const G4RotationMatrix* rm = pWorld->GetRotation();
 94   if ( (rm != nullptr) && (!rm->isIdentity())  <<  97   if ( rm && (!rm->isIdentity()) )
 95   {                                                98   {
 96     G4Exception ("G4Navigator::SetWorldVolume( <<  99     G4Exception ("G4Navigator::SetWorldVolume()", "InvalidSetup",
 97                  FatalException, "Volume must     100                  FatalException, "Volume must not be rotated.");
 98   }                                               101   }
 99   fTopPhysical = pWorld;                          102   fTopPhysical = pWorld;
100   fHistory.SetFirstEntry(pWorld);                 103   fHistory.SetFirstEntry(pWorld);
101 }                                                 104 }
102                                                   105 
103 // *******************************************    106 // ********************************************************************
104 // SetGeometrycallyLimitedStep                    107 // SetGeometrycallyLimitedStep
105 //                                                108 //
106 // Informs the navigator that the previous Ste    109 // Informs the navigator that the previous Step calculated
107 // by the geometry was taken in its entirety      110 // by the geometry was taken in its entirety
108 // *******************************************    111 // ********************************************************************
109 //                                                112 //
110 inline                                            113 inline
111 void G4Navigator::SetGeometricallyLimitedStep(    114 void G4Navigator::SetGeometricallyLimitedStep()
112 {                                                 115 {
113   fWasLimitedByGeometry = true;                << 116   fWasLimitedByGeometry=true;
114 }                                                 117 }
115                                                   118 
116 // *******************************************    119 // ********************************************************************
117 // ResetStackAndState                             120 // ResetStackAndState
118 //                                                121 //
119 // Resets stack and minimum of navigator state    122 // Resets stack and minimum of navigator state `machine'
120 // *******************************************    123 // ********************************************************************
121 //                                                124 //
122 inline                                            125 inline
123 void G4Navigator::ResetStackAndState()            126 void G4Navigator::ResetStackAndState()
124 {                                                 127 {
125   fHistory.Reset();                               128   fHistory.Reset();
126   ResetState();                                   129   ResetState();
127 }                                                 130 }
128                                                   131 
129 // *******************************************    132 // ********************************************************************
130 // VolumeType                                     133 // VolumeType
131 // *******************************************    134 // ********************************************************************
132 //                                                135 //
133 inline                                            136 inline
134 EVolume G4Navigator::VolumeType(const G4VPhysi    137 EVolume G4Navigator::VolumeType(const G4VPhysicalVolume *pVol) const
135 {                                                 138 {
136   return pVol->VolumeType();                   << 139   EVolume type;
                                                   >> 140   EAxis axis;
                                                   >> 141   G4int nReplicas;
                                                   >> 142   G4double width,offset;
                                                   >> 143   G4bool consuming;
                                                   >> 144   if ( pVol->IsReplicated() )
                                                   >> 145   {
                                                   >> 146     pVol->GetReplicationData(axis,nReplicas,width,offset,consuming);
                                                   >> 147     type = (consuming) ? kReplica : kParameterised;
                                                   >> 148   }
                                                   >> 149   else
                                                   >> 150   {
                                                   >> 151     type = kNormal;
                                                   >> 152   }
                                                   >> 153   return type;
137 }                                                 154 }
138                                                   155 
139 // *******************************************    156 // ********************************************************************
140 // CharacteriseDaughters                       << 157 // CharacteriseDahghters
141 // *******************************************    158 // ********************************************************************
142 //                                                159 //
143 inline                                            160 inline
144 EVolume G4Navigator::CharacteriseDaughters(con    161 EVolume G4Navigator::CharacteriseDaughters(const G4LogicalVolume *pLog) const
145 {                                                 162 {
146   return pLog->CharacteriseDaughters();        << 163   EVolume type;
147 }                                              << 164   EAxis axis;
148                                                << 165   G4int nReplicas;
149 // ******************************************* << 166   G4double width,offset;
150 // GetDaughtersRegularStructureId              << 167   G4bool consuming;
151 // ******************************************* << 
152 //                                             << 
153 inline                                         << 
154 G4int G4Navigator::                            << 
155 GetDaughtersRegularStructureId(const G4Logical << 
156 {                                              << 
157   G4int regId = 0;                             << 
158   G4VPhysicalVolume *pVol;                        168   G4VPhysicalVolume *pVol;
159                                                   169 
160   if ( pLog->GetNoDaughters() == 1 )           << 170   if ( pLog->GetNoDaughters()==1 )
161   {                                               171   {
162     pVol = pLog->GetDaughter(0);                  172     pVol = pLog->GetDaughter(0);
163     regId = pVol->GetRegularStructureId();     << 173     if (pVol->IsReplicated())
                                                   >> 174     {
                                                   >> 175       pVol->GetReplicationData(axis,nReplicas,width,offset,consuming);
                                                   >> 176       type = (consuming) ? kReplica : kParameterised;
                                                   >> 177     }
                                                   >> 178     else
                                                   >> 179     {
                                                   >> 180       type = kNormal;
                                                   >> 181     }
164   }                                               182   }
165   return regId;                                << 183   else
                                                   >> 184   {
                                                   >> 185     type = kNormal;
                                                   >> 186   }
                                                   >> 187   return type;
166 }                                                 188 }
167                                                   189 
168 // *******************************************    190 // ********************************************************************
169 // GetGlobalToLocalTransform                      191 // GetGlobalToLocalTransform
170 //                                                192 //
171 // Returns local to global transformation.        193 // Returns local to global transformation.
172 // I.e. transformation that will take point or    194 // I.e. transformation that will take point or axis in world coord system
173 // and return one in the local coord system       195 // and return one in the local coord system
174 // *******************************************    196 // ********************************************************************
175 //                                                197 //
176 inline                                            198 inline
177 const G4AffineTransform& G4Navigator::GetGloba    199 const G4AffineTransform& G4Navigator::GetGlobalToLocalTransform() const
178 {                                                 200 {
179   return fHistory.GetTopTransform();              201   return fHistory.GetTopTransform();
180 }                                                 202 }
181                                                   203 
182 // *******************************************    204 // ********************************************************************
183 // GetLocalToGlobalTransform                      205 // GetLocalToGlobalTransform
184 //                                                206 //
185 // Returns global to local transformation         207 // Returns global to local transformation 
186 // *******************************************    208 // ********************************************************************
187 //                                                209 //
188 inline                                            210 inline
189 const G4AffineTransform G4Navigator::GetLocalT    211 const G4AffineTransform G4Navigator::GetLocalToGlobalTransform() const
190 {                                                 212 {
191   return fHistory.GetTopTransform().Inverse(); << 213   G4AffineTransform  tempTransform;
                                                   >> 214   tempTransform = fHistory.GetTopTransform().Inverse(); 
                                                   >> 215   return tempTransform;
192 }                                                 216 }
193                                                   217 
194 // *******************************************    218 // ********************************************************************
195 // NetTranslation                                 219 // NetTranslation
196 //                                                220 //
197 // Computes+returns the local->global translat    221 // Computes+returns the local->global translation of current volume
198 // *******************************************    222 // ********************************************************************
199 //                                                223 //
200 inline                                            224 inline
201 G4ThreeVector G4Navigator::NetTranslation() co    225 G4ThreeVector G4Navigator::NetTranslation() const
202 {                                                 226 {
203   return fHistory.GetTopTransform().InverseNet << 227   G4AffineTransform tf(fHistory.GetTopTransform().Inverse());
                                                   >> 228   return tf.NetTranslation();
204 }                                                 229 }
205                                                   230 
206 // *******************************************    231 // ********************************************************************
207 // NetRotation                                    232 // NetRotation
208 //                                                233 //
209 // Computes+returns the local->global rotation    234 // Computes+returns the local->global rotation of current volume
210 // *******************************************    235 // ********************************************************************
211 //                                                236 //
212 inline                                            237 inline
213 G4RotationMatrix G4Navigator::NetRotation() co    238 G4RotationMatrix G4Navigator::NetRotation() const
214 {                                                 239 {
215   return fHistory.GetTopTransform().InverseNet << 240   G4AffineTransform tf(fHistory.GetTopTransform().Inverse());
                                                   >> 241   return tf.NetRotation();
216 }                                                 242 }
217                                                   243 
218 // *******************************************    244 // ********************************************************************
219 // CreateTouchableHistory                      << 245 // CreateGRSVolume
220 //                                                246 //
221 // `Touchable' creation method: caller has del    247 // `Touchable' creation method: caller has deletion responsibility
222 // *******************************************    248 // ********************************************************************
223 //                                                249 //
224 inline                                            250 inline
225 G4TouchableHistory* G4Navigator::CreateTouchab << 251 G4GRSVolume* G4Navigator::CreateGRSVolume() const
226 {                                                 252 {
227   return new G4TouchableHistory(fHistory);     << 253   G4AffineTransform tf(fHistory.GetTopTransform().Inverse());
                                                   >> 254   return new G4GRSVolume(fHistory.GetTopVolume(),
                                                   >> 255                          tf.NetRotation(),
                                                   >> 256                          tf.NetTranslation());
228 }                                                 257 }
229                                                   258 
230 // *******************************************    259 // ********************************************************************
231 // CreateTouchableHistory(history)             << 260 // CreateGRSSolid
232 //                                                261 //
233 // `Touchable' creation method: caller has del    262 // `Touchable' creation method: caller has deletion responsibility
234 // *******************************************    263 // ********************************************************************
235 //                                                264 //
236 inline                                            265 inline
237 G4TouchableHistory*                            << 266 G4GRSSolid* G4Navigator::CreateGRSSolid() const
238 G4Navigator::CreateTouchableHistory(const G4Na << 
239 {                                                 267 {
240   return new G4TouchableHistory(*history);     << 268   G4AffineTransform tf(fHistory.GetTopTransform().Inverse());
                                                   >> 269   return new G4GRSSolid(fHistory.GetTopVolume()->GetLogicalVolume()->GetSolid(),
                                                   >> 270                         tf.NetRotation(),
                                                   >> 271                         tf.NetTranslation());
241 }                                                 272 }
242                                                   273 
243 // *******************************************    274 // ********************************************************************
244 // LocateGlobalPointAndUpdateTouchableHandle   << 275 // CreateTouchableHistory
                                                   >> 276 //
                                                   >> 277 // `Touchable' creation method: caller has deletion responsibility
245 // *******************************************    278 // ********************************************************************
246 //                                                279 //
247 inline                                            280 inline
248 void G4Navigator::LocateGlobalPointAndUpdateTo << 281 G4TouchableHistory* G4Navigator::CreateTouchableHistory() const
249                                const G4ThreeVe << 
250                                const G4ThreeVe << 
251                                      G4Touchab << 
252                                const G4bool    << 
253 {                                                 282 {
254   G4VPhysicalVolume* pPhysVol;                 << 283   return new G4TouchableHistory(fHistory);
255   pPhysVol = LocateGlobalPointAndSetup( positi << 284 }
256   if( fEnteredDaughter || fExitedMother )      << 285 
257   {                                            << 286 // ********************************************************************
258      oldTouchableToUpdate = CreateTouchableHis << 287 // EnteredDaughterVolume
259      if( pPhysVol == nullptr )                 << 288 //
260      {                                         << 289 // To inform the caller if the track is entering a daughter volume
261        // We want to ensure that the touchable << 290 // ********************************************************************
262        // The method below should do this and  << 291 //
263        //                                      << 292 inline
264        oldTouchableToUpdate->UpdateYourself( p << 293 G4bool  G4Navigator::EnteredDaughterVolume()
265      }                                         << 294 {
266   }                                            << 295   return fEnteredDaughter;
267   return;                                      << 
268 }                                                 296 }
269                                                   297 
270 // *******************************************    298 // ********************************************************************
271 // LocateGlobalPointAndUpdateTouchable            299 // LocateGlobalPointAndUpdateTouchable
272 //                                                300 //
273 // Use direction                                  301 // Use direction
274 // *******************************************    302 // ********************************************************************
275 //                                                303 //
276 inline                                            304 inline
277 void G4Navigator::LocateGlobalPointAndUpdateTo    305 void G4Navigator::LocateGlobalPointAndUpdateTouchable(
278                            const G4ThreeVector    306                            const G4ThreeVector&       position,
279                            const G4ThreeVector    307                            const G4ThreeVector&       direction,
280                                  G4VTouchable*    308                                  G4VTouchable*        touchableToUpdate,
281                            const G4bool           309                            const G4bool               RelativeSearch  )
282 {                                                 310 {
283   G4VPhysicalVolume* pPhysVol;                    311   G4VPhysicalVolume* pPhysVol;
284   pPhysVol = LocateGlobalPointAndSetup( positi    312   pPhysVol = LocateGlobalPointAndSetup( position, &direction, RelativeSearch);  
285   touchableToUpdate->UpdateYourself( pPhysVol,    313   touchableToUpdate->UpdateYourself( pPhysVol, &fHistory );
286 }                                                 314 }
287                                                   315 
288 // *******************************************    316 // ********************************************************************
289 // LocateGlobalPointAndUpdateTouchable            317 // LocateGlobalPointAndUpdateTouchable
290 // *******************************************    318 // ********************************************************************
291 //                                                319 //
292 inline                                            320 inline
293 void G4Navigator::LocateGlobalPointAndUpdateTo    321 void G4Navigator::LocateGlobalPointAndUpdateTouchable(
294                            const G4ThreeVector    322                            const G4ThreeVector&       position,
295                                  G4VTouchable*    323                                  G4VTouchable*        touchableToUpdate,
296                            const G4bool           324                            const G4bool               RelativeSearch )
297 {                                                 325 {
298   G4VPhysicalVolume* pPhysVol;                    326   G4VPhysicalVolume* pPhysVol;
299   pPhysVol = LocateGlobalPointAndSetup( positi << 327   pPhysVol = LocateGlobalPointAndSetup( position, 0, RelativeSearch);  
300   touchableToUpdate->UpdateYourself( pPhysVol,    328   touchableToUpdate->UpdateYourself( pPhysVol, &fHistory );
301 }                                                 329 }
302                                                   330 
303 // *******************************************    331 // ********************************************************************
304 // GetVerboseLevel                                332 // GetVerboseLevel
305 // *******************************************    333 // ********************************************************************
306 //                                                334 //
307 inline                                            335 inline
308 G4int G4Navigator::GetVerboseLevel() const        336 G4int G4Navigator::GetVerboseLevel() const
309 {                                                 337 {
310   return fVerbose;                                338   return fVerbose;
311 }                                                 339 }
312                                                   340 
313 // *******************************************    341 // ********************************************************************
314 // SetVerboseLevel                                342 // SetVerboseLevel
315 // *******************************************    343 // ********************************************************************
316 //                                                344 //
317 inline                                            345 inline
318 void G4Navigator::SetVerboseLevel(G4int level) << 346 void  G4Navigator::SetVerboseLevel(G4int level)
319 {                                                 347 {
320   fVerbose = level;                               348   fVerbose = level;
321   fnormalNav.SetVerboseLevel(level);              349   fnormalNav.SetVerboseLevel(level);
322   GetVoxelNavigator().SetVerboseLevel(level);  << 350   fvoxelNav.SetVerboseLevel(level);
323   fparamNav.SetVerboseLevel(level);               351   fparamNav.SetVerboseLevel(level);
324   freplicaNav.SetVerboseLevel(level);             352   freplicaNav.SetVerboseLevel(level);
325   fregularNav.SetVerboseLevel(level);          << 
326   if (fpExternalNav != nullptr) { fpExternalNa << 
327 }                                              << 
328                                                << 
329 // ******************************************* << 
330 // IsActive                                    << 
331 // ******************************************* << 
332 //                                             << 
333 inline                                         << 
334 G4bool G4Navigator::IsActive() const           << 
335 {                                              << 
336   return fActive;                              << 
337 }                                              << 
338                                                << 
339 // ******************************************* << 
340 // Activate                                    << 
341 // ******************************************* << 
342 //                                             << 
343 inline                                         << 
344 void G4Navigator::Activate(G4bool flag)        << 
345 {                                              << 
346   fActive = flag;                              << 
347 }                                              << 
348                                                << 
349 // ******************************************* << 
350 // EnteredDaughterVolume                       << 
351 //                                             << 
352 // To inform the caller if the track is enteri << 
353 // ******************************************* << 
354 //                                             << 
355 inline                                         << 
356 G4bool G4Navigator::EnteredDaughterVolume() co << 
357 {                                              << 
358   return fEnteredDaughter;                     << 
359 }                                              << 
360                                                << 
361 // ******************************************* << 
362 // ExitedMotherVolume                          << 
363 // ******************************************* << 
364 //                                             << 
365 inline                                         << 
366 G4bool G4Navigator::ExitedMotherVolume() const << 
367 {                                              << 
368   return fExitedMother;                        << 
369 }                                                 353 }
370                                                   354 
371 // *******************************************    355 // ********************************************************************
372 // CheckMode                                      356 // CheckMode
373 // *******************************************    357 // ********************************************************************
374 //                                                358 //
375 inline                                            359 inline
376 void  G4Navigator::CheckMode(G4bool mode)         360 void  G4Navigator::CheckMode(G4bool mode)
377 {                                                 361 {
378   fCheck = mode;                                  362   fCheck = mode;
379   fnormalNav.CheckMode(mode);                     363   fnormalNav.CheckMode(mode);
380   GetVoxelNavigator().CheckMode(mode);         << 364   fvoxelNav.CheckMode(mode);
381   fparamNav.CheckMode(mode);                      365   fparamNav.CheckMode(mode);
382   freplicaNav.CheckMode(mode);                    366   freplicaNav.CheckMode(mode);
383   fregularNav.CheckMode(mode);                 << 
384   if (fpExternalNav != nullptr) { fpExternalNa << 
385 }                                              << 
386                                                << 
387 // ******************************************* << 
388 // IsCheckModeActive                           << 
389 // ******************************************* << 
390 //                                             << 
391 inline                                         << 
392 G4bool G4Navigator::IsCheckModeActive() const  << 
393 {                                              << 
394   return fCheck;                               << 
395 }                                              << 
396                                                << 
397 // ******************************************* << 
398 // SetPushVerbosity                            << 
399 // ******************************************* << 
400 //                                             << 
401 inline                                         << 
402 void G4Navigator::SetPushVerbosity(G4bool mode << 
403 {                                              << 
404   fWarnPush = mode;                            << 
405 }                                                 367 }
406                                                   368 
407 // *******************************************    369 // ********************************************************************
408 // SeverityOfZeroStepping                         370 // SeverityOfZeroStepping
409 //                                                371 //
410 // Reports on severity of error in case Naviga    372 // Reports on severity of error in case Navigator is stuck
411 // and is returning zero steps                    373 // and is returning zero steps
412 // *******************************************    374 // ********************************************************************
413 //                                                375 //
414 inline                                            376 inline 
415 G4int G4Navigator::SeverityOfZeroStepping( G4i    377 G4int G4Navigator::SeverityOfZeroStepping( G4int* noZeroSteps ) const 
416 {                                                 378 {
417   G4int severity = 0, noZeros = fNumberZeroSte << 379   G4int severity=0, noZeros= fNumberZeroSteps;
418   if( noZeroSteps != nullptr )                 << 380   if( noZeroSteps) *noZeroSteps = fNumberZeroSteps;
419   {                                            << 381 
420     *noZeroSteps = fNumberZeroSteps;           << 
421   }                                            << 
422   if( noZeros >= fAbandonThreshold_NoZeroSteps    382   if( noZeros >= fAbandonThreshold_NoZeroSteps )
423   {                                               383   {
424     severity = 10;                                384     severity = 10;
425   }                                               385   }
426   if( noZeros > 0 && noZeros < fActionThreshol    386   if( noZeros > 0 && noZeros < fActionThreshold_NoZeroSteps )
427   {                                               387   {
428     severity =  5 * noZeros / fActionThreshold    388     severity =  5 * noZeros / fActionThreshold_NoZeroSteps;
429   }                                               389   }
430   else if( noZeros == fActionThreshold_NoZeroS    390   else if( noZeros == fActionThreshold_NoZeroSteps )
431   {                                               391   {
432     severity =  5;                                392     severity =  5; 
433   }                                               393   }
434   else if( noZeros >= fAbandonThreshold_NoZero    394   else if( noZeros >= fAbandonThreshold_NoZeroSteps - 2 )
435   {                                               395   {
436     severity =  9;                                396     severity =  9; 
437   }                                               397   }
438   else if( noZeros < fAbandonThreshold_NoZeroS    398   else if( noZeros < fAbandonThreshold_NoZeroSteps - 2 )
439   {                                               399   {
440     severity =  5 + 4 * (noZeros-fAbandonThres    400     severity =  5 + 4 * (noZeros-fAbandonThreshold_NoZeroSteps)
441                       / fActionThreshold_NoZer    401                       / fActionThreshold_NoZeroSteps;
442   }                                               402   }
443   return severity;                                403   return severity;
444 }                                              << 
445                                                << 
446 // ******************************************* << 
447 // GetVoxelNavigator                           << 
448 // ******************************************* << 
449 //                                             << 
450 inline                                         << 
451 G4VoxelNavigation& G4Navigator::GetVoxelNaviga << 
452 {                                              << 
453   return *fpvoxelNav;                          << 
454 }                                              << 
455                                                << 
456 // ******************************************* << 
457 // EnableBestSafety                            << 
458 // ******************************************* << 
459 //                                             << 
460 inline void G4Navigator::EnableBestSafety( G4b << 
461 {                                              << 
462   GetVoxelNavigator().EnableBestSafety( value  << 
463 }                                              << 
464                                                << 
465 // ******************************************* << 
466 // SetExternalNavigation                       << 
467 // ******************************************* << 
468 //                                             << 
469 inline                                         << 
470 G4VExternalNavigation* G4Navigator::GetExterna << 
471 {                                              << 
472   return fpExternalNav;                        << 
473 }                                              << 
474                                                << 
475 // ******************************************* << 
476 // Clone                                       << 
477 // ******************************************* << 
478 //                                             << 
479 inline                                         << 
480 G4Navigator* G4Navigator::Clone() const        << 
481 {                                              << 
482   auto  clone_nav = new G4Navigator();         << 
483   clone_nav->SetWorldVolume(fTopPhysical);     << 
484   if( fpExternalNav != nullptr )               << 
485   {                                            << 
486     clone_nav->SetExternalNavigation(fpExterna << 
487   }                                            << 
488   return clone_nav;                            << 
489 }                                                 404 }
490                                                   405