Geant4 11.1.1
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 const G4VProcessGetCreatorProcess () const
 
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 97 of file G4ITTransportation.cc.

97 :
102 fUnimportant_Energy(1 * MeV), // Not used
103 fSumEnergyKilled(0.0),
104 fMaxEnergyKilled(0.0),
105 fShortStepOptimisation(false), // Old default: true (=fast short steps)
106 fVerboseLevel(verbose)
107{
109 G4TransportationManager* transportMgr;
111 G4ITTransportationManager* ITtransportMgr;
113 fLinearNavigator = ITtransportMgr->GetNavigatorForTracking();
114 fFieldPropagator = transportMgr->GetPropagatorInField();
115 fpSafetyHelper = ITtransportMgr->GetSafetyHelper(); // New
116
117 // Cannot determine whether a field exists here, as it would
118 // depend on the relative order of creating the detector's
119 // field and this process. That order is not guaranted.
120 // Instead later the method DoesGlobalFieldExist() is called
121
122 enableAtRestDoIt = false;
123 enableAlongStepDoIt = true;
124 enablePostStepDoIt = true;
128 fInstantiateProcessState = true;
129
130 G4VITProcess::fpState.reset(new G4ITTransportationState());
131 /*
132 if(fTransportationState == 0)
133 {
134 G4cout << "KILL in G4ITTransportation::G4ITTransportation" << G4endl;
135 abort();
136 }
137 */
138}
@ fLowEnergyTransportation
@ 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:363
G4bool enableAlongStepDoIt
Definition: G4VProcess.hh:364
void SetProcessSubType(G4int)
Definition: G4VProcess.hh:410
G4bool enablePostStepDoIt
Definition: G4VProcess.hh:365
G4VParticleChange * pParticleChange
Definition: G4VProcess.hh:325

◆ ~G4ITTransportation()

G4ITTransportation::~G4ITTransportation ( )
virtual

Definition at line 216 of file G4ITTransportation.cc.

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

◆ G4ITTransportation() [2/2]

G4ITTransportation::G4ITTransportation ( const G4ITTransportation right)

Definition at line 140 of file G4ITTransportation.cc.

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

Member Function Documentation

◆ AlongStepDoIt()

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

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


Implements G4VProcess.

Reimplemented in G4DNABrownianTransportation.

Definition at line 690 of file G4ITTransportation.cc.

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

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

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

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

◆ DoesGlobalFieldExist()

G4bool G4ITTransportation::DoesGlobalFieldExist ( )
protected

Definition at line 236 of file G4ITTransportation.cc.

237{
238 G4TransportationManager* transportMgr;
240
241 // fFieldExists= transportMgr->GetFieldManager()->DoesFieldExist();
242 // return fFieldExists;
243 return transportMgr->GetFieldManager()->DoesFieldExist();
244}
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 872 of file G4ITTransportation.cc.

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

Referenced by G4DNABrownianTransportation::PostStepDoIt().

◆ PostStepGetPhysicalInteractionLength()

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

Implements G4VProcess.

Definition at line 860 of file G4ITTransportation.cc.

864{
865 *pForceCond = Forced;
866 return DBL_MAX; // was kInfinity ; but convention now is DBL_MAX
867}
@ 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 NewTrackState()
virtual void SaveTrackState(G4TrackStateManager &manager)
virtual void StartTracking(G4Track *)
Definition: G4VITProcess.cc:85
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: