G4LHEPStoppingPhysics.cc

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 // $Id$
00027 //
00028 //---------------------------------------------------------------------------
00029 //
00030 // ClassName:   G4LHEPStoppingPhysics
00031 //
00032 // Author: 2002 J.P. Wellisch
00033 //
00034 // Modified:
00035 // 10.11.2005 V.Ivanchenko edit to provide a standard and add mu-
00036 // 16.10.2012 A.Ribon: deprecated class, to be removed in G4 version 10.
00037 //
00038 //----------------------------------------------------------------------------
00039 //
00040 
00041 #include "G4LHEPStoppingPhysics.hh"
00042 
00043 #include "G4ParticleTable.hh"
00044 #include "G4ProcessManager.hh"
00045 #include "G4LeptonConstructor.hh"
00046 #include "G4MesonConstructor.hh"
00047 #include "G4BaryonConstructor.hh"
00048 #include "G4MuonMinus.hh"
00049 #include "G4PionMinus.hh"
00050 #include "G4KaonMinus.hh"
00051 #include "G4AntiProton.hh"
00052 #include "G4AntiNeutron.hh"
00053 #include "G4MuonMinusCaptureAtRest.hh"
00054 #include "G4PionMinusAbsorptionAtRest.hh"
00055 #include "G4KaonMinusAbsorption.hh"
00056 #include "G4AntiProtonAnnihilationAtRest.hh"
00057 #include "G4AntiNeutronAnnihilationAtRest.hh"
00058 #include "G4HadronicDeprecate.hh"
00059 
00060 // factory
00061 #include "G4PhysicsConstructorFactory.hh"
00062 //
00063 G4_DECLARE_PHYSCONSTR_FACTORY(G4LHEPStoppingPhysics);
00064 
00065 
00066 G4LHEPStoppingPhysics::G4LHEPStoppingPhysics(G4int ver)
00067   : G4VPhysicsConstructor("LHEP Stopping")
00068  , muProcess(0), piProcess(0), kProcess(0), apProcess(0), anProcess(0)
00069     , verbose(ver), wasActivated(false)
00070 {
00071   G4HadronicDeprecate("G4LHEPStoppingPhysics");
00072 }
00073 
00074 G4LHEPStoppingPhysics::G4LHEPStoppingPhysics(const G4String& nam, G4int ver)
00075 : G4VPhysicsConstructor(nam), muProcess(0), piProcess(0), kProcess(0), apProcess(0), anProcess(0)
00076 , verbose(ver), wasActivated(false)
00077 {
00078   G4HadronicDeprecate("G4LHEPStoppingPhysics");
00079 }
00080 
00081 G4LHEPStoppingPhysics::~G4LHEPStoppingPhysics()
00082 {
00083   if(wasActivated) {
00084     delete muProcess;
00085     delete piProcess;
00086     delete kProcess;
00087     delete apProcess;
00088     delete anProcess;
00089   }
00090 }
00091 
00092 void G4LHEPStoppingPhysics::ConstructParticle()
00093 {
00094 // G4cout << "G4QStoppingPhysics::ConstructParticle" << G4endl;
00095   G4LeptonConstructor pLeptonConstructor;
00096   pLeptonConstructor.ConstructParticle();
00097 
00098   G4MesonConstructor pMesonConstructor;
00099   pMesonConstructor.ConstructParticle();
00100 
00101   G4BaryonConstructor pBaryonConstructor;
00102   pBaryonConstructor.ConstructParticle();
00103 
00104 }
00105 
00106 void G4LHEPStoppingPhysics::ConstructProcess()
00107 {
00108   if(wasActivated) return;
00109   G4ProcessManager * aProcMan = 0;
00110   wasActivated=true;
00111   //G4cout << " adding stopping hadron Physics" << G4endl;
00112 
00113   // Muon Minus Physics
00114   aProcMan = G4MuonMinus::MuonMinus()->GetProcessManager();
00115   muProcess = new G4MuonMinusCaptureAtRest();
00116   aProcMan->AddRestProcess(muProcess);
00117 
00118   // PionMinus
00119   aProcMan = G4PionMinus::PionMinus()->GetProcessManager();
00120   piProcess = new G4PionMinusAbsorptionAtRest();
00121   aProcMan->AddRestProcess(piProcess);
00122 
00123   // KaonMinus
00124   aProcMan = G4KaonMinus::KaonMinus()->GetProcessManager();
00125   kProcess = new G4KaonMinusAbsorption();
00126   aProcMan->AddRestProcess(kProcess);
00127 
00128   // anti-Proton
00129   aProcMan = G4AntiProton::AntiProton()->GetProcessManager();
00130   apProcess = new G4AntiProtonAnnihilationAtRest();
00131   aProcMan->AddRestProcess(apProcess);
00132 
00133   // AntiNeutron
00134   aProcMan = G4AntiNeutron::AntiNeutron()->GetProcessManager();
00135   anProcess = new G4AntiNeutronAnnihilationAtRest();
00136   aProcMan->AddRestProcess(anProcess);
00137 
00138 }

Generated on Mon May 27 17:48:47 2013 for Geant4 by  doxygen 1.4.7