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 #include "G4ElectroNuclearBuilder.hh"
00041
00042 #include "globals.hh"
00043 #include "G4ios.hh"
00044 #include "G4SystemOfUnits.hh"
00045
00046 #include "G4ParticleDefinition.hh"
00047 #include "G4ParticleTable.hh"
00048 #include "G4Gamma.hh"
00049 #include "G4Electron.hh"
00050 #include "G4Positron.hh"
00051 #include "G4ProcessManager.hh"
00052
00053 G4ElectroNuclearBuilder::G4ElectroNuclearBuilder() :
00054 thePhotoNuclearProcess(0), theElectronNuclearProcess(0),
00055 thePositronNuclearProcess(0), theElectroReaction(0),
00056 theGammaReaction(0), theModel(0), theCascade(0),
00057 theStringModel(0), theFragmentation(0), theStringDecay(0),
00058 wasActivated(false)
00059 {
00060 }
00061
00062 G4ElectroNuclearBuilder::~G4ElectroNuclearBuilder()
00063 {
00064 if(wasActivated) {
00065 delete theFragmentation;
00066 delete theStringDecay;
00067 delete theStringModel;
00068 delete thePhotoNuclearProcess;
00069 delete theElectronNuclearProcess;
00070 delete thePositronNuclearProcess;
00071 delete theElectroReaction;
00072 delete theGammaReaction;
00073 delete theModel;
00074 delete theCascade;
00075 }
00076 }
00077
00078 void G4ElectroNuclearBuilder::Build()
00079 {
00080 if(wasActivated) return;
00081 wasActivated=true;
00082
00083 thePhotoNuclearProcess = new G4PhotoNuclearProcess;
00084 theElectronNuclearProcess = new G4ElectronNuclearProcess;
00085 thePositronNuclearProcess = new G4PositronNuclearProcess;
00086 theElectroReaction = new G4ElectroNuclearReaction;
00087 theGammaReaction = new G4GammaNuclearReaction;
00088
00089 theModel = new G4TheoFSGenerator;
00090
00091 theStringModel = new G4QGSModel< G4GammaParticipants >;
00092 theStringDecay = new G4ExcitedStringDecay(theFragmentation=new G4QGSMFragmentation);
00093 theStringModel->SetFragmentationModel(theStringDecay);
00094
00095 theCascade = new G4GeneratorPrecompoundInterface;
00096
00097 theModel->SetTransport(theCascade);
00098 theModel->SetHighEnergyGenerator(theStringModel);
00099
00100 G4ProcessManager * aProcMan = 0;
00101
00102 aProcMan = G4Gamma::Gamma()->GetProcessManager();
00103 theGammaReaction->SetMaxEnergy(3.5*GeV);
00104 thePhotoNuclearProcess->RegisterMe(theGammaReaction);
00105 theModel->SetMinEnergy(3.*GeV);
00106 theModel->SetMaxEnergy(100*TeV);
00107 thePhotoNuclearProcess->RegisterMe(theModel);
00108 aProcMan->AddDiscreteProcess(thePhotoNuclearProcess);
00109
00110 aProcMan = G4Electron::Electron()->GetProcessManager();
00111 theElectronNuclearProcess->RegisterMe(theElectroReaction);
00112 aProcMan->AddDiscreteProcess(theElectronNuclearProcess);
00113
00114 aProcMan = G4Positron::Positron()->GetProcessManager();
00115 thePositronNuclearProcess->RegisterMe(theElectroReaction);
00116 aProcMan->AddDiscreteProcess(thePositronNuclearProcess);
00117 }
00118