Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4MiscCHIPSBuilder Class Reference

#include <G4MiscCHIPSBuilder.hh>

Public Member Functions

 G4MiscCHIPSBuilder (G4int verbose=0)
 
virtual ~G4MiscCHIPSBuilder ()
 
void Build ()
 

Protected Attributes

G4ParticleTabletheParticleTable
 
G4ParticleTable::G4PTblDicIteratortheParticleIterator
 

Detailed Description

Definition at line 48 of file G4MiscCHIPSBuilder.hh.

Constructor & Destructor Documentation

◆ G4MiscCHIPSBuilder()

G4MiscCHIPSBuilder::G4MiscCHIPSBuilder ( G4int  verbose = 0)

Definition at line 38 of file G4MiscCHIPSBuilder.cc.

38 :
39 verbose(ver), wasActivated(false), inelastic(0)
40{
41 // pointer to the particle table
44}
G4ParticleTable * theParticleTable
G4ParticleTable::G4PTblDicIterator * theParticleIterator
G4PTblDicIterator * GetIterator()
static G4ParticleTable * GetParticleTable()

◆ ~G4MiscCHIPSBuilder()

G4MiscCHIPSBuilder::~G4MiscCHIPSBuilder ( )
virtual

Definition at line 46 of file G4MiscCHIPSBuilder.cc.

47{
48 if(wasActivated) delete inelastic;
49}

Member Function Documentation

◆ Build()

void G4MiscCHIPSBuilder::Build ( )

Definition at line 51 of file G4MiscCHIPSBuilder.cc.

52{
53 if(wasActivated) return;
54
55 wasActivated = true;
57 inelastic = new G4QInelastic();
58
59 while( (*theParticleIterator)() )
60 {
62 G4String pname = particle->GetParticleName();
63 if(pname == "kaon-" || pname == "kaon+" || pname == "kaon0S" || pname == "kaon0L" ||
64 pname == "pi-" || pname == "pi+" || pname == "neutron" || pname == "proton" )
65 {
66 if(verbose>1)G4cout<<"** G4MiscCHIPSBuilder: "<<pname<<" already defined"<<G4endl;
67 }
68 else if( pname == "lambda" || pname == "sigma+" || pname == "sigma0" ||
69 pname == "sigma-" || pname == "xi0" || pname == "xi-" || pname == "omega-" ||
70 pname == "anti_proton" || pname == "anti_neutron" || pname == "anti_lambda" ||
71 pname == "anti_sigma+" || pname == "anti_sigma0" || pname == "anti_sigma-" ||
72 pname == "anti_xi0" || pname == "anti_xi-" || pname == "anti_omega-" )
73 {
74 if(verbose>1)G4cout<< "__G4QInelCHIPSBuilder: "<< pname <<" is defined here"<<G4endl;
75 G4ProcessManager* pmanager = particle->GetProcessManager();
76 pmanager->AddDiscreteProcess(inelastic);
77 if(verbose>1) G4cout<<"###> G4MiscCHIPSBuilder: "<<inelastic->GetProcessName()
78 <<" is added for "<<pname<<G4endl;
79 }
80 }
81}
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
G4ProcessManager * GetProcessManager() const
const G4String & GetParticleName() const
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
const G4String & GetProcessName() const
Definition: G4VProcess.hh:379

Referenced by HadronPhysicsQGSP_BERT_CHIPS::ConstructProcess(), and HadronPhysicsShielding::ConstructProcess().

Member Data Documentation

◆ theParticleIterator

G4ParticleTable::G4PTblDicIterator* G4MiscCHIPSBuilder::theParticleIterator
protected

Definition at line 60 of file G4MiscCHIPSBuilder.hh.

Referenced by Build(), and G4MiscCHIPSBuilder().

◆ theParticleTable

G4ParticleTable* G4MiscCHIPSBuilder::theParticleTable
protected

Definition at line 59 of file G4MiscCHIPSBuilder.hh.

Referenced by G4MiscCHIPSBuilder().


The documentation for this class was generated from the following files: