File indexing completed on 2025-09-18 09:16:10
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037 #ifndef G4WeightWindowProcess_hh
0038 #define G4WeightWindowProcess_hh 1
0039
0040 #include "G4VProcess.hh"
0041 #include "G4VTrackTerminator.hh"
0042 #include "G4PlaceOfAction.hh"
0043 #include "G4VTouchable.hh"
0044
0045 class G4SamplingPostStepAction;
0046 class G4VWeightWindowAlgorithm;
0047 class G4VWeightWindowStore;
0048
0049 class G4Step;
0050 class G4Navigator;
0051 class G4TransportationManager;
0052 class G4PathFinder;
0053
0054 #include "G4FieldTrack.hh"
0055 #include "G4TouchableHandle.hh"
0056 #include "G4MultiNavigator.hh" // For ELimited enum
0057
0058 class G4WeightWindowProcess : public G4VProcess, public G4VTrackTerminator
0059 {
0060
0061 public:
0062
0063 G4WeightWindowProcess(const G4VWeightWindowAlgorithm&
0064 aWeightWindowAlgorithm,
0065 const G4VWeightWindowStore &aWWStore,
0066 const G4VTrackTerminator* TrackTerminator,
0067 G4PlaceOfAction placeOfAction,
0068 const G4String& aName = "WeightWindowProcess",
0069 G4bool para = false);
0070
0071
0072 virtual ~G4WeightWindowProcess();
0073
0074
0075 G4WeightWindowProcess(const G4WeightWindowProcess &) = delete;
0076 G4WeightWindowProcess &operator=(const G4WeightWindowProcess &) = delete;
0077
0078
0079
0080
0081
0082 void SetParallelWorld(const G4String& parallelWorldName);
0083 void SetParallelWorld(G4VPhysicalVolume* parallelWorld);
0084
0085
0086
0087
0088
0089 void StartTracking(G4Track*);
0090
0091 virtual G4double
0092 PostStepGetPhysicalInteractionLength(const G4Track& aTrack,
0093 G4double previousStepSize,
0094 G4ForceCondition* condition);
0095
0096 virtual G4VParticleChange *PostStepDoIt(const G4Track&, const G4Step&);
0097
0098
0099 virtual void KillTrack() const;
0100
0101
0102 virtual const G4String& GetName() const;
0103
0104
0105
0106 virtual G4double
0107 AlongStepGetPhysicalInteractionLength(const G4Track&, G4double, G4double,
0108 G4double&, G4GPILSelection*);
0109 virtual G4double
0110 AtRestGetPhysicalInteractionLength(const G4Track&, G4ForceCondition*);
0111
0112 virtual G4VParticleChange* AtRestDoIt(const G4Track&, const G4Step&);
0113 virtual G4VParticleChange* AlongStepDoIt(const G4Track&, const G4Step&);
0114
0115 private:
0116
0117 void CopyStep(const G4Step& step);
0118
0119 G4Step* fGhostStep = nullptr;
0120 G4StepPoint* fGhostPreStepPoint = nullptr;
0121 G4StepPoint* fGhostPostStepPoint = nullptr;
0122
0123 G4ParticleChange* fParticleChange = nullptr;
0124 const G4VWeightWindowAlgorithm& fWeightWindowAlgorithm;
0125 const G4VWeightWindowStore& fWeightWindowStore;
0126 G4SamplingPostStepAction* fPostStepAction = nullptr;
0127 G4PlaceOfAction fPlaceOfAction;
0128
0129 G4TransportationManager* fTransportationManager = nullptr;
0130 G4PathFinder* fPathFinder = nullptr;
0131
0132
0133
0134
0135 G4String fGhostWorldName = "NoParallelWorld";
0136 G4VPhysicalVolume* fGhostWorld = nullptr;
0137 G4Navigator* fGhostNavigator = nullptr;
0138 G4int fNavigatorID = -1;
0139 G4TouchableHandle fOldGhostTouchable;
0140 G4TouchableHandle fNewGhostTouchable;
0141 G4FieldTrack fFieldTrack = '0';
0142 G4double fGhostSafety = -1;
0143 G4bool fOnBoundary = false;
0144
0145 G4bool fParaflag = false;
0146 G4FieldTrack fEndTrack = '0';
0147 ELimited feLimited = kDoNot;
0148 };
0149
0150 #endif