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 #ifndef G4RPGInelastic_h
00033 #define G4RPGInelastic_h 1
00034
00035
00036
00037
00038
00039 #include <vector>
00040
00041 #include "globals.hh"
00042 #include "G4FastVector.hh"
00043 #include "G4HadronicInteraction.hh"
00044 #include "G4ReactionProduct.hh"
00045 #include "Randomize.hh"
00046 #include "G4RPGFragmentation.hh"
00047 #include "G4RPGTwoCluster.hh"
00048 #include "G4RPGTwoBody.hh"
00049 #include "G4RPGStrangeProduction.hh"
00050 #include "G4RPGPionSuppression.hh"
00051
00052
00053 class G4RPGInelastic : public G4HadronicInteraction
00054 {
00055 public:
00056
00057 G4RPGInelastic(const G4String& modelName = "RPGInelastic");
00058
00059 virtual ~G4RPGInelastic()
00060 { }
00061
00062 protected:
00063
00064 G4double Pmltpc(G4int np, G4int nm, G4int nz, G4int n,
00065 G4double b, G4double c);
00066
00067 G4int Factorial(G4int n);
00068
00069 G4bool MarkLeadingStrangeParticle(const G4ReactionProduct& currentParticle,
00070 const G4ReactionProduct& targetParticle,
00071 G4ReactionProduct& leadParticle);
00072
00073 void SetUpPions(const G4int np, const G4int nm, const G4int nz,
00074 G4FastVector<G4ReactionProduct,256> &vec,
00075 G4int &vecLen);
00076
00077
00078
00079 void GetNormalizationConstant(const G4double availableEnergy,
00080 G4double &n,
00081 G4double &anpn);
00082
00083 void CalculateMomenta(G4FastVector<G4ReactionProduct,256> &vec,
00084 G4int &vecLen,
00085 const G4HadProjectile *originalIncident,
00086 const G4DynamicParticle *originalTarget,
00087 G4ReactionProduct &modifiedOriginal,
00088 G4Nucleus &targetNucleus,
00089 G4ReactionProduct ¤tParticle,
00090 G4ReactionProduct &targetParticle,
00091 G4bool &incidentHasChanged,
00092 G4bool &targetHasChanged,
00093 G4bool quasiElastic);
00094
00095 void SetUpChange(G4FastVector<G4ReactionProduct,256> &vec,
00096 G4int &vecLen,
00097 G4ReactionProduct ¤tParticle,
00098 G4ReactionProduct &targetParticle,
00099 G4bool &incidentHasChanged);
00100
00101 G4RPGFragmentation fragmentation;
00102
00103 G4RPGTwoCluster twoCluster;
00104
00105 G4RPGPionSuppression pionSuppression;
00106
00107 G4RPGStrangeProduction strangeProduction;
00108
00109 G4RPGTwoBody twoBody;
00110
00111 std::pair<G4int, G4double> interpolateEnergy(G4double ke) const;
00112
00113 G4int sampleFlat(std::vector<G4double> sigma) const;
00114
00115 void CheckQnums(G4FastVector<G4ReactionProduct,256> &vec,
00116 G4int &vecLen,
00117 G4ReactionProduct ¤tParticle,
00118 G4ReactionProduct &targetParticle,
00119 G4double Q, G4double B, G4double S);
00120
00121 enum {pi0, pip, pim, kp, km, k0, k0b, pro, neu,
00122 lam, sp, s0, sm, xi0, xim, om, ap, an};
00123
00124 protected:
00125
00126 G4ParticleDefinition* particleDef[18];
00127
00128 private:
00129
00130 G4double cache;
00131 G4ThreeVector what;
00132
00133 static const G4double energyScale[30];
00134
00135 };
00136
00137 #endif