]>
Commit | Line | Data |
---|---|---|
2817d3e2 | 1 | // $Id$ |
2 | // Category: physics | |
3 | // | |
4 | // Special process that applies process control flags | |
5 | ||
6 | #ifndef TG4_SPECIAL_FLAGS_H | |
7 | #define TG4_SPECIAL_FLAGS_H | |
8 | ||
9 | #include "TG4Globals.h" | |
10 | ||
11 | #include <G4VProcess.hh> | |
12 | #include <G4ProcessVector.hh> | |
13 | #include <globals.hh> | |
14 | ||
15 | class TG4SpecialFlags : public G4VProcess | |
16 | { | |
17 | enum Switch { kSwitch, kReswitch, kUnswitch }; | |
18 | ||
19 | public: | |
20 | TG4SpecialFlags(const G4String& processName ="specialFlag" ); | |
21 | // --> protected | |
22 | // TG4SpecialFlags(const TG4SpecialFlags& right); | |
23 | virtual ~TG4SpecialFlags(); | |
24 | ||
25 | // methods | |
26 | ||
27 | virtual G4double PostStepGetPhysicalInteractionLength( | |
28 | const G4Track& track, G4double previousStepSize, | |
29 | G4ForceCondition* condition); | |
30 | ||
31 | virtual G4VParticleChange* PostStepDoIt(const G4Track& track, | |
32 | const G4Step& step); | |
33 | ||
34 | virtual G4double AlongStepGetPhysicalInteractionLength( | |
35 | const G4Track& track, G4double previousStepSize , | |
36 | G4double currentMinimumStep, G4double& proposedSafety, | |
37 | G4GPILSelection* selection) | |
38 | { return -1.0; } | |
39 | ||
40 | virtual G4VParticleChange* AlongStepDoIt(const G4Track& , | |
41 | const G4Step& step) | |
42 | { return 0; } | |
43 | ||
44 | virtual G4double AtRestGetPhysicalInteractionLength( | |
45 | const G4Track& track, G4ForceCondition* condition) | |
46 | { return -1.0; } | |
47 | ||
48 | virtual G4VParticleChange* AtRestDoIt(const G4Track& track, | |
49 | const G4Step& step) | |
50 | { return 0; } | |
51 | ||
52 | protected: | |
53 | TG4SpecialFlags(const TG4SpecialFlags& right); | |
54 | ||
55 | //operators | |
56 | TG4SpecialFlags& operator = (const TG4SpecialFlags& right); | |
57 | ||
58 | private: | |
59 | // data members | |
60 | Switch fSwitchFlags; //directive passed from PostStepGetPIL | |
61 | //to PostStepDoIt | |
62 | G4ProcessVector fSwitchedProcesses; //vector of the processes activation of | |
63 | //which is changed by this process | |
64 | TG4boolVector fSwitchedFlags; //vector for storing the current values of | |
65 | //the processes activation | |
66 | }; | |
67 | ||
68 | #endif //TG4_SPECIAL_FLAGS_H | |
69 |