CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_13_patch3/src/SimG4Core/GFlash/src/HadronPhysicsQGSP_WP.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 //
00027 // $Id: HadronPhysicsQGSP_WP.cc,v 1.4 2009/03/24 03:52:27 syjun Exp $
00028 // GEANT4 tag $Name: CMSSW_5_3_11_patch3 $
00029 //
00030 //---------------------------------------------------------------------------
00031 //
00032 // ClassName:   HadronPhysicsQGSP_WP
00033 //
00034 // Author: 2002 J.P. Wellisch
00035 //
00036 // Modified:
00037 // 21.11.2005 G.Folger:  migration to non static particles
00038 // 08.06.2006 V.Ivanchenko: remove stopping
00039 // 30.03.2007 G.Folger: Add code for quasielastic
00040 //
00041 
00042 #include "SimG4Core/GFlash/interface/HadronPhysicsQGSP_WP.h"
00043 #include "SimG4Core/GFlash/interface/G4PiKBuilder_WP.h"
00044 #include "SimG4Core/GFlash/interface/G4ProtonBuilder_WP.h"
00045 #include "SimG4Core/GFlash/interface/G4MiscLHEPBuilder_WP.h"
00046 
00047 #include "globals.hh"
00048 #include "G4ios.hh"
00049 #include <iomanip>   
00050 #include "G4ParticleDefinition.hh"
00051 #include "G4ParticleTable.hh"
00052 
00053 #include "G4MesonConstructor.hh"
00054 #include "G4BaryonConstructor.hh"
00055 #include "G4ShortLivedConstructor.hh"
00056 
00057 HadronPhysicsQGSP_WP::HadronPhysicsQGSP_WP(const G4String& name, G4bool quasiElastic)
00058                  :  G4VPhysicsConstructor(name) , QuasiElastic(quasiElastic)
00059 {}
00060 
00061 void HadronPhysicsQGSP_WP::CreateModels()
00062 {
00063   theNeutrons=new G4NeutronBuilder;
00064   theQGSPNeutron=new G4QGSPNeutronBuilder(QuasiElastic);
00065   theNeutrons->RegisterMe(theQGSPNeutron);
00066   theNeutrons->RegisterMe(theLEPNeutron=new G4LEPNeutronBuilder);
00067   theLEPNeutron->SetMaxInelasticEnergy(25*GeV);  
00068 
00069   thePro=new G4ProtonBuilder_WP;
00070   theQGSPPro=new G4QGSPProtonBuilder(QuasiElastic);
00071   thePro->RegisterMe(theQGSPPro);
00072   thePro->RegisterMe(theLEPPro=new G4LEPProtonBuilder);
00073   theLEPPro->SetMaxEnergy(25*GeV);
00074   
00075   thePiK=new G4PiKBuilder_WP;
00076   theQGSPPiK=new G4QGSPPiKBuilder(QuasiElastic);
00077   thePiK->RegisterMe(theQGSPPiK);
00078   thePiK->RegisterMe(theLEPPiK=new G4LEPPiKBuilder);
00079   theLEPPiK->SetMaxEnergy(25*GeV);
00080   
00081   theMiscLHEP=new G4MiscLHEPBuilder_WP;
00082 }
00083 
00084 HadronPhysicsQGSP_WP::~HadronPhysicsQGSP_WP()
00085 {
00086    delete theMiscLHEP;
00087    delete theQGSPNeutron;
00088    delete theLEPNeutron;
00089    delete theQGSPPro;
00090    delete theLEPPro;
00091    delete thePro;
00092    delete theQGSPPiK;
00093    delete theLEPPiK;
00094    delete thePiK;
00095 }
00096 
00097 
00098 void HadronPhysicsQGSP_WP::ConstructParticle()
00099 {
00100   G4MesonConstructor pMesonConstructor;
00101   pMesonConstructor.ConstructParticle();
00102 
00103   G4BaryonConstructor pBaryonConstructor;
00104   pBaryonConstructor.ConstructParticle();
00105 
00106   G4ShortLivedConstructor pShortLivedConstructor;
00107   pShortLivedConstructor.ConstructParticle();  
00108 }
00109 
00110 #include "G4ProcessManager.hh"
00111 void HadronPhysicsQGSP_WP::ConstructProcess()
00112 {
00113   CreateModels();
00114   theNeutrons->Build();
00115   thePro->Build();
00116   thePiK->Build();
00117   theMiscLHEP->Build();
00118 }
00119 
00120 // Sept 2007 Modified for CMS GflashHadronWrapperProcess