File indexing completed on 2025-02-23 09:21:11
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 "G4ChannelingPhysics.hh"
0031
0032 #include "G4BaryonConstructor.hh"
0033 #include "G4BosonConstructor.hh"
0034 #include "G4Channeling.hh"
0035 #include "G4IonConstructor.hh"
0036 #include "G4LeptonConstructor.hh"
0037 #include "G4LogicalCrystalVolume.hh"
0038 #include "G4MesonConstructor.hh"
0039 #include "G4ProcessManager.hh"
0040 #include "G4ProcessTable.hh"
0041
0042
0043
0044 G4ChannelingPhysics::G4ChannelingPhysics(const G4String& name) : G4VPhysicsConstructor(name)
0045 {
0046 ;
0047 }
0048
0049
0050
0051 G4ChannelingPhysics::~G4ChannelingPhysics()
0052 {
0053 ;
0054 }
0055
0056
0057
0058 void G4ChannelingPhysics::ConstructParticle()
0059 {
0060 G4BosonConstructor pBosonConstructor;
0061 pBosonConstructor.ConstructParticle();
0062
0063 G4LeptonConstructor pLeptonConstructor;
0064 pLeptonConstructor.ConstructParticle();
0065
0066 G4MesonConstructor pMesonConstructor;
0067 pMesonConstructor.ConstructParticle();
0068
0069 G4BaryonConstructor pBaryonConstructor;
0070 pBaryonConstructor.ConstructParticle();
0071
0072 G4IonConstructor pIonConstructor;
0073 pIonConstructor.ConstructParticle();
0074 }
0075
0076
0077
0078 void G4ChannelingPhysics::ConstructProcess()
0079 {
0080 auto ptable = G4ProcessTable::GetProcessTable();
0081 G4int verb = ptable->GetVerboseLevel();
0082 ptable->SetVerboseLevel(2);
0083 ptable->SetProcessActivation("CoulombScat", false);
0084 ptable->SetVerboseLevel(verb);
0085
0086 G4Channeling* channeling = new G4Channeling();
0087
0088 G4ParticleTable::G4PTblDicIterator* aParticleIterator =
0089 G4ParticleTable::GetParticleTable()->GetIterator();
0090 aParticleIterator->reset();
0091
0092 while ((*aParticleIterator)()) {
0093 G4ParticleDefinition* particle = aParticleIterator->value();
0094 G4double particleCharge = particle->GetPDGCharge();
0095 G4ProcessManager* pManager = particle->GetProcessManager();
0096
0097 if (particleCharge != 0) {
0098 pManager->AddDiscreteProcess(channeling);
0099 }
0100 }
0101 }
0102
0103