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

Diff markup

Differences between /processes/electromagnetic/dna/management/src/G4ITNavigatorState2.cc (Version 11.3.0) and /processes/electromagnetic/dna/management/src/G4ITNavigatorState2.cc (Version 11.2)


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