File indexing completed on 2025-01-31 09:22:03
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 #include "FlashPhysicsList.hh"
0031 #include "FlashPhysicsListMessenger.hh"
0032 #include "G4DecayPhysics.hh"
0033 #include "G4EmLivermorePhysics.hh"
0034 #include "G4EmPenelopePhysics.hh"
0035 #include "G4EmStandardPhysics.hh"
0036 #include "G4EmStandardPhysics_option4.hh"
0037 #include "G4EmStandardPhysics_option3.hh"
0038 #include "G4PhysListFactory.hh"
0039 #include "G4ProductionCuts.hh"
0040 #include "G4RadioactiveDecayPhysics.hh"
0041 #include "G4Region.hh"
0042 #include "G4RegionStore.hh"
0043 #include "G4SystemOfUnits.hh"
0044
0045 FlashPhysicsList::FlashPhysicsList() : G4VModularPhysicsList() {
0046
0047
0048
0049 pMessenger = new FlashPhysicsListMessenger(this);
0050 SetVerboseLevel(2);
0051
0052
0053 emPhysicsList = new G4EmStandardPhysics_option4(1);
0054 emName = G4String("emstandard_opt4");
0055
0056
0057 decPhysicsList = new G4DecayPhysics();
0058
0059
0060 radPhysicsList=new G4RadioactiveDecayPhysics();
0061
0062
0063 }
0064
0065 FlashPhysicsList::~FlashPhysicsList() {
0066
0067 delete pMessenger;
0068 delete emPhysicsList;
0069 delete decPhysicsList;
0070 delete radPhysicsList;
0071
0072 }
0073
0074
0075 void FlashPhysicsList::AddPackage(const G4String& name)
0076 {
0077 G4PhysListFactory factory;
0078 G4VModularPhysicsList* phys =factory.GetReferencePhysList(name);
0079 G4int i=0;
0080 const G4VPhysicsConstructor* elem= phys->GetPhysics(i);
0081 G4VPhysicsConstructor* tmp = const_cast<G4VPhysicsConstructor*> (elem);
0082 while (elem !=0)
0083 {
0084 RegisterPhysics(tmp);
0085 elem= phys->GetPhysics(++i) ;
0086 tmp = const_cast<G4VPhysicsConstructor*> (elem);
0087 }
0088 }
0089
0090
0091
0092
0093 void FlashPhysicsList::ConstructParticle()
0094 {
0095 decPhysicsList->ConstructParticle();
0096 }
0097
0098 void FlashPhysicsList::ConstructProcess()
0099 {
0100
0101
0102 AddTransportation();
0103
0104
0105
0106 emPhysicsList->ConstructProcess();
0107 em_config.AddModels();
0108
0109 decPhysicsList->ConstructProcess();
0110 radPhysicsList->ConstructProcess();
0111
0112 }
0113
0114 void FlashPhysicsList::AddPhysicsList(const G4String& name)
0115 {
0116
0117 if (verboseLevel>1) {
0118 G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
0119 }
0120 if (name == emName) return;
0121
0122
0123
0124
0125
0126 if (name == "standard_opt3") {
0127 emName = name;
0128 delete emPhysicsList;
0129 emPhysicsList = new G4EmStandardPhysics_option3();
0130 G4cout << "THE FOLLOWING ELECTROMAGNETIC PHYSICS LIST HAS BEEN ACTIVATED: G4EmStandardPhysics_option3" << G4endl;
0131 }
0132 else if (name == "standard_opt4") {
0133 emName = name;
0134 delete emPhysicsList;
0135 emPhysicsList = new G4EmStandardPhysics_option4();
0136 G4cout << "THE FOLLOWING ELECTROMAGNETIC PHYSICS LIST HAS BEEN ACTIVATED: G4EmStandardPhysics_option4" << G4endl;
0137
0138
0139 } else if (name == "Livermore") {
0140 emName = name;
0141 delete emPhysicsList;
0142 emPhysicsList = new G4EmLivermorePhysics();
0143 G4cout << "THE FOLLOWING ELECTROMAGNETIC PHYSICS LIST HAS BEEN ACTIVATED: G4EmLivermorePhysics" << G4endl;
0144
0145 } else if (name == "Penelope") {
0146 emName = name;
0147 delete emPhysicsList;
0148 emPhysicsList = new G4EmPenelopePhysics();
0149 G4cout << "THE FOLLOWING ELECTROMAGNETIC PHYSICS LIST HAS BEEN ACTIVATED: G4EmPenelopePhysics" << G4endl;
0150
0151 }
0152
0153 }
0154 void FlashPhysicsList::SetCuts() {
0155
0156 SetCutsWithDefault();
0157 G4Region *region;
0158 G4String regName;
0159 G4ProductionCuts *cuts;
0160
0161
0162
0163 regName = "Phantom_reg";
0164 region = G4RegionStore::GetInstance()->GetRegion(regName);
0165 cuts = new G4ProductionCuts;
0166 cuts->SetProductionCut(0.1 * mm, G4ProductionCuts::GetIndex("gamma"));
0167 cuts->SetProductionCut(0.1 * mm, G4ProductionCuts::GetIndex("e-"));
0168 cuts->SetProductionCut(0.1 * mm, G4ProductionCuts::GetIndex("e+"));
0169 region->SetProductionCuts(cuts);
0170
0171
0172 }
0173
0174
0175