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

Last change on this file since 978 was 962, checked in by garnier, 15 years ago

update processes

File size: 3.4 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.5 2008/09/19 13:32:54 ahoward Exp $
28// GEANT4 tag $Name: geant4-09-02-ref-02 $
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
36#ifndef G4Evaporation_h
37#define G4Evaporation_h 1
38
39#include "globals.hh"
40
41#include "G4VEvaporation.hh"
42#include "G4VEvaporationChannel.hh"
43#include "G4Fragment.hh"
44
45class G4VEvaporationFactory;
46
47//#define debug
48
49class G4Evaporation : public G4VEvaporation
50{
51public:
52  G4Evaporation();
53  G4Evaporation(std::vector<G4VEvaporationChannel*> * aChannelsVector) :
54    theChannels(aChannelsVector), theChannelFactory(0)
55  {};
56         
57  ~G4Evaporation();
58
59private:
60  G4Evaporation(const G4Evaporation &right);
61
62  const G4Evaporation & operator=(const G4Evaporation &right);
63  G4bool operator==(const G4Evaporation &right) const;
64  G4bool operator!=(const G4Evaporation &right) const;
65
66public:
67  G4FragmentVector * BreakItUp(const G4Fragment &theNucleus);
68
69  void SetDefaultChannel();
70  void SetGEMChannel();
71
72#ifdef debug
73  void CheckConservation(const G4Fragment & theInitialState,
74                         G4FragmentVector * Result) const;
75#endif
76
77
78  std::vector<G4VEvaporationChannel*> * theChannels;
79  G4VEvaporationFactory * theChannelFactory;
80 
81 
82  class SumProbabilities : public std::binary_function<G4double,G4double,G4double>
83  {
84  public:
85    SumProbabilities() : total(0.0) {}
86    G4double operator() (G4double& /* probSoFar */, G4VEvaporationChannel*& frag)
87    { 
88      G4double temp_prob = frag->GetEmissionProbability();
89      if(temp_prob >= 0.0) total += temp_prob;
90      //      total += frag->GetEmissionProbability();
91      return total;
92    }
93   
94    G4double GetTotal() { return total; }
95  public:
96    G4double total;
97   
98  };
99
100};
101
102#endif
103
104
105
106
107
Note: See TracBrowser for help on using the repository browser.