| Message: Re: Forced Compton interaction with Penelope model | Not Logged In (login) |
|
User Luciano wrote: >> Right. The G4PenelopeCompton() has not the same interface as >> G4ComptonScattering().
In your physicsList, replace G4PenelopeCompton by MyPenelopeCompton below.
Play with factor and myMaterial.
Michel
#ifndef MyPenelopeCompton_HH #define MyPenelopeCompton_HH 1
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "globals.hh" #include "G4PenelopeCompton.hh"
class G4Track;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class MyPenelopeCompton : public G4PenelopeCompton {
public:
MyPenelopeCompton(const G4String& processName ="PenCompton");
~MyPenelopeCompton();
G4double GetMeanFreePath(const G4Track&, G4double, G4ForceCondition*);
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "MyPenelopeCompton.hh" #include "G4Track.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
MyPenelopeCompton::MyPenelopeCompton(const G4String& processName)
: G4PenelopeCompton(processName)
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
MyPenelopeCompton::~MyPenelopeCompton()
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double MyPenelopeCompton::GetMeanFreePath(const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition)
{
const G4double factor = 10.;
G4Material* material = track.GetMaterial();
G4double meanFreePath = G4PenelopeCompton::GetMeanFreePath(track,
previousStepSize, condition);
if (material->GetName() == "myMaterial") meanFreePath /= factor;
return meanFreePath;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
| Inline Depth: | Outline Depth: | Add message: |
|
to: |