source: trunk/source/processes/hadronic/models/de_excitation/evaporation/include/G4Evaporation.hh @ 1198

Last change on this file since 1198 was 1196, checked in by garnier, 15 years ago

update CVS release candidate geant4.9.3.01

File size: 3.5 KB
Line 
1//
2// ********************************************************************
3// * License and Disclaimer                                           *
4// *                                                                  *
5// * The  Geant4 software  is  copyright of the Copyright Holders  of *
6// * the Geant4 Collaboration.  It is provided  under  the terms  and *
7// * conditions of the Geant4 Software License,  included in the file *
8// * LICENSE and available at  http://cern.ch/geant4/license .  These *
9// * include a list of copyright holders.                             *
10// *                                                                  *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work  make  any representation or  warranty, express or implied, *
14// * regarding  this  software system or assume any liability for its *
15// * use.  Please see the license in the file  LICENSE  and URL above *
16// * for the full disclaimer and the limitation of liability.         *
17// *                                                                  *
18// * This  code  implementation is the result of  the  scientific and *
19// * technical work of the GEANT4 collaboration.                      *
20// * By using,  copying,  modifying or  distributing the software (or *
21// * any work based  on the software)  you  agree  to acknowledge its *
22// * use  in  resulting  scientific  publications,  and indicate your *
23// * acceptance of all terms of the Geant4 Software license.          *
24// ********************************************************************
25//
26//
27// $Id: G4Evaporation.hh,v 1.7 2009/07/27 10:32:05 vnivanch Exp $
28// GEANT4 tag $Name: geant4-09-03-cand-01 $
29//
30// Hadronic Process: Nuclear De-excitations
31// by V. Lara
32//
33//
34// Alex Howard - added protection for negative probabilities in the sum, 14/2/07
35// V.Ivanchenko - added Combined decay channels (default + GEM) 27/07/09
36
37#ifndef G4Evaporation_h
38#define G4Evaporation_h 1
39
40#include "globals.hh"
41
42#include "G4VEvaporation.hh"
43#include "G4VEvaporationChannel.hh"
44#include "G4Fragment.hh"
45
46class G4VEvaporationFactory;
47
48//#define debug
49
50class G4Evaporation : public G4VEvaporation
51{
52public:
53  G4Evaporation();
54  G4Evaporation(std::vector<G4VEvaporationChannel*> * aChannelsVector) :
55    theChannels(aChannelsVector), theChannelFactory(0)
56  {};
57         
58  virtual ~G4Evaporation();
59
60private:
61  G4Evaporation(const G4Evaporation &right);
62
63  const G4Evaporation & operator=(const G4Evaporation &right);
64  G4bool operator==(const G4Evaporation &right) const;
65  G4bool operator!=(const G4Evaporation &right) const;
66
67public:
68  G4FragmentVector * BreakItUp(const G4Fragment &theNucleus);
69
70  void SetDefaultChannel();
71  void SetGEMChannel();
72  void SetCombinedChannel();
73
74#ifdef debug
75  void CheckConservation(const G4Fragment & theInitialState,
76                         G4FragmentVector * Result) const;
77#endif
78
79
80  std::vector<G4VEvaporationChannel*> * theChannels;
81  G4VEvaporationFactory * theChannelFactory;
82 
83 
84  class SumProbabilities : public std::binary_function<G4double,G4double,G4double>
85  {
86  public:
87    SumProbabilities() : total(0.0) {}
88    G4double operator() (G4double& /* probSoFar */, G4VEvaporationChannel*& frag)
89    { 
90      G4double temp_prob = frag->GetEmissionProbability();
91      if(temp_prob >= 0.0) total += temp_prob;
92      //      total += frag->GetEmissionProbability();
93      return total;
94    }
95   
96    G4double GetTotal() { return total; }
97  public:
98    G4double total;
99   
100  };
101
102};
103
104#endif
105
106
107
108
109
Note: See TracBrowser for help on using the repository browser.