File indexing completed on 2025-01-18 09:58:00
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 #ifndef G4CascadeFinalStateAlgorithm_hh
0035 #define G4CascadeFinalStateAlgorithm_hh 1
0036
0037 #include "globals.hh"
0038 #include "G4VHadDecayAlgorithm.hh"
0039 #include "G4LorentzConvertor.hh"
0040
0041 class G4InuclElementaryParticle;
0042 class G4MultiBodyMomentumDist;
0043 class G4TwoBodyAngularDist;
0044 class G4VMultiBodyMomDst;
0045 class G4VTwoBodyAngDst;
0046
0047
0048 class G4CascadeFinalStateAlgorithm : public G4VHadDecayAlgorithm {
0049 public:
0050 G4CascadeFinalStateAlgorithm();
0051 virtual ~G4CascadeFinalStateAlgorithm();
0052
0053 virtual void SetVerboseLevel(G4int verbose);
0054
0055
0056 void Configure(G4InuclElementaryParticle* bullet,
0057 G4InuclElementaryParticle* target,
0058 const std::vector<G4int>& particle_kinds);
0059
0060 protected:
0061
0062 virtual void GenerateTwoBody(G4double initialMass,
0063 const std::vector<G4double>& masses,
0064 std::vector<G4LorentzVector>& finalState);
0065
0066
0067 virtual void GenerateMultiBody(G4double initialMass,
0068 const std::vector<G4double>& masses,
0069 std::vector<G4LorentzVector>& finalState);
0070
0071
0072 void SaveKinematics(G4InuclElementaryParticle* bullet,
0073 G4InuclElementaryParticle* target);
0074
0075
0076 void ChooseGenerators(G4int is, G4int fs);
0077
0078
0079 void FillMagnitudes(G4double initialMass,
0080 const std::vector<G4double>& masses);
0081
0082 G4bool satisfyTriangle(const std::vector<G4double>& pmod) const;
0083
0084
0085 void FillDirections(G4double initialMass,
0086 const std::vector<G4double>& masses,
0087 std::vector<G4LorentzVector>& finalState);
0088
0089 void FillDirThreeBody(G4double initialMass,
0090 const std::vector<G4double>& masses,
0091 std::vector<G4LorentzVector>& finalState);
0092
0093 void FillDirManyBody(G4double initialMass,
0094 const std::vector<G4double>& masses,
0095 std::vector<G4LorentzVector>& finalState);
0096
0097 G4double GenerateCosTheta(G4int ptype, G4double pmod) const;
0098
0099
0100 void FillUsingKopylov(G4double initialMass,
0101 const std::vector<G4double>& masses,
0102 std::vector<G4LorentzVector>& finalState);
0103
0104 G4double BetaKopylov(G4int K) const;
0105
0106 private:
0107 const G4VMultiBodyMomDst* momDist;
0108 const G4VTwoBodyAngDst* angDist;
0109
0110 std::vector<G4int> kinds;
0111 G4int multiplicity;
0112 G4double bullet_ekin;
0113 G4LorentzConvertor toSCM;
0114
0115 std::vector<G4double> modules;
0116 G4ThreeVector mom;
0117
0118 static const G4double maxCosTheta;
0119 static const G4double oneOverE;
0120 static const G4double small;
0121 static const G4int itry_max;
0122 };
0123
0124 #endif