File indexing completed on 2025-04-04 08:05:05
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045 #include "PhysicsList.hh"
0046
0047 #include "PhysicsListMessenger.hh"
0048
0049 #include "G4DecayPhysics.hh"
0050 #include "G4Electron.hh"
0051 #include "G4EmExtraPhysics.hh"
0052 #include "G4EmLivermorePhysics.hh"
0053 #include "G4EmParameters.hh"
0054 #include "G4EmPenelopePhysics.hh"
0055 #include "G4EmStandardPhysics.hh"
0056 #include "G4EmStandardPhysicsGS.hh"
0057 #include "G4EmStandardPhysics_option1.hh"
0058 #include "G4EmStandardPhysics_option2.hh"
0059 #include "G4EmStandardPhysics_option3.hh"
0060 #include "G4EmStandardPhysics_option4.hh"
0061 #include "G4Gamma.hh"
0062 #include "G4HadronElasticPhysics.hh"
0063 #include "G4HadronElasticPhysicsHP.hh"
0064 #include "G4HadronElasticPhysicsXS.hh"
0065 #include "G4HadronHElasticPhysics.hh"
0066 #include "G4HadronInelasticQBBC.hh"
0067 #include "G4HadronPhysicsFTFP_BERT.hh"
0068 #include "G4HadronPhysicsFTFP_BERT_HP.hh"
0069 #include "G4HadronPhysicsFTFP_BERT_TRV.hh"
0070 #include "G4HadronPhysicsFTF_BIC.hh"
0071 #include "G4HadronPhysicsQGSP_BERT.hh"
0072 #include "G4HadronPhysicsQGSP_BERT_HP.hh"
0073 #include "G4HadronPhysicsQGSP_BIC.hh"
0074 #include "G4HadronPhysicsQGSP_BIC_HP.hh"
0075 #include "G4HadronPhysicsQGSP_FTFP_BERT.hh"
0076 #include "G4HadronPhysicsQGS_BIC.hh"
0077 #include "G4IonBinaryCascadePhysics.hh"
0078 #include "G4IonElasticPhysics.hh"
0079 #include "G4IonPhysics.hh"
0080 #include "G4IonPhysicsXS.hh"
0081 #include "G4NeutronCrossSectionXS.hh"
0082 #include "G4NeutronTrackingCut.hh"
0083 #include "G4ParticleTable.hh"
0084 #include "G4ParticleTypes.hh"
0085 #include "G4PhysListFactoryMessenger.hh"
0086 #include "G4Positron.hh"
0087 #include "G4ProcessManager.hh"
0088 #include "G4Proton.hh"
0089 #include "G4RadioactiveDecayPhysics.hh"
0090 #include "G4StoppingPhysics.hh"
0091 #include "G4SystemOfUnits.hh"
0092
0093
0094
0095 PhysicsList::PhysicsList() : G4VModularPhysicsList()
0096 {
0097 SetDefaultCutValue(0.7 * CLHEP::mm);
0098 verboseLevel = 1;
0099
0100
0101 fMessenger = new PhysicsListMessenger(this);
0102 fFactMessenger = new G4PhysListFactoryMessenger(this);
0103
0104
0105 fParticleList = new G4DecayPhysics(verboseLevel);
0106
0107
0108 fEmPhysicsList = new G4EmStandardPhysics(verboseLevel);
0109 }
0110
0111
0112
0113 PhysicsList::~PhysicsList()
0114 {
0115 delete fMessenger;
0116 delete fParticleList;
0117 delete fEmPhysicsList;
0118 for (std::size_t i = 0; i < fHadronPhys.size(); ++i) {
0119 delete fHadronPhys[i];
0120 }
0121 }
0122
0123
0124
0125 void PhysicsList::ConstructParticle()
0126 {
0127 fParticleList->ConstructParticle();
0128 }
0129
0130
0131
0132 void PhysicsList::ConstructProcess()
0133 {
0134 AddTransportation();
0135 fEmPhysicsList->ConstructProcess();
0136 fParticleList->ConstructProcess();
0137 for (std::size_t i = 0; i < fHadronPhys.size(); ++i) {
0138 fHadronPhys[i]->ConstructProcess();
0139 }
0140 }
0141
0142
0143
0144 void PhysicsList::AddPhysicsList(const G4String& name)
0145 {
0146 if (verboseLevel > 0) {
0147 G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
0148 }
0149 if (name == "emstandard_opt0") {
0150 delete fEmPhysicsList;
0151 fEmPhysicsList = new G4EmStandardPhysics(verboseLevel);
0152 }
0153 else if (name == "emstandard_opt1") {
0154 delete fEmPhysicsList;
0155 fEmPhysicsList = new G4EmStandardPhysics_option1(verboseLevel);
0156 }
0157 else if (name == "emstandard_opt2") {
0158 delete fEmPhysicsList;
0159 fEmPhysicsList = new G4EmStandardPhysics_option2(verboseLevel);
0160 }
0161 else if (name == "emstandard_opt3") {
0162 delete fEmPhysicsList;
0163 fEmPhysicsList = new G4EmStandardPhysics_option3(verboseLevel);
0164 }
0165 else if (name == "emstandard_opt4") {
0166 delete fEmPhysicsList;
0167 fEmPhysicsList = new G4EmStandardPhysics_option4(verboseLevel);
0168 }
0169 else if (name == "emstandardGS") {
0170 delete fEmPhysicsList;
0171 fEmPhysicsList = new G4EmStandardPhysicsGS(verboseLevel);
0172 }
0173 else if (name == "FTFP_BERT_EMV") {
0174 AddPhysicsList("FTFP_BERT");
0175 AddPhysicsList("emstandard_opt1");
0176 }
0177 else if (name == "FTFP_BERT_EMX") {
0178 AddPhysicsList("FTFP_BERT");
0179 AddPhysicsList("emstandard_opt2");
0180 }
0181 else if (name == "FTFP_BERT_EMY") {
0182 AddPhysicsList("FTFP_BERT");
0183 AddPhysicsList("emstandard_opt3");
0184 }
0185 else if (name == "FTFP_BERT_EMZ") {
0186 AddPhysicsList("FTFP_BERT");
0187 AddPhysicsList("emstandard_opt4");
0188 }
0189 else if (name == "FTFP_BERT") {
0190 SetBuilderList0(false);
0191 fHadronPhys.push_back(new G4HadronPhysicsFTFP_BERT(verboseLevel));
0192 }
0193 else if (name == "FTFP_BERT_TRV") {
0194 AddPhysicsList("emstandardGS");
0195 SetBuilderList1(false);
0196 fHadronPhys.push_back(new G4HadronPhysicsFTFP_BERT_TRV(verboseLevel));
0197 }
0198 else if (name == "FTF_BIC") {
0199 SetBuilderList0(false);
0200 fHadronPhys.push_back(new G4HadronPhysicsFTF_BIC(verboseLevel));
0201 }
0202 else if (name == "QBBC") {
0203 AddPhysicsList("emstandard_opt0");
0204 SetBuilderList2();
0205 fHadronPhys.push_back(new G4HadronInelasticQBBC(verboseLevel));
0206 }
0207 else if (name == "QGSP_BERT") {
0208 SetBuilderList0(false);
0209 fHadronPhys.push_back(new G4HadronPhysicsQGSP_BERT(verboseLevel));
0210 }
0211 else if (name == "QGSP_FTFP_BERT") {
0212 SetBuilderList0(false);
0213 fHadronPhys.push_back(new G4HadronPhysicsQGSP_FTFP_BERT(verboseLevel));
0214 }
0215 else if (name == "QGSP_FTFP_BERT_EMV") {
0216 AddPhysicsList("QGSP_FTFP_BERT");
0217 AddPhysicsList("emstandard_opt1");
0218 }
0219 else if (name == "QGSP_BERT_EMV") {
0220 AddPhysicsList("QGSP_BERT");
0221 AddPhysicsList("emstandard_opt1");
0222 }
0223 else if (name == "QGSP_BERT_EMX") {
0224 AddPhysicsList("QGSP_BERT");
0225 AddPhysicsList("emstandard_opt2");
0226 }
0227 else if (name == "QGSP_BERT_HP") {
0228 SetBuilderList0(true);
0229 fHadronPhys.push_back(new G4HadronPhysicsQGSP_BERT_HP(verboseLevel));
0230 AddPhysicsList("RadioactiveDecay");
0231 }
0232 else if (name == "QGSP_BIC") {
0233 SetBuilderList0(false);
0234 fHadronPhys.push_back(new G4HadronPhysicsQGSP_BIC(verboseLevel));
0235 fHadronPhys.push_back(new G4IonElasticPhysics(verboseLevel));
0236 }
0237 else if (name == "QGSP_BIC_EMY") {
0238 AddPhysicsList("QGSP_BIC");
0239 AddPhysicsList("emstandard_opt3");
0240 }
0241 else if (name == "QGS_BIC") {
0242 SetBuilderList0(false);
0243 fHadronPhys.push_back(new G4HadronPhysicsQGS_BIC(verboseLevel));
0244 }
0245 else if (name == "QGSP_BIC_HP") {
0246 SetBuilderList0(true);
0247 fHadronPhys.push_back(new G4HadronPhysicsQGSP_BIC_HP(verboseLevel));
0248 AddPhysicsList("RadioactiveDecay");
0249 }
0250 else if (name == "RadioactiveDecay") {
0251 fHadronPhys.push_back(new G4RadioactiveDecayPhysics(verboseLevel));
0252 }
0253 else {
0254 G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
0255 << " is not defined" << G4endl;
0256 }
0257 }
0258
0259
0260
0261 void PhysicsList::SetBuilderList0(G4bool flagHP)
0262 {
0263 fHadronPhys.push_back(new G4EmExtraPhysics(verboseLevel));
0264 if (flagHP) {
0265 fHadronPhys.push_back(new G4HadronElasticPhysicsHP(verboseLevel));
0266 }
0267 else {
0268 fHadronPhys.push_back(new G4HadronElasticPhysics(verboseLevel));
0269 }
0270 fHadronPhys.push_back(new G4StoppingPhysics(verboseLevel));
0271 fHadronPhys.push_back(new G4IonPhysics(verboseLevel));
0272 if (!flagHP) {
0273 fHadronPhys.push_back(new G4NeutronTrackingCut(verboseLevel));
0274 }
0275 }
0276
0277
0278
0279 void PhysicsList::SetBuilderList1(G4bool flagHP)
0280 {
0281 fHadronPhys.push_back(new G4EmExtraPhysics(verboseLevel));
0282 if (flagHP) {
0283 fHadronPhys.push_back(new G4HadronElasticPhysicsHP(verboseLevel));
0284 }
0285 else {
0286 fHadronPhys.push_back(new G4HadronHElasticPhysics(verboseLevel));
0287 }
0288 fHadronPhys.push_back(new G4StoppingPhysics(verboseLevel));
0289 fHadronPhys.push_back(new G4IonPhysics(verboseLevel));
0290 if (!flagHP) {
0291 fHadronPhys.push_back(new G4NeutronTrackingCut(verboseLevel));
0292 }
0293 }
0294
0295
0296
0297 void PhysicsList::SetBuilderList2()
0298 {
0299 fHadronPhys.push_back(new G4EmExtraPhysics(verboseLevel));
0300 fHadronPhys.push_back(new G4HadronElasticPhysicsXS(verboseLevel));
0301 fHadronPhys.push_back(new G4StoppingPhysics(verboseLevel));
0302 fHadronPhys.push_back(new G4IonPhysicsXS(verboseLevel));
0303 fHadronPhys.push_back(new G4IonElasticPhysics(verboseLevel));
0304 fHadronPhys.push_back(new G4NeutronTrackingCut(verboseLevel));
0305 }
0306
0307
0308
0309 void PhysicsList::List()
0310 {
0311 G4cout << "### PhysicsLists available: FTFP_BERT FTFP_BERT_EMV "
0312 << "FTFP_BERT_EMX FTFP_BERT_EMZ FTFP_BERT_TRV" << G4endl;
0313 G4cout << " FTF_BIC QBBC QGSP_BERT "
0314 << "QGSP_BERT_EMV QGSP_BERT_EMX" << G4endl;
0315 G4cout << " QGSP_BERT_HP QGSP_FTFP_BERT "
0316 << "QGSP_FTFP_BERT_EMV" << G4endl;
0317 G4cout << " QGS_BIC QGSP_BIC QGSP_BIC_EMY "
0318 << "QGSP_BIC_HP" << G4endl;
0319 }
0320
0321