separated registering of EM processes and hadronic
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 29 Nov 2001 16:28:57 +0000 (16:28 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 29 Nov 2001 16:28:57 +0000 (16:28 +0000)
processes (in order to enable switching of EM only);
added inheritance from TG4VPhysicsConstructor;
all G4cout calls controlled by verbose level
(defined in TG4Verbose)

TGeant4/TG4PhysicsConstructorHadron.cxx
TGeant4/TG4PhysicsConstructorHadron.h
TGeant4/TG4PhysicsConstructorIon.cxx
TGeant4/TG4PhysicsConstructorIon.h

index 2b15e0a..bce1cab 100644 (file)
 
 //_____________________________________________________________________________
 TG4PhysicsConstructorHadron::TG4PhysicsConstructorHadron(const G4String& name)
-  : G4VPhysicsConstructor(name)
-{
+  : TG4VPhysicsConstructor(name),
+    fSetEM(true),
+    fSetHadron(true) {
+//
+}
+
+//_____________________________________________________________________________
+TG4PhysicsConstructorHadron::TG4PhysicsConstructorHadron(G4int verboseLevel,
+                                                         G4bool setEM, 
+                                                        G4bool setHadron,
+                                                        const G4String& name)
+  : TG4VPhysicsConstructor(name, verboseLevel),
+    fSetEM(setEM),
+    fSetHadron(setHadron) {
 //
-  SetVerboseLevel(1);
 }
 
 //_____________________________________________________________________________
 TG4PhysicsConstructorHadron::TG4PhysicsConstructorHadron(
                                      const TG4PhysicsConstructorHadron& right)
+  : TG4VPhysicsConstructor(right)                                   
 {
 //
   TG4Globals::Exception("TG4PhysicsConstructorHadron is protected from copying.");
@@ -61,20 +73,13 @@ TG4PhysicsConstructorHadron::operator=(const TG4PhysicsConstructorHadron &right)
 // private methods
 
 //_____________________________________________________________________________
-void TG4PhysicsConstructorHadron::ConstructProcessForPionPlus()
+void TG4PhysicsConstructorHadron::ConstructEMProcessForPionPlus()
 {
 // Construct processes for pi+.
 // ---
 
   // add process
   G4ProcessManager* pManager = G4PionPlus::PionPlus()->GetProcessManager();
-  pManager->AddDiscreteProcess(&fElasticProcess);
-
-  fLEPionPlusModel = new G4LEPionPlusInelastic();
-  fHEPionPlusModel = new G4HEPionPlusInelastic();
-  fPionPlusInelastic.RegisterMe(fLEPionPlusModel);
-  fPionPlusInelastic.RegisterMe(fHEPionPlusModel);
-  pManager->AddDiscreteProcess(&fPionPlusInelastic);
 
   pManager->AddProcess(&fPionPlusIonisation, ordInActive, 2, 2);
   pManager->AddProcess(&fPionPlusMult);
@@ -85,21 +90,437 @@ void TG4PhysicsConstructorHadron::ConstructProcessForPionPlus()
 
   // map to G3 controls
   TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
-  controlMap->Add(&fElasticProcess, kHADR); 
-  controlMap->Add(&fPionPlusInelastic, kHADR); 
   controlMap->Add(&fPionPlusIonisation, kLOSS); 
   controlMap->Add(&fPionPlusMult, kMULS); 
 
   // map to G3 ALIMCProcess codes
   TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
-  mcMap->Add(&fElasticProcess, kPHElastic); 
-  mcMap->Add(&fPionPlusInelastic, kPHInhelastic); 
   mcMap->Add(&fPionPlusIonisation, kPEnergyLoss); 
   mcMap->Add(&fPionPlusMult, kPMultipleScattering); 
 }
 
 //_____________________________________________________________________________
-void TG4PhysicsConstructorHadron::ConstructProcessForPionMinus()
+void TG4PhysicsConstructorHadron::ConstructEMProcessForPionMinus()
+{
+// Construct processes for pi-.
+// ---
+
+  // add process & set ordering
+  G4ProcessManager* pManager = G4PionMinus::PionMinus()->GetProcessManager();
+
+  pManager->AddProcess(&fPionMinusIonisation, ordInActive, 2, 2);
+
+  pManager->AddProcess(&fPionMinusMult);
+  pManager->SetProcessOrdering(&fPionMinusMult, idxAlongStep, 1);
+  pManager->SetProcessOrdering(&fPionMinusMult, idxPostStep, 1);
+
+  // map to G3 controls
+  TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
+  controlMap->Add(&fPionMinusIonisation, kLOSS); 
+  controlMap->Add(&fPionMinusMult, kMULS); 
+
+  // map to G3 ALIMCProcess codes
+  TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
+  mcMap->Add(&fPionMinusIonisation, kPEnergyLoss); 
+  mcMap->Add(&fPionMinusMult, kPMultipleScattering); 
+}
+
+//_____________________________________________________________________________
+void TG4PhysicsConstructorHadron::ConstructEMProcessForKaonPlus()
+{
+// Construct processes for K+.
+// ---
+
+  // add process
+  G4ProcessManager* pManager = G4KaonPlus::KaonPlus()->GetProcessManager();
+
+  pManager->AddProcess(&fKaonPlusIonisation, ordInActive, 2, 2);
+  pManager->AddProcess(&fKaonPlusMult);
+
+  // set ordering
+  pManager->SetProcessOrdering(&fKaonPlusMult, idxAlongStep, 1);
+  pManager->SetProcessOrdering(&fKaonPlusMult, idxPostStep, 1);
+
+  // map to G3 controls
+  TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
+  controlMap->Add(&fKaonPlusIonisation, kLOSS); 
+  controlMap->Add(&fKaonPlusMult, kMULS); 
+
+  // map to G3 ALIMCProcess codes
+  TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
+  mcMap->Add(&fKaonPlusIonisation, kPEnergyLoss); 
+  mcMap->Add(&fKaonPlusMult, kPMultipleScattering); 
+}
+
+//_____________________________________________________________________________
+void TG4PhysicsConstructorHadron::ConstructEMProcessForKaonMinus()
+{
+// Construct processes for K-.
+// ---
+
+  // add process & set ordering
+  G4ProcessManager* pManager = G4KaonMinus::KaonMinus()->GetProcessManager();
+
+  pManager->AddProcess(&fKaonMinusIonisation, ordInActive, 2, 2);
+
+  pManager->AddProcess(&fKaonMinusMult);
+  pManager->SetProcessOrdering(&fKaonMinusMult, idxAlongStep, 1);
+  pManager->SetProcessOrdering(&fKaonMinusMult, idxPostStep, 1);
+
+  // map to G3 controls
+  TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
+  controlMap->Add(&fKaonMinusIonisation, kLOSS); 
+  controlMap->Add(&fKaonMinusMult, kMULS); 
+
+  // map to G3 ALIMCProcess codes
+  TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
+  mcMap->Add(&fKaonMinusIonisation, kPEnergyLoss); 
+  mcMap->Add(&fKaonMinusMult, kPMultipleScattering); 
+}
+
+//_____________________________________________________________________________
+void TG4PhysicsConstructorHadron::ConstructEMProcessForProton()
+{
+// Construct processes for proton.
+// ---
+
+  // add process
+  G4ProcessManager* pManager = G4Proton::Proton()->GetProcessManager();
+
+  pManager->AddProcess(&fProtonIonisation, ordInActive, 2, 2);
+  pManager->AddProcess(&fProtonMult);
+
+  // set ordering
+  pManager->SetProcessOrdering(&fProtonMult, idxAlongStep, 1);
+  pManager->SetProcessOrdering(&fProtonMult, idxPostStep, 1);
+
+  // map to G3 controls
+  TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
+  controlMap->Add(&fProtonIonisation, kLOSS); 
+  controlMap->Add(&fProtonMult, kMULS); 
+
+  // map to G3 ALIMCProcess codes
+  TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
+  mcMap->Add(&fProtonIonisation, kPEnergyLoss); 
+  mcMap->Add(&fProtonMult, kPMultipleScattering); 
+}
+
+//_____________________________________________________________________________
+void TG4PhysicsConstructorHadron::ConstructEMProcessForAntiProton()
+{
+// Construct processes for anti-proton.
+// ---
+
+  // add process & set ordering
+  G4ProcessManager* pManager = G4AntiProton::AntiProton()->GetProcessManager();
+
+  pManager->AddProcess(&fAntiProtonIonisation, ordInActive, 2, 2);
+
+  pManager->AddProcess(&fAntiProtonMult);
+  pManager->SetProcessOrdering(&fAntiProtonMult, idxAlongStep, 1);
+  pManager->SetProcessOrdering(&fAntiProtonMult, idxPostStep, 1);
+
+  pManager->AddRestProcess(&fAntiProtonAnnihilation);
+
+  // map to G3 controls
+  TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
+  controlMap->Add(&fAntiProtonIonisation, kLOSS); 
+  controlMap->Add(&fAntiProtonMult, kMULS); 
+
+  // map to G3 ALIMCProcess codes
+  TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
+  mcMap->Add(&fAntiProtonIonisation, kPEnergyLoss); 
+  mcMap->Add(&fAntiProtonMult, kPMultipleScattering); 
+}
+
+//_____________________________________________________________________________
+void TG4PhysicsConstructorHadron::ConstructEMProcessForSigmaMinus()
+{
+// Construct processes for Sigma-.
+// ---
+
+  // add process & set ordering
+  G4ProcessManager* pManager = G4SigmaMinus::SigmaMinus()->GetProcessManager();
+
+  pManager->AddProcess(&fSigmaMinusIonisation, ordInActive, 2, 2);
+
+  pManager->AddProcess(&fSigmaMinusMult);
+  pManager->SetProcessOrdering(&fSigmaMinusMult, idxAlongStep, 1);
+  pManager->SetProcessOrdering(&fSigmaMinusMult, idxPostStep, 1);
+
+  // map to G3 controls
+  TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
+  controlMap->Add(&fSigmaMinusIonisation, kLOSS); 
+  controlMap->Add(&fSigmaMinusMult, kMULS); 
+
+  // map to G3 ALIMCProcess codes
+  TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
+  mcMap->Add(&fSigmaMinusIonisation, kPEnergyLoss); 
+  mcMap->Add(&fSigmaMinusMult, kPMultipleScattering); 
+}
+
+//_____________________________________________________________________________
+void TG4PhysicsConstructorHadron::ConstructEMProcessForAntiSigmaMinus()
+{
+// Construct processes for anti-Sigma-.
+// ---
+
+  // add process & set ordering
+  G4ProcessManager* pManager 
+    = G4AntiSigmaMinus::AntiSigmaMinus()->GetProcessManager();
+
+  pManager->AddProcess(&fAntiSigmaMinusIonisation, ordInActive, 2, 2);
+
+  pManager->AddProcess(&fAntiSigmaMinusMult);
+  pManager->SetProcessOrdering(&fAntiSigmaMinusMult, idxAlongStep, 1);
+  pManager->SetProcessOrdering(&fAntiSigmaMinusMult, idxPostStep, 1);
+
+  // map to G3 controls
+  TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
+  controlMap->Add(&fAntiSigmaMinusIonisation, kLOSS); 
+  controlMap->Add(&fAntiSigmaMinusMult, kMULS); 
+
+  // map to G3 ALIMCProcess codes
+  TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
+  mcMap->Add(&fAntiSigmaMinusIonisation, kPEnergyLoss); 
+  mcMap->Add(&fAntiSigmaMinusMult, kPMultipleScattering); 
+}
+
+//_____________________________________________________________________________
+void TG4PhysicsConstructorHadron::ConstructEMProcessForSigmaPlus()
+{
+// Construct processes for Sigma+.
+// ---
+
+  // add process & set ordering
+  G4ProcessManager* pManager = G4SigmaPlus::SigmaPlus()->GetProcessManager();
+
+  pManager->AddProcess(&fSigmaPlusIonisation, ordInActive, 2, 2);
+
+  pManager->AddProcess(&fSigmaPlusMult);
+  pManager->SetProcessOrdering(&fSigmaPlusMult, idxAlongStep, 1);
+  pManager->SetProcessOrdering(&fSigmaPlusMult, idxPostStep, 1);
+
+  // map to G3 controls
+  TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
+  controlMap->Add(&fSigmaPlusIonisation, kLOSS); 
+  controlMap->Add(&fSigmaPlusMult, kMULS); 
+
+  // map to G3 ALIMCProcess codes
+  TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
+  mcMap->Add(&fSigmaPlusIonisation, kPEnergyLoss); 
+  mcMap->Add(&fSigmaPlusMult, kPMultipleScattering); 
+}
+
+//_____________________________________________________________________________
+void TG4PhysicsConstructorHadron::ConstructEMProcessForAntiSigmaPlus()
+{
+// Construct processes for anti-Sigma+.
+// ---
+
+  // add process & set ordering
+  G4ProcessManager* pManager 
+    = G4AntiSigmaPlus::AntiSigmaPlus()->GetProcessManager();
+
+  pManager->AddProcess(&fAntiSigmaPlusIonisation, ordInActive, 2, 2);
+
+  pManager->AddProcess(&fAntiSigmaPlusMult);
+  pManager->SetProcessOrdering(&fAntiSigmaPlusMult, idxAlongStep, 1);
+  pManager->SetProcessOrdering(&fAntiSigmaPlusMult, idxPostStep, 1);
+
+  // map to G3 controls
+  TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
+  controlMap->Add(&fAntiSigmaPlusIonisation, kLOSS); 
+  controlMap->Add(&fAntiSigmaPlusMult, kMULS); 
+
+  // map to G3 ALIMCProcess codes
+  TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
+  mcMap->Add(&fAntiSigmaPlusIonisation, kPEnergyLoss); 
+  mcMap->Add(&fAntiSigmaPlusMult, kPMultipleScattering); 
+}
+
+//_____________________________________________________________________________
+void TG4PhysicsConstructorHadron::ConstructEMProcessForXiMinus()
+{
+// Construct processes for Xi-.
+// ---
+
+  // add process & set ordering
+  G4ProcessManager* pManager = G4XiMinus::XiMinus()->GetProcessManager();
+
+  pManager->AddProcess(&fXiMinusIonisation, ordInActive, 2, 2);
+
+  pManager->AddProcess(&fXiMinusMult);
+  pManager->SetProcessOrdering(&fXiMinusMult, idxAlongStep, 1);
+  pManager->SetProcessOrdering(&fXiMinusMult, idxPostStep, 1);
+
+  // map to G3 controls
+  TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
+  controlMap->Add(&fXiMinusIonisation, kLOSS); 
+  controlMap->Add(&fXiMinusMult, kMULS); 
+
+  // map to G3 ALIMCProcess codes
+  TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
+  mcMap->Add(&fXiMinusIonisation, kPEnergyLoss); 
+  mcMap->Add(&fXiMinusMult, kPMultipleScattering); 
+}
+
+//_____________________________________________________________________________
+void TG4PhysicsConstructorHadron::ConstructEMProcessForAntiXiMinus()
+{
+// Construct processes for anti-Xi-.
+// ---
+
+  // add process & set ordering
+  G4ProcessManager* pManager 
+    = G4AntiXiMinus::AntiXiMinus()->GetProcessManager();
+
+  pManager->AddProcess(&fAntiXiMinusIonisation, ordInActive, 2, 2);
+
+  pManager->AddProcess(&fAntiXiMinusMult);
+  pManager->SetProcessOrdering(&fAntiXiMinusMult, idxAlongStep, 1);
+  pManager->SetProcessOrdering(&fAntiXiMinusMult, idxPostStep, 1);
+
+  // map to G3 controls
+  TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
+  controlMap->Add(&fAntiXiMinusIonisation, kLOSS); 
+  controlMap->Add(&fAntiXiMinusMult, kMULS); 
+
+  // map to G3 ALIMCProcess codes
+  TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
+  mcMap->Add(&fAntiXiMinusIonisation, kPEnergyLoss); 
+  mcMap->Add(&fAntiXiMinusMult, kPMultipleScattering); 
+}
+
+//_____________________________________________________________________________
+void TG4PhysicsConstructorHadron::ConstructEMProcessForOmegaMinus()
+{
+// Construct processes for Omega-.
+// ---
+
+  // add process & set ordering
+  G4ProcessManager* pManager = G4OmegaMinus::OmegaMinus()->GetProcessManager();
+
+  pManager->AddProcess(&fOmegaMinusIonisation, ordInActive, 2, 2);
+
+  pManager->AddProcess(&fOmegaMinusMult);
+  pManager->SetProcessOrdering(&fOmegaMinusMult, idxAlongStep, 1);
+  pManager->SetProcessOrdering(&fOmegaMinusMult, idxPostStep, 1);
+
+  // map to G3 controls
+  TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
+  controlMap->Add(&fOmegaMinusIonisation, kLOSS); 
+  controlMap->Add(&fOmegaMinusMult, kMULS); 
+
+  // map to G3 ALIMCProcess codes
+  TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
+  mcMap->Add(&fOmegaMinusIonisation, kPEnergyLoss); 
+  mcMap->Add(&fOmegaMinusMult, kPMultipleScattering); 
+}
+
+//_____________________________________________________________________________
+void TG4PhysicsConstructorHadron::ConstructEMProcessForAntiOmegaMinus()
+{
+// Construct processes for pi+.
+// ---
+
+  // add process & set ordering
+  G4ProcessManager* pManager 
+    = G4AntiOmegaMinus::AntiOmegaMinus()->GetProcessManager();
+
+  pManager->AddProcess(&fAntiOmegaMinusIonisation, ordInActive, 2, 2);
+
+  pManager->AddProcess(&fAntiOmegaMinusMult);
+  pManager->SetProcessOrdering(&fAntiOmegaMinusMult, idxAlongStep, 1);
+  pManager->SetProcessOrdering(&fAntiOmegaMinusMult, idxPostStep, 1);
+
+  // map to G3 controls
+  TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
+  controlMap->Add(&fAntiOmegaMinusIonisation, kLOSS); 
+  controlMap->Add(&fAntiOmegaMinusMult, kMULS); 
+
+  // map to G3 ALIMCProcess codes
+  TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
+  mcMap->Add(&fAntiOmegaMinusIonisation, kPEnergyLoss); 
+  mcMap->Add(&fAntiOmegaMinusMult, kPMultipleScattering); 
+}
+
+//_____________________________________________________________________________
+void TG4PhysicsConstructorHadron::ConstructEMProcessForOther()
+{
+// Construct processes for other hadrons.
+// ---
+
+  theParticleIterator->reset();
+  while( (*theParticleIterator)() ){
+    G4ParticleDefinition* particle = theParticleIterator->value();
+    G4ProcessManager* pManager = particle->GetProcessManager();
+    G4int nofAlongStepProcesses 
+      = pManager->GetAlongStepProcessVector()->length();
+
+    if ( !particle->IsShortLived()       &&
+         particle->GetPDGCharge() != 0.0 &&
+         nofAlongStepProcesses == 1      && 
+         particle->GetParticleName() != "chargedgeantino") {
+       
+      // create processes
+      G4VProcess* aMultipleScattering = new G4MultipleScattering();
+      G4VProcess* anIonisation = new G4hIonisation();
+
+      // add processes
+      pManager->AddProcess(anIonisation, ordInActive, 2, 2);
+      pManager->AddProcess(aMultipleScattering);
+
+      // set ordering
+      pManager->SetProcessOrdering(aMultipleScattering, idxAlongStep, 1);
+      pManager->SetProcessOrdering(aMultipleScattering, idxPostStep, 1);
+
+      // map to G3 controls
+      TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
+      controlMap->Add(anIonisation, kLOSS); 
+      controlMap->Add(aMultipleScattering, kMULS); 
+
+      // map to AliMCProcess codes
+      TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
+      mcMap->Add(anIonisation, kPEnergyLoss); 
+      mcMap->Add(aMultipleScattering, kPMultipleScattering); 
+      
+      // keep for deleting 
+      fOtherProcesses.push_back(aMultipleScattering);
+      fOtherProcesses.push_back(anIonisation);
+    }
+  }    
+}
+
+//_____________________________________________________________________________
+void TG4PhysicsConstructorHadron::ConstructHadProcessForPionPlus()
+{
+// Construct processes for pi+.
+// ---
+
+  // add process
+  G4ProcessManager* pManager = G4PionPlus::PionPlus()->GetProcessManager();
+  pManager->AddDiscreteProcess(&fElasticProcess);
+
+  fLEPionPlusModel = new G4LEPionPlusInelastic();
+  fHEPionPlusModel = new G4HEPionPlusInelastic();
+  fPionPlusInelastic.RegisterMe(fLEPionPlusModel);
+  fPionPlusInelastic.RegisterMe(fHEPionPlusModel);
+  pManager->AddDiscreteProcess(&fPionPlusInelastic);
+
+  // map to G3 controls
+  TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
+  controlMap->Add(&fElasticProcess, kHADR); 
+  controlMap->Add(&fPionPlusInelastic, kHADR); 
+
+  // map to G3 ALIMCProcess codes
+  TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
+  mcMap->Add(&fElasticProcess, kPHElastic); 
+  mcMap->Add(&fPionPlusInelastic, kPHInhelastic); 
+}
+
+//_____________________________________________________________________________
+void TG4PhysicsConstructorHadron::ConstructHadProcessForPionMinus()
 {
 // Construct processes for pi-.
 // ---
@@ -114,31 +535,21 @@ void TG4PhysicsConstructorHadron::ConstructProcessForPionMinus()
   fPionMinusInelastic.RegisterMe(fHEPionMinusModel);
   pManager->AddDiscreteProcess(&fPionMinusInelastic);
 
-  pManager->AddProcess(&fPionMinusIonisation, ordInActive, 2, 2);
-
-  pManager->AddProcess(&fPionMinusMult);
-  pManager->SetProcessOrdering(&fPionMinusMult, idxAlongStep, 1);
-  pManager->SetProcessOrdering(&fPionMinusMult, idxPostStep, 1);
-
   pManager->AddRestProcess(&fPionMinusAbsorption, ordDefault);
 
   // map to G3 controls
   TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
   controlMap->Add(&fPionMinusInelastic, kHADR); 
-  controlMap->Add(&fPionMinusIonisation, kLOSS); 
-  controlMap->Add(&fPionMinusMult, kMULS); 
   controlMap->Add(&fPionMinusAbsorption, kHADR); 
 
   // map to G3 ALIMCProcess codes
   TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
   mcMap->Add(&fPionMinusInelastic, kPHInhelastic); 
-  mcMap->Add(&fPionMinusIonisation, kPEnergyLoss); 
-  mcMap->Add(&fPionMinusMult, kPMultipleScattering); 
   mcMap->Add(&fPionMinusAbsorption, kPNuclearAbsorption); 
 }
 
 //_____________________________________________________________________________
-void TG4PhysicsConstructorHadron::ConstructProcessForKaonPlus()
+void TG4PhysicsConstructorHadron::ConstructHadProcessForKaonPlus()
 {
 // Construct processes for K+.
 // ---
@@ -153,28 +564,17 @@ void TG4PhysicsConstructorHadron::ConstructProcessForKaonPlus()
   fKaonPlusInelastic.RegisterMe(fHEKaonPlusModel);
   pManager->AddDiscreteProcess(&fKaonPlusInelastic);
 
-  pManager->AddProcess(&fKaonPlusIonisation, ordInActive, 2, 2);
-  pManager->AddProcess(&fKaonPlusMult);
-
-  // set ordering
-  pManager->SetProcessOrdering(&fKaonPlusMult, idxAlongStep, 1);
-  pManager->SetProcessOrdering(&fKaonPlusMult, idxPostStep, 1);
-
   // map to G3 controls
   TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
   controlMap->Add(&fKaonPlusInelastic, kHADR); 
-  controlMap->Add(&fKaonPlusIonisation, kLOSS); 
-  controlMap->Add(&fKaonPlusMult, kMULS); 
 
   // map to G3 ALIMCProcess codes
   TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
   mcMap->Add(&fKaonPlusInelastic, kPHInhelastic); 
-  mcMap->Add(&fKaonPlusIonisation, kPEnergyLoss); 
-  mcMap->Add(&fKaonPlusMult, kPMultipleScattering); 
 }
 
 //_____________________________________________________________________________
-void TG4PhysicsConstructorHadron::ConstructProcessForKaonMinus()
+void TG4PhysicsConstructorHadron::ConstructHadProcessForKaonMinus()
 {
 // Construct processes for K-.
 // ---
@@ -189,31 +589,21 @@ void TG4PhysicsConstructorHadron::ConstructProcessForKaonMinus()
   fKaonMinusInelastic.RegisterMe(fHEKaonMinusModel);
   pManager->AddDiscreteProcess(&fKaonMinusInelastic);
 
-  pManager->AddProcess(&fKaonMinusIonisation, ordInActive, 2, 2);
-
-  pManager->AddProcess(&fKaonMinusMult);
-  pManager->SetProcessOrdering(&fKaonMinusMult, idxAlongStep, 1);
-  pManager->SetProcessOrdering(&fKaonMinusMult, idxPostStep, 1);
-
   pManager->AddRestProcess(&fKaonMinusAbsorption, ordDefault);
 
   // map to G3 controls
   TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
   controlMap->Add(&fKaonMinusInelastic, kHADR); 
-  controlMap->Add(&fKaonMinusIonisation, kLOSS); 
-  controlMap->Add(&fKaonMinusMult, kMULS); 
   controlMap->Add(&fKaonMinusAbsorption, kHADR); 
 
   // map to G3 ALIMCProcess codes
   TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
   mcMap->Add(&fKaonMinusInelastic, kPHInhelastic); 
-  mcMap->Add(&fKaonMinusIonisation, kPEnergyLoss); 
-  mcMap->Add(&fKaonMinusMult, kPMultipleScattering); 
   mcMap->Add(&fKaonMinusAbsorption, kPNuclearAbsorption); 
 }
 
 //_____________________________________________________________________________
-void TG4PhysicsConstructorHadron::ConstructProcessForKaonZeroLong()
+void TG4PhysicsConstructorHadron::ConstructHadProcessForKaonZeroLong()
 {
 // Construct processes for K0L.
 // ---
@@ -239,7 +629,7 @@ void TG4PhysicsConstructorHadron::ConstructProcessForKaonZeroLong()
 }
 
 //_____________________________________________________________________________
-void TG4PhysicsConstructorHadron::ConstructProcessForKaonZeroShort()
+void TG4PhysicsConstructorHadron::ConstructHadProcessForKaonZeroShort()
 {
 // Construct processes for K0S.
 // ---
@@ -265,7 +655,7 @@ void TG4PhysicsConstructorHadron::ConstructProcessForKaonZeroShort()
 }
 
 //_____________________________________________________________________________
-void TG4PhysicsConstructorHadron::ConstructProcessForProton()
+void TG4PhysicsConstructorHadron::ConstructHadProcessForProton()
 {
 // Construct processes for proton.
 // ---
@@ -280,28 +670,17 @@ void TG4PhysicsConstructorHadron::ConstructProcessForProton()
   fProtonInelastic.RegisterMe(fHEProtonModel);
   pManager->AddDiscreteProcess(&fProtonInelastic);
 
-  pManager->AddProcess(&fProtonIonisation, ordInActive, 2, 2);
-  pManager->AddProcess(&fProtonMult);
-
-  // set ordering
-  pManager->SetProcessOrdering(&fProtonMult, idxAlongStep, 1);
-  pManager->SetProcessOrdering(&fProtonMult, idxPostStep, 1);
-
   // map to G3 controls
   TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
   controlMap->Add(&fProtonInelastic, kHADR); 
-  controlMap->Add(&fProtonIonisation, kLOSS); 
-  controlMap->Add(&fProtonMult, kMULS); 
 
   // map to G3 ALIMCProcess codes
   TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
   mcMap->Add(&fProtonInelastic, kPHInhelastic); 
-  mcMap->Add(&fProtonIonisation, kPEnergyLoss); 
-  mcMap->Add(&fProtonMult, kPMultipleScattering); 
 }
 
 //_____________________________________________________________________________
-void TG4PhysicsConstructorHadron::ConstructProcessForAntiProton()
+void TG4PhysicsConstructorHadron::ConstructHadProcessForAntiProton()
 {
 // Construct processes for anti-proton.
 // ---
@@ -316,31 +695,21 @@ void TG4PhysicsConstructorHadron::ConstructProcessForAntiProton()
   fAntiProtonInelastic.RegisterMe(fHEAntiProtonModel);
   pManager->AddDiscreteProcess(&fAntiProtonInelastic);
 
-  pManager->AddProcess(&fAntiProtonIonisation, ordInActive, 2, 2);
-
-  pManager->AddProcess(&fAntiProtonMult);
-  pManager->SetProcessOrdering(&fAntiProtonMult, idxAlongStep, 1);
-  pManager->SetProcessOrdering(&fAntiProtonMult, idxPostStep, 1);
-
   pManager->AddRestProcess(&fAntiProtonAnnihilation);
 
   // map to G3 controls
   TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
   controlMap->Add(&fAntiProtonInelastic, kHADR); 
-  controlMap->Add(&fAntiProtonIonisation, kLOSS); 
-  controlMap->Add(&fAntiProtonMult, kMULS); 
   controlMap->Add(&fAntiProtonAnnihilation, kHADR); 
 
   // map to G3 ALIMCProcess codes
   TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
   mcMap->Add(&fAntiProtonInelastic, kPHInhelastic); 
-  mcMap->Add(&fAntiProtonIonisation, kPEnergyLoss); 
-  mcMap->Add(&fAntiProtonMult, kPMultipleScattering); 
   mcMap->Add(&fAntiProtonAnnihilation, kPPbarAnnihilation); 
 }
 
 //_____________________________________________________________________________
-void TG4PhysicsConstructorHadron::ConstructProcessForNeutron()
+void TG4PhysicsConstructorHadron::ConstructHadProcessForNeutron()
 {
 // Construct processes for neutron.
 // ---
@@ -373,7 +742,7 @@ void TG4PhysicsConstructorHadron::ConstructProcessForNeutron()
 }
 
 //_____________________________________________________________________________
-void TG4PhysicsConstructorHadron::ConstructProcessForAntiNeutron()
+void TG4PhysicsConstructorHadron::ConstructHadProcessForAntiNeutron()
 {
 // Construct processes for anti-neutron.
 // ---
@@ -402,7 +771,7 @@ void TG4PhysicsConstructorHadron::ConstructProcessForAntiNeutron()
 }
 
 //_____________________________________________________________________________
-void TG4PhysicsConstructorHadron::ConstructProcessForLambda()
+void TG4PhysicsConstructorHadron::ConstructHadProcessForLambda()
 {
 // Construct processes for Lambda.
 // ---
@@ -427,7 +796,7 @@ void TG4PhysicsConstructorHadron::ConstructProcessForLambda()
 }
 
 //_____________________________________________________________________________
-void TG4PhysicsConstructorHadron::ConstructProcessForAntiLambda()
+void TG4PhysicsConstructorHadron::ConstructHadProcessForAntiLambda()
 {
 // Construct processes for anti-Lambda.
 // ---
@@ -452,7 +821,7 @@ void TG4PhysicsConstructorHadron::ConstructProcessForAntiLambda()
 }
 
 //_____________________________________________________________________________
-void TG4PhysicsConstructorHadron::ConstructProcessForSigmaMinus()
+void TG4PhysicsConstructorHadron::ConstructHadProcessForSigmaMinus()
 {
 // Construct processes for Sigma-.
 // ---
@@ -467,27 +836,17 @@ void TG4PhysicsConstructorHadron::ConstructProcessForSigmaMinus()
   fSigmaMinusInelastic.RegisterMe(fHESigmaMinusModel);
   pManager->AddDiscreteProcess(&fSigmaMinusInelastic);
 
-  pManager->AddProcess(&fSigmaMinusIonisation, ordInActive, 2, 2);
-
-  pManager->AddProcess(&fSigmaMinusMult);
-  pManager->SetProcessOrdering(&fSigmaMinusMult, idxAlongStep, 1);
-  pManager->SetProcessOrdering(&fSigmaMinusMult, idxPostStep, 1);
-
   // map to G3 controls
   TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
   controlMap->Add(&fSigmaMinusInelastic, kHADR); 
-  controlMap->Add(&fSigmaMinusIonisation, kLOSS); 
-  controlMap->Add(&fSigmaMinusMult, kMULS); 
 
   // map to G3 ALIMCProcess codes
   TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
   mcMap->Add(&fSigmaMinusInelastic, kPHInhelastic); 
-  mcMap->Add(&fSigmaMinusIonisation, kPEnergyLoss); 
-  mcMap->Add(&fSigmaMinusMult, kPMultipleScattering); 
 }
 
 //_____________________________________________________________________________
-void TG4PhysicsConstructorHadron::ConstructProcessForAntiSigmaMinus()
+void TG4PhysicsConstructorHadron::ConstructHadProcessForAntiSigmaMinus()
 {
 // Construct processes for anti-Sigma-.
 // ---
@@ -503,27 +862,17 @@ void TG4PhysicsConstructorHadron::ConstructProcessForAntiSigmaMinus()
   fAntiSigmaMinusInelastic.RegisterMe(fHEAntiSigmaMinusModel);
   pManager->AddDiscreteProcess(&fAntiSigmaMinusInelastic);
 
-  pManager->AddProcess(&fAntiSigmaMinusIonisation, ordInActive, 2, 2);
-
-  pManager->AddProcess(&fAntiSigmaMinusMult);
-  pManager->SetProcessOrdering(&fAntiSigmaMinusMult, idxAlongStep, 1);
-  pManager->SetProcessOrdering(&fAntiSigmaMinusMult, idxPostStep, 1);
-
   // map to G3 controls
   TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
   controlMap->Add(&fAntiSigmaMinusInelastic, kHADR); 
-  controlMap->Add(&fAntiSigmaMinusIonisation, kLOSS); 
-  controlMap->Add(&fAntiSigmaMinusMult, kMULS); 
 
   // map to G3 ALIMCProcess codes
   TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
   mcMap->Add(&fAntiSigmaMinusInelastic, kPHInhelastic); 
-  mcMap->Add(&fAntiSigmaMinusIonisation, kPEnergyLoss); 
-  mcMap->Add(&fAntiSigmaMinusMult, kPMultipleScattering); 
 }
 
 //_____________________________________________________________________________
-void TG4PhysicsConstructorHadron::ConstructProcessForSigmaPlus()
+void TG4PhysicsConstructorHadron::ConstructHadProcessForSigmaPlus()
 {
 // Construct processes for Sigma+.
 // ---
@@ -538,27 +887,17 @@ void TG4PhysicsConstructorHadron::ConstructProcessForSigmaPlus()
   fSigmaPlusInelastic.RegisterMe(fHESigmaPlusModel);
   pManager->AddDiscreteProcess(&fSigmaPlusInelastic);
 
-  pManager->AddProcess(&fSigmaPlusIonisation, ordInActive, 2, 2);
-
-  pManager->AddProcess(&fSigmaPlusMult);
-  pManager->SetProcessOrdering(&fSigmaPlusMult, idxAlongStep, 1);
-  pManager->SetProcessOrdering(&fSigmaPlusMult, idxPostStep, 1);
-
   // map to G3 controls
   TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
   controlMap->Add(&fSigmaPlusInelastic, kHADR); 
-  controlMap->Add(&fSigmaPlusIonisation, kLOSS); 
-  controlMap->Add(&fSigmaPlusMult, kMULS); 
 
   // map to G3 ALIMCProcess codes
   TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
   mcMap->Add(&fSigmaPlusInelastic, kPHInhelastic); 
-  mcMap->Add(&fSigmaPlusIonisation, kPEnergyLoss); 
-  mcMap->Add(&fSigmaPlusMult, kPMultipleScattering); 
 }
 
 //_____________________________________________________________________________
-void TG4PhysicsConstructorHadron::ConstructProcessForAntiSigmaPlus()
+void TG4PhysicsConstructorHadron::ConstructHadProcessForAntiSigmaPlus()
 {
 // Construct processes for anti-Sigma+.
 // ---
@@ -574,27 +913,17 @@ void TG4PhysicsConstructorHadron::ConstructProcessForAntiSigmaPlus()
   fAntiSigmaPlusInelastic.RegisterMe(fHEAntiSigmaPlusModel);
   pManager->AddDiscreteProcess(&fAntiSigmaPlusInelastic);
 
-  pManager->AddProcess(&fAntiSigmaPlusIonisation, ordInActive, 2, 2);
-
-  pManager->AddProcess(&fAntiSigmaPlusMult);
-  pManager->SetProcessOrdering(&fAntiSigmaPlusMult, idxAlongStep, 1);
-  pManager->SetProcessOrdering(&fAntiSigmaPlusMult, idxPostStep, 1);
-
   // map to G3 controls
   TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
   controlMap->Add(&fAntiSigmaPlusInelastic, kHADR); 
-  controlMap->Add(&fAntiSigmaPlusIonisation, kLOSS); 
-  controlMap->Add(&fAntiSigmaPlusMult, kMULS); 
 
   // map to G3 ALIMCProcess codes
   TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
   mcMap->Add(&fAntiSigmaPlusInelastic, kPHInhelastic); 
-  mcMap->Add(&fAntiSigmaPlusIonisation, kPEnergyLoss); 
-  mcMap->Add(&fAntiSigmaPlusMult, kPMultipleScattering); 
 }
 
 //_____________________________________________________________________________
-void TG4PhysicsConstructorHadron::ConstructProcessForXiMinus()
+void TG4PhysicsConstructorHadron::ConstructHadProcessForXiMinus()
 {
 // Construct processes for Xi-.
 // ---
@@ -609,27 +938,17 @@ void TG4PhysicsConstructorHadron::ConstructProcessForXiMinus()
   fXiMinusInelastic.RegisterMe(fHEXiMinusModel);
   pManager->AddDiscreteProcess(&fXiMinusInelastic);
 
-  pManager->AddProcess(&fXiMinusIonisation, ordInActive, 2, 2);
-
-  pManager->AddProcess(&fXiMinusMult);
-  pManager->SetProcessOrdering(&fXiMinusMult, idxAlongStep, 1);
-  pManager->SetProcessOrdering(&fXiMinusMult, idxPostStep, 1);
-
   // map to G3 controls
   TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
   controlMap->Add(&fXiMinusInelastic, kHADR); 
-  controlMap->Add(&fXiMinusIonisation, kLOSS); 
-  controlMap->Add(&fXiMinusMult, kMULS); 
 
   // map to G3 ALIMCProcess codes
   TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
   mcMap->Add(&fXiMinusInelastic, kPHInhelastic); 
-  mcMap->Add(&fXiMinusIonisation, kPEnergyLoss); 
-  mcMap->Add(&fXiMinusMult, kPMultipleScattering); 
 }
 
 //_____________________________________________________________________________
-void TG4PhysicsConstructorHadron::ConstructProcessForAntiXiMinus()
+void TG4PhysicsConstructorHadron::ConstructHadProcessForAntiXiMinus()
 {
 // Construct processes for anti-Xi-.
 // ---
@@ -645,27 +964,17 @@ void TG4PhysicsConstructorHadron::ConstructProcessForAntiXiMinus()
   fAntiXiMinusInelastic.RegisterMe(fHEAntiXiMinusModel);
   pManager->AddDiscreteProcess(&fAntiXiMinusInelastic);
 
-  pManager->AddProcess(&fAntiXiMinusIonisation, ordInActive, 2, 2);
-
-  pManager->AddProcess(&fAntiXiMinusMult);
-  pManager->SetProcessOrdering(&fAntiXiMinusMult, idxAlongStep, 1);
-  pManager->SetProcessOrdering(&fAntiXiMinusMult, idxPostStep, 1);
-
   // map to G3 controls
   TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
   controlMap->Add(&fAntiXiMinusInelastic, kHADR); 
-  controlMap->Add(&fAntiXiMinusIonisation, kLOSS); 
-  controlMap->Add(&fAntiXiMinusMult, kMULS); 
 
   // map to G3 ALIMCProcess codes
   TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
   mcMap->Add(&fAntiXiMinusInelastic, kPHInhelastic); 
-  mcMap->Add(&fAntiXiMinusIonisation, kPEnergyLoss); 
-  mcMap->Add(&fAntiXiMinusMult, kPMultipleScattering); 
 }
 
 //_____________________________________________________________________________
-void TG4PhysicsConstructorHadron::ConstructProcessForXiZero()
+void TG4PhysicsConstructorHadron::ConstructHadProcessForXiZero()
 {
 // Construct processes for Xi0.
 // ---
@@ -690,7 +999,7 @@ void TG4PhysicsConstructorHadron::ConstructProcessForXiZero()
 }
 
 //_____________________________________________________________________________
-void TG4PhysicsConstructorHadron::ConstructProcessForAntiXiZero()
+void TG4PhysicsConstructorHadron::ConstructHadProcessForAntiXiZero()
 {
 // Construct processes for anti-Xi0.
 // ---
@@ -715,7 +1024,7 @@ void TG4PhysicsConstructorHadron::ConstructProcessForAntiXiZero()
 }
 
 //_____________________________________________________________________________
-void TG4PhysicsConstructorHadron::ConstructProcessForOmegaMinus()
+void TG4PhysicsConstructorHadron::ConstructHadProcessForOmegaMinus()
 {
 // Construct processes for Omega-.
 // ---
@@ -730,27 +1039,17 @@ void TG4PhysicsConstructorHadron::ConstructProcessForOmegaMinus()
   fOmegaMinusInelastic.RegisterMe(fHEOmegaMinusModel);
   pManager->AddDiscreteProcess(&fOmegaMinusInelastic);
 
-  pManager->AddProcess(&fOmegaMinusIonisation, ordInActive, 2, 2);
-
-  pManager->AddProcess(&fOmegaMinusMult);
-  pManager->SetProcessOrdering(&fOmegaMinusMult, idxAlongStep, 1);
-  pManager->SetProcessOrdering(&fOmegaMinusMult, idxPostStep, 1);
-
   // map to G3 controls
   TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
   controlMap->Add(&fOmegaMinusInelastic, kHADR); 
-  controlMap->Add(&fOmegaMinusIonisation, kLOSS); 
-  controlMap->Add(&fOmegaMinusMult, kMULS); 
 
   // map to G3 ALIMCProcess codes
   TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
   mcMap->Add(&fOmegaMinusInelastic, kPHInhelastic); 
-  mcMap->Add(&fOmegaMinusIonisation, kPEnergyLoss); 
-  mcMap->Add(&fOmegaMinusMult, kPMultipleScattering); 
 }
 
 //_____________________________________________________________________________
-void TG4PhysicsConstructorHadron::ConstructProcessForAntiOmegaMinus()
+void TG4PhysicsConstructorHadron::ConstructHadProcessForAntiOmegaMinus()
 {
 // Construct processes for pi+.
 // ---
@@ -766,27 +1065,17 @@ void TG4PhysicsConstructorHadron::ConstructProcessForAntiOmegaMinus()
   fAntiOmegaMinusInelastic.RegisterMe(fHEAntiOmegaMinusModel);
   pManager->AddDiscreteProcess(&fAntiOmegaMinusInelastic);
 
-  pManager->AddProcess(&fAntiOmegaMinusIonisation, ordInActive, 2, 2);
-
-  pManager->AddProcess(&fAntiOmegaMinusMult);
-  pManager->SetProcessOrdering(&fAntiOmegaMinusMult, idxAlongStep, 1);
-  pManager->SetProcessOrdering(&fAntiOmegaMinusMult, idxPostStep, 1);
-
   // map to G3 controls
   TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
   controlMap->Add(&fAntiOmegaMinusInelastic, kHADR); 
-  controlMap->Add(&fAntiOmegaMinusIonisation, kLOSS); 
-  controlMap->Add(&fAntiOmegaMinusMult, kMULS); 
 
   // map to G3 ALIMCProcess codes
   TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
   mcMap->Add(&fAntiOmegaMinusInelastic, kPHInhelastic); 
-  mcMap->Add(&fAntiOmegaMinusIonisation, kPEnergyLoss); 
-  mcMap->Add(&fAntiOmegaMinusMult, kPMultipleScattering); 
 }
 
 //_____________________________________________________________________________
-void TG4PhysicsConstructorHadron::ConstructProcessForOther()
+void TG4PhysicsConstructorHadron::ConstructHadProcessForOther()
 {
 // Construct processes for other hadrons.
 // ---
@@ -832,6 +1121,7 @@ void TG4PhysicsConstructorHadron::ConstructProcessForOther()
   }    
 }
 
+
 // protected methods
 
 //_____________________________________________________________________________
@@ -858,36 +1148,58 @@ void TG4PhysicsConstructorHadron::ConstructProcess()
 {
 // Construct all hadronic processes.
 // ---
-
-  // Elastic Process
-  fElasticModel = new G4LElastic();
-  fElasticProcess.RegisterMe(fElasticModel);
+  if (fSetHadron) {
+    // Elastic process
+    fElasticModel = new G4LElastic();
+    fElasticProcess.RegisterMe(fElasticModel);
   
-  ConstructProcessForPionPlus();
-  ConstructProcessForPionMinus();
-  ConstructProcessForKaonPlus();
-  ConstructProcessForKaonMinus();
-  ConstructProcessForKaonZeroLong();
-  ConstructProcessForKaonZeroShort();
-  ConstructProcessForProton();
-  ConstructProcessForAntiProton();
-  ConstructProcessForNeutron();
-  ConstructProcessForAntiNeutron();
-  ConstructProcessForLambda();
-  ConstructProcessForAntiLambda();
-  ConstructProcessForSigmaMinus();
-  ConstructProcessForAntiSigmaMinus();
-  ConstructProcessForSigmaPlus();
-  ConstructProcessForAntiSigmaPlus();
-  ConstructProcessForXiMinus();
-  ConstructProcessForAntiXiMinus();
-  ConstructProcessForXiZero();
-  ConstructProcessForAntiXiZero();
-  ConstructProcessForOmegaMinus();
-  ConstructProcessForAntiOmegaMinus();
-  ConstructProcessForOther();
-
-  if (verboseLevel>0)
+    // Hadron processes
+    ConstructHadProcessForPionPlus();
+    ConstructHadProcessForPionMinus();
+    ConstructHadProcessForKaonPlus();
+    ConstructHadProcessForKaonMinus();
+    ConstructHadProcessForKaonZeroLong();
+    ConstructHadProcessForKaonZeroShort();
+    ConstructHadProcessForProton();
+    ConstructHadProcessForAntiProton();
+    ConstructHadProcessForNeutron();
+    ConstructHadProcessForAntiNeutron();
+    ConstructHadProcessForLambda();
+    ConstructHadProcessForAntiLambda();
+    ConstructHadProcessForSigmaMinus();
+    ConstructHadProcessForAntiSigmaMinus();
+    ConstructHadProcessForSigmaPlus();
+    ConstructHadProcessForAntiSigmaPlus();
+    ConstructHadProcessForXiMinus();
+    ConstructHadProcessForAntiXiMinus();
+    ConstructHadProcessForXiZero();
+    ConstructHadProcessForAntiXiZero();
+    ConstructHadProcessForOmegaMinus();
+    ConstructHadProcessForAntiOmegaMinus();
+    ConstructHadProcessForOther();
+  }  
+
+  if (fSetEM) {
+    // EM processes
+    ConstructEMProcessForPionPlus();
+    ConstructEMProcessForPionMinus();
+    ConstructEMProcessForKaonPlus();
+    ConstructEMProcessForKaonMinus();
+    ConstructEMProcessForProton();
+    ConstructEMProcessForAntiProton();
+    ConstructEMProcessForSigmaMinus();
+    ConstructEMProcessForAntiSigmaMinus();
+    ConstructEMProcessForSigmaPlus();
+    ConstructEMProcessForAntiSigmaPlus();
+    ConstructEMProcessForXiMinus();
+    ConstructEMProcessForAntiXiMinus();
+    ConstructEMProcessForOmegaMinus();
+    ConstructEMProcessForAntiOmegaMinus();
+    ConstructEMProcessForOther();
+  }  
+
+  if (VerboseLevel() > 0) {
      G4cout << "### Hadron physics constructed." << G4endl;
+  }   
 }
 
index 8cddb93..bae464f 100644 (file)
@@ -11,7 +11,8 @@
 #ifndef TG4_PHYSICS_CONSTRUCTOR_HADRON_H
 #define TG4_PHYSICS_CONSTRUCTOR_HADRON_H
 
-#include <G4VPhysicsConstructor.hh>
+#include "TG4VPhysicsConstructor.h"
+
 #include <g4std/vector>
 #include <globals.hh>
 
 #include <G4KaonMinusAbsorptionAtRest.hh>
 #endif
 
-class TG4PhysicsConstructorHadron: public G4VPhysicsConstructor
+class TG4PhysicsConstructorHadron: public TG4VPhysicsConstructor
 {
   typedef G4std::vector<G4VProcess*>  ProcessVector;
 
   public:
     TG4PhysicsConstructorHadron(const G4String& name = "Hadron");
+    TG4PhysicsConstructorHadron(G4int verboseLevel, 
+                                G4bool setEM, G4bool setHadron,
+                                const G4String& name = "Hadron");
     // --> protected
     // TG4PhysicsConstructorHadron(const TG4PhysicsConstructorHadron& right);
     virtual ~TG4PhysicsConstructorHadron();
@@ -306,29 +310,52 @@ class TG4PhysicsConstructorHadron: public G4VPhysicsConstructor
 
   private:
     // methods
-    void ConstructProcessForPionPlus();
-    void ConstructProcessForPionMinus();
-    void ConstructProcessForKaonPlus();
-    void ConstructProcessForKaonMinus();
-    void ConstructProcessForKaonZeroLong();
-    void ConstructProcessForKaonZeroShort();
-    void ConstructProcessForProton();
-    void ConstructProcessForAntiProton();
-    void ConstructProcessForNeutron();
-    void ConstructProcessForAntiNeutron();
-    void ConstructProcessForLambda();
-    void ConstructProcessForAntiLambda();
-    void ConstructProcessForSigmaMinus();
-    void ConstructProcessForAntiSigmaMinus();
-    void ConstructProcessForSigmaPlus();
-    void ConstructProcessForAntiSigmaPlus();
-    void ConstructProcessForXiMinus();
-    void ConstructProcessForAntiXiMinus();
-    void ConstructProcessForXiZero();
-    void ConstructProcessForAntiXiZero();
-    void ConstructProcessForOmegaMinus();
-    void ConstructProcessForAntiOmegaMinus();
-    void ConstructProcessForOther();
+
+    // EM processes
+    void ConstructEMProcessForPionPlus();
+    void ConstructEMProcessForPionMinus();
+    void ConstructEMProcessForKaonPlus();
+    void ConstructEMProcessForKaonMinus();
+    void ConstructEMProcessForProton();
+    void ConstructEMProcessForAntiProton();
+    void ConstructEMProcessForSigmaMinus();
+    void ConstructEMProcessForAntiSigmaMinus();
+    void ConstructEMProcessForSigmaPlus();
+    void ConstructEMProcessForAntiSigmaPlus();
+    void ConstructEMProcessForXiMinus();
+    void ConstructEMProcessForAntiXiMinus();
+    void ConstructEMProcessForOmegaMinus();
+    void ConstructEMProcessForAntiOmegaMinus();
+    void ConstructEMProcessForOther();
+
+    // hadron processes
+    void ConstructHadProcessForPionPlus();
+    void ConstructHadProcessForPionMinus();
+    void ConstructHadProcessForKaonPlus();
+    void ConstructHadProcessForKaonMinus();
+    void ConstructHadProcessForKaonZeroLong();
+    void ConstructHadProcessForKaonZeroShort();
+    void ConstructHadProcessForProton();
+    void ConstructHadProcessForAntiProton();
+    void ConstructHadProcessForNeutron();
+    void ConstructHadProcessForAntiNeutron();
+    void ConstructHadProcessForLambda();
+    void ConstructHadProcessForAntiLambda();
+    void ConstructHadProcessForSigmaMinus();
+    void ConstructHadProcessForAntiSigmaMinus();
+    void ConstructHadProcessForSigmaPlus();
+    void ConstructHadProcessForAntiSigmaPlus();
+    void ConstructHadProcessForXiMinus();
+    void ConstructHadProcessForAntiXiMinus();
+    void ConstructHadProcessForXiZero();
+    void ConstructHadProcessForAntiXiZero();
+    void ConstructHadProcessForOmegaMinus();
+    void ConstructHadProcessForAntiOmegaMinus();
+    void ConstructHadProcessForOther();
+
+    // data members
+    G4bool  fSetEM;    //if true - EM processes are constructed
+    G4bool  fSetHadron;//if true - hadron processes are constructed
 };
 
 #endif //TG4_PHYSICS_CONSTRUCTOR_HADRON_H
index 4db709f..68e1968 100644 (file)
 
 //_____________________________________________________________________________
 TG4PhysicsConstructorIon::TG4PhysicsConstructorIon(const G4String& name)
-  : G4VPhysicsConstructor(name)
-{
+  : TG4VPhysicsConstructor(name),
+    fSetEM(true),
+    fSetHadron(true) {
+//
+}
+
+//_____________________________________________________________________________
+TG4PhysicsConstructorIon::TG4PhysicsConstructorIon(G4int verboseLevel,
+                                                   G4bool setEM,
+                                                  G4bool setHadron,
+                                                  const G4String& name)
+  : TG4VPhysicsConstructor(name, verboseLevel),
+    fSetEM(setEM),
+    fSetHadron(setHadron) {
 //
-  SetVerboseLevel(1);
 }
 
 //_____________________________________________________________________________
@@ -58,7 +69,7 @@ TG4PhysicsConstructorIon::operator=(const TG4PhysicsConstructorIon &right)
 // private methods
 
 //_____________________________________________________________________________
-void TG4PhysicsConstructorIon::ConstructProcessForGenericIon()
+void TG4PhysicsConstructorIon::ConstructHadProcessForGenericIon()
 {
 // Constructs electromagnetic processes for generic ion.
 // ---
@@ -66,6 +77,104 @@ void TG4PhysicsConstructorIon::ConstructProcessForGenericIon()
   // add process
   G4ProcessManager* pManager = G4GenericIon::GenericIon()->GetProcessManager();
   pManager->AddDiscreteProcess(&fElasticProcess);
+
+  // map to G3 controls
+  TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
+  controlMap->Add(&fElasticProcess, kHADR); 
+
+  // map to AliMCProcess codes
+  TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
+  mcMap->Add(&fElasticProcess, kPHElastic); 
+}
+
+//_____________________________________________________________________________
+void TG4PhysicsConstructorIon::ConstructHadProcessForDeuteron()
+{
+// Constructs electromagnetic processes for deuteron.
+// ---
+
+  // add process
+  G4ProcessManager* pManager = G4Deuteron::Deuteron()->GetProcessManager();
+  pManager->AddDiscreteProcess(&fElasticProcess);
+
+  fDeuteronModel = new G4LEDeuteronInelastic();
+  fDeuteronProcess.RegisterMe(fDeuteronModel);
+  pManager->AddDiscreteProcess(&fDeuteronProcess);
+
+  // map to G3 controls
+  TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
+  controlMap->Add(&fDeuteronProcess, kHADR); 
+
+  // map to AliMCProcess codes
+  TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
+  mcMap->Add(&fDeuteronProcess, kPHInhelastic); 
+}
+
+//_____________________________________________________________________________
+void TG4PhysicsConstructorIon::ConstructHadProcessForTriton()
+{
+// Constructs electromagnetic processes for triton.
+// ---
+
+  // add process
+  G4ProcessManager* pManager = G4Triton::Triton()->GetProcessManager();
+  pManager->AddDiscreteProcess(&fElasticProcess);
+
+  fTritonModel = new G4LETritonInelastic();
+  fTritonProcess.RegisterMe(fTritonModel);
+  pManager->AddDiscreteProcess(&fTritonProcess);
+
+  // map to G3 controls
+  TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
+  controlMap->Add(&fTritonProcess, kHADR); 
+
+  // map to AliMCProcess codes
+  TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
+  mcMap->Add(&fTritonProcess, kPHInhelastic); 
+}
+
+//_____________________________________________________________________________
+void TG4PhysicsConstructorIon::ConstructHadProcessForAlpha()
+{
+// Constructs electromagnetic processes for alpha.
+// ---
+
+  // add process
+  G4ProcessManager* pManager = G4Alpha::Alpha()->GetProcessManager();
+  pManager->AddDiscreteProcess(&fElasticProcess);
+
+  fAlphaModel = new G4LEAlphaInelastic();
+  fAlphaProcess.RegisterMe(fAlphaModel);
+  pManager->AddDiscreteProcess(&fAlphaProcess);
+
+  // map to G3 controls
+  TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
+  controlMap->Add(&fAlphaProcess, kHADR); 
+
+  // map to AliMCProcess codes
+  TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
+  mcMap->Add(&fAlphaProcess, kPHInhelastic); 
+}
+
+//_____________________________________________________________________________
+void TG4PhysicsConstructorIon::ConstructHadProcessForHe3()
+{
+// Constructs electromagnetic processes for He3.
+// ---
+
+  // add process
+  G4ProcessManager* pManager = G4He3::He3()->GetProcessManager();
+  pManager->AddDiscreteProcess(&fElasticProcess);
+}
+
+//_____________________________________________________________________________
+void TG4PhysicsConstructorIon::ConstructEMProcessForGenericIon()
+{
+// Constructs electromagnetic processes for generic ion.
+// ---
+
+  // add process
+  G4ProcessManager* pManager = G4GenericIon::GenericIon()->GetProcessManager();
   pManager->AddProcess(&fIonIonisation, ordInActive, 2, 2);
   pManager->AddProcess(&fIonMultipleScattering);
 
@@ -75,30 +184,23 @@ void TG4PhysicsConstructorIon::ConstructProcessForGenericIon()
 
   // map to G3 controls
   TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
-  controlMap->Add(&fElasticProcess, kHADR); 
   controlMap->Add(&fIonIonisation, kLOSS); 
   controlMap->Add(&fIonMultipleScattering, kMULS); 
 
   // map to AliMCProcess codes
   TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
-  mcMap->Add(&fElasticProcess, kPHElastic); 
   mcMap->Add(&fIonIonisation, kPEnergyLoss); 
   mcMap->Add(&fIonMultipleScattering, kPMultipleScattering); 
 }
 
 //_____________________________________________________________________________
-void TG4PhysicsConstructorIon::ConstructProcessForDeuteron()
+void TG4PhysicsConstructorIon::ConstructEMProcessForDeuteron()
 {
 // Constructs electromagnetic processes for deuteron.
 // ---
 
   // add process
   G4ProcessManager* pManager = G4Deuteron::Deuteron()->GetProcessManager();
-  pManager->AddDiscreteProcess(&fElasticProcess);
-
-  fDeuteronModel = new G4LEDeuteronInelastic();
-  fDeuteronProcess.RegisterMe(fDeuteronModel);
-  pManager->AddDiscreteProcess(&fDeuteronProcess);
 
   pManager->AddProcess(&fDeuteronIonisation, ordInActive, 2, 2);
   pManager->AddProcess(&fDeuteronMultipleScattering);
@@ -109,30 +211,23 @@ void TG4PhysicsConstructorIon::ConstructProcessForDeuteron()
 
   // map to G3 controls
   TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
-  controlMap->Add(&fDeuteronProcess, kHADR); 
   controlMap->Add(&fDeuteronIonisation, kLOSS); 
   controlMap->Add(&fDeuteronMultipleScattering, kMULS); 
 
   // map to AliMCProcess codes
   TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
-  mcMap->Add(&fDeuteronProcess, kPHInhelastic); 
   mcMap->Add(&fDeuteronIonisation, kPEnergyLoss); 
   mcMap->Add(&fDeuteronMultipleScattering, kPMultipleScattering); 
 }
 
 //_____________________________________________________________________________
-void TG4PhysicsConstructorIon::ConstructProcessForTriton()
+void TG4PhysicsConstructorIon::ConstructEMProcessForTriton()
 {
 // Constructs electromagnetic processes for triton.
 // ---
 
   // add process
   G4ProcessManager* pManager = G4Triton::Triton()->GetProcessManager();
-  pManager->AddDiscreteProcess(&fElasticProcess);
-
-  fTritonModel = new G4LETritonInelastic();
-  fTritonProcess.RegisterMe(fTritonModel);
-  pManager->AddDiscreteProcess(&fTritonProcess);
 
   pManager->AddProcess(&fTritonIonisation, ordInActive, 2, 2);
   pManager->AddProcess(&fTritonMultipleScattering);
@@ -143,30 +238,23 @@ void TG4PhysicsConstructorIon::ConstructProcessForTriton()
 
   // map to G3 controls
   TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
-  controlMap->Add(&fTritonProcess, kHADR); 
   controlMap->Add(&fTritonIonisation, kLOSS); 
   controlMap->Add(&fTritonMultipleScattering, kMULS); 
 
   // map to AliMCProcess codes
   TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
-  mcMap->Add(&fTritonProcess, kPHInhelastic); 
   mcMap->Add(&fTritonIonisation, kPEnergyLoss); 
   mcMap->Add(&fTritonMultipleScattering, kPMultipleScattering); 
 }
 
 //_____________________________________________________________________________
-void TG4PhysicsConstructorIon::ConstructProcessForAlpha()
+void TG4PhysicsConstructorIon::ConstructEMProcessForAlpha()
 {
 // Constructs electromagnetic processes for alpha.
 // ---
 
   // add process
   G4ProcessManager* pManager = G4Alpha::Alpha()->GetProcessManager();
-  pManager->AddDiscreteProcess(&fElasticProcess);
-
-  fAlphaModel = new G4LEAlphaInelastic();
-  fAlphaProcess.RegisterMe(fAlphaModel);
-  pManager->AddDiscreteProcess(&fAlphaProcess);
 
   pManager->AddProcess(&fAlphaIonisation, ordInActive, 2, 2);
   pManager->AddProcess(&fAlphaMultipleScattering);
@@ -177,26 +265,23 @@ void TG4PhysicsConstructorIon::ConstructProcessForAlpha()
 
   // map to G3 controls
   TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
-  controlMap->Add(&fAlphaProcess, kHADR); 
   controlMap->Add(&fAlphaIonisation, kLOSS); 
   controlMap->Add(&fAlphaMultipleScattering, kMULS); 
 
   // map to AliMCProcess codes
   TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
-  mcMap->Add(&fAlphaProcess, kPHInhelastic); 
   mcMap->Add(&fAlphaIonisation, kPEnergyLoss); 
   mcMap->Add(&fAlphaMultipleScattering, kPMultipleScattering); 
 }
 
 //_____________________________________________________________________________
-void TG4PhysicsConstructorIon::ConstructProcessForHe3()
+void TG4PhysicsConstructorIon::ConstructEMProcessForHe3()
 {
 // Constructs electromagnetic processes for He3.
 // ---
 
   // add process
   G4ProcessManager* pManager = G4He3::He3()->GetProcessManager();
-  pManager->AddDiscreteProcess(&fElasticProcess);
   pManager->AddProcess(&fHe3Ionisation, ordInActive, 2, 2);
   pManager->AddProcess(&fHe3MultipleScattering);
 
@@ -215,6 +300,7 @@ void TG4PhysicsConstructorIon::ConstructProcessForHe3()
   mcMap->Add(&fHe3MultipleScattering, kPMultipleScattering); 
 }
 
+
 // protected methods
 
 //_____________________________________________________________________________
@@ -234,16 +320,37 @@ void TG4PhysicsConstructorIon::ConstructProcess()
 // Constructs electromagnetic processes for e+.
 // ---
 
-  // Elastic Process
-  fElasticModel = new G4LElastic();
-  fElasticProcess.RegisterMe(fElasticModel);
-
-  ConstructProcessForGenericIon();
-  ConstructProcessForDeuteron();
-  ConstructProcessForTriton();
-  ConstructProcessForAlpha();
-  ConstructProcessForHe3();
-
-  if (verboseLevel>0)
+  if (fSetHadron) {
+    // Elastic Process
+    fElasticModel = new G4LElastic();
+    fElasticProcess.RegisterMe(fElasticModel);
+
+    // Hadron processes
+    ConstructHadProcessForGenericIon();
+    ConstructHadProcessForDeuteron();
+    ConstructHadProcessForTriton();
+    ConstructHadProcessForAlpha();
+    ConstructHadProcessForHe3();
+
+    if (VerboseLevel() > 1) {
+      G4cout << "### Ion EM physics constructed." << G4endl;
+    }  
+  }  
+
+  if (fSetEM) {
+    // EM processes
+    ConstructEMProcessForGenericIon();
+    ConstructEMProcessForDeuteron();
+    ConstructEMProcessForTriton();
+    ConstructEMProcessForAlpha();
+    ConstructEMProcessForHe3();
+
+    if (VerboseLevel() > 1) {
+      G4cout << "### Ion hadron physics constructed." << G4endl;
+    }  
+  }  
+
+  if (VerboseLevel() > 0) {
     G4cout << "### Ion physics constructed." << G4endl;
+  }  
 }
index 9aaec46..4db689a 100644 (file)
@@ -11,7 +11,8 @@
 #ifndef TG4_PHYSICS_CONSTRUCTOR_ION_H
 #define TG4_PHYSICS_CONSTRUCTOR_ION_H
 
-#include <G4VPhysicsConstructor.hh>
+#include "TG4VPhysicsConstructor.h"
+
 #include <G4HadronElasticProcess.hh>
 #include <G4LElastic.hh>
 #include <G4DeuteronInelasticProcess.hh>
 #include <G4MultipleScattering.hh>
 #include <globals.hh>
 
-class TG4PhysicsConstructorIon: public G4VPhysicsConstructor
+class TG4PhysicsConstructorIon: public TG4VPhysicsConstructor
 {
   public:
     TG4PhysicsConstructorIon(const G4String& name = "Ion");
+    TG4PhysicsConstructorIon(G4int verboseLevel, 
+                             G4bool setEM, G4bool setHadron,
+                             const G4String& name = "Ion");
     // --> protected
     // TG4PhysicsConstructorIon(const TG4PhysicsConstructorIon& right);
     virtual ~TG4PhysicsConstructorIon();
@@ -75,11 +79,24 @@ class TG4PhysicsConstructorIon: public G4VPhysicsConstructor
     
   private:
     // methods
-    void ConstructProcessForGenericIon();    
-    void ConstructProcessForDeuteron();    
-    void ConstructProcessForTriton();    
-    void ConstructProcessForAlpha();    
-    void ConstructProcessForHe3();    
+
+    // Hadron processes
+    void ConstructHadProcessForGenericIon();    
+    void ConstructHadProcessForDeuteron();    
+    void ConstructHadProcessForTriton();    
+    void ConstructHadProcessForAlpha();    
+    void ConstructHadProcessForHe3();    
+
+    // EM processes
+    void ConstructEMProcessForGenericIon();    
+    void ConstructEMProcessForDeuteron();    
+    void ConstructEMProcessForTriton();    
+    void ConstructEMProcessForAlpha();    
+    void ConstructEMProcessForHe3();    
+
+    // data members
+    G4bool  fSetEM;    //if true - EM processes are constructed
+    G4bool  fSetHadron;//if true - hadron processes are constructed
 };
 
 #endif //TG4_PHYSICS_CONSTRUCTOR_ION_H