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] [ 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 ]

  1 //
  2 // ********************************************************************
  3 // * License and Disclaimer                                           *
  4 // *                                                                  *
  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.                             *
 10 // *                                                                  *
 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.         *
 17 // *                                                                  *
 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 // ********************************************************************
 25 //
 26 /*
 27  * G4ITNavigatorState2.cc
 28  *
 29  *  Created on: 25 févr. 2014
 30  *      Author: kara
 31  */
 32 
 33 #include "G4ITNavigator.hh"
 34 //#include "G4ITNavigator2.hh"
 35 
 36 // !>
 37 
 38 G4ITNavigator2 ::G4NavigatorState::G4NavigatorState()    
 39 {
 40   ResetState();
 41 }
 42 
 43 void G4ITNavigator2::G4NavigatorState::ResetStack()
 44 {
 45   fHistory.Reset();
 46 }
 47 
 48 void G4ITNavigator2::G4NavigatorState::ResetState()
 49 {
 50   fCalculatedExitNormal = false;
 51   fChangedGrandMotherRefFrame = false;
 52   fLastTriedStepComputation = false;
 53   fWasLimitedByGeometry = false;
 54   fEntering = false;
 55   fExiting = false;
 56   fLocatedOnEdge = false;
 57   fLastStepWasZero = false;
 58   fEnteredDaughter = false;
 59   fExitedMother = false;
 60   fPushed = false;
 61 
 62   fValidExitNormal = false;
 63   fExitNormal = G4ThreeVector(0, 0, 0);
 64 
 65   fPreviousSftOrigin = G4ThreeVector(0, 0, 0);
 66   fPreviousSafety = 0.0;
 67 
 68   fNumberZeroSteps = 0;
 69 
 70   fStepEndPoint = G4ThreeVector(kInfinity, kInfinity, kInfinity);
 71   fLastStepEndPointLocal = G4ThreeVector(kInfinity, kInfinity, kInfinity);
 72 
 73   fBlockedPhysicalVolume = nullptr;
 74   fBlockedReplicaNo = -1;
 75 
 76   fLastLocatedPointLocal = G4ThreeVector(kInfinity, -kInfinity, 0.0);
 77   fLocatedOutsideWorld = false;
 78 }
 79 
 80 G4ITNavigator2 ::G4NavigatorState::G4NavigatorState(const G4NavigatorState& rhs)    
 81 {
 82   fExitNormal = rhs.fExitNormal;
 83   fValidExitNormal = rhs.fValidExitNormal;
 84   fExiting = rhs.fExiting;
 85   fEntering = rhs.fEntering;
 86 
 87   fBlockedPhysicalVolume = rhs.fBlockedPhysicalVolume;
 88   fBlockedReplicaNo = rhs.fBlockedReplicaNo,
 89 
 90   fLastStepWasZero = rhs.fLastStepWasZero;
 91 
 92   fLocatedOutsideWorld = rhs.fLocatedOutsideWorld;
 93   fLastLocatedPointLocal = rhs.fLastLocatedPointLocal;
 94   fEnteredDaughter = rhs.fEnteredDaughter;
 95   fExitedMother = rhs.fExitedMother;
 96   fWasLimitedByGeometry = rhs.fWasLimitedByGeometry;
 97 
 98   fPreviousSftOrigin = rhs.fPreviousSftOrigin;
 99   fPreviousSafety = rhs.fPreviousSafety;
100 
101   fLastTriedStepComputation = rhs.fLastTriedStepComputation;
102   fChangedGrandMotherRefFrame = rhs.fChangedGrandMotherRefFrame;
103   fCalculatedExitNormal = rhs.fCalculatedExitNormal;
104 
105   fNumberZeroSteps = rhs.fNumberZeroSteps;
106   fLocatedOnEdge = rhs.fLocatedOnEdge;
107   fPushed = rhs.fPushed;
108   fNumberZeroSteps = rhs.fNumberZeroSteps;
109 }
110 
111 G4ITNavigator2::G4NavigatorState&
112 G4ITNavigator2::G4NavigatorState::operator=(const G4NavigatorState& rhs)
113 {
114   if (this == &rhs) return *this;
115   fExitNormal = rhs.fExitNormal;
116   fValidExitNormal = rhs.fValidExitNormal;
117   fExiting = rhs.fExiting;
118   fEntering = rhs.fEntering;
119 
120   fBlockedPhysicalVolume = rhs.fBlockedPhysicalVolume;
121   fBlockedReplicaNo = rhs.fBlockedReplicaNo;
122   fCalculatedExitNormal = rhs.fCalculatedExitNormal;
123 
124   fLastStepWasZero = rhs.fLastStepWasZero;
125   fLastTriedStepComputation = rhs.fLastTriedStepComputation;
126   fChangedGrandMotherRefFrame = rhs.fChangedGrandMotherRefFrame;
127 
128   fPreviousSftOrigin = rhs.fPreviousSftOrigin;
129   fPreviousSafety = rhs.fPreviousSafety;
130   fNumberZeroSteps = rhs.fNumberZeroSteps;
131   fLocatedOnEdge = rhs.fLocatedOnEdge;
132   fWasLimitedByGeometry = rhs.fWasLimitedByGeometry;
133   fPushed = rhs.fPushed;
134   fNumberZeroSteps = rhs.fNumberZeroSteps;
135   fEnteredDaughter = rhs.fEnteredDaughter;
136   fExitedMother = rhs.fExitedMother;
137 
138   fLastLocatedPointLocal = rhs.fLastLocatedPointLocal;
139   fLocatedOutsideWorld = rhs.fLocatedOutsideWorld;
140 
141   return *this;
142 }
143 
144 G4ITNavigator2 ::G4SaveNavigatorState::G4SaveNavigatorState()
145 {
146 
147   sWasLimitedByGeometry = false;
148   sEntering = false;
149   sExiting = false;
150   sLastStepWasZero = 0;
151   sEnteredDaughter = false;
152   sExitedMother = false;
153 
154 
155   sValidExitNormal = false;
156   sExitNormal = G4ThreeVector(0, 0, 0);
157 
158   sPreviousSftOrigin = G4ThreeVector(0, 0, 0);
159   sPreviousSafety = 0.0;
160 
161 //  sLocatedOnEdge = false;
162 //  sPushed = false;
163 //  sNumberZeroSteps = 0;
164 
165   spBlockedPhysicalVolume = nullptr;
166   sBlockedReplicaNo = -1;
167 
168   sLastLocatedPointLocal = G4ThreeVector(kInfinity, -kInfinity, 0.0);
169   sLocatedOutsideWorld = false;
170 }
171 
172 G4ITNavigator2 ::G4SaveNavigatorState::G4SaveNavigatorState(G4NavigatorState* rhs)
173 {
174   sExitNormal = rhs->fExitNormal;
175   sValidExitNormal = rhs->fValidExitNormal;
176   sExiting = rhs->fExiting;
177   sEntering = rhs->fEntering;
178 
179   spBlockedPhysicalVolume = rhs->fBlockedPhysicalVolume;
180   sBlockedReplicaNo = rhs->fBlockedReplicaNo;
181 
182   sLastStepWasZero = static_cast<G4int>(rhs->fLastStepWasZero);
183 
184   sPreviousSftOrigin = rhs->fPreviousSftOrigin;
185   sPreviousSafety = rhs->fPreviousSafety;
186 
187   sWasLimitedByGeometry = rhs->fWasLimitedByGeometry;
188 
189 //  sLocatedOnEdge = rhs->fLocatedOnEdge;
190 //  sPushed = rhs->fPushed;
191 //  sNumberZeroSteps = rhs->fNumberZeroSteps;
192 
193   sEnteredDaughter = rhs->fEnteredDaughter;
194   sExitedMother = rhs->fExitedMother;
195 
196   sLastLocatedPointLocal = rhs->fLastLocatedPointLocal;
197   sLocatedOutsideWorld = rhs->fLocatedOutsideWorld;
198 }
199 
200 G4ITNavigator2::G4NavigatorState& G4ITNavigator2::G4NavigatorState::operator=(const G4SaveNavigatorState& rhs)
201 {
202   fExitNormal = rhs.sExitNormal;
203   fValidExitNormal = rhs.sValidExitNormal;
204   fExiting = rhs.sExiting;
205   fEntering = rhs.sEntering;
206 
207   fBlockedPhysicalVolume = rhs.spBlockedPhysicalVolume;
208   fBlockedReplicaNo = rhs.sBlockedReplicaNo;
209 //  fCalculatedExitNormal = rhs.sCalculatedExitNormal;
210 
211   fLastStepWasZero = (rhs.sLastStepWasZero != 0);
212 //  fLastTriedStepComputation =rhs.sLastTriedStepComputation;
213 //  fChangedGrandMotherRefFrame = rhs.sChangedGrandMotherRefFrame;
214 
215   fPreviousSftOrigin = rhs.sPreviousSftOrigin;
216   fPreviousSafety = rhs.sPreviousSafety;
217 //  fNumberZeroSteps = rhs.sNumberZeroSteps;
218 //  fLocatedOnEdge = rhs.sLocatedOnEdge;
219 //  fPushed = rhs.sPushed;
220   fWasLimitedByGeometry = rhs.sWasLimitedByGeometry;
221 
222   fEnteredDaughter = rhs.sEnteredDaughter;
223   fExitedMother = rhs.sExitedMother;
224 
225   fLastLocatedPointLocal = rhs.sLastLocatedPointLocal;
226   fLocatedOutsideWorld = rhs.sLocatedOutsideWorld;
227   return *this;
228 }
229