GFlashParticleBounds.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: GFlashParticleBounds.cc 69796 2013-05-15 13:26:12Z gcosmo $
00027 //
00028 //
00029 // ------------------------------------------------------------
00030 // GEANT 4 class implementation
00031 //
00032 //      ---------------- GFlashParticleBounds ----------------
00033 //
00034 // Author: Joanna Weng - 9.11.2004
00035 // ------------------------------------------------------------
00036 
00037 #include "GFlashParticleBounds.hh"
00038 
00039 #include "G4SystemOfUnits.hh"
00040 #include "G4Electron.hh"
00041 #include "G4Positron.hh"
00042 
00043 
00044 GFlashParticleBounds::GFlashParticleBounds()
00045 {    
00046   // e+e- defaults
00047   EMinEneToParametrise = 0.10*GeV;  
00048   EMaxEneToParametrise = 10000.00*GeV;  
00049   EEneToKill = 0.1*GeV; // Energie at which electrons are killed
00050 }
00051 
00052 GFlashParticleBounds::~GFlashParticleBounds()
00053 {
00054 }
00055 
00056 void GFlashParticleBounds::
00057 SetMinEneToParametrise(G4ParticleDefinition &particleType, G4double enemin)
00058 { 
00059   if( &particleType == G4Electron::ElectronDefinition()||
00060     &particleType == G4Positron::PositronDefinition()) 
00061   EMinEneToParametrise = enemin;
00062 }
00063 
00064 void GFlashParticleBounds::
00065 SetMaxEneToParametrise(G4ParticleDefinition &particleType, G4double enemax)
00066 {
00067   if( &particleType == G4Electron::ElectronDefinition()||
00068     &particleType == G4Positron::PositronDefinition()) 
00069   EMaxEneToParametrise = enemax; 
00070 }
00071 
00072 void GFlashParticleBounds::
00073 SetEneToKill(G4ParticleDefinition &particleType, G4double enekill)
00074 {
00075   if( &particleType == G4Electron::ElectronDefinition()||
00076     &particleType == G4Positron::PositronDefinition()) 
00077   EEneToKill = enekill; 
00078 }
00079 
00080 G4double GFlashParticleBounds::
00081 GetMinEneToParametrise(G4ParticleDefinition &particleType) 
00082 { 
00083   G4double result = DBL_MAX;
00084   if( &particleType == G4Electron::ElectronDefinition()||
00085     &particleType == G4Positron::PositronDefinition()) 
00086   {
00087     result = EMinEneToParametrise;
00088   }        
00089   return result;
00090 }
00091 
00092 G4double GFlashParticleBounds::
00093 GetMaxEneToParametrise(G4ParticleDefinition &particleType) 
00094 { 
00095   G4double result = 0;
00096   if( &particleType == G4Electron::ElectronDefinition()||
00097     &particleType == G4Positron::PositronDefinition()) 
00098   {
00099     result = EMaxEneToParametrise; 
00100   }
00101   return result;
00102 }
00103 
00104 G4double GFlashParticleBounds::
00105 GetEneToKill(G4ParticleDefinition & particleType) 
00106 {
00107   if (&particleType == G4Electron::ElectronDefinition() ||
00108     &particleType == G4Positron::PositronDefinition())  
00109   return EEneToKill;
00110   else return (-DBL_MAX);
00111 }

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