File indexing completed on 2025-01-18 09:58:19
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 #ifndef G4FTFParticipants_h
0030 #define G4FTFParticipants_h 1
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040 #include "G4VParticipants.hh"
0041 #include "G4FTFParameters.hh"
0042 #include <vector>
0043 #include "G4Nucleon.hh"
0044 #include "G4V3DNucleus.hh"
0045 #include "G4Fancy3DNucleus.hh"
0046 #include "G4ReactionProduct.hh"
0047 #include "G4InteractionContent.hh"
0048
0049
0050 class G4FTFParticipants : public G4VParticipants {
0051 public:
0052 G4FTFParticipants();
0053 ~G4FTFParticipants();
0054
0055 const G4FTFParticipants& operator=( const G4FTFParticipants& right ) = delete;
0056 G4bool operator==( const G4FTFParticipants& right ) const = delete;
0057 G4bool operator!=( const G4FTFParticipants& right ) const = delete;
0058 G4FTFParticipants( const G4FTFParticipants& right ) = delete;
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069 void SetImpactParameter( const G4double b_value );
0070 G4double GetImpactParameter() const;
0071 void SetBminBmax( const G4double bmin_value, const G4double bmax_value );
0072 G4bool SampleBinInterval() const;
0073 G4double GetBmin2() const;
0074 G4double GetBmax2() const;
0075
0076 void GetList( const G4ReactionProduct& thePrimary, G4FTFParameters* theParameters );
0077 void StartLoop();
0078 G4bool Next();
0079 void SortInteractionsIncT();
0080 void ShiftInteractionTime();
0081 G4InteractionContent& GetInteraction();
0082 void Clean();
0083
0084 private:
0085 G4double Bimpact;
0086 G4bool BinInterval;
0087 G4double Bmin2;
0088 G4double Bmax2;
0089
0090 std::vector< G4InteractionContent* > theInteractions;
0091 G4int currentInteraction;
0092 };
0093
0094
0095 inline void G4FTFParticipants::SetImpactParameter( const G4double b_value ) {
0096 Bimpact = b_value;
0097 }
0098
0099 inline G4double G4FTFParticipants::GetImpactParameter() const {
0100 return Bimpact;
0101 }
0102
0103 inline void G4FTFParticipants::SetBminBmax( const G4double bmin_value, const G4double bmax_value ) {
0104 BinInterval = false;
0105 if ( bmin_value < 0.0 || bmax_value < 0.0 || bmax_value < bmin_value ) return;
0106 BinInterval = true;
0107 Bmin2 = bmin_value * bmin_value;
0108 Bmax2 = bmax_value * bmax_value;
0109 }
0110
0111 inline G4bool G4FTFParticipants::SampleBinInterval() const {
0112 return BinInterval;
0113 }
0114
0115 inline G4double G4FTFParticipants::GetBmin2() const {
0116 return Bmin2;
0117 }
0118
0119 inline G4double G4FTFParticipants::GetBmax2() const {
0120 return Bmax2;
0121 }
0122
0123 inline void G4FTFParticipants::StartLoop() {
0124 currentInteraction = -1;
0125 }
0126
0127 inline G4bool G4FTFParticipants::Next() {
0128 return ++currentInteraction < static_cast< G4int >( theInteractions.size() );
0129 }
0130
0131 inline G4InteractionContent& G4FTFParticipants::GetInteraction() {
0132 return *theInteractions[ currentInteraction ];
0133 }
0134
0135 #endif
0136