G4LHEPStoppingHadronBuilder.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:   G4LHEPStoppingHadronBuilder
00031 //
00032 // Author: 16-Oct-2012 A. Ribon
00033 //         Copied from the original G4StoppingHadronBuilder and renamed
00034 //
00035 // Modified:
00036 //
00037 //----------------------------------------------------------------------------
00038 //
00039 
00040 #include "G4LHEPStoppingHadronBuilder.hh"
00041 #include "G4MuonMinusCapture.hh"
00042 #include "G4AntiProtonAnnihilationAtRest.hh"
00043 #include "G4AntiNeutronAnnihilationAtRest.hh"
00044 #include "G4PionMinusAbsorptionAtRest.hh"
00045 #include "G4KaonMinusAbsorption.hh"
00046 
00047 #include "G4ParticleTable.hh"
00048 #include "G4ProcessManager.hh"
00049 #include "G4PionMinus.hh"
00050 #include "G4KaonMinus.hh"
00051 #include "G4AntiProton.hh"
00052 #include "G4AntiNeutron.hh"
00053 
00054 G4LHEPStoppingHadronBuilder::G4LHEPStoppingHadronBuilder():
00055  theMuonMinusAbsorption(0),thePionMinusAbsorption(0),
00056  theKaonMinusAbsorption(0), theAntiProtonAnnihilation(0),
00057  theAntiNeutronAnnihilation(0),
00058  wasActivated(false)
00059 {}
00060 
00061 G4LHEPStoppingHadronBuilder::~G4LHEPStoppingHadronBuilder()
00062 {
00063   if(wasActivated) {
00064     delete theMuonMinusAbsorption;
00065     delete thePionMinusAbsorption;
00066     delete theKaonMinusAbsorption;
00067     delete theAntiProtonAnnihilation;
00068     delete theAntiNeutronAnnihilation;
00069   }
00070 }
00071 
00072 void G4LHEPStoppingHadronBuilder::Build()
00073 {
00074   G4ProcessManager * aProcMan = 0;
00075   wasActivated=true;
00076 //G4cout << " adding stopping hadron Physics" << G4endl;
00077 
00078   // Muon Minus Physics
00079   aProcMan = G4MuonMinus::MuonMinus()->GetProcessManager();
00080   theMuonMinusAbsorption = new G4MuonMinusCapture();
00081   aProcMan->AddRestProcess(theMuonMinusAbsorption);
00082 
00083   // PionMinus
00084   aProcMan = G4PionMinus::PionMinus()->GetProcessManager();
00085   thePionMinusAbsorption = new G4PionMinusAbsorptionAtRest();
00086   aProcMan->AddRestProcess(thePionMinusAbsorption);
00087 
00088   // KaonMinus
00089   aProcMan = G4KaonMinus::KaonMinus()->GetProcessManager();
00090   theKaonMinusAbsorption = new G4KaonMinusAbsorption();
00091   aProcMan->AddRestProcess(theKaonMinusAbsorption);
00092 
00093   // anti-Proton
00094   aProcMan = G4AntiProton::AntiProton()->GetProcessManager();
00095   theAntiProtonAnnihilation = new G4AntiProtonAnnihilationAtRest();
00096   aProcMan->AddRestProcess(theAntiProtonAnnihilation);
00097 
00098   // AntiNeutron
00099   aProcMan = G4AntiNeutron::AntiNeutron()->GetProcessManager();
00100   theAntiNeutronAnnihilation = new G4AntiNeutronAnnihilationAtRest();
00101   aProcMan->AddRestProcess(theAntiNeutronAnnihilation);
00102 
00103 }

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