2 // ********************************************************************
3 // * License and Disclaimer *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
27 // $Id: G4NormalNavigation.icc 66356 2012-12-18 09:02:32Z gcosmo $
30 // G4NormalNavigation Inline Implementation
32 // --------------------------------------------------------------------
34 // ********************************************************************
36 // ********************************************************************
40 G4NormalNavigation::LevelLocate( G4NavigationHistory& history,
41 const G4VPhysicalVolume* blockedVol,
43 const G4ThreeVector& globalPoint,
44 const G4ThreeVector* globalDirection,
45 const G4bool pLocatedOnEdge,
46 G4ThreeVector &localPoint )
48 G4VPhysicalVolume *targetPhysical, *samplePhysical;
49 G4LogicalVolume *targetLogical;
50 G4VSolid *sampleSolid;
51 G4ThreeVector samplePoint;
52 G4int targetNoDaughters;
54 targetPhysical = history.GetTopVolume();
55 targetLogical = targetPhysical->GetLogicalVolume();
56 targetNoDaughters = targetLogical->GetNoDaughters();
60 if (targetNoDaughters!=0)
63 // Search daughters in volume
65 for ( register int sampleNo=targetNoDaughters-1; sampleNo>=0; sampleNo-- )
67 samplePhysical = targetLogical->GetDaughter(sampleNo);
68 if ( samplePhysical!=blockedVol )
72 history.NewLevel(samplePhysical, kNormal, samplePhysical->GetCopyNo());
73 sampleSolid = samplePhysical->GetLogicalVolume()->GetSolid();
74 samplePoint = history.GetTopTransform().TransformPoint(globalPoint);
75 if( G4AuxiliaryNavServices::
76 CheckPointOnSurface(sampleSolid, samplePoint, globalDirection,
77 history.GetTopTransform(), pLocatedOnEdge) )
79 // Enter this daughter
81 localPoint = samplePoint;
95 // ********************************************************************
97 // ********************************************************************
100 G4int G4NormalNavigation::GetVerboseLevel() const
102 return fLogger->GetVerboseLevel();
105 // ********************************************************************
107 // ********************************************************************
110 void G4NormalNavigation::SetVerboseLevel(G4int level)
112 fLogger->SetVerboseLevel(level);
115 // ********************************************************************
117 // ********************************************************************
120 void G4NormalNavigation::CheckMode(G4bool mode)