TG4SpecialFlags renamed to TG4SpecialControls
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 13 Feb 2001 14:23:02 +0000 (14:23 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 13 Feb 2001 14:23:02 +0000 (14:23 +0000)
TGeant4/TG4SpecialControls.cxx [moved from TGeant4/TG4SpecialFlags.cxx with 63% similarity]
TGeant4/TG4SpecialControls.h [moved from TGeant4/TG4SpecialFlags.h with 75% similarity]

similarity index 63%
rename from TGeant4/TG4SpecialFlags.cxx
rename to TGeant4/TG4SpecialControls.cxx
index 53e0666aa1f5394cb3f75f1057ed9e723f49f62d..bfb299ff16193eaf96b5dd53cd15225a18ba46b4 100644 (file)
@@ -3,16 +3,16 @@
 //
 // See the class description in the header file.
 
-#include "TG4SpecialFlags.h"
+#include "TG4SpecialControls.h"
 #include "TG4Limits.h"
 
 #include <G4StepStatus.hh>
 #include <G4ProcessManager.hh>
 #include <G4ProcessVector.hh>
 
-TG4SpecialFlags::TG4SpecialFlags(const G4String& aName)
+TG4SpecialControls::TG4SpecialControls(const G4String& aName)
   : G4VProcess(aName),
-    fSwitchFlags(kUnswitch)
+    fSwitchControls(kUnswitch)
 {
    // verboseLevel = 1;
    if (verboseLevel>0) {
@@ -20,32 +20,33 @@ TG4SpecialFlags::TG4SpecialFlags(const G4String& aName)
    }
 }
 
-TG4SpecialFlags::TG4SpecialFlags(const TG4SpecialFlags& right) {
+TG4SpecialControls::TG4SpecialControls(const TG4SpecialControls& right) {
 // 
   TG4Globals::Exception(
-    "TG4SpecialFlags is protected from copying.");
+    "TG4SpecialControls is protected from copying.");
 }
 
-TG4SpecialFlags::~TG4SpecialFlags() {
+TG4SpecialControls::~TG4SpecialControls() {
 //
 }
 
 // operators
 
-TG4SpecialFlags& TG4SpecialFlags::operator=(const TG4SpecialFlags& right)
+TG4SpecialControls& TG4SpecialControls::operator=(
+                                          const TG4SpecialControls& right)
 {
   // check assignement to self
   if (this == &right) return *this;
 
   TG4Globals::Exception(
-    "TG4SpecialFlags is protected from assigning.");
+    "TG4SpecialControls is protected from assigning.");
     
   return *this;  
 } 
 
 // public methods   
           
-G4double TG4SpecialFlags::PostStepGetPhysicalInteractionLength(
+G4double TG4SpecialControls::PostStepGetPhysicalInteractionLength(
                            const G4Track& track, G4double previousStepSize,
                           G4ForceCondition* condition)
 {
@@ -66,35 +67,35 @@ G4double TG4SpecialFlags::PostStepGetPhysicalInteractionLength(
   TG4Limits* limits 
     = (TG4Limits*) track.GetVolume()->GetLogicalVolume()->GetUserLimits();
 
-  if (fSwitchFlags != kUnswitch) {
+  if (fSwitchControls != kUnswitch) {
     if (status == fGeomBoundary) {
-      if  ((limits) && (limits->IsFlag())) {
-        // particle is exiting a logical volume with special flags
-        // and entering another logical volume with special flag
+      if  ((limits) && (limits->IsControl())) {
+        // particle is exiting a logical volume with special controls
+        // and entering another logical volume with special control
        proposedStep = minStep;
-        fSwitchFlags = kReswitch;
+        fSwitchControls = kReswitch;
         if (verboseLevel>0) G4cout << "kReswitch" << G4endl;
       }
       else {
-        // particle is exiting a logical volume with special flags
-        // and entering a logical volume without special flag
+        // particle is exiting a logical volume with special controls
+        // and entering a logical volume without special control
        proposedStep = minStep;
-        fSwitchFlags = kUnswitch;
+        fSwitchControls = kUnswitch;
         if (verboseLevel>0) G4cout << "kUnswitch" << G4endl;
       }
     }
   }
-  else if ((limits) && (limits->IsFlag())) {
-       // particle is entering a logical volume with special flags
+  else if ((limits) && (limits->IsControl())) {
+       // particle is entering a logical volume with special controls
        // that have not yet been set
        proposedStep = minStep;
-       fSwitchFlags = kSwitch;
+       fSwitchControls = kSwitch;
        if (verboseLevel>0) G4cout << "kSwitch" << G4endl;
   }  
   return proposedStep;
 }
 
-G4VParticleChange* TG4SpecialFlags::PostStepDoIt(
+G4VParticleChange* TG4SpecialControls::PostStepDoIt(
                       const G4Track& track, const G4Step& step)
 {
 // Changes processes activation of the current track
@@ -109,7 +110,7 @@ G4VParticleChange* TG4SpecialFlags::PostStepDoIt(
   G4ProcessVector* processVector = processManager->GetProcessList();
   // processManager->DumpInfo();
 
-  if ((fSwitchFlags==kUnswitch) || (fSwitchFlags==kReswitch)) {
+  if ((fSwitchControls==kUnswitch) || (fSwitchControls==kReswitch)) {
     // set processes activation back
     for (G4int i=0; i<fSwitchedProcesses.entries(); i++) {
       if (verboseLevel>0) {
@@ -118,22 +119,22 @@ G4VParticleChange* TG4SpecialFlags::PostStepDoIt(
                << G4endl;
       }
       processManager
-        ->SetProcessActivation(fSwitchedProcesses[i],fSwitchedFlags[i]);
+        ->SetProcessActivation(fSwitchedProcesses[i],fSwitchedControls[i]);
     }
     fSwitchedProcesses.clear();
-    fSwitchedFlags.clear();
+    fSwitchedControls.clear();
   }
 
-  if ((fSwitchFlags==kSwitch) ||  (fSwitchFlags==kReswitch)) {
-    // set TG4Limits processes flags
+  if ((fSwitchControls==kSwitch) ||  (fSwitchControls==kReswitch)) {
+    // set TG4Limits processes controls
     for (G4int i=0; i<processManager->GetProcessListLength(); i++) {
-      G4int flag = limits->GetFlag((*processVector)[i]);
-      if (flag != kUnset) {
-        // store the current processes flags;
+      G4int control = limits->GetControl((*processVector)[i]);
+      if (control != kUnset) {
+        // store the current processes controls;
         fSwitchedProcesses.insert((*processVector)[i]);
-        //fSwitchedFlags.insert(processManager->GetProcessActivation(i));
-        fSwitchedFlags.push_back(processManager->GetProcessActivation(i));
-        if (flag == kInActivate) {
+        //fSwitchedControls.insert(processManager->GetProcessActivation(i));
+        fSwitchedControls.push_back(processManager->GetProcessActivation(i));
+        if (control == kInActivate) {
           if (verboseLevel>0) {
             G4cout << "Set process inactivation for " 
                    << (*processVector)[i]->GetProcessName() << " in " 
@@ -143,7 +144,7 @@ G4VParticleChange* TG4SpecialFlags::PostStepDoIt(
           processManager->SetProcessActivation(i,false);
         }  
         else {
-         // ((flag == kActivate) || (flag == kActivate2)) 
+         // ((control == kActivate) || (control == kActivate2)) 
           if (verboseLevel>0) {
             G4cout << "Set process activation for " 
                    << (*processVector)[i]->GetProcessName() << " in " 
similarity index 75%
rename from TGeant4/TG4SpecialFlags.h
rename to TGeant4/TG4SpecialControls.h
index d8780cb88a84550c2f7d592ac35cf267e3ff2160..a0f6ed35eaab7f60f7cc32f6427056acf1df7225 100644 (file)
@@ -1,7 +1,7 @@
 // $Id$
 // Category: physics
 //
-// Special process that applies process control flags 
+// Special process that applies G3 process controls.
 
 #ifndef TG4_SPECIAL_FLAGS_H
 #define TG4_SPECIAL_FLAGS_H
 #include <G4ProcessVector.hh>
 #include <globals.hh>
 
-class TG4SpecialFlags : public G4VProcess 
+class TG4SpecialControls : public G4VProcess 
 {
   enum Switch { kSwitch, kReswitch, kUnswitch };
 
   public:     
-    TG4SpecialFlags(const G4String& processName ="specialFlag" );
+    TG4SpecialControls(const G4String& processName ="specialControl" );
     // --> protected
-    // TG4SpecialFlags(const TG4SpecialFlags& right);
-    virtual ~TG4SpecialFlags();
+    // TG4SpecialControls(const TG4SpecialControls& right);
+    virtual ~TG4SpecialControls();
 
     // methods
 
@@ -50,18 +50,18 @@ class TG4SpecialFlags : public G4VProcess
                          { return 0; }
 
   protected:
-    TG4SpecialFlags(const TG4SpecialFlags& right);
+    TG4SpecialControls(const TG4SpecialControls& right);
     
     //operators
-    TG4SpecialFlags& operator = (const TG4SpecialFlags& right);
+    TG4SpecialControls& operator = (const TG4SpecialControls& right);
     
   private:  
     // data members
-    Switch           fSwitchFlags;       //directive passed from PostStepGetPIL
+    Switch           fSwitchControls;       //directive passed from PostStepGetPIL
                                          //to PostStepDoIt
     G4ProcessVector  fSwitchedProcesses; //vector of the processes activation of
                                          //which is changed by this process
-    TG4boolVector    fSwitchedFlags;     //vector for storing the current values of 
+    TG4boolVector    fSwitchedControls;     //vector for storing the current values of 
                                          //the processes activation   
 };