source: trunk/source/processes/hadronic/models/de_excitation/handler/include/G4ExcitationHandler.hh @ 836

Last change on this file since 836 was 819, checked in by garnier, 16 years ago

import all except CVS

File size: 6.7 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: G4ExcitationHandler.hh,v 1.7 2006/08/19 19:55:59 dennis Exp $
28// GEANT4 tag $Name:  $
29//
30// Hadronic Process: Nuclear De-excitations
31// by V. Lara (May 1998)
32// Modif (30 June 1998) by V. Lara:
33//      -Using G4ParticleTable and therefore G4IonTable
34//       it can return all kind of fragments produced in
35//       deexcitation
36//      -It uses default algorithms for:
37//              Evaporation: G4StatEvaporation
38//              MultiFragmentation: G4DummyMF (a dummy one)
39//              Fermi Breakup model: G4StatFermiBreakUp
40
41
42#ifndef G4ExcitationHandler_h
43#define G4ExcitationHandler_h 1
44
45#include "G4VMultiFragmentation.hh"
46#include "G4VFermiBreakUp.hh"
47#include "G4VEvaporation.hh"
48#include "G4VPhotonEvaporation.hh"
49#include "G4Fragment.hh"
50#include "G4DynamicParticle.hh"
51#include "G4ReactionProductVector.hh"
52#include "G4ReactionProduct.hh"
53#include "G4ParticleTypes.hh"
54#include "G4ParticleTable.hh"
55// needed for default models
56#include "G4Evaporation.hh"
57#include "G4StatMF.hh"
58#include "G4FermiBreakUp.hh"
59#include "G4PhotonEvaporation.hh"
60#include "G4IonConstructor.hh"
61
62//#define debug
63
64class G4ExcitationHandler 
65{
66public:
67  G4ExcitationHandler(); 
68  ~G4ExcitationHandler();
69private:
70  G4ExcitationHandler(const G4ExcitationHandler &right);
71
72  const G4ExcitationHandler & operator=(const G4ExcitationHandler &right);
73  G4bool operator==(const G4ExcitationHandler &right) const;
74  G4bool operator!=(const G4ExcitationHandler &right) const;
75 
76
77public:
78  G4ReactionProductVector * BreakItUp(const G4Fragment &theInitialState) const;
79
80  void SetEvaporation(G4VEvaporation *const  value);
81
82  void SetMultiFragmentation(G4VMultiFragmentation *const  value);
83
84  void SetFermiModel(G4VFermiBreakUp *const  value);
85
86  void SetPhotonEvaporation(G4VPhotonEvaporation * const value);
87
88  void SetMaxZForFermiBreakUp(G4int aZ);
89  void SetMaxAForFermiBreakUp(G4int anA);
90  void SetMaxAandZForFermiBreakUp(G4int anA,G4int aZ);
91  void SetMinEForMultiFrag(G4double anE);
92
93private:
94
95  G4ReactionProductVector * Transform(G4FragmentVector * theFragmentVector) const;
96
97  const G4VEvaporation * GetEvaporation() const;
98
99  const G4VMultiFragmentation * GetMultiFragmentation() const;
100
101  const G4VFermiBreakUp * GetFermiModel() const;
102
103  const G4VPhotonEvaporation * GetPhotonEvaporation() const;
104
105  G4int GetMaxZ() const;
106  G4int GetMaxA() const;
107  G4double GetMinE() const;
108 
109#ifdef debug
110  void CheckConservation(const G4Fragment & aFragment,
111                         G4FragmentVector * Result) const;
112#endif
113private:
114 
115  G4VEvaporation *theEvaporation;
116 
117  G4VMultiFragmentation *theMultiFragmentation;
118 
119  G4VFermiBreakUp *theFermiModel;
120 
121  G4VPhotonEvaporation * thePhotonEvaporation;
122
123  G4int maxZForFermiBreakUp;
124  G4int maxAForFermiBreakUp;
125  G4double minEForMultiFrag;
126
127  G4ParticleTable *theTableOfParticles;
128
129  G4bool MyOwnEvaporationClass;
130  G4bool MyOwnMultiFragmentationClass; 
131  G4bool MyOwnFermiBreakUpClass;
132  G4bool MyOwnPhotonEvaporationClass;
133
134  struct DeleteFragment
135  {
136    template<typename T>
137    void operator()(const T* ptr) const
138    {
139      delete ptr;
140    }
141  };
142
143
144};
145
146
147
148inline const G4VEvaporation * G4ExcitationHandler::GetEvaporation() const
149{
150  return theEvaporation;
151}
152
153inline void G4ExcitationHandler::SetEvaporation(G4VEvaporation *const  value)
154{
155  if (theEvaporation != 0 && MyOwnEvaporationClass) delete theEvaporation;
156  MyOwnEvaporationClass = false;
157  theEvaporation = value;
158}
159
160inline const G4VMultiFragmentation * G4ExcitationHandler::GetMultiFragmentation() const
161{
162  return theMultiFragmentation;
163}
164
165inline void G4ExcitationHandler::SetMultiFragmentation(G4VMultiFragmentation *const  value)
166{
167  if (theMultiFragmentation != 0 && MyOwnMultiFragmentationClass) delete theMultiFragmentation;
168  MyOwnMultiFragmentationClass = false;
169  theMultiFragmentation = value;
170}
171
172inline const G4VFermiBreakUp * G4ExcitationHandler::GetFermiModel() const
173{
174  return theFermiModel;
175}
176
177inline void G4ExcitationHandler::SetFermiModel(G4VFermiBreakUp *const  value)
178{
179  if (theFermiModel != 0 && MyOwnFermiBreakUpClass) delete theFermiModel;
180  MyOwnFermiBreakUpClass = false;
181  theFermiModel = value;
182}
183
184
185inline const G4VPhotonEvaporation * G4ExcitationHandler::GetPhotonEvaporation() const
186{
187  return thePhotonEvaporation;
188}
189
190inline void G4ExcitationHandler::SetPhotonEvaporation(G4VPhotonEvaporation *const  value)
191{
192  if (thePhotonEvaporation != 0 && MyOwnPhotonEvaporationClass) delete thePhotonEvaporation;
193  MyOwnPhotonEvaporationClass = false;
194  thePhotonEvaporation = value;
195}
196
197inline void G4ExcitationHandler::SetMaxZForFermiBreakUp(G4int aZ)
198{
199  maxZForFermiBreakUp = aZ;
200}
201
202inline void G4ExcitationHandler::SetMaxAForFermiBreakUp(G4int anA)
203{
204  maxAForFermiBreakUp = anA;
205}
206
207inline void G4ExcitationHandler::SetMaxAandZForFermiBreakUp(G4int anA, G4int aZ)
208{
209  maxAForFermiBreakUp = anA;
210  maxZForFermiBreakUp = aZ;
211}
212
213inline void G4ExcitationHandler::SetMinEForMultiFrag(G4double anE)
214{
215  minEForMultiFrag = anE;
216}
217
218inline G4int G4ExcitationHandler::GetMaxZ() const
219{
220  return maxZForFermiBreakUp;
221}
222
223inline G4int G4ExcitationHandler::GetMaxA() const 
224{
225  return maxAForFermiBreakUp;
226}
227
228inline G4double G4ExcitationHandler::GetMinE() const 
229{
230  return minEForMultiFrag;
231}
232
233
234#endif
Note: See TracBrowser for help on using the repository browser.