]>
Commit | Line | Data |
---|---|---|
2817d3e2 | 1 | // $Id$ |
2 | // Category: global | |
3 | // | |
e5967ab3 | 4 | // Author: I. Hrivnacova |
5 | // | |
6 | // Class TG4Limits | |
7 | // --------------- | |
8 | // G4UserLimits derived class extended with the | |
2817d3e2 | 9 | // vectors of kinetic energy cuts and control process flags |
e5967ab3 | 10 | // data members. |
2817d3e2 | 11 | |
12 | #ifndef TG4_LIMITS_H | |
13 | #define TG4_LIMITS_H | |
14 | ||
15 | #include "TG4Globals.h" | |
6eb43d7c | 16 | #include "TG4G3Cut.h" |
17 | #include "TG4G3Control.h" | |
e5967ab3 | 18 | #include "TG4G3CutVector.h" |
19 | #include "TG4G3ControlVector.h" | |
2817d3e2 | 20 | |
21 | #include <G4UserLimits.hh> | |
22 | ||
2817d3e2 | 23 | class G4VProcess; |
24 | ||
25 | class TG4Limits: public G4UserLimits | |
26 | { | |
27 | public: | |
e5967ab3 | 28 | TG4Limits(const TG4G3CutVector& cuts, const TG4G3ControlVector& controls); |
29 | TG4Limits(const G4String& name, | |
30 | const TG4G3CutVector& cuts, const TG4G3ControlVector& controls); | |
2817d3e2 | 31 | TG4Limits(const TG4Limits& right); |
32 | virtual ~TG4Limits(); | |
33 | ||
34 | // operators | |
35 | TG4Limits& operator=(const TG4Limits& right); | |
e5967ab3 | 36 | |
37 | // static methods | |
38 | static G4int GetNofLimits(); | |
2817d3e2 | 39 | |
40 | // set methods | |
e5967ab3 | 41 | void SetName(const G4String& name); |
6eb43d7c | 42 | void SetG3Cut(TG4G3Cut cut, G4double cutValue); |
e5967ab3 | 43 | void SetG3Control(TG4G3Control control, TG4G3ControlValue controlValue); |
44 | G4bool Update(const TG4G3ControlVector& controls); | |
2817d3e2 | 45 | void SetG3DefaultCuts(); |
6eb43d7c | 46 | void SetG3DefaultControls(); |
2817d3e2 | 47 | |
e5967ab3 | 48 | // methods |
49 | void Print() const; | |
50 | ||
2817d3e2 | 51 | // get methods |
e5967ab3 | 52 | G4String GetName() const; |
53 | G4bool IsCut() const; | |
54 | G4bool IsControl() const; | |
2817d3e2 | 55 | virtual G4double GetUserMinEkine(const G4Track& track); |
56 | G4double GetMinEkineForGamma(const G4Track& track) const; | |
57 | G4double GetMinEkineForElectron(const G4Track& track) const; | |
e5967ab3 | 58 | G4double GetMinEkineForEplus(const G4Track& track) const; |
59 | G4double GetMinEkineForChargedHadron(const G4Track& track) const; | |
2817d3e2 | 60 | G4double GetMinEkineForNeutralHadron(const G4Track& track) const; |
61 | G4double GetMinEkineForMuon(const G4Track& track) const; | |
62 | G4double GetMinEkineForOther(const G4Track& track) const; | |
e5967ab3 | 63 | TG4G3ControlValue GetControl(G4VProcess* process) const; |
64 | ||
65 | protected: | |
66 | TG4Limits(); | |
2817d3e2 | 67 | |
68 | private: | |
e5967ab3 | 69 | // methods |
70 | void Initialize(const TG4G3CutVector& cuts, | |
71 | const TG4G3ControlVector& controls); | |
72 | ||
015b87e4 | 73 | // static data members |
98c988ce | 74 | static const G4double fgkDefaultMaxStep; // default max step value |
e5967ab3 | 75 | static G4int fgCounter; // counter |
015b87e4 | 76 | |
2817d3e2 | 77 | // data members |
e5967ab3 | 78 | G4String fName; //name |
98c988ce | 79 | G4bool fIsCut; //true if any cut value is set |
e5967ab3 | 80 | G4bool fIsControl; //true if any control value is set |
81 | TG4G3CutVector fCutVector; //TG4CutVector | |
82 | TG4G3ControlVector fControlVector;//TG4ControlVector | |
2817d3e2 | 83 | }; |
84 | ||
85 | // inline methods | |
86 | ||
e5967ab3 | 87 | inline G4int TG4Limits::GetNofLimits() |
88 | { return fgCounter; } | |
89 | ||
90 | inline G4bool TG4Limits::IsCut() const | |
91 | { return fIsCut; } | |
92 | ||
93 | inline G4bool TG4Limits::IsControl() const | |
94 | { return fIsControl; } | |
95 | ||
96 | inline void TG4Limits::SetName(const G4String& name) | |
97 | { fName = name; } | |
98 | ||
99 | inline G4String TG4Limits::GetName() const | |
100 | { return fName; } | |
2817d3e2 | 101 | |
102 | #endif //TG4_USER_LIMITS_H | |
103 | ||
104 | ||
105 |