]>
Commit | Line | Data |
---|---|---|
2817d3e2 | 1 | // $Id$ |
2 | // Category: physics | |
3 | // | |
e5967ab3 | 4 | // Author: I. Hrivnacova |
5 | // | |
6 | // Class TG4SpecialControls | |
7 | // ---------------------------- | |
8 | // Special process that applies the G3 process controls. | |
2817d3e2 | 9 | |
f4b948cd | 10 | #ifndef TG4_SPECIAL_CONTROLS_H |
11 | #define TG4_SPECIAL_CONTROLS_H | |
2817d3e2 | 12 | |
5b6ecd36 | 13 | #include "TG4Verbose.h" |
2817d3e2 | 14 | #include "TG4Globals.h" |
e5967ab3 | 15 | #include "TG4G3Control.h" |
2817d3e2 | 16 | |
17 | #include <G4VProcess.hh> | |
18 | #include <G4ProcessVector.hh> | |
19 | #include <globals.hh> | |
e5967ab3 | 20 | #include <g4std/vector> |
2817d3e2 | 21 | |
5b6ecd36 | 22 | class TG4SpecialControls : public G4VProcess, |
23 | public TG4Verbose | |
2817d3e2 | 24 | { |
25 | enum Switch { kSwitch, kReswitch, kUnswitch }; | |
26 | ||
27 | public: | |
6a474bd6 | 28 | TG4SpecialControls(const G4String& processName ="specialControl" ); |
2817d3e2 | 29 | // --> protected |
6a474bd6 | 30 | // TG4SpecialControls(const TG4SpecialControls& right); |
31 | virtual ~TG4SpecialControls(); | |
2817d3e2 | 32 | |
33 | // methods | |
34 | ||
35 | virtual G4double PostStepGetPhysicalInteractionLength( | |
36 | const G4Track& track, G4double previousStepSize, | |
37 | G4ForceCondition* condition); | |
38 | ||
39 | virtual G4VParticleChange* PostStepDoIt(const G4Track& track, | |
40 | const G4Step& step); | |
41 | ||
42 | virtual G4double AlongStepGetPhysicalInteractionLength( | |
43 | const G4Track& track, G4double previousStepSize , | |
44 | G4double currentMinimumStep, G4double& proposedSafety, | |
45 | G4GPILSelection* selection) | |
46 | { return -1.0; } | |
47 | ||
48 | virtual G4VParticleChange* AlongStepDoIt(const G4Track& , | |
49 | const G4Step& step) | |
50 | { return 0; } | |
51 | ||
52 | virtual G4double AtRestGetPhysicalInteractionLength( | |
53 | const G4Track& track, G4ForceCondition* condition) | |
54 | { return -1.0; } | |
55 | ||
56 | virtual G4VParticleChange* AtRestDoIt(const G4Track& track, | |
57 | const G4Step& step) | |
58 | { return 0; } | |
59 | ||
60 | protected: | |
6a474bd6 | 61 | TG4SpecialControls(const TG4SpecialControls& right); |
2817d3e2 | 62 | |
63 | //operators | |
6a474bd6 | 64 | TG4SpecialControls& operator = (const TG4SpecialControls& right); |
2817d3e2 | 65 | |
66 | private: | |
e5967ab3 | 67 | // methods |
68 | virtual void Reset(); | |
69 | ||
2817d3e2 | 70 | // data members |
e5967ab3 | 71 | Switch fSwitchControls; //directive passed from PostStepGetPIL |
2817d3e2 | 72 | //to PostStepDoIt |
e5967ab3 | 73 | G4ProcessVector fSwitchedProcesses; //vector of the processes the activation of |
2817d3e2 | 74 | //which is changed by this process |
e5967ab3 | 75 | TG4boolVector fSwitchedControls; //vector for storing the current values of |
2817d3e2 | 76 | //the processes activation |
e5967ab3 | 77 | G4int fLastTrackID; //the last processed track ID |
2817d3e2 | 78 | }; |
79 | ||
f4b948cd | 80 | #endif //TG4_SPECIAL_CONTROLS_H |
2817d3e2 | 81 |