19#include "G4Version.hh"
20#if G4VERSION_NUMBER > 1039
21#include "BDSGlobalConstants.hh"
22#include "BDSPhysicsChannelling.hh"
24#include "G4AutoDelete.hh"
25#include "G4BaryonConstructor.hh"
26#include "G4BosonConstructor.hh"
27#include "G4Channeling.hh"
29#include "G4GenericIon.hh"
30#include "G4IonConstructor.hh"
31#include "G4LeptonConstructor.hh"
32#include "G4MesonConstructor.hh"
33#include "G4ParticleDefinition.hh"
34#include "G4ProcessManager.hh"
36BDSPhysicsChannelling::BDSPhysicsChannelling():
37 G4VPhysicsConstructor(
"BDSPhysicsChannelling")
40void BDSPhysicsChannelling::ConstructParticle()
42 G4BosonConstructor pBosonConstructor;
43 pBosonConstructor.ConstructParticle();
45 G4LeptonConstructor pLeptonConstructor;
46 pLeptonConstructor.ConstructParticle();
48 G4MesonConstructor pMesonConstructor;
49 pMesonConstructor.ConstructParticle();
51 G4BaryonConstructor pBaryonConstructor;
52 pBaryonConstructor.ConstructParticle();
54 G4IonConstructor pIonConstructor;
55 pIonConstructor.ConstructParticle();
63 G4Channeling* channelling =
new G4Channeling();
64 G4AutoDelete::Register(channelling);
70#if G4VERSION_NUMBER > 1029
71 auto aParticleIterator = GetParticleIterator();
73 aParticleIterator->reset();
75 while((*aParticleIterator)())
77 G4ParticleDefinition* particle = aParticleIterator->value();
78 G4double particleCharge = particle->GetPDGCharge();
80 if (particleCharge !=0)
82 G4ProcessManager* pManager = particle->GetProcessManager();
83 pManager->AddDiscreteProcess(channelling);
static BDSGlobalConstants * Instance()
Access method.
virtual void ConstructProcess()
Construct and attach the processes to the relevant particles.
G4bool Activated() const
Get whether this instance has been activated.
void SetActivated()
Flag this instance as activated for later querying.