HadronPhysicsLHEP.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:   HadronPhysicsLHEP
00031 //
00032 // Author: 2002 J.P. Wellisch
00033 //
00034 // Modified:
00035 // 21.11.2005 G.Folger: don't  keep processes as data members, but new these
00036 // 16.10.2012 A.Ribon: renamed stopping builder
00037 //
00038 //----------------------------------------------------------------------------
00039 //
00040 #include "HadronPhysicsLHEP.hh"
00041 
00042 #include "globals.hh"
00043 #include "G4ios.hh"
00044 #include <iomanip>   
00045 #include "G4ParticleDefinition.hh"
00046 #include "G4ParticleTable.hh"
00047 
00048 #include "G4MesonConstructor.hh"
00049 #include "G4BaryonConstructor.hh"
00050 #include "G4ShortLivedConstructor.hh"
00051 
00052 // factory
00053 #include "G4PhysicsConstructorFactory.hh"
00054 //
00055 G4_DECLARE_PHYSCONSTR_FACTORY(HadronPhysicsLHEP);
00056 
00057 HadronPhysicsLHEP::HadronPhysicsLHEP(G4int)
00058     :  G4VPhysicsConstructor("hInelastic LHEP") 
00059     , theNeutrons(0)
00060     , theLHEPNeutron(0)
00061     , thePiK(0)
00062     , theLHEPPiK(0)
00063     , thePro(0)
00064     , theLHEPPro(0)
00065     , theMiscLHEP(0)
00066     , theStoppingHadron(0)
00067 {}
00068 
00069 HadronPhysicsLHEP::HadronPhysicsLHEP(const G4String& name)
00070     :  G4VPhysicsConstructor(name) 
00071     , theNeutrons(0)
00072     , theLHEPNeutron(0)
00073     , thePiK(0)
00074     , theLHEPPiK(0)
00075     , thePro(0)
00076     , theLHEPPro(0)
00077     , theMiscLHEP(0)
00078     , theStoppingHadron(0)
00079 {}
00080 
00081 void HadronPhysicsLHEP::CreateModels()
00082 {
00083   theNeutrons=new G4NeutronBuilder;
00084   theNeutrons->RegisterMe(theLHEPNeutron=new G4LHEPNeutronBuilder);
00085 
00086   thePro=new G4ProtonBuilder;
00087   thePro->RegisterMe(theLHEPPro=new G4LHEPProtonBuilder);
00088 
00089   thePiK=new G4PiKBuilder;
00090   thePiK->RegisterMe(theLHEPPiK=new G4LHEPPiKBuilder);
00091 
00092   theMiscLHEP=new G4MiscLHEPBuilder;
00093   theStoppingHadron=new G4LHEPStoppingHadronBuilder;  
00094 }
00095 
00096 HadronPhysicsLHEP::~HadronPhysicsLHEP()
00097 {
00098    delete theLHEPNeutron;
00099    delete theNeutrons;
00100    delete theLHEPPro;
00101    delete thePro;
00102    delete theLHEPPiK;
00103    delete thePiK;
00104 }
00105 
00106 void HadronPhysicsLHEP::ConstructParticle()
00107 {
00108   G4MesonConstructor pMesonConstructor;
00109   pMesonConstructor.ConstructParticle();
00110 
00111   G4BaryonConstructor pBaryonConstructor;
00112   pBaryonConstructor.ConstructParticle();
00113 
00114   G4ShortLivedConstructor pShortLivedConstructor;
00115   pShortLivedConstructor.ConstructParticle();  
00116 }
00117 
00118 #include "G4ProcessManager.hh"
00119 void HadronPhysicsLHEP::ConstructProcess()
00120 {
00121   CreateModels();
00122   theNeutrons->Build();
00123   thePro->Build();
00124   thePiK->Build();
00125   theMiscLHEP->Build();
00126   theStoppingHadron->Build();
00127 }
00128 // 2002 by J.P. Wellisch

Generated on Mon May 27 17:50:30 2013 for Geant4 by  doxygen 1.4.7