Message: Re: Gamma particle. Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Gamma particle. 

Forum: Particles
Re: None Gamma particle. (Dat Vu)
Date: 13 Jun, 2012
From: Martin Thompson <Martin Thompson>

This should work:

// GEANT4 - geant4.9.3.p01
// Constructor/Class File for Physics Processes
//	Contains constructor and function definitions for objects in header file

#include "TNDDPhysicsList.hh" 		// Includes header file, which contains essential defintions and variables

#include "G4ParticleTypes.hh"			// These are the GEANT4 classes necessary to define the particles
#include "G4ParticleTable.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleWithCuts.hh"

#include "G4BaryonConstructor.hh"
#include "G4BosonConstructor.hh"
#include "G4IonConstructor.hh"
#include "G4LeptonConstructor.hh"
#include "G4MesonConstructor.hh"
#include "G4ShortLivedConstructor.hh"

#include "G4ProcessManager.hh"			// These are the GEANT4 classes necessary to define the processes
#include "G4ProcessVector.hh"
#include "G4RunManager.hh"

#include "TNDDNeutronPhysics.hh"		// Includes neutron physics process definition
#include "TNDDDecayPhysics.hh"
#include "TNDDEMPhysics.hh"
#include "G4VUserPhysicsList.hh"

#include "G4UnitsTable.hh"

#include "G4ios.hh"				// Allows reading/writing into the standard input/output
#include <iomanip>

#include "globals.hh"				// Includes defintion for global constants and variable types

TNDDPhysicsList::TNDDPhysicsList()		// Constructor - Instantiation of object, defined by corresponding header file
 :  G4VModularPhysicsList()
	// A warning message that indicates the neutron physics used is not correct - only display if switching back to LHEP models
//  G4cout << "This simulation is using the Neutron Physics Process listed in the examples." << G4endl;
//  G4cout << "Real calculations should be done using hadronic_lists rather than the defined physics." << G4endl;
//  G4cout << "" << G4endl;

  G4double newCutValue;
  SetDefaultCutValue(newCutValue = 1.0*m);	// Assumed that this is the standard cut value, subject to change
  SetVerboseLevel(1);				// Assumed that this Modular class does not have a default verbose level
  DisableCheckParticleList();			// Disable additional function which checks particle list (DO NOT REMOVE!! - causes segmentation fault otherwise)

  G4String name, title;
  TNDDNeutronPhysics* neutron_physics = new TNDDNeutronPhysics(name = "Neutron");
  TNDDDecayPhysics* decay_physics = new TNDDDecayPhysics(name = "Decay", title = "Radioactive Decay");
  TNDDEMPhysics* em_physics = new TNDDEMPhysics(name = "EM");
  RegisterPhysics(neutron_physics);	// Registers physics into the physics set

TNDDPhysicsList::~TNDDPhysicsList()		// Deconstructor - Removes any variables which may interfere with next instance of object 
{;} // <------------------------------------------- No parameters added to remove

void TNDDPhysicsList::ConstructParticle()	// Defines particels to be used int his simulation, constructs all particles just to be safe though most are unused
	// Barions
  G4BaryonConstructor* baryon_constructor = new G4BaryonConstructor();
  delete baryon_constructor;

	// Bosons
  G4BosonConstructor* boson_constructor = new G4BosonConstructor();
  delete boson_constructor;

	// Ions
  G4IonConstructor* ion_constructor = new G4IonConstructor();
  delete ion_constructor;

	// Leptons
  G4LeptonConstructor* lepton_constructor = new G4LeptonConstructor();
  delete lepton_constructor;

	// Mesons
  G4MesonConstructor* meson_constructor = new G4MesonConstructor();
  delete meson_constructor;

	// Short Lived
  G4ShortLivedConstructor* short_lived_constructor = new G4ShortLivedConstructor();
  delete short_lived_constructor;

void TNDDPhysicsList::SetCuts()		// Function defines the cut values for each particle, just chosen to be the default cut value for now
  if(verboseLevel > 0)
    G4cout << "Cuts have been set to: " << G4BestUnit(defaultCutValue,"Length") << G4endl;


  if(verboseLevel > 0)

// EOF

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Gamma particle.   (Dat Vu - 18 Jun, 2012)
 Add Message Add Message
to: "Re: Gamma particle."

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]