#include "TG4NameMap.h"
#include "TG4Globals.h"
-#include "TG3Cut.h"
-#include "TG3Flag.h"
+#include "TG4G3Cut.h"
+#include "TG4G3Control.h"
#include <globals.hh>
#include <G3SensVolVector.hh>
private:
// methods
- void GstparCut(G4int itmed, TG3Cut par, G4double parval);
- void GstparFlag(G4int itmed, TG3Flag par, G4double parval);
+ void GstparCut(G4int itmed, TG4G3Cut par, G4double parval);
+ void GstparControl(G4int itmed, TG4G3Control control, G4double parval);
// static data members
static TG4GeometryManager* fgInstance; //this instance
// See the class description in the header file.
#include "TG4Limits.h"
-#include "TG4CutVector.h"
-#include "TG4FlagVector.h"
+#include "TG4G3CutVector.h"
+#include "TG4G3ControlVector.h"
TG4Limits::TG4Limits()
: G4UserLimits(),
// fMaxStep (DBL_MAX), fMaxTrack(DBL_MAX),fMaxTime(DBL_MAX),
// fMinEkine(0.), fMinRange(0.)
fIsCut(false),
- fIsFlag(false)
+ fIsControl(false)
{
//
- fCutVector = new TG4CutVector();
- fFlagVector = new TG4FlagVector();
+ fCutVector = new TG4G3CutVector();
+ fControlVector = new TG4G3ControlVector();
}
TG4Limits::TG4Limits(const TG4Limits& right)
: G4UserLimits(right)
{
//
- fCutVector = new TG4CutVector(*right.fCutVector);
- fFlagVector = new TG4FlagVector(*right.fFlagVector);
+ fCutVector = new TG4G3CutVector(*right.fCutVector);
+ fControlVector = new TG4G3ControlVector(*right.fControlVector);
}
TG4Limits::~TG4Limits() {
//
delete fCutVector;
- delete fFlagVector;
+ delete fControlVector;
}
// operators
G4UserLimits::operator=(right);
*fCutVector = *right.fCutVector;
- *fFlagVector = *right.fFlagVector;
+ *fControlVector = *right.fControlVector;
return *this;
}
// public methods
-void TG4Limits::SetG3Cut(TG3Cut g3Cut, G4double cutValue)
+void TG4Limits::SetG3Cut(TG4G3Cut cut, G4double cutValue)
{
// Sets the cut value for the specified cut.
// ---
- fCutVector->SetG3Cut(g3Cut, cutValue);
+ fCutVector->SetG3Cut(cut, cutValue);
fIsCut = true;
}
-void TG4Limits::SetG3Flag(TG3Flag g3Flag, G4double flagValue)
+void TG4Limits::SetG3Control(TG4G3Control control, G4double flagValue)
{
// Sets the process control value for the specified flag.
// ---
- fFlagVector->SetG3Flag(g3Flag, flagValue);
- if (flagValue - kUnset > 0.01) fIsFlag = true;
+ fControlVector->SetG3Control(control, flagValue);
+ if (flagValue - kUnset > 0.01) fIsControl = true;
}
void TG4Limits::SetG3DefaultCuts()
fIsCut = true;
}
-void TG4Limits::SetG3DefaultFlags()
+void TG4Limits::SetG3DefaultControls()
{
// Sets the G3 default process control values for all flags.
// ---
- fFlagVector->SetG3Defaults();
- fIsFlag = true;
+ fControlVector->SetG3Defaults();
+ fIsControl = true;
}
G4double TG4Limits::GetMinEkineForGamma(const G4Track& track) const
return fMinEkine;
}
-G4int TG4Limits::GetFlag(G4VProcess* process) const
+G4int TG4Limits::GetControl(G4VProcess* process) const
{
// Returns the flag value for the particle associated with
// the specified process.
// ---
- if (fIsFlag)
- return fFlagVector->GetFlag(process);
+ if (fIsControl)
+ return fControlVector->GetControl(process);
else
return kUnset;
}
#define TG4_LIMITS_H
#include "TG4Globals.h"
-#include "TG3Cut.h"
-#include "TG3Flag.h"
+#include "TG4G3Cut.h"
+#include "TG4G3Control.h"
#include <G4UserLimits.hh>
-class TG4CutVector;
-class TG4FlagVector;
+class TG4G3CutVector;
+class TG4G3ControlVector;
class G4VProcess;
TG4Limits& operator=(const TG4Limits& right);
// set methods
- void SetG3Cut(TG3Cut g3Cut, G4double cutValue);
- void SetG3Flag(TG3Flag g3Flag, G4double flagValue);
+ void SetG3Cut(TG4G3Cut cut, G4double cutValue);
+ void SetG3Control(TG4G3Control control, G4double controlValue);
void SetG3DefaultCuts();
- void SetG3DefaultFlags();
+ void SetG3DefaultControls();
// get methods
G4bool IsCut() const;
- G4bool IsFlag() const;
+ G4bool IsControl() const;
virtual G4double GetUserMinEkine(const G4Track& track);
G4double GetMinEkineForGamma(const G4Track& track) const;
G4double GetMinEkineForElectron(const G4Track& track) const;
G4double GetMinEkineForNeutralHadron(const G4Track& track) const;
G4double GetMinEkineForMuon(const G4Track& track) const;
G4double GetMinEkineForOther(const G4Track& track) const;
- G4int GetFlag(G4VProcess* process) const;
+ G4int GetControl(G4VProcess* process) const;
private:
// data members
- G4bool fIsCut; //true if any cut value is set
- G4bool fIsFlag; //true if any flag value is set
- TG4CutVector* fCutVector; //TG4CutVector
- TG4FlagVector* fFlagVector; //TG4FlagVector
+ G4bool fIsCut; //true if any cut value is set
+ G4bool fIsControl;//true if any flag value is set
+ TG4G3CutVector* fCutVector; //TG4CutVector
+ TG4G3ControlVector* fControlVector;//TG4ControlVector
};
// inline methods
inline G4bool TG4Limits::IsCut() const { return fIsCut; }
-inline G4bool TG4Limits::IsFlag() const { return fIsFlag; }
+inline G4bool TG4Limits::IsControl() const { return fIsControl; }
#endif //TG4_USER_LIMITS_H