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
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053 #ifndef G4HadronicInteraction_h
00054 #define G4HadronicInteraction_h 1
00055
00056 #include "G4HadFinalState.hh"
00057 #include "G4Material.hh"
00058 #include "G4Nucleus.hh"
00059 #include "G4Track.hh"
00060 #include "G4HadProjectile.hh"
00061 #include "G4ReactionDynamics.hh"
00062
00063 class G4HadronicInteraction
00064 {
00065 public:
00066
00067 G4HadronicInteraction(const G4String& modelName = "HadronicModel");
00068
00069 virtual ~G4HadronicInteraction();
00070
00071 virtual G4HadFinalState *ApplyYourself(const G4HadProjectile &aTrack,
00072 G4Nucleus & targetNucleus ) = 0;
00073
00074
00075 virtual G4double SampleInvariantT(const G4ParticleDefinition* p,
00076 G4double plab,
00077 G4int Z, G4int A);
00078
00079
00080 virtual G4bool IsApplicable(const G4HadProjectile &,
00081 G4Nucleus & )
00082 { return true;}
00083
00084 inline G4double GetMinEnergy() const
00085 { return theMinEnergy; }
00086
00087 G4double GetMinEnergy( const G4Material *aMaterial,
00088 const G4Element *anElement ) const;
00089
00090 inline void SetMinEnergy( G4double anEnergy )
00091 { theMinEnergy = anEnergy; }
00092
00093 void SetMinEnergy( G4double anEnergy, const G4Element *anElement );
00094
00095 void SetMinEnergy( G4double anEnergy, const G4Material *aMaterial );
00096
00097 inline G4double GetMaxEnergy() const
00098 { return theMaxEnergy; }
00099
00100 G4double GetMaxEnergy( const G4Material *aMaterial,
00101 const G4Element *anElement ) const;
00102
00103 inline void SetMaxEnergy( const G4double anEnergy )
00104 { theMaxEnergy = anEnergy; }
00105
00106 void SetMaxEnergy( G4double anEnergy, const G4Element *anElement );
00107
00108 void SetMaxEnergy( G4double anEnergy, const G4Material *aMaterial );
00109
00110 inline const G4HadronicInteraction* GetMyPointer() const
00111 { return this; }
00112
00113 inline G4int GetVerboseLevel() const
00114 { return verboseLevel; }
00115
00116 inline void SetVerboseLevel( G4int value )
00117 { verboseLevel = value; }
00118
00119 inline const G4String& GetModelName() const
00120 { return theModelName; }
00121
00122 void DeActivateFor(const G4Material* aMaterial);
00123
00124 inline void ActivateFor( const G4Material *aMaterial )
00125 {
00126 Block();
00127 SetMaxEnergy(GetMaxEnergy(), aMaterial);
00128 SetMinEnergy(GetMinEnergy(), aMaterial);
00129 }
00130
00131 void DeActivateFor( const G4Element *anElement );
00132 inline void ActivateFor( const G4Element *anElement )
00133 {
00134 Block();
00135 SetMaxEnergy(GetMaxEnergy(), anElement);
00136 SetMinEnergy(GetMinEnergy(), anElement);
00137 }
00138
00139 G4bool IsBlocked( const G4Material *aMaterial ) const;
00140 G4bool IsBlocked( const G4Element *anElement) const;
00141
00142 inline void SetRecoilEnergyThreshold(G4double val)
00143 { recoilEnergyThreshold = val; }
00144
00145 G4double GetRecoilEnergyThreshold() const
00146 { return recoilEnergyThreshold;}
00147
00148 inline G4bool operator==(const G4HadronicInteraction &right ) const
00149 { return ( this == (G4HadronicInteraction *) &right ); }
00150
00151 inline G4bool operator!=(const G4HadronicInteraction &right ) const
00152 { return ( this != (G4HadronicInteraction *) &right ); }
00153
00154 virtual const std::pair<G4double, G4double> GetFatalEnergyCheckLevels() const;
00155
00156 virtual std::pair<G4double, G4double> GetEnergyMomentumCheckLevels() const;
00157
00158 inline void SetEnergyMomentumCheckLevels(G4double relativeLevel, G4double absoluteLevel)
00159 { epCheckLevels.first = relativeLevel;
00160 epCheckLevels.second = absoluteLevel; }
00161
00162 virtual void ModelDescription(std::ostream& outFile) const ;
00163
00164 private:
00165
00166 G4HadronicInteraction(const G4HadronicInteraction &right );
00167 const G4HadronicInteraction& operator=(const G4HadronicInteraction &right);
00168
00169 protected:
00170
00171 inline void SetModelName(const G4String& nam)
00172 { theModelName = nam; }
00173
00174 inline G4bool IsBlocked() const { return isBlocked;}
00175 inline void Block() { isBlocked = true; }
00176
00177 G4HadFinalState theParticleChange;
00178
00179
00180
00181
00182 G4int verboseLevel;
00183
00184
00185
00186
00187
00188
00189
00190 G4double theMinEnergy;
00191 G4double theMaxEnergy;
00192
00193 G4bool isBlocked;
00194
00195 private:
00196
00197 G4double recoilEnergyThreshold;
00198
00199 G4String theModelName;
00200
00201 std::pair<G4double, G4double> epCheckLevels;
00202
00203 std::vector<std::pair<G4double, const G4Material *> > theMinEnergyList;
00204 std::vector<std::pair<G4double, const G4Material *> > theMaxEnergyList;
00205 std::vector<std::pair<G4double, const G4Element *> > theMinEnergyListElements;
00206 std::vector<std::pair<G4double, const G4Element *> > theMaxEnergyListElements;
00207 std::vector<const G4Material *> theBlockedList;
00208 std::vector<const G4Element *> theBlockedListElements;
00209 };
00210
00211 #endif