G4QNeutronHPBuilder.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:   G4QNeutronHPBuilder
00031 //
00032 // Author: April 2012 M. Kosov
00033 //
00034 // Modified:
00035 //
00036 //----------------------------------------------------------------------------
00037 // Short description: for use in CHIPS_HP physics list (mix Q w/ HP at 20 MeV)
00038 //----------------------------------------------------------------------------
00039 //
00040 #include "G4QNeutronHPBuilder.hh"
00041 #include "G4SystemOfUnits.hh"
00042 
00043 G4QNeutronHPBuilder::G4QNeutronHPBuilder(): 
00044     theNeutrons(0)
00045     , theNeutronFission(0)
00046     , theNeutronCapture(0)
00047     , theCHIPSNGamma(0)
00048     , theHPNeutron(0)
00049     , wasActivated(false) 
00050 {
00051   theNeutronInelastic = new G4NeutronInelasticProcess;
00052   theCHIPSInelastic  = new G4QInelastic;
00053   const G4ParticleDefinition* proj = G4Neutron::Neutron();
00054   const G4String& INprocessName = "MixedHPQNeutronInelasticProcess";
00055   theInProcessMixer= new G4QDiscProcessMixer(INprocessName, proj);
00056   const G4String& NGprocessName = "MixedHPQNeutronGammaProcess";
00057   theNgProcessMixer= new G4QDiscProcessMixer(NGprocessName, proj);
00058   const G4String& FIprocessName = "MixedHPQNeutronFissionProcess";
00059   theFiProcessMixer= new G4QDiscProcessMixer(FIprocessName, proj);
00060 }
00061 
00062 G4QNeutronHPBuilder::~G4QNeutronHPBuilder() 
00063 {
00064   delete theCHIPSInelastic;
00065   delete theCHIPSNGamma;
00066   delete theNeutronInelastic;
00067   delete theHPNeutron;
00068   delete theInProcessMixer;
00069   delete theNgProcessMixer;
00070   delete theFiProcessMixer;
00071 }
00072 
00073 void G4QNeutronHPBuilder::Build()
00074 {
00075   wasActivated = true;
00076   // The model definition for neutrons (needed for HP implementation)
00077   theNeutrons = new G4NeutronBuilder;
00078   theNeutrons->RegisterMe( theHPNeutron = new G4NeutronHPBuilder );
00079   // End of the model definition
00080   std::vector<G4VNeutronBuilder *>::iterator i;
00081   for(i = theModelCollections.begin(); i != theModelCollections.end(); i++)
00082   {
00083     (*i)->Build(theNeutronInelastic);
00084     (*i)->Build(theNeutronCapture);
00085     (*i)->Build(theNeutronFission);
00086   }
00087   G4ProcessManager * theProcMan = G4Neutron::Neutron()->GetProcessManager();
00088 
00089   theInProcessMixer->AddDiscreteProcess(theCHIPSInelastic, 1.E8*megaelectronvolt);
00090   theInProcessMixer->AddDiscreteProcess(theNeutronInelastic, 19.9*megaelectronvolt);
00091 
00092   theNgProcessMixer->AddDiscreteProcess(theCHIPSNGamma, 1.E8*megaelectronvolt);
00093   theNgProcessMixer->AddDiscreteProcess(theNeutronCapture, 19.9*megaelectronvolt);
00094 
00095   //theFiProcessMixer->AddDiscreteProcess(theCHIPSFission, 1.E8*megaelectronvolt);
00096   //theFiProcessMixer->AddDiscreteProcess(theNeutronFission, 19.9*megaelectronvolt);
00097 
00098   theProcMan->AddDiscreteProcess(theInProcessMixer); // Mix CHIPS+HP for inelastic
00099   theProcMan->AddDiscreteProcess(theNgProcessMixer); // Mix CHIPS+HP for (n,gamma)
00100   theProcMan->AddDiscreteProcess(theNeutronFission); // Only HP for fission
00101   //theProcMan->AddDiscreteProcess(theFiProcessMixer); // Mix CHIPS+HP for fission
00102 }
00103 // 2009 by M. Kosov

Generated on Mon May 27 17:49:37 2013 for Geant4 by  doxygen 1.4.7