File indexing completed on 2025-01-18 09:58:22
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
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052 #ifndef G4HadronicInteraction_h
0053 #define G4HadronicInteraction_h 1
0054
0055 #include "G4HadFinalState.hh"
0056 #include "G4Material.hh"
0057 #include "G4Nucleus.hh"
0058 #include "G4Track.hh"
0059 #include "G4HadProjectile.hh"
0060
0061 class G4HadronicInteractionRegistry;
0062
0063 class G4HadronicInteraction
0064 {
0065 public:
0066
0067 explicit G4HadronicInteraction(const G4String& modelName = "HadronicModel");
0068
0069 virtual ~G4HadronicInteraction();
0070
0071 virtual G4HadFinalState *ApplyYourself(const G4HadProjectile &aTrack,
0072 G4Nucleus & targetNucleus );
0073
0074
0075 virtual G4double SampleInvariantT(const G4ParticleDefinition* p,
0076 G4double plab,
0077 G4int Z, G4int A);
0078
0079
0080 virtual G4bool IsApplicable(const G4HadProjectile & aTrack,
0081 G4Nucleus & targetNucleus);
0082
0083 inline G4double GetMinEnergy() const
0084 { return theMinEnergy; }
0085
0086 G4double GetMinEnergy( const G4Material *aMaterial,
0087 const G4Element *anElement ) const;
0088
0089 inline void SetMinEnergy( G4double anEnergy )
0090 { theMinEnergy = anEnergy; }
0091
0092 void SetMinEnergy( G4double anEnergy, const G4Element *anElement );
0093
0094 void SetMinEnergy( G4double anEnergy, const G4Material *aMaterial );
0095
0096 inline G4double GetMaxEnergy() const
0097 { return theMaxEnergy; }
0098
0099 G4double GetMaxEnergy( const G4Material *aMaterial,
0100 const G4Element *anElement ) const;
0101
0102 inline void SetMaxEnergy( const G4double anEnergy )
0103 { theMaxEnergy = anEnergy; }
0104
0105 void SetMaxEnergy( G4double anEnergy, const G4Element *anElement );
0106
0107 void SetMaxEnergy( G4double anEnergy, const G4Material *aMaterial );
0108
0109 inline G4int GetVerboseLevel() const
0110 { return verboseLevel; }
0111
0112 inline void SetVerboseLevel( G4int value )
0113 { verboseLevel = value; }
0114
0115 inline const G4String& GetModelName() const
0116 { return theModelName; }
0117
0118 void DeActivateFor(const G4Material* aMaterial);
0119
0120 inline void ActivateFor( const G4Material *aMaterial )
0121 {
0122 Block();
0123 SetMaxEnergy(GetMaxEnergy(), aMaterial);
0124 SetMinEnergy(GetMinEnergy(), aMaterial);
0125 }
0126
0127 void DeActivateFor( const G4Element *anElement );
0128 inline void ActivateFor( const G4Element *anElement )
0129 {
0130 Block();
0131 SetMaxEnergy(GetMaxEnergy(), anElement);
0132 SetMinEnergy(GetMinEnergy(), anElement);
0133 }
0134
0135 G4bool IsBlocked( const G4Material *aMaterial ) const;
0136 G4bool IsBlocked( const G4Element *anElement) const;
0137
0138 inline void SetRecoilEnergyThreshold(G4double val)
0139 { recoilEnergyThreshold = val; }
0140
0141 G4double GetRecoilEnergyThreshold() const
0142 { return recoilEnergyThreshold;}
0143
0144 virtual const std::pair<G4double, G4double> GetFatalEnergyCheckLevels() const;
0145
0146 virtual std::pair<G4double, G4double> GetEnergyMomentumCheckLevels() const;
0147
0148 inline void
0149 SetEnergyMomentumCheckLevels(G4double relativeLevel, G4double absoluteLevel)
0150 { epCheckLevels.first = relativeLevel;
0151 epCheckLevels.second = absoluteLevel; }
0152
0153 virtual void ModelDescription(std::ostream& outFile) const ;
0154
0155
0156 virtual void BuildPhysicsTable(const G4ParticleDefinition&);
0157 virtual void InitialiseModel();
0158
0159 G4HadronicInteraction(const G4HadronicInteraction &right ) = delete;
0160 const G4HadronicInteraction& operator=(const G4HadronicInteraction &right) = delete;
0161 G4bool operator==(const G4HadronicInteraction &right ) const = delete;
0162 G4bool operator!=(const G4HadronicInteraction &right ) const = delete;
0163
0164 protected:
0165
0166 inline void SetModelName(const G4String& nam)
0167 { theModelName = nam; }
0168
0169 inline G4bool IsBlocked() const { return isBlocked;}
0170 inline void Block() { isBlocked = true; }
0171
0172 G4HadFinalState theParticleChange;
0173
0174
0175
0176
0177 G4int verboseLevel;
0178
0179
0180
0181
0182
0183
0184
0185 G4double theMinEnergy;
0186 G4double theMaxEnergy;
0187
0188 G4bool isBlocked;
0189
0190 private:
0191
0192 G4HadronicInteractionRegistry* registry;
0193
0194 G4double recoilEnergyThreshold;
0195
0196 G4String theModelName;
0197
0198 std::pair<G4double, G4double> epCheckLevels;
0199
0200 std::vector<std::pair<G4double, const G4Material *> > theMinEnergyList;
0201 std::vector<std::pair<G4double, const G4Material *> > theMaxEnergyList;
0202 std::vector<std::pair<G4double, const G4Element *> > theMinEnergyListElements;
0203 std::vector<std::pair<G4double, const G4Element *> > theMaxEnergyListElements;
0204 std::vector<const G4Material *> theBlockedList;
0205 std::vector<const G4Element *> theBlockedListElements;
0206 };
0207
0208 #endif