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 #include "G4QGSBuilder.hh"
00040 #include "G4ExcitedStringDecay.hh"
00041 #include "G4QuasiElasticChannel.hh"
00042 #include "G4ProjectileDiffractiveChannel.hh"
00043 #include "G4TheoFSGenerator.hh"
00044 #include "G4QStringChipsParticleLevelInterface.hh"
00045 #include "G4GeneratorPrecompoundInterface.hh"
00046 #include "G4QGSMFragmentation.hh"
00047 #include "G4ExcitedStringDecay.hh"
00048 #include "G4BinaryCascade.hh"
00049 #include "G4PreCompoundModel.hh"
00050 #include "G4ExcitationHandler.hh"
00051
00052
00053 G4QGSBuilder::G4QGSBuilder(const G4String& aName, G4PreCompoundModel* p,
00054 G4bool quasiel, G4bool diff)
00055 : G4VHadronModelBuilder(aName),
00056 theQGStringModel(0), theQGStringDecay(0), theQuasiElastic(0),
00057 theProjectileDiffraction(0),thePreCompound(p),theQGSM(0),
00058 quasielFlag(quasiel), diffFlag(diff)
00059 {}
00060
00061 G4QGSBuilder::~G4QGSBuilder()
00062 {
00063 delete theProjectileDiffraction;
00064 delete theQuasiElastic;
00065 delete theQGStringDecay;
00066 delete theQGStringModel;
00067 delete theQGSM;
00068 }
00069
00070 G4HadronicInteraction* G4QGSBuilder::BuildModel()
00071 {
00072 G4TheoFSGenerator* theQGSModel = new G4TheoFSGenerator(GetName());
00073 theQGStringModel = new G4QGSModel< G4QGSParticipants >;
00074 theQGSM = new G4QGSMFragmentation();
00075 theQGStringDecay = new G4ExcitedStringDecay(theQGSM);
00076 theQGStringModel->SetFragmentationModel(theQGStringDecay);
00077 theQGSModel->SetHighEnergyGenerator(theQGStringModel);
00078
00079 if(quasielFlag) {
00080 theQuasiElastic = new G4QuasiElasticChannel();
00081 theQGSModel->SetQuasiElasticChannel(theQuasiElastic);
00082 }
00083 if ( diffFlag ) {
00084 theProjectileDiffraction = new G4ProjectileDiffractiveChannel();
00085 theQGSModel->SetProjectileDiffraction(theProjectileDiffraction);
00086 }
00087
00088 if(!thePreCompound) {
00089 thePreCompound = new G4PreCompoundModel(new G4ExcitationHandler());
00090 }
00091
00092 if(GetName() == "QGSC") {
00093 theQGSModel->SetTransport(new G4QStringChipsParticleLevelInterface());
00094
00095 } else if(GetName() == "QGSB") {
00096 G4BinaryCascade* bic = new G4BinaryCascade();
00097 bic->SetDeExcitation(thePreCompound);
00098 theQGSModel->SetTransport(bic);
00099
00100 } else {
00101 G4GeneratorPrecompoundInterface* pint = new G4GeneratorPrecompoundInterface();
00102 pint->SetDeExcitation(thePreCompound);
00103 theQGSModel->SetTransport(pint);
00104 }
00105
00106 return theQGSModel;
00107 }