G4GammaNuclearReaction.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 // Short description: The CHIPS model provides the G4QHadronVector
00027 // output, which is converted to the G4 particle-singletons
00028 // --------------------------------------------------------------------
00029 //
00030 // Created: J.P. Wellisch, 2000/08/18 
00031 // 01.09.2008 V.Ivanchenko 
00032 //
00033 
00034 #include "G4GammaNuclearReaction.hh"
00035 #include "G4Gamma.hh"
00036 #include "G4Nucleus.hh"
00037 #include "G4HadFinalState.hh"
00038 #include "G4HadProjectile.hh"
00039 #include <iostream>
00040 
00041 
00042 G4GammaNuclearReaction::G4GammaNuclearReaction(const G4String& name): 
00043   G4HadronicInteraction(name)
00044 {
00045   Description();
00046 }
00047 
00048 
00049 G4GammaNuclearReaction::~G4GammaNuclearReaction()
00050 {}
00051 
00052 
00053 void G4GammaNuclearReaction::Description() const
00054 {
00055   char* dirName = getenv("G4PhysListDocDir");
00056   if (dirName) {
00057     std::ofstream outFile;
00058     G4String outFileName = GetModelName() + ".html";
00059     G4String pathName = G4String(dirName) + "/" + outFileName;
00060 
00061     outFile.open(pathName);
00062     outFile << "<html>\n";
00063     outFile << "<head>\n";
00064 
00065     outFile << "<title>Description of CHIPS Gamma Nuclear Model</title>\n";
00066     outFile << "</head>\n";
00067     outFile << "<body>\n";
00068 
00069     outFile << "G4GammaNuclearReaction handles inelastic gamma scattering\n"
00070             << "using the Chiral Invariant Phase Space (CHIPS) model of\n"
00071             << "M. Kossov.  The incident gamma is interacted directly with\n"
00072             << "nucleons and clusters of nucleons within the target by\n"
00073             << "forming quasmons (or generalized excited hadrons) which then\n"
00074             << "decay into final state hadrons.  The model is valid for\n"
00075             << "incident gamma energies up to 3.5 GeV.\n";
00076 
00077     outFile << "</body>\n";
00078     outFile << "</html>\n";
00079     outFile.close();
00080   }
00081 }
00082 
00083 
00084 G4HadFinalState * G4GammaNuclearReaction::ApplyYourself(
00085            const G4HadProjectile& aTrack, 
00086            G4Nucleus& aTargetNucleus)
00087 {
00088   if(aTrack.GetDefinition() != G4Gamma::GammaDefinition())
00089   {
00090     throw G4HadronicException(__FILE__, __LINE__, 
00091                               "Called G4GammaNuclearReaction for particle other than gamma");
00092   }
00093   return theModel.ApplyYourself(aTrack, aTargetNucleus);
00094 }
00095 

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