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