G4gspart.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$
00028 //
00029 #include "G4ProcessManager.hh"
00030 #include "G3toG4.hh"
00031 #include "G3PartTable.hh"
00032 
00033 void PG4gspart(G4String *tokens)
00034 {
00035     // fill the parameter containers
00036     G3fillParams(tokens,PTgspart);
00037 
00038     // interpret the parameters
00039     G4String chnpar = Spar[0];
00040     G4int ipart = Ipar[0];
00041     G4int itrtyp = Ipar[1];
00042     G4int nwb = Ipar[2];
00043     G4double amass = Rpar[0];
00044     G4double charge = Rpar[1];
00045     G4double tlife = Rpar[2];
00046     G4double *ubuf = &Rpar[3];
00047 
00048     G4gspart(ipart,chnpar,itrtyp,amass,charge,tlife,ubuf,nwb);
00049 }
00050 
00051 void G4gspart(G4int, G4String, G4int, G4double,
00052               G4double, G4double, G4double*, G4int)
00053 {
00054 }
00055 
00056 #ifdef OMIT_CODE
00057 void G4gspart(G4int ipart, G4String chnpar, G4int itrtyp, G4double amass,
00058               G4double charge, G4double tlife, G4double*, G4int)
00059 {
00060     // Handle conversion of itrtyp into an appropriate ProcessManager
00061     G4ProcessManager *mgr = 0;
00062     switch (itrtyp) {
00063     case 1:
00064         // gamma
00065 // $$$        mgr = gammaProcessManager;
00066         break;
00067     case 2:
00068         // electron
00069 // $$$        mgr = electronProcessManager;
00070         break;
00071     case 3:
00072         // neutron
00073 // $$$        mgr = neutronProcessManager;
00074         break;
00075     case 4:
00076         // hadron
00077 // $$$        mgr = hadronProcessManager;
00078         break;
00079     case 5:
00080         // muon
00081 // $$$        mgr = muonProcessManager;
00082         break;
00083     case 6:
00084         // geantino
00085 // $$$        mgr = geantinoProcessManager;
00086         break;
00087     case 7:
00088         // heavy ion
00089 // $$$        mgr = heavyIonProcessManager;
00090         break;
00091     case 8:
00092         // light ion
00093 // $$$        mgr = lightIonProcessManager;
00094         break;
00095     default:
00096 // $$$        mgr = theProcessManager;
00097         break;
00098     }
00099 
00100     // Create the particle; provide parameters and a process mgr.
00101     G4ParticleDefinition *part = new G4ParticleDefinition(chnpar);
00102     part->SetProcessManager(mgr);
00103     part->SetPDGMass(amass);
00104     part->SetPDGCharge(charge);
00105     part->SetPDGLifeTime(tlife);
00106 
00107     // add to particle table
00108     G3Part.put(&ipart, part);
00109 }
00110 #endif

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