Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4BinaryCascade.hh
Go to the documentation of this file.
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 //
28 // -------------------------------------------------------------------
29 // GEANT4 Class file
30 //
31 //
32 // File name: G4BinaryCascade.hh
33 //
34 // Authors: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
35 // Hans-Peter Wellisch
36 // Gunter Folger
37 //
38 // Creation date: 8 June 2000
39 //
40 // -----------------------------------------------------------------------------
41 
42 #ifndef G4BinaryCascade_hh
43 #define G4BinaryCascade_hh
44 
47 #include "G4KineticTrackVector.hh"
48 #include "G4ListOfCollisions.hh"
49 #include "G4V3DNucleus.hh"
50 #include "G4Fancy3DNucleus.hh"
51 #include "G4Fragment.hh"
52 #include "G4VFieldPropagation.hh"
53 #include "G4VScatterer.hh"
54 #include "G4LorentzVector.hh"
55 #include "G4LorentzRotation.hh"
56 
57 #include "G4BCDecay.hh"
58 #include "G4BCLateParticle.hh"
59 #include "G4BCAction.hh"
60 
61 #include "G4DecayKineticTracks.hh"
62 
63 class G4CollisionManager;
64 
65 class G4Track;
66 class G4KineticTrack;
67 class G43DNucleus;
68 class G4Scatterer;
69 
71 {
72 public:
73 
75 
76  virtual ~G4BinaryCascade();
77 
79  G4Nucleus& theNucleus);
81  G4V3DNucleus *);
82 
83  virtual void ModelDescription(std::ostream&) const;
84  virtual void PropagateModelDescription(std::ostream&) const;
85 
86 private:
87 
89  const G4BinaryCascade& operator=(G4BinaryCascade & right);
90  G4int operator==(G4BinaryCascade& right) {return (this == &right);}
91  G4int operator!=(G4BinaryCascade& right) {return (this != &right);}
92 
93 // Implementation
94  void PrintWelcomeMessage();
95  void BuildTargetList();
96  G4bool BuildLateParticleCollisions(G4KineticTrackVector * secondaries);
97  void FindCollisions(G4KineticTrackVector *);
98  void FindDecayCollision(G4KineticTrack *);
99  void FindLateParticleCollision(G4KineticTrack *);
100 
101 // void PropagateInit();
102 // void Cascade();
103  G4ReactionProductVector * DeExcite();
104  G4ReactionProductVector * DecayVoidNucleus();
105  G4ReactionProductVector * ProductsAddFinalState (G4ReactionProductVector * products, G4KineticTrackVector & finalState );
106  G4ReactionProductVector * ProductsAddPrecompound(G4ReactionProductVector * products ,G4ReactionProductVector * preco );
107 
108  G4bool ApplyCollision(G4CollisionInitialState *);
109  G4bool Capture(G4bool verbose=false);
110  G4bool Absorb();
111  G4bool CheckPauliPrinciple(G4KineticTrackVector *);
112  G4double GetExcitationEnergy();
113  void CorrectFinalPandE();
114 
115  G4double CorrectShortlivedPrimaryForFermi(
116  G4KineticTrack* primary,G4KineticTrackVector target_collection);
117  G4bool CorrectShortlivedFinalsForFermi(
118  G4KineticTrackVector * products, G4double initial_Efermi);
119 
120  void UpdateTracksAndCollisions(G4KineticTrackVector * oldSecondaries,
121  G4KineticTrackVector * oldTarget,
122  G4KineticTrackVector * newSecondaries);
123  G4bool DoTimeStep(G4double timeStep);
124  G4KineticTrackVector* CorrectBarionsOnBoundary(G4KineticTrackVector *in,
125  G4KineticTrackVector *out);
126  G4Fragment * FindFragments();
127  void StepParticlesOut();
128 
129  G4LorentzVector GetFinal4Momentum();
130  G4LorentzVector GetFinalNucleusMomentum();
131 
133  G4V3DNucleus *);
134  G4double GetIonMass(G4int Z, G4int A);
135 
136  G4int GetTotalCharge(std::vector<G4KineticTrack *> & aV)
137  {
138  G4int result = 0;
139  std::vector<G4KineticTrack *>::iterator i;
140  for(i = aV.begin(); i != aV.end(); ++i)
141  {
142  result += G4lrint((*i)->GetDefinition()->GetPDGCharge());
143  }
144  return result;
145  }
146  G4int GetTotalBaryonCharge(std::vector<G4KineticTrack *> & aV)
147  {
148  G4int result = 0;
149  std::vector<G4KineticTrack *>::iterator i;
150  for(i = aV.begin(); i != aV.end(); ++i)
151  {
152  if ( (*i)->GetDefinition()->GetBaryonNumber() != 0 ){
153  result += G4lrint((*i)->GetDefinition()->GetPDGCharge());
154  }
155  }
156  return result;
157  }
158 
159  G4ReactionProductVector * HighEnergyModelFSProducts(G4ReactionProductVector *,
160  G4KineticTrackVector * secondaries); // add secondaries of string model to G4RPV
161  G4ReactionProductVector * FillVoidNucleusProducts(G4ReactionProductVector * ); // nucleus destroyed, add secondaries to G4RPV
162 // utility methods
163 
164  G4ThreeVector GetSpherePoint(G4double r, const G4LorentzVector & momentumdirection);
165 
166  void ClearAndDestroy(G4KineticTrackVector * ktv);
167  void ClearAndDestroy(G4ReactionProductVector * rpv);
168 
169 // for debugging purpose
170 
171  G4ReactionProductVector * ProductsAddFakeGamma(G4ReactionProductVector * products );
172 
173  void PrintKTVector(G4KineticTrackVector * ktv, std::string comment=std::string(""));
174  void PrintKTVector(G4KineticTrack* kt, std::string comment=std::string(""));
175  void DebugApplyCollisionFail(G4CollisionInitialState * collision,
176  G4KineticTrackVector * products);
177  void DebugApplyCollision(G4CollisionInitialState * collision,
178  G4KineticTrackVector *products);
179  G4bool DebugEpConservation(const G4HadProjectile & aTrack, G4ReactionProductVector* products);
180  G4bool CheckChargeAndBaryonNumber(G4String where);
181 
182 private:
183  G4KineticTrackVector theProjectileList; // replaced by theProjectile4Momentum
184  G4KineticTrackVector theTargetList; // list of nucleons in Nucleus
185  G4KineticTrackVector theSecondaryList; // particles being followed
186  G4KineticTrackVector theCapturedList; // captured particles
187  G4KineticTrackVector theFinalState; // particles for final state
188 
189 
190  G4ExcitationHandler * theExcitationHandler;
191  G4CollisionManager * theCollisionMgr;
192 
193  G4Scatterer * theH1Scatterer;
194 
195  std::vector<G4BCAction *> theImR;
196  G4BCDecay * theDecay;
197  G4BCLateParticle * theLateParticle;
198  G4VFieldPropagation * thePropagator;
199  G4DecayKineticTracks decayKTV;
200 
201  G4double theCurrentTime;
202  G4double theBCminP;
203  G4double theCutOnP;
204  G4double theCutOnPAbsorb;
205  G4LorentzVector theInitial4Mom; // suppress?
206  G4LorentzVector theProjectile4Momentum;
207  G4int currentA, currentZ, lateA, lateZ;
208  G4int initialZ, initialA,projectileA,projectileZ;
209  G4double massInNucleus, initial_nuclear_mass;
210  G4double currentInitialEnergy; // for debugging
211  G4LorentzRotation precompoundLorentzboost;
212  G4double theOuterRadius;
213  G4bool thePrimaryEscape;
214  G4ParticleDefinition * thePrimaryType;
215  G4ThreeVector theMomentumTransfer;
216 
217 
218 
219 };
220 
221 #endif
222 
223 
224 
225