Initial version
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 5 Oct 2001 07:43:16 +0000 (07:43 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 5 Oct 2001 07:43:16 +0000 (07:43 +0000)
TGeant4/TG4PhysicsConstructorGeneral.cxx [new file with mode: 0644]
TGeant4/TG4PhysicsConstructorGeneral.h [new file with mode: 0644]
TGeant4/TG4PhysicsConstructorIon.cxx [new file with mode: 0644]
TGeant4/TG4PhysicsConstructorIon.h [new file with mode: 0644]
TGeant4/TG4PhysicsConstructorMuon.cxx [new file with mode: 0644]
TGeant4/TG4PhysicsConstructorMuon.h [new file with mode: 0644]

diff --git a/TGeant4/TG4PhysicsConstructorGeneral.cxx b/TGeant4/TG4PhysicsConstructorGeneral.cxx
new file mode 100644 (file)
index 0000000..8031ada
--- /dev/null
@@ -0,0 +1,86 @@
+// $Id$
+// Category: physics
+//
+// Author: I. Hrivnacova
+//
+// Class TG4PhysicsConstructorGeneral
+// ------------------------------
+// See the class description in the header file.
+// According to ExN04IonPhysics.cc,v 1.1.2.1 2001/06/28 19:07:37 gunter Exp 
+// GEANT4 tag Name: geant4-03-02
+
+#include "TG4PhysicsConstructorGeneral.h"
+#include "TG4ProcessControlMap.h"
+#include "TG4ProcessMCMap.h"
+#include "TG4G3Control.h"
+#include "TG4ExtDecayer.h"
+#include "AliDecayer.h"
+#include "AliMC.h"
+
+#include <G4ParticleDefinition.hh>
+#include <G4ProcessManager.hh>
+#include <G4ChargedGeantino.hh>
+#include <G4Geantino.hh>
+
+//_____________________________________________________________________________
+TG4PhysicsConstructorGeneral::TG4PhysicsConstructorGeneral(const G4String& name)
+  : G4VPhysicsConstructor(name)
+{
+//
+  SetVerboseLevel(1);
+}
+
+//_____________________________________________________________________________
+TG4PhysicsConstructorGeneral::~TG4PhysicsConstructorGeneral() {
+//
+}
+
+// protected methods
+
+//_____________________________________________________________________________
+void TG4PhysicsConstructorGeneral::ConstructParticle()
+{
+// Instantiates particles.
+// ---
+
+  // pseudo-particles
+  G4Geantino::GeantinoDefinition();
+  G4ChargedGeantino::ChargedGeantinoDefinition();  
+}
+
+//_____________________________________________________________________________
+void TG4PhysicsConstructorGeneral::ConstructProcess()
+{
+// Constructs electromagnetic processes for e+.
+// ---
+
+  // Set external decayer
+  AliDecayer* aliDecayer = gMC->Decayer(); 
+  if (aliDecayer) {
+    TG4ExtDecayer* tg4Decayer = new TG4ExtDecayer(aliDecayer);
+       // the tg4Decayer is deleted in G4Decay destructor
+    tg4Decayer->SetVerboseLevel(1);   
+    fDecayProcess.SetExtDecayer(tg4Decayer);
+    
+    if (verboseLevel>0) G4cout << "### External decayer is set" << G4endl;
+  } 
+
+  theParticleIterator->reset();
+  while( (*theParticleIterator)() ){
+    G4ParticleDefinition* particle = theParticleIterator->value();
+    G4ProcessManager* pmanager = particle->GetProcessManager();
+    if (fDecayProcess.IsApplicable(*particle)) { 
+      pmanager ->AddProcess(&fDecayProcess);
+      // set ordering for PostStepDoIt and AtRestDoIt
+      pmanager ->SetProcessOrdering(&fDecayProcess, idxPostStep);
+      pmanager ->SetProcessOrdering(&fDecayProcess, idxAtRest);
+    }
+  }
+  
+  // map to G3 controls
+  TG4ProcessControlMap* processMap = TG4ProcessControlMap::Instance();
+  processMap->Add(&fDecayProcess, kDCAY); 
+
+  if (verboseLevel>0)
+    G4cout << "### General physics constructed." << G4endl;
+}
diff --git a/TGeant4/TG4PhysicsConstructorGeneral.h b/TGeant4/TG4PhysicsConstructorGeneral.h
new file mode 100644 (file)
index 0000000..3558aa3
--- /dev/null
@@ -0,0 +1,35 @@
+// $Id$
+// Category: physics
+//
+// Author: I. Hrivnacova
+//
+// Class TG4PhysicsConstructorGeneral
+// -----------------------------
+// Constructor of physics for ions.
+// According to ExN04IonPhysics.hh, GEANT4 tag Name: geant4-03-02
+
+#ifndef TG4_PHYSICS_CONSTRUCTOR_GENERAL_H
+#define TG4_PHYSICS_CONSTRUCTOR_GENERAL_H
+
+#include <G4VPhysicsConstructor.hh>
+#include <G4Decay.hh>
+#include <globals.hh>
+
+class TG4PhysicsConstructorGeneral: public G4VPhysicsConstructor
+{
+  public:
+    TG4PhysicsConstructorGeneral(const G4String& name = "General");
+    virtual ~TG4PhysicsConstructorGeneral();
+
+  protected:
+    // methods
+          // construct particle and physics
+    virtual void ConstructParticle();
+    virtual void ConstructProcess();
+
+    // data members
+    G4Decay fDecayProcess;
+};
+
+#endif //TG4_PHYSICS_CONSTRUCTOR_GENERAL_H
+
diff --git a/TGeant4/TG4PhysicsConstructorIon.cxx b/TGeant4/TG4PhysicsConstructorIon.cxx
new file mode 100644 (file)
index 0000000..4db709f
--- /dev/null
@@ -0,0 +1,249 @@
+// $Id$
+// Category: physics
+//
+// Author: I. Hrivnacova
+//
+// Class TG4PhysicsConstructorIon
+// ------------------------------
+// See the class description in the header file.
+// According to ExN04IonPhysics.cc,v 1.1.2.1 2001/06/28 19:07:37 gunter Exp 
+// GEANT4 tag Name: geant4-03-02
+
+#include "TG4PhysicsConstructorIon.h"
+#include "TG4ProcessControlMap.h"
+#include "TG4ProcessMCMap.h"
+#include "TG4Globals.h"
+
+#include <G4ParticleDefinition.hh>
+#include <G4ProcessManager.hh>
+#include "G4IonConstructor.hh"
+
+//_____________________________________________________________________________
+TG4PhysicsConstructorIon::TG4PhysicsConstructorIon(const G4String& name)
+  : G4VPhysicsConstructor(name)
+{
+//
+  SetVerboseLevel(1);
+}
+
+//_____________________________________________________________________________
+TG4PhysicsConstructorIon::TG4PhysicsConstructorIon(
+                                     const TG4PhysicsConstructorIon& right)
+{
+//
+  TG4Globals::Exception("TG4PhysicsConstructorIon is protected from copying.");
+}
+
+//_____________________________________________________________________________
+TG4PhysicsConstructorIon::~TG4PhysicsConstructorIon() {
+//
+}
+
+// operators
+
+//_____________________________________________________________________________
+TG4PhysicsConstructorIon& 
+TG4PhysicsConstructorIon::operator=(const TG4PhysicsConstructorIon &right)
+{
+  // check assignement to self
+  if (this == &right) return *this;
+  
+  TG4Globals::Exception(
+    "TG4PhysicsConstructorIon is protected from assigning.");
+
+  return *this;
+}
+
+
+// private methods
+
+//_____________________________________________________________________________
+void TG4PhysicsConstructorIon::ConstructProcessForGenericIon()
+{
+// Constructs electromagnetic processes for generic ion.
+// ---
+
+  // add process
+  G4ProcessManager* pManager = G4GenericIon::GenericIon()->GetProcessManager();
+  pManager->AddDiscreteProcess(&fElasticProcess);
+  pManager->AddProcess(&fIonIonisation, ordInActive, 2, 2);
+  pManager->AddProcess(&fIonMultipleScattering);
+
+  // set ordering
+  pManager->SetProcessOrdering(&fIonMultipleScattering, idxAlongStep,  1);
+  pManager->SetProcessOrdering(&fIonMultipleScattering, idxPostStep,  1);
+
+  // 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()
+{
+// 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);
+
+  // set ordering
+  pManager->SetProcessOrdering(&fDeuteronMultipleScattering, idxAlongStep,  1);
+  pManager->SetProcessOrdering(&fDeuteronMultipleScattering, idxPostStep,  1);
+
+  // 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()
+{
+// 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);
+
+  // set ordering
+  pManager->SetProcessOrdering(&fTritonMultipleScattering, idxAlongStep,  1);
+  pManager->SetProcessOrdering(&fTritonMultipleScattering, idxPostStep,  1);
+
+  // 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()
+{
+// 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);
+
+  // set ordering
+  pManager->SetProcessOrdering(&fAlphaMultipleScattering, idxAlongStep,  1);
+  pManager->SetProcessOrdering(&fAlphaMultipleScattering, idxPostStep,  1);
+
+  // 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()
+{
+// Constructs electromagnetic processes for He3.
+// ---
+
+  // add process
+  G4ProcessManager* pManager = G4He3::He3()->GetProcessManager();
+  pManager->AddDiscreteProcess(&fElasticProcess);
+  pManager->AddProcess(&fHe3Ionisation, ordInActive, 2, 2);
+  pManager->AddProcess(&fHe3MultipleScattering);
+
+  // set ordering
+  pManager->SetProcessOrdering(&fHe3MultipleScattering, idxAlongStep,  1);
+  pManager->SetProcessOrdering(&fHe3MultipleScattering, idxPostStep,  1);
+
+  // map to G3 controls
+  TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
+  controlMap->Add(&fHe3Ionisation, kLOSS); 
+  controlMap->Add(&fHe3MultipleScattering, kMULS); 
+
+  // map to AliMCProcess codes
+  TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
+  mcMap->Add(&fHe3Ionisation, kPEnergyLoss); 
+  mcMap->Add(&fHe3MultipleScattering, kPMultipleScattering); 
+}
+
+// protected methods
+
+//_____________________________________________________________________________
+void TG4PhysicsConstructorIon::ConstructParticle()
+{
+// Instantiates particles.
+// ---
+
+  //  Construct light ions
+  G4IonConstructor pConstructor;
+  pConstructor.ConstructParticle();  
+}
+
+//_____________________________________________________________________________
+void TG4PhysicsConstructorIon::ConstructProcess()
+{
+// Constructs electromagnetic processes for e+.
+// ---
+
+  // Elastic Process
+  fElasticModel = new G4LElastic();
+  fElasticProcess.RegisterMe(fElasticModel);
+
+  ConstructProcessForGenericIon();
+  ConstructProcessForDeuteron();
+  ConstructProcessForTriton();
+  ConstructProcessForAlpha();
+  ConstructProcessForHe3();
+
+  if (verboseLevel>0)
+    G4cout << "### Ion physics constructed." << G4endl;
+}
diff --git a/TGeant4/TG4PhysicsConstructorIon.h b/TGeant4/TG4PhysicsConstructorIon.h
new file mode 100644 (file)
index 0000000..4cff171
--- /dev/null
@@ -0,0 +1,86 @@
+// $Id$
+// Category: physics
+//
+// Author: I. Hrivnacova
+//
+// Class TG4PhysicsConstructorIon
+// -----------------------------
+// Constructor of physics for ions.
+// According to ExN04IonPhysics.hh, GEANT4 tag Name: geant4-03-02
+
+#ifndef TG4_PHYSICS_CONSTRUCTOR_ION_H
+#define TG4_PHYSICS_CONSTRUCTOR_ION_H
+
+#include <G4VPhysicsConstructor.hh>
+#include <G4HadronElasticProcess.hh>
+#include <G4LElastic.hh>
+#include <G4DeuteronInelasticProcess.hh>
+#include <G4LEDeuteronInelastic.hh>
+#include <G4TritonInelasticProcess.hh>
+#include <G4LETritonInelastic.hh>
+#include <G4AlphaInelasticProcess.hh>
+#include <G4LEAlphaInelastic.hh>
+#include <G4hIonisation.hh>
+#include <G4MultipleScattering.hh>
+#include <globals.hh>
+
+class TG4PhysicsConstructorIon: public G4VPhysicsConstructor
+{
+  public:
+    TG4PhysicsConstructorIon(const G4String& name = "Ion");
+    // --> protected
+    // TG4PhysicsConstructorIon(const TG4PhysicsConstructorIon& right);
+    virtual ~TG4PhysicsConstructorIon();
+
+  protected:
+    TG4PhysicsConstructorIon(const TG4PhysicsConstructorIon& right);
+    
+    // operators
+    TG4PhysicsConstructorIon& operator=(const TG4PhysicsConstructorIon& right);
+    // methods
+          // construct particle and physics
+    virtual void ConstructParticle();
+    virtual void ConstructProcess();
+
+    // data members
+          // Elastic Process
+   G4HadronElasticProcess fElasticProcess;
+   G4LElastic*            fElasticModel;
+
+          // Generic Ion physics
+   G4MultipleScattering   fIonMultipleScattering;
+   G4hIonisation          fIonIonisation;
+
+          // Deuteron physics
+   G4MultipleScattering        fDeuteronMultipleScattering;
+   G4hIonisation               fDeuteronIonisation;
+   G4DeuteronInelasticProcess  fDeuteronProcess;
+   G4LEDeuteronInelastic*      fDeuteronModel;
+
+          // Triton physics
+   G4MultipleScattering        fTritonMultipleScattering;
+   G4hIonisation               fTritonIonisation;
+   G4TritonInelasticProcess    fTritonProcess;
+   G4LETritonInelastic*        fTritonModel;
+  
+         // Alpha physics
+   G4MultipleScattering        fAlphaMultipleScattering;
+   G4hIonisation               fAlphaIonisation;
+   G4AlphaInelasticProcess     fAlphaProcess;
+   G4LEAlphaInelastic*         fAlphaModel;
+
+        // He3 physics
+   G4MultipleScattering        fHe3MultipleScattering;
+   G4hIonisation               fHe3Ionisation;
+    
+  private:
+    // methods
+    void ConstructProcessForGenericIon();    
+    void ConstructProcessForDeuteron();    
+    void ConstructProcessForTriton();    
+    void ConstructProcessForAlpha();    
+    void ConstructProcessForHe3();    
+};
+
+#endif //TG4_PHYSICS_CONSTRUCTOR_ION_H
+
diff --git a/TGeant4/TG4PhysicsConstructorMuon.cxx b/TGeant4/TG4PhysicsConstructorMuon.cxx
new file mode 100644 (file)
index 0000000..1423680
--- /dev/null
@@ -0,0 +1,206 @@
+// $Id$
+// Category: physics
+//
+// Author: I. Hrivnacova
+//
+// Class TG4PhysicsConstructorMuon
+// -----------------------------
+// See the class description in the header file.
+// According to ExN04MuonPhysics.cc,v 1.2.2.1 2001/06/28 19:07:37 gunter Exp 
+// GEANT4 tag Name: geant4-03-02
+
+#include "TG4PhysicsConstructorMuon.h"
+#include "TG4ProcessControlMap.h"
+#include "TG4ProcessMCMap.h"
+#include "TG4G3Control.h"
+
+#include <G4ParticleDefinition.hh>
+#include <G4ProcessManager.hh>
+#include <G4MuonPlus.hh>
+#include <G4MuonMinus.hh>
+#include <G4TauMinus.hh>
+#include <G4TauPlus.hh>
+#include <G4NeutrinoTau.hh>
+#include <G4AntiNeutrinoTau.hh>
+#include <G4NeutrinoMu.hh>
+#include <G4AntiNeutrinoMu.hh>
+
+//TBR
+#include <G4MuIonisation.hh>
+#include <G4MuBremsstrahlung.hh>
+#include <G4MuPairProduction.hh>
+#include <G4hIonisation.hh>
+
+//_____________________________________________________________________________
+TG4PhysicsConstructorMuon::TG4PhysicsConstructorMuon(const G4String& name)
+  : G4VPhysicsConstructor(name)
+{
+//
+  SetVerboseLevel(1);
+}
+
+//_____________________________________________________________________________
+TG4PhysicsConstructorMuon::~TG4PhysicsConstructorMuon() {
+//
+}
+
+// private methods
+
+//_____________________________________________________________________________
+void TG4PhysicsConstructorMuon::ConstructProcessForMuonPlus()
+{
+// Constructs electromagnetic processes for mu+.
+// ---
+  
+  // add processes
+  G4ProcessManager* pManager = G4MuonPlus::MuonPlus()->GetProcessManager();
+  pManager->AddProcess(&fMuPlusIonisation, ordInActive,2, 2);
+  pManager->AddDiscreteProcess(&fMuPlusBremsstrahlung);
+  pManager->AddDiscreteProcess(&fMuPlusPairProduction);
+  pManager->AddProcess(&fMuPlusMultipleScattering);
+
+  // set ordering
+  pManager->SetProcessOrdering(&fMuPlusMultipleScattering, idxAlongStep,  1);
+  pManager->SetProcessOrdering(&fMuPlusMultipleScattering, idxPostStep,  1);
+
+  // map to G3 controls
+  TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
+  controlMap->Add(&fMuPlusIonisation, kLOSS); 
+  controlMap->Add(&fMuPlusBremsstrahlung, kBREM); 
+  controlMap->Add(&fMuPlusPairProduction, kPAIR); 
+  controlMap->Add(&fMuPlusMultipleScattering, kMULS); 
+
+
+  // map to AliMCProcess codes
+  TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
+  mcMap->Add(&fMuPlusIonisation, kPEnergyLoss); 
+  mcMap->Add(&fMuPlusBremsstrahlung, kPBrem); 
+  mcMap->Add(&fMuPlusPairProduction, kPPair); 
+  mcMap->Add(&fMuPlusMultipleScattering, kPMultipleScattering); 
+}  
+
+//_____________________________________________________________________________
+void TG4PhysicsConstructorMuon::ConstructProcessForMuonMinus()
+{
+// Constructs electromagnetic processes for mu-.
+// ---
+  
+  // add processes & set ordering
+  G4ProcessManager* pManager = G4MuonMinus::MuonMinus()->GetProcessManager();
+  pManager->AddProcess(&fMuMinusIonisation, ordInActive,2, 2);
+  pManager->AddDiscreteProcess(&fMuMinusBremsstrahlung);
+  pManager->AddDiscreteProcess(&fMuMinusPairProduction);
+  pManager->AddProcess(&fMuMinusMultipleScattering);
+
+  pManager->SetProcessOrdering(&fMuMinusMultipleScattering, idxAlongStep,  1);
+  pManager->SetProcessOrdering(&fMuMinusMultipleScattering, idxPostStep,  1);
+
+  pManager->AddRestProcess(&fMuMinusCaptureAtRest);
+
+  // map to G3 controls
+  TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
+  controlMap->Add(&fMuMinusIonisation, kLOSS); 
+  controlMap->Add(&fMuMinusBremsstrahlung, kBREM); 
+  controlMap->Add(&fMuMinusPairProduction, kPAIR); 
+  controlMap->Add(&fMuMinusMultipleScattering, kMULS); 
+  controlMap->Add(&fMuMinusCaptureAtRest, kMUNU); 
+
+  // map to AliMCProcess codes
+  TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
+  mcMap->Add(&fMuMinusIonisation, kPEnergyLoss); 
+  mcMap->Add(&fMuMinusBremsstrahlung, kPBrem); 
+  mcMap->Add(&fMuMinusPairProduction, kPPair); 
+  mcMap->Add(&fMuMinusMultipleScattering, kPMultipleScattering); 
+  mcMap->Add(&fMuMinusCaptureAtRest, kPMuonNuclear); 
+}  
+
+//_____________________________________________________________________________
+void TG4PhysicsConstructorMuon::ConstructProcessForTauPlus()
+{
+// Constructs electromagnetic processes for tau+.
+// ---
+  
+  // add processes
+  G4ProcessManager* pManager = G4TauPlus::TauPlus()->GetProcessManager();
+  pManager->AddProcess(&fTauPlusIonisation, ordInActive,2, 2);
+  pManager->AddProcess(&fTauPlusMultipleScattering);
+
+  // set ordering
+  pManager->SetProcessOrdering(&fTauPlusMultipleScattering, idxAlongStep,  1);
+  pManager->SetProcessOrdering(&fTauPlusMultipleScattering, idxPostStep,  1);
+
+  // map to G3 controls
+  TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
+  controlMap->Add(&fTauPlusIonisation, kLOSS); 
+  controlMap->Add(&fTauPlusMultipleScattering, kMULS); 
+
+
+  // map to AliMCProcess codes
+  TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
+  mcMap->Add(&fTauPlusIonisation, kPEnergyLoss); 
+  mcMap->Add(&fTauPlusMultipleScattering, kPMultipleScattering); 
+}  
+
+//_____________________________________________________________________________
+void TG4PhysicsConstructorMuon::ConstructProcessForTauMinus()
+{
+// Constructs electromagnetic processes for tau-.
+// ---
+  
+  // add processes
+  G4ProcessManager* pManager = G4TauMinus::TauMinus()->GetProcessManager();
+  pManager->AddProcess(&fTauMinusIonisation, ordInActive,2, 2);
+  pManager->AddProcess(&fTauMinusMultipleScattering);
+
+  // set ordering
+  pManager->SetProcessOrdering(&fTauMinusMultipleScattering, idxAlongStep,  1);
+  pManager->SetProcessOrdering(&fTauMinusMultipleScattering, idxPostStep,  1);
+
+  // map to G3 controls
+  TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
+  controlMap->Add(&fTauMinusIonisation, kLOSS); 
+  controlMap->Add(&fTauMinusMultipleScattering, kMULS); 
+
+
+  // map to AliMCProcess codes
+  TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
+  mcMap->Add(&fTauMinusIonisation, kPEnergyLoss); 
+  mcMap->Add(&fTauMinusMultipleScattering, kPMultipleScattering); 
+}  
+
+
+// protected methods
+
+//_____________________________________________________________________________
+void TG4PhysicsConstructorMuon::ConstructParticle()
+{
+// Instantiates particles.
+// ---
+
+  // Mu
+  G4MuonPlus::MuonPlusDefinition();
+  G4MuonMinus::MuonMinusDefinition();
+  G4NeutrinoMu::NeutrinoMuDefinition();
+  G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
+
+  // Tau
+  G4TauMinus::TauMinusDefinition();
+  G4TauPlus::TauPlusDefinition();
+  G4NeutrinoTau::NeutrinoTauDefinition();
+  G4AntiNeutrinoTau::AntiNeutrinoTauDefinition();
+}
+
+//_____________________________________________________________________________
+void TG4PhysicsConstructorMuon::ConstructProcess()
+{
+// Constructs electromagnetic processes for muons.
+// ---
+
+  ConstructProcessForMuonPlus();
+  ConstructProcessForMuonMinus();
+  ConstructProcessForTauPlus();
+  ConstructProcessForTauMinus();
+
+  if (verboseLevel>0)
+    G4cout << "### Muon physics constructed." << G4endl;
+}
diff --git a/TGeant4/TG4PhysicsConstructorMuon.h b/TGeant4/TG4PhysicsConstructorMuon.h
new file mode 100644 (file)
index 0000000..9909d50
--- /dev/null
@@ -0,0 +1,66 @@
+// $Id$
+// Category: physics
+//
+// Author: I. Hrivnacova
+//
+// Class TG4PhysicsConstructorMuon
+// -------------------------------
+// Constructor of electromagnetic physics.
+// According to ExN04MuonPhysics.hh, GEANT4 tag Name: geant4-03-02
+
+#ifndef TG4_PHYSICS_CONSTRUCTOR_MUON_H
+#define TG4_PHYSICS_CONSTRUCTOR_MUON_H
+
+#include <G4VPhysicsConstructor.hh>
+#include "G4MultipleScattering.hh"
+#include "G4MuBremsstrahlung.hh"
+#include "G4MuPairProduction.hh"
+#include "G4MuIonisation.hh"
+#include "G4MuonMinusCaptureAtRest.hh"
+#include "G4hIonisation.hh"
+#include <globals.hh>
+
+class TG4PhysicsConstructorMuon: public G4VPhysicsConstructor
+{
+  public:
+    TG4PhysicsConstructorMuon(const G4String& name = "EM");
+    virtual ~TG4PhysicsConstructorMuon();
+
+  protected:
+    // methods
+          // construct particle and physics
+    virtual void ConstructParticle();
+    virtual void ConstructProcess();
+
+    // data members
+          // mu+ physics
+   G4MultipleScattering   fMuPlusMultipleScattering;
+   G4MuBremsstrahlung     fMuPlusBremsstrahlung ;
+   G4MuPairProduction     fMuPlusPairProduction;
+   G4MuIonisation         fMuPlusIonisation;
+
+          // mu- physics
+   G4MultipleScattering   fMuMinusMultipleScattering;
+   G4MuBremsstrahlung     fMuMinusBremsstrahlung ;
+   G4MuPairProduction     fMuMinusPairProduction;
+   G4MuIonisation         fMuMinusIonisation;
+   G4MuonMinusCaptureAtRest fMuMinusCaptureAtRest;
+
+          // tau+ physics
+   G4MultipleScattering   fTauPlusMultipleScattering;
+   G4hIonisation          fTauPlusIonisation;
+
+          // tau+ physics
+   G4MultipleScattering   fTauMinusMultipleScattering;
+   G4hIonisation          fTauMinusIonisation;
+    
+  private:
+    // methods
+    void ConstructProcessForMuonPlus();    
+    void ConstructProcessForMuonMinus();    
+    void ConstructProcessForTauPlus();    
+    void ConstructProcessForTauMinus();    
+};
+
+#endif //TG4_PHYSICS_CONSTRUCTOR_MUON_H
+