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
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 #ifndef G4VXTRenergyLoss_h
00044 #define G4VXTRenergyLoss_h 1
00045
00046 #include <complex>
00047 #include "globals.hh"
00048 #include "Randomize.hh"
00049
00050 #include "G4LogicalVolume.hh"
00051
00052 #include "G4PhysicsTable.hh"
00053 #include "G4PhysicsLogVector.hh"
00054 #include "G4Gamma.hh"
00055 #include "G4ThreeVector.hh"
00056 #include "G4ParticleMomentum.hh"
00057 #include "G4Step.hh"
00058 #include "G4Track.hh"
00059 #include "G4VContinuousProcess.hh"
00060 #include "G4VDiscreteProcess.hh"
00061 #include "G4DynamicParticle.hh"
00062 #include "G4Material.hh"
00063 #include "G4PhysicsTable.hh"
00064 #include "G4MaterialPropertiesTable.hh"
00065 #include "G4PhysicsOrderedFreeVector.hh"
00066 #include "G4Integrator.hh"
00067 #include "G4ParticleChange.hh"
00068
00069 class G4SandiaTable;
00070 class G4VParticleChange;
00071 class G4PhysicsFreeVector;
00072 class G4PhysicsLinearVector;
00073
00074 class G4VXTRenergyLoss : public G4VDiscreteProcess
00075 {
00076 public:
00077
00078 G4VXTRenergyLoss (G4LogicalVolume *anEnvelope,G4Material*,G4Material*,
00079 G4double,G4double,G4int,
00080 const G4String & processName = "XTRenergyLoss",
00081 G4ProcessType type = fElectromagnetic);
00082 virtual ~G4VXTRenergyLoss ();
00083
00084
00085
00086 virtual G4double GetStackFactor( G4double energy, G4double gamma,
00087 G4double varAngle );
00088
00089 G4bool IsApplicable(const G4ParticleDefinition&);
00090
00091 G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
00092 const G4Step& aStep);
00093
00094 G4double GetMeanFreePath(const G4Track& aTrack,
00095 G4double previousStepSize,
00096 G4ForceCondition* condition);
00097
00098 void BuildPhysicsTable(const G4ParticleDefinition&);
00099 void BuildEnergyTable() ;
00100 void BuildAngleForEnergyBank() ;
00101
00102 void BuildTable(){} ;
00103 void BuildAngleTable() ;
00104 void BuildGlobalAngleTable() ;
00105
00106 G4complex OneInterfaceXTRdEdx( G4double energy,
00107 G4double gamma,
00108 G4double varAngle ) ;
00109
00110 G4double SpectralAngleXTRdEdx(G4double varAngle) ;
00111
00112 virtual G4double SpectralXTRdEdx(G4double energy) ;
00113
00114 G4double AngleSpectralXTRdEdx(G4double energy) ;
00115
00116 G4double AngleXTRdEdx(G4double varAngle) ;
00117
00118
00120
00121 G4double OneBoundaryXTRNdensity( G4double energy,
00122 G4double gamma,
00123 G4double varAngle ) const ;
00124
00125
00126
00127
00128 G4double XTRNSpectralAngleDensity(G4double varAngle) ;
00129 G4double XTRNSpectralDensity(G4double energy) ;
00130
00131
00132
00133 G4double XTRNAngleSpectralDensity(G4double energy) ;
00134 G4double XTRNAngleDensity(G4double varAngle) ;
00135
00136 void GetNumberOfPhotons() ;
00137
00138
00139
00140 G4double GetPlateFormationZone(G4double,G4double,G4double);
00141 G4complex GetPlateComplexFZ(G4double,G4double,G4double);
00142 void ComputePlatePhotoAbsCof();
00143 G4double GetPlateLinearPhotoAbs(G4double);
00144 void GetPlateZmuProduct() ;
00145 G4double GetPlateZmuProduct(G4double,G4double,G4double);
00146
00147 G4double GetGasFormationZone(G4double,G4double,G4double);
00148 G4complex GetGasComplexFZ(G4double,G4double,G4double);
00149 void ComputeGasPhotoAbsCof();
00150 G4double GetGasLinearPhotoAbs(G4double);
00151 void GetGasZmuProduct();
00152 G4double GetGasZmuProduct(G4double,G4double,G4double);
00153
00154 G4double GetPlateCompton(G4double);
00155 G4double GetGasCompton(G4double);
00156 G4double GetComptonPerAtom(G4double,G4double);
00157
00158 G4double GetXTRrandomEnergy( G4double scaledTkin, G4int iTkin );
00159 G4double GetXTRenergy( G4int iPlace, G4double position, G4int iTransfer );
00160
00161 G4double GetRandomAngle( G4double energyXTR, G4int iTkin );
00162 G4double GetAngleXTR(G4int iTR,G4double position,G4int iAngle);
00163
00164 G4double GetGamma() {return fGamma;};
00165 G4double GetEnergy() {return fEnergy;};
00166 G4double GetVarAngle(){return fVarAngle;};
00167
00168 void SetGamma(G4double gamma) {fGamma = gamma;};
00169 void SetEnergy(G4double energy) {fEnergy = energy;};
00170 void SetVarAngle(G4double varAngle){fVarAngle = varAngle;};
00171 void SetAngleRadDistr(G4bool pAngleRadDistr){fAngleRadDistr=pAngleRadDistr;};
00172 void SetCompton(G4bool pC){fCompton=pC;};
00173
00174 G4PhysicsLogVector* GetProtonVector(){ return fProtonEnergyVector;};
00175 G4int GetTotBin(){return fTotBin;};
00176 G4PhysicsFreeVector* GetAngleVector(G4double energy, G4int n);
00177
00178 protected:
00179
00180 G4ParticleDefinition* fPtrGamma ;
00181
00182 G4double* fGammaCutInKineticEnergy ;
00183
00184 G4double fGammaTkinCut ;
00185 G4LogicalVolume* fEnvelope ;
00186 G4PhysicsTable* fAngleDistrTable ;
00187 G4PhysicsTable* fEnergyDistrTable ;
00188
00189 G4PhysicsLogVector* fProtonEnergyVector ;
00190 G4PhysicsLogVector* fXTREnergyVector ;
00191
00192 G4double fTheMinEnergyTR;
00193 G4double fTheMaxEnergyTR;
00194 G4double fMinEnergyTR;
00195 G4double fMaxEnergyTR;
00196 G4double fTheMaxAngle;
00197 G4double fTheMinAngle;
00198 G4double fMaxThetaTR;
00199 G4int fBinTR;
00200
00201 G4double fMinProtonTkin;
00202 G4double fMaxProtonTkin;
00203 G4int fTotBin;
00204 G4double fGamma;
00205 G4double fEnergy;
00206 G4double fVarAngle;
00207 G4double fLambda;
00208
00209 G4double fPlasmaCof ;
00210 G4double fCofTR ;
00211
00212 G4bool fExitFlux;
00213 G4bool fAngleRadDistr;
00214 G4bool fCompton;
00215 G4double fSigma1;
00216 G4double fSigma2;
00217
00218 G4int fMatIndex1;
00219 G4int fMatIndex2;
00220 G4int fPlateNumber;
00221
00222 G4double fTotalDist;
00223 G4double fPlateThick;
00224 G4double fGasThick;
00225 G4double fAlphaPlate;
00226 G4double fAlphaGas ;
00227
00228 G4SandiaTable* fPlatePhotoAbsCof;
00229
00230 G4SandiaTable* fGasPhotoAbsCof;
00231
00232 G4ParticleChange fParticleChange;
00233
00234
00235
00236 G4PhysicsTable* fAngleForEnergyTable;
00237 std::vector<G4PhysicsTable*> fAngleBank;
00238
00239 };
00240
00241 #endif