File indexing completed on 2025-02-23 09:20:36
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 #include "G4VUserPhysicsList.hh"
0037 #include "XrayTESdetPhysicsList.hh"
0038 #include "XrayTESdetPhysicsListMessenger.hh"
0039
0040 #include "G4RadioactiveDecayPhysics.hh"
0041 #include "G4DecayPhysics.hh"
0042 #include "G4EmStandardPhysics.hh"
0043 #include "G4EmStandardPhysics_option1.hh"
0044 #include "G4EmStandardPhysics_option2.hh"
0045 #include "G4EmStandardPhysics_option3.hh"
0046 #include "G4EmStandardPhysics_option4.hh"
0047 #include "G4EmStandardPhysicsSS.hh"
0048
0049 #include "G4EmStandardPhysics_SpacePhysics.hh"
0050 #include "G4EmLivermorePhysics.hh"
0051 #include "G4EmPenelopePhysics.hh"
0052 #include "G4HadronElasticPhysics.hh"
0053 #include "G4HadronElasticPhysicsXS.hh"
0054 #include "G4HadronElasticPhysicsHP.hh"
0055 #include "G4ChargeExchangePhysics.hh"
0056 #include "G4NeutronTrackingCut.hh"
0057 #include "G4NeutronCrossSectionXS.hh"
0058 #include "G4StoppingPhysics.hh"
0059 #include "G4IonBinaryCascadePhysics.hh"
0060 #include "G4IonPhysics.hh"
0061 #include "G4EmExtraPhysics.hh"
0062
0063 #include "G4HadronPhysicsFTFP_BERT.hh"
0064 #include "G4HadronPhysicsFTFP_BERT_HP.hh"
0065 #include "G4HadronPhysicsFTF_BIC.hh"
0066 #include "G4HadronInelasticQBBC.hh"
0067 #include "G4HadronPhysicsQGSP_BERT.hh"
0068 #include "G4HadronPhysicsQGSP_BERT_HP.hh"
0069 #include "G4HadronPhysicsQGSP_BIC.hh"
0070 #include "G4HadronPhysicsQGSP_BIC_HP.hh"
0071 #include "G4HadronPhysicsQGSP_FTFP_BERT.hh"
0072 #include "G4HadronPhysicsQGS_BIC.hh"
0073
0074 #include "G4LossTableManager.hh"
0075 #include "G4ProcessManager.hh"
0076 #include "G4ParticleTypes.hh"
0077 #include "G4ParticleTable.hh"
0078 #include "G4Gamma.hh"
0079 #include "G4Electron.hh"
0080 #include "G4Positron.hh"
0081 #include "G4Proton.hh"
0082
0083 #include "G4Region.hh"
0084 #include "G4RegionStore.hh"
0085 #include "G4SystemOfUnits.hh"
0086 #include "G4PhysicalConstants.hh"
0087
0088
0089
0090 XrayTESdetPhysicsList::XrayTESdetPhysicsList() : fMessenger(nullptr), fEmPhysicsList(nullptr), fParticleList(nullptr)
0091 {
0092 fMessenger = new XrayTESdetPhysicsListMessenger(this);
0093 G4LossTableManager::Instance();
0094 verboseLevel = 1;
0095
0096
0097 G4cout << "1 - Defining DecayPhysics" << G4endl;
0098 fParticleList = new G4DecayPhysics("decays");
0099
0100
0101 G4cout << "2 - Defining RadioactiveDecayPhysics" << G4endl;
0102 RegisterPhysics(new G4RadioactiveDecayPhysics());
0103
0104
0105 G4cout << "3 - Defining Standard em" << G4endl;
0106 fEmName = G4String("local");
0107
0108 fEmPhysicsList = new G4EmStandardPhysics();
0109 }
0110
0111
0112
0113 XrayTESdetPhysicsList::~XrayTESdetPhysicsList()
0114 {
0115 delete fParticleList;
0116 delete fEmPhysicsList;
0117 delete fMessenger;
0118 for(size_t i=0; i<fHadronPhys.size(); i++)
0119 {
0120 delete fHadronPhys[i];
0121 }
0122 }
0123
0124
0125
0126 void XrayTESdetPhysicsList::ConstructParticle()
0127 {
0128 fParticleList->ConstructParticle();
0129 }
0130
0131
0132
0133 void XrayTESdetPhysicsList::ConstructProcess()
0134 {
0135 AddTransportation();
0136 fEmPhysicsList->ConstructProcess();
0137 fParticleList->ConstructProcess();
0138 for(size_t i=0; i<fHadronPhys.size(); i++)
0139 {
0140 fHadronPhys[i]->ConstructProcess();
0141 }
0142
0143
0144 G4cout << "4 - Defining em options" << G4endl;
0145 G4EmParameters* param = G4EmParameters::Instance();
0146 param->SetDeexActiveRegion("InnerRegion", true, true, true);
0147
0148 param->SetAuger(true);
0149 param->SetAugerCascade(false);
0150 param->SetFluo(true);
0151 param->SetPixe(true);
0152 param->SetDeexcitationIgnoreCut(false);
0153
0154 param->SetMuHadLateralDisplacement(false);
0155 param->SetBremsstrahlungTh(10*TeV);
0156 param->Dump();
0157 }
0158
0159
0160
0161 void XrayTESdetPhysicsList::AddPhysicsList(const G4String& name)
0162 {
0163 if (verboseLevel>0)
0164 {
0165 G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
0166 }
0167
0168 if (name == fEmName)
0169 {
0170 return;
0171 }
0172
0173 if (name == "SpacePhysics")
0174 {
0175 delete fEmPhysicsList;
0176 G4cout << "X - Defining SpacePhysics, no hadronic part" << G4endl;
0177 fEmName = name;
0178 fEmPhysicsList = new G4EmStandardPhysics_SpacePhysics();
0179 }
0180 else if (name == "SpacePhysics_QBBC")
0181 {
0182 delete fEmPhysicsList;
0183 G4cout << "X - Defining SpacePhysics" << G4endl;
0184 fEmName = name;
0185 fEmPhysicsList = new G4EmStandardPhysics_SpacePhysics();
0186 fSetBuilderList1(false);
0187 fHadronPhys.push_back(new G4HadronInelasticQBBC(verboseLevel));
0188 }
0189 else if (name == "opt4_QGSP")
0190 {
0191 delete fEmPhysicsList;
0192 fEmName = name;
0193 G4cout << "X - Defining opt4+QGSP no HP physics" << G4endl;
0194 fEmPhysicsList = new G4EmStandardPhysics_option4();
0195 fSetBuilderList1(false);
0196 fHadronPhys.push_back( new G4HadronPhysicsQGSP_BERT_HP());
0197 }
0198 else if (name == "opt4_QBBC")
0199 {
0200 delete fEmPhysicsList;
0201 fEmName = name;
0202 G4cout << "X - Defining opt4+QBBC physics" << G4endl;
0203 fEmPhysicsList = new G4EmStandardPhysics_option4();
0204 fSetBuilderList1(false);
0205 fHadronPhys.push_back(new G4HadronInelasticQBBC(verboseLevel));
0206 }
0207 else if (name == "emstandard_opt4")
0208 {
0209 delete fEmPhysicsList;
0210 G4cout << "X - Defining opt4" << G4endl;
0211 fEmName = name;
0212 fEmPhysicsList = new G4EmStandardPhysics_option4();
0213 }
0214 else if (name == "emstandardSS")
0215 {
0216 delete fEmPhysicsList;
0217 G4cout << "X - Defining SS" << G4endl;
0218 fEmName = name;
0219 fEmPhysicsList = new G4EmStandardPhysicsSS();
0220 }
0221 else
0222 {
0223 G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
0224 << " is not defined"
0225 << G4endl;
0226 }
0227 }
0228
0229
0230
0231 void XrayTESdetPhysicsList::fSetBuilderList1(G4bool flagHP)
0232 {
0233 fHadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
0234 if(flagHP)
0235 {
0236 fHadronPhys.push_back( new G4HadronElasticPhysicsHP(verboseLevel));
0237 }
0238 else
0239 {
0240 fHadronPhys.push_back( new G4HadronElasticPhysics(verboseLevel));
0241 }
0242 fHadronPhys.push_back(new G4StoppingPhysics(verboseLevel));
0243 fHadronPhys.push_back(new G4IonPhysics(verboseLevel));
0244 fHadronPhys.push_back(new G4NeutronTrackingCut(verboseLevel));
0245 }
0246
0247