Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ITTransportation Class Reference

#include <G4ITTransportation.hh>

+ Inheritance diagram for G4ITTransportation:

Classes

struct  G4ITTransportationState
 

Public Member Functions

 G4ITTransportation (const G4String &aName="ITTransportation", G4int verbosityLevel=0)
 
virtual ~G4ITTransportation ()
 
 G4ITTransportation (const G4ITTransportation &)
 
virtual void BuildPhysicsTable (const G4ParticleDefinition &)
 
virtual void ComputeStep (const G4Track &, const G4Step &, const double timeStep, double &spaceStep)
 
virtual void StartTracking (G4Track *aTrack)
 
G4bool IsStepLimitedByGeometry ()
 
virtual G4double AtRestGetPhysicalInteractionLength (const G4Track &, G4ForceCondition *)
 
virtual G4VParticleChangeAtRestDoIt (const G4Track &, const G4Step &)
 
virtual G4double AlongStepGetPhysicalInteractionLength (const G4Track &track, G4double, G4double currentMinimumStep, G4double &currentSafety, G4GPILSelection *selection)
 
virtual G4double PostStepGetPhysicalInteractionLength (const G4Track &, G4double, G4ForceCondition *pForceCond)
 
virtual G4VParticleChangeAlongStepDoIt (const G4Track &track, const G4Step &stepData)
 
virtual G4VParticleChangePostStepDoIt (const G4Track &track, const G4Step &)
 
G4PropagatorInFieldGetPropagatorInField ()
 
void SetPropagatorInField (G4PropagatorInField *pFieldPropagator)
 
void SetVerboseLevel (G4int verboseLevel)
 
G4int GetVerboseLevel () const
 
G4double GetThresholdWarningEnergy () const
 
G4double GetThresholdImportantEnergy () const
 
G4int GetThresholdTrials () const
 
void SetThresholdWarningEnergy (G4double newEnWarn)
 
void SetThresholdImportantEnergy (G4double newEnImp)
 
void SetThresholdTrials (G4int newMaxTrials)
 
G4double GetMaxEnergyKilled () const
 
G4double GetSumEnergyKilled () const
 
void ResetKilledStatistics (G4int report=1)
 
void EnableShortStepOptimisation (G4bool optimise=true)
 
- Public Member Functions inherited from G4VITProcess
 G4VITProcess (const G4String &name, G4ProcessType type=fNotDefined)
 
virtual ~G4VITProcess ()
 
 G4VITProcess (const G4VITProcess &other)
 
G4VITProcessoperator= (const G4VITProcess &other)
 
G4bool operator== (const G4VITProcess &right) const
 
G4bool operator!= (const G4VITProcess &right) const
 
size_t GetProcessID () const
 
G4shared_ptr< G4ProcessState_LockGetProcessState ()
 
void SetProcessState (G4shared_ptr< G4ProcessState_Lock > aProcInfo)
 
void ResetProcessState ()
 
virtual void StartTracking (G4Track *)
 
virtual void BuildPhysicsTable (const G4ParticleDefinition &)
 
G4double GetInteractionTimeLeft ()
 
virtual void ResetNumberOfInteractionLengthLeft ()
 
G4bool ProposesTimeStep () const
 
- Public Member Functions inherited from G4VProcess
 G4VProcess (const G4String &aName="NoName", G4ProcessType aType=fNotDefined)
 
 G4VProcess (const G4VProcess &right)
 
virtual ~G4VProcess ()
 
G4VProcessoperator= (const G4VProcess &)=delete
 
G4bool operator== (const G4VProcess &right) const
 
G4bool operator!= (const G4VProcess &right) const
 
virtual G4VParticleChangePostStepDoIt (const G4Track &track, const G4Step &stepData)=0
 
virtual G4VParticleChangeAlongStepDoIt (const G4Track &track, const G4Step &stepData)=0
 
virtual G4VParticleChangeAtRestDoIt (const G4Track &track, const G4Step &stepData)=0
 
virtual G4double AlongStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &proposedSafety, G4GPILSelection *selection)=0
 
virtual G4double AtRestGetPhysicalInteractionLength (const G4Track &track, G4ForceCondition *condition)=0
 
virtual G4double PostStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)=0
 
G4double GetCurrentInteractionLength () const
 
void SetPILfactor (G4double value)
 
G4double GetPILfactor () const
 
G4double AlongStepGPIL (const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &proposedSafety, G4GPILSelection *selection)
 
G4double AtRestGPIL (const G4Track &track, G4ForceCondition *condition)
 
G4double PostStepGPIL (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
 
virtual G4bool IsApplicable (const G4ParticleDefinition &)
 
virtual void BuildPhysicsTable (const G4ParticleDefinition &)
 
virtual void PreparePhysicsTable (const G4ParticleDefinition &)
 
virtual G4bool StorePhysicsTable (const G4ParticleDefinition *, const G4String &, G4bool)
 
virtual G4bool RetrievePhysicsTable (const G4ParticleDefinition *, const G4String &, G4bool)
 
const G4StringGetPhysicsTableFileName (const G4ParticleDefinition *, const G4String &directory, const G4String &tableName, G4bool ascii=false)
 
const G4StringGetProcessName () const
 
G4ProcessType GetProcessType () const
 
void SetProcessType (G4ProcessType)
 
G4int GetProcessSubType () const
 
void SetProcessSubType (G4int)
 
virtual void StartTracking (G4Track *)
 
virtual void EndTracking ()
 
virtual void SetProcessManager (const G4ProcessManager *)
 
virtual const G4ProcessManagerGetProcessManager ()
 
virtual void ResetNumberOfInteractionLengthLeft ()
 
G4double GetNumberOfInteractionLengthLeft () const
 
G4double GetTotalNumberOfInteractionLengthTraversed () const
 
G4bool isAtRestDoItIsEnabled () const
 
G4bool isAlongStepDoItIsEnabled () const
 
G4bool isPostStepDoItIsEnabled () const
 
virtual void DumpInfo () const
 
virtual void ProcessDescription (std::ostream &outfile) const
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 
virtual void SetMasterProcess (G4VProcess *masterP)
 
const G4VProcessGetMasterProcess () const
 
virtual void BuildWorkerPhysicsTable (const G4ParticleDefinition &part)
 
virtual void PrepareWorkerPhysicsTable (const G4ParticleDefinition &)
 

Protected Member Functions

G4bool DoesGlobalFieldExist ()
 
void SetInstantiateProcessState (G4bool flag)
 
G4bool InstantiateProcessState ()
 
- Protected Member Functions inherited from G4VITProcess
void RetrieveProcessInfo ()
 
void CreateInfo ()
 
template<typename T >
T * GetState ()
 
virtual void SubtractNumberOfInteractionLengthLeft (G4double previousStepSize)
 
virtual void ClearInteractionTimeLeft ()
 
virtual void ClearNumberOfInteractionLengthLeft ()
 
void SetInstantiateProcessState (G4bool flag)
 
G4bool InstantiateProcessState ()
 
- Protected Member Functions inherited from G4VProcess
void SubtractNumberOfInteractionLengthLeft (G4double prevStepSize)
 
void ClearNumberOfInteractionLengthLeft ()
 

Protected Attributes

G4ITNavigator * fLinearNavigator
 
G4PropagatorInFieldfFieldPropagator
 
G4ParticleChangeForTransport fParticleChange
 
G4double fThreshold_Warning_Energy
 
G4double fThreshold_Important_Energy
 
G4int fThresholdTrials
 
G4double fUnimportant_Energy
 
G4double fSumEnergyKilled
 
G4double fMaxEnergyKilled
 
G4bool fShortStepOptimisation
 
G4ITSafetyHelperfpSafetyHelper
 
G4int fVerboseLevel
 
- Protected Attributes inherited from G4VITProcess
G4shared_ptr< G4ProcessStatefpState
 
G4bool fProposesTimeStep
 
- Protected Attributes inherited from G4VProcess
const G4ProcessManageraProcessManager = nullptr
 
G4VParticleChangepParticleChange = nullptr
 
G4ParticleChange aParticleChange
 
G4double theNumberOfInteractionLengthLeft = -1.0
 
G4double currentInteractionLength = -1.0
 
G4double theInitialNumberOfInteractionLength = -1.0
 
G4String theProcessName
 
G4String thePhysicsTableFileName
 
G4ProcessType theProcessType = fNotDefined
 
G4int theProcessSubType = -1
 
G4double thePILfactor = 1.0
 
G4int verboseLevel = 0
 
G4bool enableAtRestDoIt = true
 
G4bool enableAlongStepDoIt = true
 
G4bool enablePostStepDoIt = true
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VITProcess
static const size_t & GetMaxProcessIndex ()
 
- Static Public Member Functions inherited from G4VProcess
static const G4StringGetProcessTypeName (G4ProcessType)
 

Detailed Description

Definition at line 73 of file G4ITTransportation.hh.

Constructor & Destructor Documentation

◆ G4ITTransportation() [1/2]

G4ITTransportation::G4ITTransportation ( const G4String aName = "ITTransportation",
G4int  verbosityLevel = 0 
)

Definition at line 95 of file G4ITTransportation.cc.

95 :
100 fUnimportant_Energy(1 * MeV), // Not used
101 fSumEnergyKilled(0.0),
102 fMaxEnergyKilled(0.0),
103 fShortStepOptimisation(false), // Old default: true (=fast short steps)
104 fVerboseLevel(verbose)
105{
107 G4TransportationManager* transportMgr;
109 G4ITTransportationManager* ITtransportMgr;
111 fLinearNavigator = ITtransportMgr->GetNavigatorForTracking();
112 fFieldPropagator = transportMgr->GetPropagatorInField();
113 fpSafetyHelper = ITtransportMgr->GetSafetyHelper(); // New
114
115 // Cannot determine whether a field exists here, as it would
116 // depend on the relative order of creating the detector's
117 // field and this process. That order is not guaranted.
118 // Instead later the method DoesGlobalFieldExist() is called
119
120 enableAtRestDoIt = false;
121 enableAlongStepDoIt = true;
122 enablePostStepDoIt = true;
126 fInstantiateProcessState = true;
127
128 G4VITProcess::fpState.reset(new G4ITTransportationState());
129 /*
130 if(fTransportationState == 0)
131 {
132 G4cout << "KILL in G4ITTransportation::G4ITTransportation" << G4endl;
133 abort();
134 }
135 */
136}
@ fTransportation
static G4ITTransportationManager * GetTransportationManager()
G4ITNavigator * GetNavigatorForTracking() const
G4ITSafetyHelper * GetSafetyHelper() const
G4ParticleChangeForTransport fParticleChange
G4double fThreshold_Important_Energy
void SetInstantiateProcessState(G4bool flag)
G4PropagatorInField * fFieldPropagator
G4ITSafetyHelper * fpSafetyHelper
G4ITNavigator * fLinearNavigator
static G4TransportationManager * GetTransportationManager()
G4PropagatorInField * GetPropagatorInField() const
void SetInstantiateProcessState(G4bool flag)
G4shared_ptr< G4ProcessState > fpState
G4bool enableAtRestDoIt
Definition: G4VProcess.hh:359
G4bool enableAlongStepDoIt
Definition: G4VProcess.hh:360
void SetProcessSubType(G4int)
Definition: G4VProcess.hh:406
G4bool enablePostStepDoIt
Definition: G4VProcess.hh:361
G4VParticleChange * pParticleChange
Definition: G4VProcess.hh:321

◆ ~G4ITTransportation()

G4ITTransportation::~G4ITTransportation ( )
virtual

Definition at line 214 of file G4ITTransportation.cc.

215{
216#ifdef G4VERBOSE
217 if ((fVerboseLevel > 0) && (fSumEnergyKilled > 0.0))
218 {
219 G4cout << " G4ITTransportation: Statistics for looping particles "
220 << G4endl;
221 G4cout << " Sum of energy of loopers killed: "
223 G4cout << " Max energy of loopers killed: "
225 }
226#endif
227}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout

◆ G4ITTransportation() [2/2]

G4ITTransportation::G4ITTransportation ( const G4ITTransportation right)

Definition at line 138 of file G4ITTransportation.cc.

138 :
139 G4VITProcess(right)
140{
141 // Copy attributes
150
151 // Setup Navigators
152 G4TransportationManager* transportMgr;
154 G4ITTransportationManager* ITtransportMgr;
156 fLinearNavigator = ITtransportMgr->GetNavigatorForTracking();
157 fFieldPropagator = transportMgr->GetPropagatorInField();
158 fpSafetyHelper = ITtransportMgr->GetSafetyHelper(); // New
159
160 // Cannot determine whether a field exists here, as it would
161 // depend on the relative order of creating the detector's
162 // field and this process. That order is not guaranted.
163 // Instead later the method DoesGlobalFieldExist() is called
164
165 enableAtRestDoIt = false;
166 enableAlongStepDoIt = true;
167 enablePostStepDoIt = true;
168
172 fInstantiateProcessState = right.fInstantiateProcessState;
173}

Member Function Documentation

◆ AlongStepDoIt()

G4VParticleChange * G4ITTransportation::AlongStepDoIt ( const G4Track track,
const G4Step stepData 
)
virtual

!!!!!!! A REVOIR !!!!


Implements G4VProcess.

Reimplemented in G4DNABrownianTransportation.

Definition at line 688 of file G4ITTransportation.cc.

690{
691
692#if defined (DEBUG_MEM)
693 MemStat mem_first, mem_second, mem_diff;
694#endif
695
696#if defined (DEBUG_MEM)
697 mem_first = MemoryUsage();
698#endif
699
701
702 // G4cout << "G4ITTransportation::AlongStepDoIt" << G4endl;
703 // set pdefOpticalPhoton
704 // Andrea Dotti: the following statement should be in a single line:
705 // G4-MT transformation tools get confused if statement spans two lines
706 // If needed contact: [email protected]
707 static G4ThreadLocal G4ParticleDefinition* pdefOpticalPhoton = 0;
708 if (!pdefOpticalPhoton) pdefOpticalPhoton =
709 G4ParticleTable::GetParticleTable()->FindParticle("opticalphoton");
710
711 static G4ThreadLocal G4int noCalls = 0;
712 noCalls++;
713
714 fParticleChange.Initialize(track);
715
716 // Code for specific process
717 //
718 fParticleChange.ProposePosition(State(fTransportEndPosition));
719 fParticleChange.ProposeMomentumDirection(State(fTransportEndMomentumDir));
720 fParticleChange.ProposeEnergy(State(fTransportEndKineticEnergy));
721 fParticleChange.SetMomentumChanged(State(fMomentumChanged));
722
723 fParticleChange.ProposePolarization(State(fTransportEndSpin));
724
725 G4double deltaTime = 0.0;
726
727 // Calculate Lab Time of Flight (ONLY if field Equations used it!)
728 // G4double endTime = State(fCandidateEndGlobalTime);
729 // G4double delta_time = endTime - startTime;
730
731 G4double startTime = track.GetGlobalTime();
732 ///___________________________________________________________________________
733 /// !!!!!!!
734 /// A REVOIR !!!!
735 if (State(fEndGlobalTimeComputed) == false)
736 {
737 // The time was not integrated .. make the best estimate possible
738 //
739 G4double initialVelocity = stepData.GetPreStepPoint()->GetVelocity();
740 G4double stepLength = track.GetStepLength();
741
742 deltaTime = 0.0; // in case initialVelocity = 0
743 if (track.GetParticleDefinition() == pdefOpticalPhoton)
744 {
745 // For only Optical Photon, final velocity is used
746 double finalVelocity = track.CalculateVelocityForOpticalPhoton();
747 fParticleChange.ProposeVelocity(finalVelocity);
748 deltaTime = stepLength / finalVelocity;
749 }
750 else if (initialVelocity > 0.0)
751 {
752 deltaTime = stepLength / initialVelocity;
753 }
754
755 State(fCandidateEndGlobalTime) = startTime + deltaTime;
756 }
757 else
758 {
759 deltaTime = State(fCandidateEndGlobalTime) - startTime;
760 }
761
762 fParticleChange.ProposeGlobalTime(State(fCandidateEndGlobalTime));
763 fParticleChange.ProposeLocalTime(track.GetLocalTime() + deltaTime);
764 /*
765 // Now Correct by Lorentz factor to get delta "proper" Time
766
767 G4double restMass = track.GetDynamicParticle()->GetMass() ;
768 G4double deltaProperTime = deltaTime*( restMass/track.GetTotalEnergy() ) ;
769
770 fParticleChange.ProposeProperTime(track.GetProperTime() + deltaProperTime) ;
771 */
772
773 fParticleChange.ProposeTrueStepLength(track.GetStepLength());
774
775 ///___________________________________________________________________________
776 ///
777
778 // If the particle is caught looping or is stuck (in very difficult
779 // boundaries) in a magnetic field (doing many steps)
780 // THEN this kills it ...
781 //
782 if (State(fParticleIsLooping))
783 {
784 G4double endEnergy = State(fTransportEndKineticEnergy);
785
786 if ((endEnergy < fThreshold_Important_Energy) || (State(fNoLooperTrials)
788 {
789 // Kill the looping particle
790 //
791 // G4cout << "G4ITTransportation will killed the molecule"<< G4endl;
793
794 // 'Bare' statistics
795 fSumEnergyKilled += endEnergy;
796 if (endEnergy > fMaxEnergyKilled)
797 {
798 fMaxEnergyKilled = endEnergy;
799 }
800
801#ifdef G4VERBOSE
802 if ((fVerboseLevel > 1) || (endEnergy > fThreshold_Warning_Energy))
803 {
804 G4cout
805 << " G4ITTransportation is killing track that is looping or stuck "
806 << G4endl<< " This track has " << track.GetKineticEnergy() / MeV
807 << " MeV energy." << G4endl;
808 G4cout << " Number of trials = " << State(fNoLooperTrials)
809 << " No of calls to AlongStepDoIt = " << noCalls
810 << G4endl;
811 }
812#endif
813 State(fNoLooperTrials) = 0;
814 }
815 else
816 {
817 State(fNoLooperTrials)++;
818#ifdef G4VERBOSE
819 if ((fVerboseLevel > 2))
820 {
821 G4cout << " G4ITTransportation::AlongStepDoIt(): Particle looping - "
822 << " Number of trials = " << State(fNoLooperTrials)
823 << " No of calls to = " << noCalls << G4endl;
824 }
825#endif
826 }
827 }
828 else
829 {
830 State(fNoLooperTrials)=0;
831 }
832
833 // Another (sometimes better way) is to use a user-limit maximum Step size
834 // to alleviate this problem ..
835
836 // Introduce smooth curved trajectories to particle-change
837 //
840
841#if defined (DEBUG_MEM)
842 mem_second = MemoryUsage();
843 mem_diff = mem_second-mem_first;
844 G4cout << "\t || MEM || End of G4ITTransportation::AlongStepDoIt, diff is: "
845 << mem_diff << G4endl;
846#endif
847
848 return &fParticleChange;
849}
#define State(X)
#define PrepareState()
@ fStopAndKill
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
void SetPointerToVectorOfAuxiliaryPoints(std::vector< G4ThreeVector > *vec)
void ProposeLocalTime(G4double t)
void ProposeVelocity(G4double finalVelocity)
void ProposeGlobalTime(G4double t)
std::vector< G4ThreeVector > * GimmeTrajectoryVectorAndForgetIt() const
G4double GetVelocity() const
G4StepPoint * GetPreStepPoint() const
void ProposeTrackStatus(G4TrackStatus status)
void ProposeTrueStepLength(G4double truePathLength)
MemStat MemoryUsage()
Definition: G4MemStat.cc:55
#define G4ThreadLocal
Definition: tls.hh:77

Referenced by G4DNABrownianTransportation::AlongStepDoIt().

◆ AlongStepGetPhysicalInteractionLength()

G4double G4ITTransportation::AlongStepGetPhysicalInteractionLength ( const G4Track track,
G4double  ,
G4double  currentMinimumStep,
G4double currentSafety,
G4GPILSelection selection 
)
virtual

Implements G4VProcess.

Reimplemented in G4DNABrownianTransportation.

Definition at line 251 of file G4ITTransportation.cc.

257{
259 G4double geometryStepLength(-1.0), newSafety(-1.0);
260
261 State(fParticleIsLooping) = false;
262 State(fEndGlobalTimeComputed) = false;
263 State(fGeometryLimitedStep) = false;
264
265 // Initial actions moved to StartTrack()
266 // --------------------------------------
267 // Note: in case another process changes touchable handle
268 // it will be necessary to add here (for all steps)
269 // State(fCurrentTouchableHandle) = track.GetTouchableHandle();
270
271 // GPILSelection is set to defaule value of CandidateForSelection
272 // It is a return value
273 //
274 *selection = CandidateForSelection;
275
276 // Get initial Energy/Momentum of the track
277 //
278 const G4DynamicParticle* pParticle = track.GetDynamicParticle();
279// const G4ParticleDefinition* pParticleDef = pParticle->GetDefinition() ;
280 G4ThreeVector startMomentumDir = pParticle->GetMomentumDirection();
281 G4ThreeVector startPosition = track.GetPosition();
282
283 // G4double theTime = track.GetGlobalTime() ;
284
285 // The Step Point safety can be limited by other geometries and/or the
286 // assumptions of any process - it's not always the geometrical safety.
287 // We calculate the starting point's isotropic safety here.
288 //
289 G4ThreeVector OriginShift = startPosition - State(fPreviousSftOrigin);
290 G4double MagSqShift = OriginShift.mag2();
291 if (MagSqShift >= sqr(State(fPreviousSafety)))
292 {
293 currentSafety = 0.0;
294 }
295 else
296 {
297 currentSafety = State(fPreviousSafety) - std::sqrt(MagSqShift);
298 }
299
300 // Is the particle charged ?
301 //
302 G4double particleCharge = pParticle->GetCharge();
303
304 // There is no need to locate the current volume. It is Done elsewhere:
305 // On track construction
306 // By the tracking, after all AlongStepDoIts, in "Relocation"
307
308 // Check whether the particle have an (EM) field force exerting upon it
309 //
310 G4FieldManager* fieldMgr = 0;
311 G4bool fieldExertsForce = false;
312 if ((particleCharge != 0.0))
313 {
315 if (fieldMgr != 0)
316 {
317 // Message the field Manager, to configure it for this track
318 fieldMgr->ConfigureForTrack(&track);
319 // Moved here, in order to allow a transition
320 // from a zero-field status (with fieldMgr->(field)0
321 // to a finite field status
322
323 // If the field manager has no field, there is no field !
324 fieldExertsForce = (fieldMgr->GetDetectorField() != 0);
325 }
326 }
327
328 // G4cout << " G4Transport: field exerts force= " << fieldExertsForce
329 // << " fieldMgr= " << fieldMgr << G4endl;
330
331 // Choose the calculation of the transportation: Field or not
332 //
333 if (!fieldExertsForce)
334 {
335 G4double linearStepLength;
336 if (fShortStepOptimisation && (currentMinimumStep <= currentSafety))
337 {
338 // The Step is guaranteed to be taken
339 //
340 geometryStepLength = currentMinimumStep;
341 State(fGeometryLimitedStep) = false;
342 }
343 else
344 {
345 // Find whether the straight path intersects a volume
346 //
347 // fLinearNavigator->SetNavigatorState(GetIT(track)->GetTrackingInfo()->GetNavigatorState());
348 linearStepLength = fLinearNavigator->ComputeStep(startPosition,
349 startMomentumDir,
350 currentMinimumStep,
351 newSafety);
352
353// G4cout << "linearStepLength : " << G4BestUnit(linearStepLength,"Length")
354// << " | currentMinimumStep: " << currentMinimumStep
355// << " | trackID: " << track.GetTrackID() << G4endl;
356
357 // Remember last safety origin & value.
358 //
359 State(fPreviousSftOrigin) = startPosition;
360 State(fPreviousSafety) = newSafety;
361
362 G4TrackStateManager& trackStateMan = GetIT(track)->GetTrackingInfo()
364 fpSafetyHelper->LoadTrackState(trackStateMan);
365 // fpSafetyHelper->SetTrackState(state);
367 State(fTransportEndPosition));
369
370 // The safety at the initial point has been re-calculated:
371 //
372 currentSafety = newSafety;
373
374 State(fGeometryLimitedStep) = (linearStepLength <= currentMinimumStep);
375 if (State(fGeometryLimitedStep))
376 {
377 // The geometry limits the Step size (an intersection was found.)
378 geometryStepLength = linearStepLength;
379 }
380 else
381 {
382 // The full Step is taken.
383 geometryStepLength = currentMinimumStep;
384 }
385 }
386 State(fEndPointDistance) = geometryStepLength;
387
388 // Calculate final position
389 //
390 State(fTransportEndPosition) = startPosition
391 + geometryStepLength * startMomentumDir;
392
393 // Momentum direction, energy and polarisation are unchanged by transport
394 //
395 State(fTransportEndMomentumDir) = startMomentumDir;
396 State(fTransportEndKineticEnergy) = track.GetKineticEnergy();
397 State(fTransportEndSpin) = track.GetPolarization();
398 State(fParticleIsLooping) = false;
399 State(fMomentumChanged) = false;
400 State(fEndGlobalTimeComputed) = true;
401 State(theInteractionTimeLeft) = State(fEndPointDistance)
402 / track.GetVelocity();
403 State(fCandidateEndGlobalTime) = State(theInteractionTimeLeft)
404 + track.GetGlobalTime();
405/*
406 G4cout << "track.GetVelocity() : "
407 << track.GetVelocity() << G4endl;
408 G4cout << "State(endpointDistance) : "
409 << G4BestUnit(State(endpointDistance),"Length") << G4endl;
410 G4cout << "State(theInteractionTimeLeft) : "
411 << G4BestUnit(State(theInteractionTimeLeft),"Time") << G4endl;
412 G4cout << "track.GetGlobalTime() : "
413 << G4BestUnit(track.GetGlobalTime(),"Time") << G4endl;
414*/
415 }
416 else // A field exerts force
417 {
418
419 G4ExceptionDescription exceptionDescription;
420 exceptionDescription
421 << "ITTransportation does not support external fields.";
422 exceptionDescription
423 << " If you are dealing with a tradiational MC simulation, ";
424 exceptionDescription << "please use G4Transportation.";
425
426 G4Exception("G4ITTransportation::AlongStepGetPhysicalInteractionLength",
427 "NoExternalFieldSupport", FatalException, exceptionDescription);
428 /*
429 G4double momentumMagnitude = pParticle->GetTotalMomentum() ;
430 // G4ThreeVector EndUnitMomentum ;
431 G4double lengthAlongCurve ;
432 G4double restMass = pParticleDef->GetPDGMass() ;
433
434 fFieldPropagator->SetChargeMomentumMass( particleCharge, // in e+ units
435 momentumMagnitude, // in Mev/c
436 restMass ) ;
437
438 G4ThreeVector spin = track.GetPolarization() ;
439 G4FieldTrack aFieldTrack = G4FieldTrack( startPosition,
440 track.GetMomentumDirection(),
441 0.0,
442 track.GetKineticEnergy(),
443 restMass,
444 track.GetVelocity(),
445 track.GetGlobalTime(), // Lab.
446 track.GetProperTime(), // Part.
447 &spin ) ;
448 if( currentMinimumStep > 0 )
449 {
450 // Do the Transport in the field (non recti-linear)
451 //
452 lengthAlongCurve = fFieldPropagator->ComputeStep( aFieldTrack,
453 currentMinimumStep,
454 currentSafety,
455 track.GetVolume() ) ;
456 State(fGeometryLimitedStep)= lengthAlongCurve < currentMinimumStep;
457 if( State(fGeometryLimitedStep) )
458 {
459 geometryStepLength = lengthAlongCurve ;
460 }
461 else
462 {
463 geometryStepLength = currentMinimumStep ;
464 }
465
466 // Remember last safety origin & value.
467 //
468 State(fPreviousSftOrigin) = startPosition ;
469 State(fPreviousSafety) = currentSafety ;
470 fpSafetyHelper->SetCurrentSafety( newSafety, startPosition);
471 }
472 else
473 {
474 geometryStepLength = lengthAlongCurve= 0.0 ;
475 State(fGeometryLimitedStep) = false ;
476 }
477
478 // Get the End-Position and End-Momentum (Dir-ection)
479 //
480 State(fTransportEndPosition) = aFieldTrack.GetPosition() ;
481
482 // Momentum: Magnitude and direction can be changed too now ...
483 //
484 State(fMomentumChanged) = true ;
485 State(fTransportEndMomentumDir) = aFieldTrack.GetMomentumDir() ;
486
487 State(fTransportEndKineticEnergy) = aFieldTrack.GetKineticEnergy() ;
488
489 if( fFieldPropagator->GetCurrentFieldManager()->DoesFieldChangeEnergy() )
490 {
491 // If the field can change energy, then the time must be integrated
492 // - so this should have been updated
493 //
494 State(fCandidateEndGlobalTime) = aFieldTrack.GetLabTimeOfFlight();
495 State(fEndGlobalTimeComputed) = true;
496
497 State(theInteractionTimeLeft) = State(fCandidateEndGlobalTime) -
498 track.GetGlobalTime() ;
499
500 // was ( State(fCandidateEndGlobalTime) != track.GetGlobalTime() );
501 // a cleaner way is to have FieldTrack knowing whether time is updated.
502 }
503 else
504 {
505 // The energy should be unchanged by field transport,
506 // - so the time changed will be calculated elsewhere
507 //
508 State(fEndGlobalTimeComputed) = false;
509
510 // Check that the integration preserved the energy
511 // - and if not correct this!
512 G4double startEnergy= track.GetKineticEnergy();
513 G4double endEnergy= State(fTransportEndKineticEnergy);
514
515 static G4int no_inexact_steps=0, no_large_ediff;
516 G4double absEdiff = std::fabs(startEnergy- endEnergy);
517 if( absEdiff > perMillion * endEnergy )
518 {
519 no_inexact_steps++;
520 // Possible statistics keeping here ...
521 }
522 #ifdef G4VERBOSE
523 if( fVerboseLevel > 1 )
524 {
525 if( std::fabs(startEnergy- endEnergy) > perThousand * endEnergy )
526 {
527 static G4int no_warnings= 0, warnModulo=1, moduloFactor= 10;
528 no_large_ediff ++;
529 if( (no_large_ediff% warnModulo) == 0 )
530 {
531 no_warnings++;
532 G4cout << "WARNING - G4Transportation::AlongStepGetPIL() "
533 << " Energy change in Step is above 1^-3 relative value. " << G4endl
534 << " Relative change in 'tracking' step = "
535 << std::setw(15) << (endEnergy-startEnergy)/startEnergy << G4endl
536 << " Starting E= " << std::setw(12) << startEnergy / MeV << " MeV "
537 << G4endl
538 << " Ending E= " << std::setw(12) << endEnergy / MeV << " MeV "
539 << G4endl;
540 G4cout << " Energy has been corrected -- however, review"
541 << " field propagation parameters for accuracy." << G4endl;
542 if( (fVerboseLevel > 2 ) || (no_warnings<4) ||
543 (no_large_ediff == warnModulo * moduloFactor) )
544 {
545 G4cout << " These include EpsilonStepMax(/Min) in G4FieldManager "
546 << " which determine fractional error per step for integrated quantities. "
547 << G4endl
548 << " Note also the influence of the permitted number of integration steps."
549 << G4endl;
550 }
551 G4cerr << "ERROR - G4Transportation::AlongStepGetPIL()" << G4endl
552 << " Bad 'endpoint'. Energy change detected"
553 << " and corrected. "
554 << " Has occurred already "
555 << no_large_ediff << " times." << G4endl;
556 if( no_large_ediff == warnModulo * moduloFactor )
557 {
558 warnModulo *= moduloFactor;
559 }
560 }
561 }
562 } // end of if (fVerboseLevel)
563 #endif
564 // Correct the energy for fields that conserve it
565 // This - hides the integration error
566 // - but gives a better physical answer
567 State(fTransportEndKineticEnergy)= track.GetKineticEnergy();
568 }
569
570 State(fTransportEndSpin) = aFieldTrack.GetSpin();
571 State(fParticleIsLooping) = fFieldPropagator->IsParticleLooping() ;
572 State(endpointDistance) = (State(fTransportEndPosition) -
573 startPosition).mag() ;
574 // State(theInteractionTimeLeft) =
575 track.GetVelocity()/State(endpointDistance) ;
576 */
577 }
578
579 // If we are asked to go a step length of 0, and we are on a boundary
580 // then a boundary will also limit the step -> we must flag this.
581 //
582 if (currentMinimumStep == 0.0)
583 {
584 if (currentSafety == 0.0)
585 {
586 State(fGeometryLimitedStep) = true;
587// G4cout << "!!!! Safety is NULL, on the Boundary !!!!!" << G4endl;
588// G4cout << " Track position : " << track.GetPosition() /nanometer
589// << G4endl;
590 }
591 }
592
593 // Update the safety starting from the end-point,
594 // if it will become negative at the end-point.
595 //
596 if (currentSafety < State(fEndPointDistance))
597 {
598 // if( particleCharge == 0.0 )
599 // G4cout << " Avoiding call to ComputeSafety : charge = 0.0 " << G4endl;
600
601 if (particleCharge != 0.0)
602 {
603
604 G4double endSafety = fLinearNavigator->ComputeSafety(
605 State(fTransportEndPosition));
606 currentSafety = endSafety;
607 State(fPreviousSftOrigin) = State(fTransportEndPosition);
608 State(fPreviousSafety) = currentSafety;
609
610 /*
611 G4VTrackStateHandle state =
612 GetIT(track)->GetTrackingInfo()->GetTrackState(fpSafetyHelper);
613 */
614 G4TrackStateManager& trackStateMan = GetIT(track)->GetTrackingInfo()
616 fpSafetyHelper->LoadTrackState(trackStateMan);
617 // fpSafetyHelper->SetTrackState(state);
618 fpSafetyHelper->SetCurrentSafety(currentSafety,
619 State(fTransportEndPosition));
621
622 // Because the Stepping Manager assumes it is from the start point,
623 // add the StepLength
624 //
625 currentSafety += State(fEndPointDistance);
626
627#ifdef G4DEBUG_TRANSPORT
628 G4cout.precision(12);
629 G4cout << "***G4Transportation::AlongStepGPIL ** " << G4endl;
630 G4cout << " Called Navigator->ComputeSafety at "
631 << State(fTransportEndPosition)
632 << " and it returned safety= " << endSafety << G4endl;
633 G4cout << " Adding endpoint distance " << State(fEndPointDistance)
634 << " to obtain pseudo-safety= " << currentSafety << G4endl;
635#endif
636 }
637 }
638
639 // fParticleChange.ProposeTrueStepLength(geometryStepLength) ;
640
641// G4cout << "G4ITTransportation::AlongStepGetPhysicalInteractionLength = "
642// << G4BestUnit(geometryStepLength,"Length") << G4endl;
643
644 return geometryStepLength;
645}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40
@ CandidateForSelection
#define fPreviousSftOrigin
#define fPreviousSafety
G4IT * GetIT(const G4Track *track)
Definition: G4IT.cc:48
bool G4bool
Definition: G4Types.hh:86
virtual void ConfigureForTrack(const G4Track *)
const G4Field * GetDetectorField() const
void SetCurrentSafety(G4double val, const G4ThreeVector &pos)
G4TrackingInformation * GetTrackingInfo()
Definition: G4IT.hh:143
G4FieldManager * FindAndSetFieldManager(G4VPhysicalVolume *pCurrentPhysVol)
virtual void LoadTrackState(G4TrackStateManager &manager)
virtual void ResetTrackState()
G4double GetVelocity() const
G4VPhysicalVolume * GetVolume() const
G4double GetGlobalTime() const
G4double GetKineticEnergy() const
const G4ThreeVector & GetPolarization() const
G4TrackStateManager & GetTrackStateManager()
T sqr(const T &x)
Definition: templates.hh:128

Referenced by G4DNABrownianTransportation::AlongStepGetPhysicalInteractionLength().

◆ AtRestDoIt()

virtual G4VParticleChange * G4ITTransportation::AtRestDoIt ( const G4Track ,
const G4Step  
)
inlinevirtual

Implements G4VProcess.

Definition at line 113 of file G4ITTransportation.hh.

114 {
115 return 0;
116 }

◆ AtRestGetPhysicalInteractionLength()

virtual G4double G4ITTransportation::AtRestGetPhysicalInteractionLength ( const G4Track ,
G4ForceCondition  
)
inlinevirtual

Implements G4VProcess.

Definition at line 106 of file G4ITTransportation.hh.

108 {
109 return -1.0;
110 }

◆ BuildPhysicsTable()

void G4ITTransportation::BuildPhysicsTable ( const G4ParticleDefinition )
virtual

Reimplemented from G4VITProcess.

Reimplemented in G4DNABrownianTransportation.

Definition at line 229 of file G4ITTransportation.cc.

Referenced by G4DNABrownianTransportation::BuildPhysicsTable().

◆ ComputeStep()

void G4ITTransportation::ComputeStep ( const G4Track track,
const G4Step ,
const double  timeStep,
double &  spaceStep 
)
virtual

Reimplemented in G4DNABrownianTransportation.

Definition at line 647 of file G4ITTransportation.cc.

651{
653 const G4DynamicParticle* pParticle = track.GetDynamicParticle();
654 G4ThreeVector startMomentumDir = pParticle->GetMomentumDirection();
655 G4ThreeVector startPosition = track.GetPosition();
656
657 track.CalculateVelocity();
658 G4double initialVelocity = track.GetVelocity();
659
660 State(fGeometryLimitedStep) = false;
661
662 /////////////////////////
663 // !!! CASE NO FIELD !!!
664 /////////////////////////
665 State(fCandidateEndGlobalTime) = timeStep + track.GetGlobalTime();
666 State(fEndGlobalTimeComputed) = true;
667
668 // Choose the calculation of the transportation: Field or not
669 //
670 if (!State(fMomentumChanged))
671 {
672 // G4cout << "Momentum has not changed" << G4endl;
673 fParticleChange.ProposeVelocity(initialVelocity);
674 oPhysicalStep = initialVelocity * timeStep;
675
676 // Calculate final position
677 //
678 State(fTransportEndPosition) = startPosition
679 + oPhysicalStep * startMomentumDir;
680 }
681}

Referenced by G4ITStepProcessor::DoDefinePhysicalStepLength(), and G4ITStepProcessor::FindTransportationStep().

◆ DoesGlobalFieldExist()

G4bool G4ITTransportation::DoesGlobalFieldExist ( )
protected

Definition at line 234 of file G4ITTransportation.cc.

235{
236 G4TransportationManager* transportMgr;
238
239 // fFieldExists= transportMgr->GetFieldManager()->DoesFieldExist();
240 // return fFieldExists;
241 return transportMgr->GetFieldManager()->DoesFieldExist();
242}
G4bool DoesFieldExist() const
G4FieldManager * GetFieldManager() const

Referenced by StartTracking().

◆ EnableShortStepOptimisation()

void G4ITTransportation::EnableShortStepOptimisation ( G4bool  optimise = true)
inline

◆ GetMaxEnergyKilled()

G4double G4ITTransportation::GetMaxEnergyKilled ( ) const
inline

◆ GetPropagatorInField()

G4PropagatorInField * G4ITTransportation::GetPropagatorInField ( )

◆ GetSumEnergyKilled()

G4double G4ITTransportation::GetSumEnergyKilled ( ) const
inline

◆ GetThresholdImportantEnergy()

G4double G4ITTransportation::GetThresholdImportantEnergy ( ) const
inline

◆ GetThresholdTrials()

G4int G4ITTransportation::GetThresholdTrials ( ) const
inline

◆ GetThresholdWarningEnergy()

G4double G4ITTransportation::GetThresholdWarningEnergy ( ) const
inline

◆ GetVerboseLevel()

G4int G4ITTransportation::GetVerboseLevel ( ) const
inline

◆ InstantiateProcessState()

G4bool G4ITTransportation::InstantiateProcessState ( )
inlineprotected

Definition at line 259 of file G4ITTransportation.hh.

260 {
261 return fInstantiateProcessState;
262 }

◆ IsStepLimitedByGeometry()

G4bool G4ITTransportation::IsStepLimitedByGeometry ( )
inline

Definition at line 97 of file G4ITTransportation.hh.

98 {
99 return GetState<G4ITTransportationState>()->fGeometryLimitedStep;
100 }

◆ PostStepDoIt()

G4VParticleChange * G4ITTransportation::PostStepDoIt ( const G4Track track,
const G4Step  
)
virtual

Implements G4VProcess.

Reimplemented in G4DNABrownianTransportation.

Definition at line 870 of file G4ITTransportation.cc.

872{
873 // G4cout << "G4ITTransportation::PostStepDoIt" << G4endl;
874
876 G4TouchableHandle retCurrentTouchable; // The one to return
877 G4bool isLastStep = false;
878
879 // Initialize ParticleChange (by setting all its members equal
880 // to corresponding members in G4Track)
881 fParticleChange.Initialize(track); // To initialise TouchableChange
882
883 fParticleChange.ProposeTrackStatus(track.GetTrackStatus());
884
885 // If the Step was determined by the volume boundary,
886 // logically relocate the particle
887
888 if (State(fGeometryLimitedStep))
889 {
890
891 if(fVerboseLevel)
892 {
893 G4cout << "Step is limited by geometry "
894 << "track ID : " << track.GetTrackID() << G4endl;
895 }
896
897 // fCurrentTouchable will now become the previous touchable,
898 // and what was the previous will be freed.
899 // (Needed because the preStepPoint can point to the previous touchable)
900
901 if ( State(fCurrentTouchableHandle)->GetVolume() == 0)
902 {
903 G4ExceptionDescription exceptionDescription;
904 exceptionDescription << "No current touchable found ";
905 G4Exception(" G4ITTransportation::PostStepDoIt", "G4ITTransportation001",
906 FatalErrorInArgument, exceptionDescription);
907 }
908
909 fLinearNavigator->SetGeometricallyLimitedStep();
910 fLinearNavigator->LocateGlobalPointAndUpdateTouchableHandle(
911 track.GetPosition(), track.GetMomentumDirection(),
912 State(fCurrentTouchableHandle), true);
913 // Check whether the particle is out of the world volume
914 // If so it has exited and must be killed.
915 //
916 if ( State(fCurrentTouchableHandle)->GetVolume() == 0)
917 {
918 // abort();
919#ifdef G4VERBOSE
920 if (fVerboseLevel > 0)
921 {
922 G4cout << "Track position : " << track.GetPosition() / nanometer
923 << " [nm]" << " Track ID : " << track.GetTrackID() << G4endl;
924 G4cout << "G4ITTransportation will killed the track because "
925 "State(fCurrentTouchableHandle)->GetVolume() == 0"<< G4endl;
926 }
927#endif
929 }
930
931 retCurrentTouchable = State(fCurrentTouchableHandle);
932
933// G4cout << "Current volume : " << track.GetVolume()->GetName()
934// << " Next volume : "
935// << (State(fCurrentTouchableHandle)->GetVolume() ?
936// State(fCurrentTouchableHandle)->GetVolume()->GetName():"OutWorld")
937// << " Position : " << track.GetPosition() / nanometer
938// << " track ID : " << track.GetTrackID()
939// << G4endl;
940
941 fParticleChange.SetTouchableHandle(State(fCurrentTouchableHandle));
942
943 // Update the Step flag which identifies the Last Step in a volume
944 isLastStep = fLinearNavigator->ExitedMotherVolume()
945 | fLinearNavigator->EnteredDaughterVolume();
946
947#ifdef G4DEBUG_TRANSPORT
948 // Checking first implementation of flagging Last Step in Volume
949 G4bool exiting = fLinearNavigator->ExitedMotherVolume();
950 G4bool entering = fLinearNavigator->EnteredDaughterVolume();
951
952 if( ! (exiting || entering) )
953 {
954 G4cout << " Transport> : Proposed isLastStep= " << isLastStep
955 << " Exiting " << fLinearNavigator->ExitedMotherVolume()
956 << " Entering " << fLinearNavigator->EnteredDaughterVolume()
957 << " Track position : " << track.GetPosition() /nanometer << " [nm]"
958 << G4endl;
959 G4cout << " Track position : " << track.GetPosition() /nanometer
960 << G4endl;
961 }
962#endif
963 }
964 else // fGeometryLimitedStep is false
965 {
966 // This serves only to move the Navigator's location
967 //
968// abort();
969 fLinearNavigator->LocateGlobalPointWithinVolume(track.GetPosition());
970
971 // The value of the track's current Touchable is retained.
972 // (and it must be correct because we must use it below to
973 // overwrite the (unset) one in particle change)
974 // It must be fCurrentTouchable too ??
975 //
976 fParticleChange.SetTouchableHandle(track.GetTouchableHandle());
977 retCurrentTouchable = track.GetTouchableHandle();
978
979 isLastStep = false;
980#ifdef G4DEBUG_TRANSPORT
981 // Checking first implementation of flagging Last Step in Volume
982 G4cout << " Transport> Proposed isLastStep= " << isLastStep
983 << " Geometry did not limit step. Position : "
984 << track.GetPosition()/ nanometer << G4endl;
985#endif
986 } // endif ( fGeometryLimitedStep )
987
989
990 const G4VPhysicalVolume* pNewVol = retCurrentTouchable->GetVolume();
991 const G4Material* pNewMaterial = 0;
992 const G4VSensitiveDetector* pNewSensitiveDetector = 0;
993
994 if (pNewVol != 0)
995 {
996 pNewMaterial = pNewVol->GetLogicalVolume()->GetMaterial();
997 pNewSensitiveDetector = pNewVol->GetLogicalVolume()->GetSensitiveDetector();
998 }
999
1000 // ( <const_cast> pNewMaterial ) ;
1001 // ( <const_cast> pNewSensitiveDetector) ;
1002
1005 (G4VSensitiveDetector *) pNewSensitiveDetector);
1006
1007 const G4MaterialCutsCouple* pNewMaterialCutsCouple = 0;
1008 if (pNewVol != 0)
1009 {
1010 pNewMaterialCutsCouple =
1012 }
1013
1014 if (pNewVol != 0 && pNewMaterialCutsCouple != 0
1015 && pNewMaterialCutsCouple->GetMaterial() != pNewMaterial)
1016 {
1017 // for parametrized volume
1018 //
1019 pNewMaterialCutsCouple = G4ProductionCutsTable::GetProductionCutsTable()
1020 ->GetMaterialCutsCouple(pNewMaterial,
1021 pNewMaterialCutsCouple->GetProductionCuts());
1022 }
1023 fParticleChange.SetMaterialCutsCoupleInTouchable(pNewMaterialCutsCouple);
1024
1025 // temporarily until Get/Set Material of ParticleChange,
1026 // and StepPoint can be made const.
1027 // Set the touchable in ParticleChange
1028 // this must always be done because the particle change always
1029 // uses this value to overwrite the current touchable pointer.
1030 //
1031 fParticleChange.SetTouchableHandle(retCurrentTouchable);
1032
1033 return &fParticleChange;
1034}
@ FatalErrorInArgument
G4VSensitiveDetector * GetSensitiveDetector() const
G4Material * GetMaterial() const
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
const G4Material * GetMaterial() const
G4ProductionCuts * GetProductionCuts() const
void SetMaterialInTouchable(G4Material *fMaterial)
void SetTouchableHandle(const G4TouchableHandle &fTouchable)
void SetMaterialCutsCoupleInTouchable(const G4MaterialCutsCouple *fMaterialCutsCouple)
void SetSensitiveDetectorInTouchable(G4VSensitiveDetector *fSensitiveDetector)
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
static G4ProductionCutsTable * GetProductionCutsTable()
void ProposeLastStepInVolume(G4bool flag)
G4LogicalVolume * GetLogicalVolume() const
virtual G4VPhysicalVolume * GetVolume(G4int depth=0) const
Definition: G4VTouchable.cc:41

Referenced by G4DNABrownianTransportation::PostStepDoIt().

◆ PostStepGetPhysicalInteractionLength()

G4double G4ITTransportation::PostStepGetPhysicalInteractionLength ( const G4Track ,
G4double  ,
G4ForceCondition pForceCond 
)
virtual

Implements G4VProcess.

Definition at line 858 of file G4ITTransportation.cc.

862{
863 *pForceCond = Forced;
864 return DBL_MAX; // was kInfinity ; but convention now is DBL_MAX
865}
@ Forced
#define DBL_MAX
Definition: templates.hh:62

◆ ResetKilledStatistics()

void G4ITTransportation::ResetKilledStatistics ( G4int  report = 1)
inline

◆ SetInstantiateProcessState()

void G4ITTransportation::SetInstantiateProcessState ( G4bool  flag)
inlineprotected

Definition at line 254 of file G4ITTransportation.hh.

255 {
256 fInstantiateProcessState = flag;
257 }

Referenced by G4ITTransportation(), and G4DNABrownianTransportation::StartTracking().

◆ SetPropagatorInField()

void G4ITTransportation::SetPropagatorInField ( G4PropagatorInField pFieldPropagator)

◆ SetThresholdImportantEnergy()

void G4ITTransportation::SetThresholdImportantEnergy ( G4double  newEnImp)
inline

◆ SetThresholdTrials()

void G4ITTransportation::SetThresholdTrials ( G4int  newMaxTrials)
inline

◆ SetThresholdWarningEnergy()

void G4ITTransportation::SetThresholdWarningEnergy ( G4double  newEnWarn)
inline

◆ SetVerboseLevel()

void G4ITTransportation::SetVerboseLevel ( G4int  verboseLevel)
inline

◆ StartTracking()

void G4ITTransportation::StartTracking ( G4Track aTrack)
virtual

Reimplemented from G4VITProcess.

Reimplemented in G4DNABrownianTransportation.

Definition at line 1040 of file G4ITTransportation.cc.

1041{
1043 if (fInstantiateProcessState)
1044 {
1045// G4VITProcess::fpState = new G4ITTransportationState();
1046 G4VITProcess::fpState.reset(new G4ITTransportationState());
1047 // Will set in the same time fTransportationState
1048 }
1049
1052 GetIT(track)->GetTrackingInfo()->GetTrackStateManager());
1053
1054 // The actions here are those that were taken in AlongStepGPIL
1055 // when track.GetCurrentStepNumber()==1
1056
1057 // reset safety value and center
1058 //
1059 // State(fPreviousSafety) = 0.0 ;
1060 // State(fPreviousSftOrigin) = G4ThreeVector(0.,0.,0.) ;
1061
1062 // reset looping counter -- for motion in field
1063 // State(fNoLooperTrials)= 0;
1064 // Must clear this state .. else it depends on last track's value
1065 // --> a better solution would set this from state of suspended track TODO ?
1066 // Was if( aTrack->GetCurrentStepNumber()==1 ) { .. }
1067
1068 // ChordFinder reset internal state
1069 //
1071 {
1073 // Resets all state of field propagator class (ONLY)
1074 // including safety values (in case of overlaps and to wipe for first track).
1075
1076 // G4ChordFinder* chordF= fFieldPropagator->GetChordFinder();
1077 // if( chordF ) chordF->ResetStepEstimate();
1078 }
1079
1080 // Make sure to clear the chord finders of all fields (ie managers)
1081 static G4ThreadLocal G4FieldManagerStore* fieldMgrStore = 0;
1082 if (!fieldMgrStore) fieldMgrStore = G4FieldManagerStore::GetInstance();
1083 fieldMgrStore->ClearAllChordFindersState();
1084
1085 // Update the current touchable handle (from the track's)
1086 //
1087 PrepareState()
1088 State(fCurrentTouchableHandle) = track->GetTouchableHandle();
1089
1091}
static G4FieldManagerStore * GetInstance()
virtual void StartTracking(G4Track *aTrack)
virtual void NewTrackState()
virtual void SaveTrackState(G4TrackStateManager &manager)
virtual void StartTracking(G4Track *)
Definition: G4VProcess.cc:87

Referenced by G4DNABrownianTransportation::StartTracking().

Member Data Documentation

◆ fFieldPropagator

G4PropagatorInField* G4ITTransportation::fFieldPropagator
protected

◆ fLinearNavigator

G4ITNavigator* G4ITTransportation::fLinearNavigator
protected

◆ fMaxEnergyKilled

G4double G4ITTransportation::fMaxEnergyKilled
protected

Definition at line 241 of file G4ITTransportation.hh.

Referenced by AlongStepDoIt(), G4ITTransportation(), and ~G4ITTransportation().

◆ fParticleChange

◆ fpSafetyHelper

◆ fShortStepOptimisation

G4bool G4ITTransportation::fShortStepOptimisation
protected

◆ fSumEnergyKilled

G4double G4ITTransportation::fSumEnergyKilled
protected

Definition at line 240 of file G4ITTransportation.hh.

Referenced by AlongStepDoIt(), G4ITTransportation(), and ~G4ITTransportation().

◆ fThreshold_Important_Energy

G4double G4ITTransportation::fThreshold_Important_Energy
protected

Definition at line 232 of file G4ITTransportation.hh.

Referenced by AlongStepDoIt(), and G4ITTransportation().

◆ fThreshold_Warning_Energy

G4double G4ITTransportation::fThreshold_Warning_Energy
protected

Definition at line 231 of file G4ITTransportation.hh.

Referenced by AlongStepDoIt(), and G4ITTransportation().

◆ fThresholdTrials

G4int G4ITTransportation::fThresholdTrials
protected

Definition at line 233 of file G4ITTransportation.hh.

Referenced by AlongStepDoIt(), and G4ITTransportation().

◆ fUnimportant_Energy

G4double G4ITTransportation::fUnimportant_Energy
protected

Definition at line 236 of file G4ITTransportation.hh.

Referenced by G4ITTransportation().

◆ fVerboseLevel


The documentation for this class was generated from the following files: