- Timestamp:
- Feb 16, 2009, 10:14:30 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/geometry/navigation/include/G4PropagatorInField.hh
r850 r921 24 24 // ******************************************************************** 25 25 // 26 //27 // $Id: G4PropagatorInField.hh,v 1.14 2008/05/28 09:11:59 tnikitin Exp $28 // GEANT4 tag $Name: HEAD $29 26 // 30 // class G4PropagatorInField 31 // 32 // Class description: 27 // $Id: G4PropagatorInField.hh,v 1.17 2008/11/13 14:28:56 tnikitin Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 // 30 // 31 // Class G4PropagatorInField 32 // 33 // class description: 33 34 // 34 35 // This class performs the navigation/propagation of a particle/track … … 36 37 // For the calculation of the path, it relies on the class G4ChordFinder. 37 38 // 38 // Key Method: 39 // ComputeStep(..) 39 // Key Method: ComputeStep(..) 40 40 41 // History: 41 42 // ------- … … 54 55 #include "G4FieldTrack.hh" 55 56 #include "G4FieldManager.hh" 57 #include "G4VIntersectionLocator.hh" 58 56 59 class G4ChordFinder; 57 60 … … 66 69 67 70 G4PropagatorInField( G4Navigator *theNavigator, 68 G4FieldManager *detectorFieldMgr ); 71 G4FieldManager *detectorFieldMgr, 72 G4VIntersectionLocator *vLocator=0 ); 69 73 ~G4PropagatorInField(); 70 74 … … 116 120 inline G4FieldTrack GetEndState() const; 117 121 118 // The following methods are now obsolescent but *for now* will work 119 // They are being replaced by same-name methods in G4FieldManager, 120 // allowing the specialisation in different volumes. 121 // Their new behaviour is to change the values for the global field manager. 122 inline G4double GetMinimumEpsilonStep() const; 123 inline void SetMinimumEpsilonStep( G4double newEpsMin ); 124 // Minimum for Relative accuracy of any Step 125 122 inline G4double GetMinimumEpsilonStep() const; // Min for relative accuracy 123 inline void SetMinimumEpsilonStep( G4double newEpsMin ); // of any step 126 124 inline G4double GetMaximumEpsilonStep() const; 127 125 inline void SetMaximumEpsilonStep( G4double newEpsMax ); 128 129 126 inline void SetLargestAcceptableStep( G4double newBigDist ); 130 127 inline G4double GetLargestAcceptableStep(); 128 // The 6 above methods are now obsolescent but *for now* will work 129 // They are being replaced by same-name methods in G4FieldManager, 130 // allowing the specialisation in different volumes. 131 // Their new behaviour is to change the values for the global field 132 // manager 133 134 void SetTrajectoryFilter(G4VCurvedTrajectoryFilter* filter); 135 // Set the filter that examines & stores 'intermediate' 136 // curved trajectory points. Currently only position is stored. 137 138 std::vector<G4ThreeVector>* GimmeTrajectoryVectorAndForgetIt() const; 139 // Access the points which have passed by the filter. 140 // Responsibility for deleting the points lies with the client. 141 // This method MUST BE called exactly ONCE per step. 142 143 void ClearPropagatorState(); 144 // Clear all the State of this class and its current associates 145 // --> the current field manager & chord finder will also be called 146 147 inline void SetDetectorFieldManager( G4FieldManager* newGlobalFieldManager ); 148 // Update this (dangerous) state -- for the time being 131 149 132 // Use alternative Locator(based on Brent Method,second order Intersection) 133 inline void SetBrentMethod(G4bool newLocator); 134 inline G4bool GetBrentMethod(); 135 136 public: // with description 137 138 // The following methods are obsolete and will not work -- 139 // as they have been replaced by the same methods in G4FieldManager 140 // since Geant4 4.0 150 inline void SetUseSafetyForOptimization( G4bool ); 151 inline G4bool GetUseSafetyForOptimization(); 152 // Toggle & view parameter for using safety to discard 153 // unneccesary calls to navigator (thus 'optimising' performance) 154 inline G4bool IntersectChord( G4ThreeVector StartPointA, 155 G4ThreeVector EndPointB, 156 G4double &NewSafety, 157 G4double &LinearStepLength, 158 G4ThreeVector &IntersectionPoint); 159 // Intersect the chord from StartPointA to EndPointB 160 // and return whether an intersection occurred 161 // NOTE : SAFETY IS CHANGED 162 163 inline G4VIntersectionLocator* GetIntersectionLocator(); 164 inline void SetIntersectionLocator(G4VIntersectionLocator *pLocator ); 165 166 public: // without description 167 141 168 inline G4double GetDeltaIntersection() const; 142 169 inline G4double GetDeltaOneStep() const; … … 144 171 inline void SetDeltaIntersection( G4double deltaIntersection ); 145 172 inline void SetDeltaOneStep( G4double deltaOneStep ); 146 147 public: // without description173 // The above 5 methods are obsolete and will not work, as they have been 174 // replaced by the same methods in G4FieldManager since Geant4 4.0 ... 148 175 149 176 inline G4FieldManager* GetCurrentFieldManager(); 150 177 inline void SetNavigatorForPropagating( G4Navigator *SimpleOrMultiNavigator ); 151 178 inline G4Navigator* GetNavigatorForPropagating(); 152 153 public: // no description154 179 155 180 inline void SetThresholdNoZeroStep( G4int noAct, … … 158 183 inline G4int GetThresholdNoZeroSteps( G4int i ); 159 184 160 public: // with description161 //162 void SetTrajectoryFilter(G4VCurvedTrajectoryFilter* filter);163 // Set the filter that examines & stores 'intermediate'164 // curved trajectory points. Currently only position is stored.165 166 std::vector<G4ThreeVector>* GimmeTrajectoryVectorAndForgetIt() const;167 // Access the points which have passed by the filter.168 // Responsibility for deleting the points lies with the client.169 // This method MUST BE called exactly ONCE per step.170 171 void ClearPropagatorState();172 // Clear all the State of this class and its current associates173 // --> the current field manager & chord finder will also be called174 175 inline void SetDetectorFieldManager( G4FieldManager* newGlobalFieldManager );176 // Update this (dangerous) state -- for the time being177 178 inline void SetUseSafetyForOptimization( G4bool );179 inline G4bool GetUseSafetyForOptimization();180 // Toggle & view parameter for using safety to discard181 // unneccesary calls to navigator (thus 'optimising' performance)182 183 185 protected: // with description 184 185 G4bool LocateIntersectionPoint(186 const G4FieldTrack& curveStartPointTangent, // A187 const G4FieldTrack& curveEndPointTangent, // B188 const G4ThreeVector& trialPoint, // E189 G4FieldTrack& intersectPointTangent, // Output190 G4bool& recalculatedEndPoint); // Out:191 192 // If such an intersection exists, this function193 // calculate the intersection point of the true path of the particle194 // with the surface of the current volume (or of one of its daughters).195 // (Should use lateral displacement as measure of convergence).196 197 G4bool IntersectChord( G4ThreeVector StartPointA,198 G4ThreeVector EndPointB,199 G4double &NewSafety,200 G4double &LinearStepLength,201 G4ThreeVector &IntersectionPoint);202 // Intersect the chord from StartPointA to EndPointB203 // and return whether an intersection occurred204 205 G4FieldTrack ReEstimateEndpoint( const G4FieldTrack &CurrentStateA,206 const G4FieldTrack &EstimtdEndStateB,207 G4double linearDistSq,208 G4double curveDist);209 // Return new estimate for state after curveDist210 // starting from CurrentStateA, to replace EstimtdEndStateB,211 // (and report displacement -- if field is compiled verbose.)212 186 213 187 void PrintStepLengthDiagnostic( G4double currentProposedStepLength, … … 217 191 private: 218 192 219 // ----------------------------------------------------------------------220 // DATA Members221 // ----------------------------------------------------------------------193 // ---------------------------------------------------------------------- 194 // DATA Members 195 // ---------------------------------------------------------------------- 222 196 223 197 G4FieldManager *fDetectorFieldMgr; … … 228 202 229 203 G4Navigator *fNavigator; 230 204 231 205 // STATE information 232 206 // ----------------- … … 270 244 // Geometrical tolerance defining surface thickness 271 245 272 G4int maxNumberOfStepsForIntersection; 273 G4int maxNumberOfCallsToReIntegration; 274 G4int maxNumberOfCallsToReIntegration_depth; 275 // Counters for Statistics about Location and ReIntegrations 276 private: 277 278 static const G4int max_depth=4; 279 G4FieldTrack* ptrInterMedFT[max_depth+1]; 280 // Used to store intermediate values of tracks in case of 281 // too slow progress 282 private: 283 G4bool fUseBrentLocator; 284 285 private: 286 287 G4VCurvedTrajectoryFilter* fpTrajectoryFilter; 288 // The filter encapsulates the algorithm which selects which 289 // intermediate points should be stored in a trajectory. 290 // When it is NULL, no intermediate points will be stored. 291 // Else PIF::ComputeStep must submit (all) intermediate 292 // points it calculates, to this filter. (jacek 04/11/2002) 246 G4VIntersectionLocator *fIntersectionLocator; 247 G4bool fAllocatedLocator; 248 // Used to Intersection Locator 249 250 private: 251 252 G4VCurvedTrajectoryFilter* fpTrajectoryFilter; 253 // The filter encapsulates the algorithm which selects which 254 // intermediate points should be stored in a trajectory. 255 // When it is NULL, no intermediate points will be stored. 256 // Else PIF::ComputeStep must submit (all) intermediate 257 // points it calculates, to this filter. (jacek 04/11/2002) 293 258 }; 294 259
Note: See TracChangeset
for help on using the changeset viewer.