Geant4  10.01.p02
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 
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();
100 
101 // void PropagateInit();
102 // void Cascade();
107 
109  G4bool Capture(G4bool verbose=false);
110  G4bool Absorb();
113  void CorrectFinalPandE();
114 
116  G4KineticTrack* primary,G4KineticTrackVector target_collection);
118  G4KineticTrackVector * products, G4double initial_Efermi);
119 
120  void UpdateTracksAndCollisions(G4KineticTrackVector * oldSecondaries,
121  G4KineticTrackVector * oldTarget,
122  G4KineticTrackVector * newSecondaries);
123  G4bool DoTimeStep(G4double timeStep);
125  G4KineticTrackVector *out);
127  void StepParticlesOut();
128 
131 
133  G4V3DNucleus *);
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 
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 
168 
169 // for debugging purpose
170 
172 
173  void PrintKTVector(G4KineticTrackVector * ktv, std::string comment=std::string(""));
174  void PrintKTVector(G4KineticTrack* kt, std::string comment=std::string(""));
176  G4KineticTrackVector * products);
178  G4KineticTrackVector *products);
180  G4bool DebugEpConservation(const G4String where);
182 
183 private:
184  G4KineticTrackVector theProjectileList; // replaced by theProjectile4Momentum
185  G4KineticTrackVector theTargetList; // list of nucleons in Nucleus
186  G4KineticTrackVector theSecondaryList; // particles being followed
187  G4KineticTrackVector theCapturedList; // captured particles
188  G4KineticTrackVector theFinalState; // particles for final state
189 
190 
193 
195 
196  std::vector<G4BCAction *> theImR;
201 
211  G4double currentInitialEnergy; // for debugging
217 
218 
219 
220 };
221 
222 #endif
223 
224 
225 
226 
void FindDecayCollision(G4KineticTrack *)
G4VFieldPropagation * thePropagator
G4bool Capture(G4bool verbose=false)
void DebugApplyCollisionFail(G4CollisionInitialState *collision, G4KineticTrackVector *products)
G4KineticTrackVector theFinalState
G4double initial_nuclear_mass
CLHEP::Hep3Vector G4ThreeVector
CLHEP::HepLorentzRotation G4LorentzRotation
G4ReactionProductVector * ProductsAddFinalState(G4ReactionProductVector *products, G4KineticTrackVector &finalState)
G4LorentzVector theInitial4Mom
G4double theCutOnPAbsorb
G4LorentzRotation precompoundLorentzboost
G4KineticTrackVector theProjectileList
void ClearAndDestroy(G4KineticTrackVector *ktv)
G4ExcitationHandler * theExcitationHandler
G4ThreeVector GetSpherePoint(G4double r, const G4LorentzVector &momentumdirection)
G4ReactionProductVector * Propagate1H1(G4KineticTrackVector *, G4V3DNucleus *)
G4double currentInitialEnergy
G4ReactionProductVector * DecayVoidNucleus()
G4Fragment * FindFragments()
G4LorentzVector GetFinal4Momentum()
G4bool BuildLateParticleCollisions(G4KineticTrackVector *secondaries)
virtual void PropagateModelDescription(std::ostream &) const
int G4int
Definition: G4Types.hh:78
const G4BinaryCascade & operator=(G4BinaryCascade &right)
G4LorentzVector theProjectile4Momentum
std::vector< G4BCAction * > theImR
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &theNucleus)
G4int GetTotalCharge(std::vector< G4KineticTrack * > &aV)
std::vector< G4ReactionProduct * > G4ReactionProductVector
G4double GetExcitationEnergy()
G4double GetIonMass(G4int Z, G4int A)
virtual ~G4BinaryCascade()
G4bool DebugEpConservation(const G4String where)
G4LorentzVector GetFinalNucleusMomentum()
void UpdateTracksAndCollisions(G4KineticTrackVector *oldSecondaries, G4KineticTrackVector *oldTarget, G4KineticTrackVector *newSecondaries)
bool G4bool
Definition: G4Types.hh:79
G4ThreeVector theMomentumTransfer
G4CollisionManager * theCollisionMgr
G4bool CheckPauliPrinciple(G4KineticTrackVector *)
G4KineticTrackVector theCapturedList
G4ReactionProductVector * ProductsAddPrecompound(G4ReactionProductVector *products, G4ReactionProductVector *preco)
G4Scatterer * theH1Scatterer
void PrintKTVector(G4KineticTrackVector *ktv, std::string comment=std::string(""))
virtual G4ReactionProductVector * Propagate(G4KineticTrackVector *, G4V3DNucleus *)
static const G4double A[nN]
G4bool ApplyCollision(G4CollisionInitialState *)
G4ReactionProductVector * HighEnergyModelFSProducts(G4ReactionProductVector *, G4KineticTrackVector *secondaries)
G4BinaryCascade(G4VPreCompoundModel *ptr=0)
G4bool CorrectShortlivedFinalsForFermi(G4KineticTrackVector *products, G4double initial_Efermi)
void DebugApplyCollision(G4CollisionInitialState *collision, G4KineticTrackVector *products)
G4bool DoTimeStep(G4double timeStep)
virtual void ModelDescription(std::ostream &) const
G4BCDecay * theDecay
int G4lrint(double ad)
Definition: templates.hh:163
void FindLateParticleCollision(G4KineticTrack *)
G4DecayKineticTracks decayKTV
G4KineticTrackVector theTargetList
G4ReactionProductVector * FillVoidNucleusProducts(G4ReactionProductVector *)
G4ReactionProductVector * ProductsAddFakeGamma(G4ReactionProductVector *products)
G4bool CheckChargeAndBaryonNumber(G4String where)
G4bool DebugFinalEpConservation(const G4HadProjectile &aTrack, G4ReactionProductVector *products)
G4int GetTotalBaryonCharge(std::vector< G4KineticTrack * > &aV)
G4BCLateParticle * theLateParticle
G4ReactionProductVector * DeExcite()
const G4ParticleDefinition * thePrimaryType
G4int operator==(G4BinaryCascade &right)
double G4double
Definition: G4Types.hh:76
G4int operator!=(G4BinaryCascade &right)
G4KineticTrackVector theSecondaryList
G4KineticTrackVector * CorrectBarionsOnBoundary(G4KineticTrackVector *in, G4KineticTrackVector *out)
G4double CorrectShortlivedPrimaryForFermi(G4KineticTrack *primary, G4KineticTrackVector target_collection)
CLHEP::HepLorentzVector G4LorentzVector
void FindCollisions(G4KineticTrackVector *)