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

#include <G4HyperonCHIPSBuilder.hh>

Public Member Functions

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

Protected Attributes

G4ParticleTabletheParticleTable
 
G4ParticleTable::G4PTblDicIteratortheParticleIterator
 

Detailed Description

Definition at line 48 of file G4HyperonCHIPSBuilder.hh.

Constructor & Destructor Documentation

◆ G4HyperonCHIPSBuilder()

G4HyperonCHIPSBuilder::G4HyperonCHIPSBuilder ( G4int  verbose = 0)

Definition at line 38 of file G4HyperonCHIPSBuilder.cc.

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

◆ ~G4HyperonCHIPSBuilder()

G4HyperonCHIPSBuilder::~G4HyperonCHIPSBuilder ( )
virtual

Definition at line 46 of file G4HyperonCHIPSBuilder.cc.

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

Member Function Documentation

◆ Build()

void G4HyperonCHIPSBuilder::Build ( )

Definition at line 51 of file G4HyperonCHIPSBuilder.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 pname == "anti_proton" || pname == "anti_neutron" )
66 {
67 if(verbose>1)G4cout<<"** G4HyperonCHIPSBuilder: "<<pname<<" already defined"<<G4endl;
68 }
69 else if( pname == "lambda" || pname == "sigma+" || pname == "sigma0" ||
70 pname == "sigma-" || pname == "xi0" || pname == "xi-" ||
71 pname == "omega-" ||
72 pname == "anti_lambda" || pname == "anti_sigma+" || pname == "anti_sigma0" ||
73 pname == "anti_sigma-" || pname == "anti_xi0" || pname == "anti_xi-" ||
74 pname == "anti_omega-" )
75 {
76 if(verbose>1)G4cout<< "__G4HyperonCHIPSBuilder: "<< pname <<" is defined here"<<G4endl;
77 G4ProcessManager* pmanager = particle->GetProcessManager();
78 pmanager->AddDiscreteProcess(inelastic);
79 if(verbose>1) G4cout<<"###> G4HyperonCHIPSBuilder: "<<inelastic->GetProcessName()
80 <<" is added for "<<pname<<G4endl;
81 }
82 }
83}
#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

Member Data Documentation

◆ theParticleIterator

G4ParticleTable::G4PTblDicIterator* G4HyperonCHIPSBuilder::theParticleIterator
protected

Definition at line 60 of file G4HyperonCHIPSBuilder.hh.

Referenced by Build(), and G4HyperonCHIPSBuilder().

◆ theParticleTable

G4ParticleTable* G4HyperonCHIPSBuilder::theParticleTable
protected

Definition at line 59 of file G4HyperonCHIPSBuilder.hh.

Referenced by G4HyperonCHIPSBuilder().


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