Belle II Software  release-08-01-10
G4MonopoleTransportation Class Reference

Concrete class that does the geometrical transport. More...

#include <G4MonopoleTransportation.h>

Inheritance diagram for G4MonopoleTransportation:
Collaboration diagram for G4MonopoleTransportation:

Public Member Functions

 G4MonopoleTransportation (const G4Monopole *mpl, G4int verb=1)
 Constructor. More...
 
 ~G4MonopoleTransportation ()
 Destructor.
 
virtual G4double AlongStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &currentSafety, G4GPILSelection *selection)
 G4VProcess::AlongStepGetPhysicalInteractionLength() implementation. More...
 
virtual G4VParticleChange * AlongStepDoIt (const G4Track &track, const G4Step &stepData)
 G4VProcess::AlongStepDoIt() implementation, Proposes changes during step to fParticleChange of this class. More...
 
virtual G4VParticleChange * PostStepDoIt (const G4Track &track, const G4Step &stepData)
 G4VProcess::PostStepDoIt() implementation. More...
 
virtual G4double PostStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4ForceCondition *pForceCond)
 G4VProcess::PostStepGetPhysicalInteractionLength() implementation. More...
 
G4PropagatorInField * GetPropagatorInField ()
 Access fFieldPropagator, the assistant class that Propagate in a Field.
 
void SetPropagatorInField (G4PropagatorInField *pFieldPropagator)
 Set fFieldPropagator, the assistant class that Propagate in a Field.
 
G4double GetThresholdWarningEnergy () const
 Access fThreshold_Warning_Energy.
 
G4double GetThresholdImportantEnergy () const
 Access fThreshold_Important_Energy.
 
G4int GetThresholdTrials () const
 Access fThresholdTrials.
 
void SetThresholdWarningEnergy (G4double newEnWarn)
 Set fThreshold_Warning_Energy.
 
void SetThresholdImportantEnergy (G4double newEnImp)
 Set fThreshold_Important_Energy.
 
void SetThresholdTrials (G4int newMaxTrials)
 Set fThresholdTrials.
 
G4double GetMaxEnergyKilled () const
 Access fMaxEnergyKilled.
 
G4double GetSumEnergyKilled () const
 Access fSumEnergyKilled.
 
void ResetKilledStatistics (G4int report=1)
 Statistics for tracks killed (currently due to looping in field)
 
void EnableShortStepOptimisation (G4bool optimise=true)
 Whether short steps < safety will avoid to call Navigator (if field=0)
 
virtual G4double AtRestGetPhysicalInteractionLength (const G4Track &, G4ForceCondition *)
 No operation in AtRestDoIt.
 
virtual G4VParticleChange * AtRestDoIt (const G4Track &, const G4Step &)
 No operation in AtRestDoIt.
 
virtual void StartTracking (G4Track *aTrack)
 Reset state for new (potentially resumed) track.
 

Protected Member Functions

G4bool DoesGlobalFieldExist ()
 Checks whether a field exists for the "global" field manager.
 

Private Attributes

const G4MonopolefParticleDef
 Monopole definition for charge and mass reference.
 
G4MonopoleFieldSetupfMagSetup
 Monpole field setup.
 
G4Navigator * fLinearNavigator
 Propagator used to transport the particle.
 
G4PropagatorInField * fFieldPropagator
 Propagator used to transport the particle.
 
G4ThreeVector fTransportEndPosition
 The particle's state after this Step, Store for DoIt.
 
G4ThreeVector fTransportEndMomentumDir
 The particle's state after this Step, Store for DoIt.
 
G4double fTransportEndKineticEnergy
 The particle's state after this Step, Store for DoIt.
 
G4ThreeVector fTransportEndSpin
 The particle's state after this Step, Store for DoIt.
 
G4bool fMomentumChanged
 The particle's state after this Step, Store for DoIt.
 
G4bool fEndGlobalTimeComputed
 The particle's state after this Step, Store for DoIt.
 
G4double fCandidateEndGlobalTime
 The particle's state after this Step, Store for DoIt.
 
G4bool fParticleIsLooping
 Is the monopole stuck in looping.
 
G4TouchableHandle fCurrentTouchableHandle
 Current touchable handle.
 
G4bool fGeometryLimitedStep
 Flag to determine whether a boundary was reached.
 
G4ThreeVector fPreviousSftOrigin
 Remember last safety origin.
 
G4double fPreviousSafety
 Remember last safety value.
 
G4ParticleChangeForTransport fParticleChange
 New ParticleChange.
 
G4double endpointDistance
 Endpint distance.
 
G4double fThreshold_Trap_Energy
 Assume monopoles below this can bound to material.
 
G4double fThreshold_Warning_Energy
 Warn above this energy about looping particle.
 
G4double fThreshold_Important_Energy
 Hesitate above this about looping particle for a certain no of trials.
 
G4int fThresholdTrials
 Nubmer of trials for looping particles.
 
G4int fNoLooperTrials
 Counter for steps in which particle reports 'looping', if it is above 'Important' Energy.
 
G4double fSumEnergyKilled
 Sum of abandoned looping tracks energies.
 
G4double fMaxEnergyKilled
 Max of abandoned looping tracks energies.
 
G4bool fShortStepOptimisation
 Whether to avoid calling G4Navigator for short step ( < safety) If using it, the safety estimate for endpoint will likely be smaller.
 
G4SafetyHelper * fpSafetyHelper
 To pass it the safety value obtained.
 

Detailed Description

Concrete class that does the geometrical transport.

Quite big and clunky class of the monopole transportation.

Definition at line 44 of file G4MonopoleTransportation.h.

Constructor & Destructor Documentation

◆ G4MonopoleTransportation()

G4MonopoleTransportation ( const G4Monopole mpl,
G4int  verb = 1 
)
explicit

Constructor.

Parameters
mplReference to the monopole definition in GEANT4
verbVerbosity level, if GEANT4 was set to be verbose

Definition at line 30 of file G4MonopoleTransportation.cc.

32  : G4VProcess(G4String("MonopoleTransportation"), fTransportation),
33  fParticleDef(mpl),
34  fMagSetup(0),
37  fParticleIsLooping(false),
38  fPreviousSftOrigin(0., 0., 0.),
39  fPreviousSafety(0.0),
40  fThreshold_Trap_Energy(10 * MeV),
41  fThreshold_Warning_Energy(100 * MeV),
42  fThreshold_Important_Energy(250 * MeV),
43  fThresholdTrials(10),
44  fNoLooperTrials(0),
46  fShortStepOptimisation(false), // Old default: true (=fast short steps)
48 {
49  verboseLevel = verb;
50 
51  // set Process Sub Type
52  SetProcessSubType(TRANSPORTATION);
53 
55 
56  G4TransportationManager* transportMgr ;
57 
58  transportMgr = G4TransportationManager::GetTransportationManager() ;
59 
60  fLinearNavigator = transportMgr->GetNavigatorForTracking() ;
61 
62  // fGlobalFieldMgr = transportMgr->GetFieldManager() ;
63 
64  fFieldPropagator = transportMgr->GetPropagatorInField() ;
65 
66  fpSafetyHelper = transportMgr->GetSafetyHelper(); // New
67 
68  // Cannot determine whether a field exists here,
69  // because it would only work if the field manager has informed
70  // about the detector's field before this transportation process
71  // is constructed.
72  // Instead later the method DoesGlobalFieldExist() is called
73 
74  static G4TouchableHandle nullTouchableHandle; // Points to (G4VTouchable*) 0
75  fCurrentTouchableHandle = nullTouchableHandle;
76 
77  fEndGlobalTimeComputed = false;
79 }
static G4MonopoleFieldSetup * GetMonopoleFieldSetup()
Returns G4MonopoleFieldSetup instance.
G4TouchableHandle fCurrentTouchableHandle
Current touchable handle.
G4double fCandidateEndGlobalTime
The particle's state after this Step, Store for DoIt.
G4int fThresholdTrials
Nubmer of trials for looping particles.
G4double fMaxEnergyKilled
Max of abandoned looping tracks energies.
G4double fPreviousSafety
Remember last safety value.
G4SafetyHelper * fpSafetyHelper
To pass it the safety value obtained.
G4double fSumEnergyKilled
Sum of abandoned looping tracks energies.
G4ThreeVector fPreviousSftOrigin
Remember last safety origin.
G4Navigator * fLinearNavigator
Propagator used to transport the particle.
G4double fThreshold_Important_Energy
Hesitate above this about looping particle for a certain no of trials.
G4bool fEndGlobalTimeComputed
The particle's state after this Step, Store for DoIt.
G4bool fShortStepOptimisation
Whether to avoid calling G4Navigator for short step ( < safety) If using it, the safety estimate for ...
G4int fNoLooperTrials
Counter for steps in which particle reports 'looping', if it is above 'Important' Energy.
G4double fThreshold_Warning_Energy
Warn above this energy about looping particle.
const G4Monopole * fParticleDef
Monopole definition for charge and mass reference.
G4bool fParticleIsLooping
Is the monopole stuck in looping.
G4double fThreshold_Trap_Energy
Assume monopoles below this can bound to material.
G4PropagatorInField * fFieldPropagator
Propagator used to transport the particle.
G4MonopoleFieldSetup * fMagSetup
Monpole field setup.

Member Function Documentation

◆ AlongStepDoIt()

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

G4VProcess::AlongStepDoIt() implementation, Proposes changes during step to fParticleChange of this class.

Parameters
trackPropagating particle track reference
stepDataCurrent step reference
Returns
Reference to modified fParticleChange

Definition at line 345 of file G4MonopoleTransportation.cc.

◆ AlongStepGetPhysicalInteractionLength()

G4double AlongStepGetPhysicalInteractionLength ( const G4Track &  track,
G4double  previousStepSize,
G4double  currentMinimumStep,
G4double &  currentSafety,
G4GPILSelection *  selection 
)
virtual

G4VProcess::AlongStepGetPhysicalInteractionLength() implementation.

Responsibilities: Find whether the geometry limits the Step, and to what length Calculate the new value of the safety and return it. Store the final time, position and momentum.

Parameters
trackPropagating particle track reference
previousStepSizeThis argument of base function is ignored
currentMinimumStepCurrent minimum step size
currentSafetyReference to current step safety
selectionPointer for return value of GPILSelection, which is set to default value of CandidateForSelection
Returns
Next geometry step length

Definition at line 95 of file G4MonopoleTransportation.cc.

◆ PostStepDoIt()

G4VParticleChange * PostStepDoIt ( const G4Track &  track,
const G4Step &  stepData 
)
virtual

G4VProcess::PostStepDoIt() implementation.

Proposes changes after the step to fParticleChange of this class.

Responsible for the relocation

Parameters
trackPropagating particle track reference
stepDataCurrent step reference
Returns
Reference to modified fParticleChange

Definition at line 484 of file G4MonopoleTransportation.cc.

◆ PostStepGetPhysicalInteractionLength()

G4double PostStepGetPhysicalInteractionLength ( const G4Track &  track,
G4double  previousStepSize,
G4ForceCondition *  pForceCond 
)
virtual

G4VProcess::PostStepGetPhysicalInteractionLength() implementation.

Forces the PostStepDoIt action to be called, so that it can do the relocation if it is needed, but does not limit the step.

Parameters
trackThis argument of base function is ignored
previousStepSizeThis argument of base function is ignored
pForceCondForce condition by default
Returns
DBL_MAX

Definition at line 475 of file G4MonopoleTransportation.cc.


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