00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #ifndef G4BinaryCascade_hh
00043 #define G4BinaryCascade_hh
00044
00045 #include "G4VIntraNuclearTransportModel.hh"
00046 #include "G4ReactionProductVector.hh"
00047 #include "G4KineticTrackVector.hh"
00048 #include "G4ListOfCollisions.hh"
00049 #include "G4V3DNucleus.hh"
00050 #include "G4Fancy3DNucleus.hh"
00051 #include "G4Fragment.hh"
00052 #include "G4VFieldPropagation.hh"
00053 #include "G4VScatterer.hh"
00054 #include "G4LorentzVector.hh"
00055 #include "G4LorentzRotation.hh"
00056
00057 #include "G4BCDecay.hh"
00058 #include "G4BCLateParticle.hh"
00059 #include "G4BCAction.hh"
00060
00061 #include "G4DecayKineticTracks.hh"
00062
00063 class G4CollisionManager;
00064
00065 class G4Track;
00066 class G4KineticTrack;
00067 class G43DNucleus;
00068 class G4Scatterer;
00069
00070 class G4BinaryCascade : public G4VIntraNuclearTransportModel
00071 {
00072 public:
00073
00074 G4BinaryCascade(G4VPreCompoundModel* ptr = 0);
00075
00076 virtual ~G4BinaryCascade();
00077
00078 G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack,
00079 G4Nucleus& theNucleus);
00080 virtual G4ReactionProductVector * Propagate(G4KineticTrackVector *,
00081 G4V3DNucleus *);
00082
00083 virtual void ModelDescription(std::ostream&) const;
00084 virtual void PropagateModelDescription(std::ostream&) const;
00085
00086 private:
00087
00088 G4BinaryCascade(const G4BinaryCascade & right);
00089 const G4BinaryCascade& operator=(G4BinaryCascade & right);
00090 G4int operator==(G4BinaryCascade& right) {return (this == &right);}
00091 G4int operator!=(G4BinaryCascade& right) {return (this != &right);}
00092
00093
00094 void PrintWelcomeMessage();
00095 void BuildTargetList();
00096 G4bool BuildLateParticleCollisions(G4KineticTrackVector * secondaries);
00097 void FindCollisions(G4KineticTrackVector *);
00098 void FindDecayCollision(G4KineticTrack *);
00099 void FindLateParticleCollision(G4KineticTrack *);
00100
00101
00102
00103 G4ReactionProductVector * DeExcite();
00104 G4ReactionProductVector * DecayVoidNucleus();
00105 G4ReactionProductVector * ProductsAddFinalState (G4ReactionProductVector * products, G4KineticTrackVector & finalState );
00106 G4ReactionProductVector * ProductsAddPrecompound(G4ReactionProductVector * products ,G4ReactionProductVector * preco );
00107
00108 G4bool ApplyCollision(G4CollisionInitialState *);
00109 G4bool Capture(G4bool verbose=false);
00110 G4bool Absorb();
00111 G4bool CheckPauliPrinciple(G4KineticTrackVector *);
00112 G4double GetExcitationEnergy();
00113 void CorrectFinalPandE();
00114
00115 G4double CorrectShortlivedPrimaryForFermi(
00116 G4KineticTrack* primary,G4KineticTrackVector target_collection);
00117 G4bool CorrectShortlivedFinalsForFermi(
00118 G4KineticTrackVector * products, G4double initial_Efermi);
00119
00120 void UpdateTracksAndCollisions(G4KineticTrackVector * oldSecondaries,
00121 G4KineticTrackVector * oldTarget,
00122 G4KineticTrackVector * newSecondaries);
00123 G4bool DoTimeStep(G4double timeStep);
00124 G4KineticTrackVector* CorrectBarionsOnBoundary(G4KineticTrackVector *in,
00125 G4KineticTrackVector *out);
00126 G4Fragment * FindFragments();
00127 void StepParticlesOut();
00128
00129 G4LorentzVector GetFinal4Momentum();
00130 G4LorentzVector GetFinalNucleusMomentum();
00131
00132 G4ReactionProductVector * Propagate1H1(G4KineticTrackVector *,
00133 G4V3DNucleus *);
00134 G4double GetIonMass(G4int Z, G4int A);
00135
00136 G4int GetTotalCharge(std::vector<G4KineticTrack *> & aV)
00137 {
00138 G4int result = 0;
00139 std::vector<G4KineticTrack *>::iterator i;
00140 for(i = aV.begin(); i != aV.end(); ++i)
00141 {
00142 result += G4lrint((*i)->GetDefinition()->GetPDGCharge());
00143 }
00144 return result;
00145 }
00146 G4int GetTotalBaryonCharge(std::vector<G4KineticTrack *> & aV)
00147 {
00148 G4int result = 0;
00149 std::vector<G4KineticTrack *>::iterator i;
00150 for(i = aV.begin(); i != aV.end(); ++i)
00151 {
00152 if ( (*i)->GetDefinition()->GetBaryonNumber() != 0 ){
00153 result += G4lrint((*i)->GetDefinition()->GetPDGCharge());
00154 }
00155 }
00156 return result;
00157 }
00158
00159 G4ReactionProductVector * HighEnergyModelFSProducts(G4ReactionProductVector *,
00160 G4KineticTrackVector * secondaries);
00161 G4ReactionProductVector * FillVoidNucleusProducts(G4ReactionProductVector * );
00162
00163
00164 G4ThreeVector GetSpherePoint(G4double r, const G4LorentzVector & momentumdirection);
00165
00166 void ClearAndDestroy(G4KineticTrackVector * ktv);
00167 void ClearAndDestroy(G4ReactionProductVector * rpv);
00168
00169
00170
00171 G4ReactionProductVector * ProductsAddFakeGamma(G4ReactionProductVector * products );
00172
00173 void PrintKTVector(G4KineticTrackVector * ktv, std::string comment=std::string(""));
00174 void PrintKTVector(G4KineticTrack* kt, std::string comment=std::string(""));
00175 void DebugApplyCollisionFail(G4CollisionInitialState * collision,
00176 G4KineticTrackVector * products);
00177 void DebugApplyCollision(G4CollisionInitialState * collision,
00178 G4KineticTrackVector *products);
00179 G4bool DebugEpConservation(const G4HadProjectile & aTrack, G4ReactionProductVector* products);
00180 G4bool CheckChargeAndBaryonNumber(G4String where);
00181
00182 private:
00183 G4KineticTrackVector theProjectileList;
00184 G4KineticTrackVector theTargetList;
00185 G4KineticTrackVector theSecondaryList;
00186 G4KineticTrackVector theCapturedList;
00187 G4KineticTrackVector theFinalState;
00188
00189
00190 G4ExcitationHandler * theExcitationHandler;
00191 G4CollisionManager * theCollisionMgr;
00192
00193 G4Scatterer * theH1Scatterer;
00194
00195 std::vector<G4BCAction *> theImR;
00196 G4BCDecay * theDecay;
00197 G4BCLateParticle * theLateParticle;
00198 G4VFieldPropagation * thePropagator;
00199 G4DecayKineticTracks decayKTV;
00200
00201 G4double theCurrentTime;
00202 G4double theBCminP;
00203 G4double theCutOnP;
00204 G4double theCutOnPAbsorb;
00205 G4LorentzVector theInitial4Mom;
00206 G4LorentzVector theProjectile4Momentum;
00207 G4int currentA, currentZ, lateA, lateZ;
00208 G4int initialZ, initialA,projectileA,projectileZ;
00209 G4double massInNucleus, initial_nuclear_mass;
00210 G4double currentInitialEnergy;
00211 G4LorentzRotation precompoundLorentzboost;
00212 G4double theOuterRadius;
00213 G4bool thePrimaryEscape;
00214 G4ParticleDefinition * thePrimaryType;
00215 G4ThreeVector theMomentumTransfer;
00216
00217
00218
00219 };
00220
00221 #endif
00222
00223
00224
00225