Import Geant4 9.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 16:15:05 +02:00
parent b79225fb37
commit 74cad5e589
3877 changed files with 234205 additions and 167127 deletions
@@ -1,4 +1,4 @@
$Id: History,v 1.3 2008/06/11 14:34:19 vnivanch Exp $
$Id: History,v 1.4 2009/07/15 10:19:47 vnivanch Exp $
-------------------------------------------------------------------
=========================================================
@@ -15,6 +15,9 @@ track of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
14 July 09: V.Ivant (monopole-V09-02-00)
- Added messenger to define mass and change of the monopole
11 June 08: V.Ivant (monopole-V09-01-00)
- Remove AIDA from GNUmakefile
- Fixed compillation warnings
@@ -1,4 +1,4 @@
$Id: README,v 1.1 2007/08/16 10:32:04 vnivanch Exp $
$Id: README,v 1.2 2009/07/15 10:19:47 vnivanch Exp $
-------------------------------------------------------------------
=========================================================
@@ -45,6 +45,11 @@ monopole.
Physics Lists include standard QGSP physics and additional builder
for monopole physics.
To define monopole parameters an extra string should be provided
a) interactive mode by UI command:
/monopole/setup 2 0 200 GeV (magnetic number, electric number, mass)
b) batch mode:
$G4BIN/$G4SYSTEM/monopole file.mac '2 0 200 GeV'
3- AN EVENT : THE PRIMARY GENERATOR
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: DetectorConstruction.hh,v 1.1 2007/08/16 10:32:04 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: DetectorConstruction.hh,v 1.2 2009/07/15 10:19:47 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -45,53 +45,48 @@ class DetectorMessenger;
class DetectorConstruction : public G4VUserDetectorConstruction
{
public:
public:
DetectorConstruction();
~DetectorConstruction();
DetectorConstruction();
~DetectorConstruction();
public:
void SetSizeX (G4double);
void SetSizeYZ (G4double);
void SetMaterial (G4String);
void SetMagField (G4double);
void SetSizeX (G4double);
void SetSizeYZ (G4double);
void SetMaterial (G4String);
void SetMagField (G4double);
void SetMaxStepSize (G4double);
void SetMaxStepSize (G4double);
G4VPhysicalVolume* Construct();
void UpdateGeometry();
G4VPhysicalVolume* Construct();
void UpdateGeometry();
public:
G4double GetWorldSizeX() {return worldSizeX;};
G4double GetWorldSizeYZ() {return worldSizeYZ;};
G4Material* GetWorldMaterial() {return worldMaterial;};
G4double GetAbsorSizeX() {return absorSizeX;};
G4double GetAbsorSizeYZ() {return absorSizeYZ;};
G4double GetMaxStepSize() {return maxStepSize;};
G4Material* GetAbsorMaterial() {return absorMaterial;};
void PrintParameters();
G4double GetWorldSizeX() {return worldSizeX;};
G4double GetWorldSizeYZ() {return worldSizeYZ;};
G4Material* GetWorldMaterial() {return worldMaterial;};
G4double GetAbsorSizeX() {return absorSizeX;};
G4double GetAbsorSizeYZ() {return absorSizeYZ;};
G4double GetMaxStepSize() {return maxStepSize;};
G4Material* GetAbsorMaterial() {return absorMaterial;};
void PrintParameters();
private:
G4double worldSizeX;
G4double worldSizeYZ;
G4Material* worldMaterial;
G4double absorSizeX;
G4double absorSizeYZ;
G4double maxStepSize;
G4Material* absorMaterial;
G4UniformMagField* magField;
G4LogicalVolume* lAbsor;
DetectorMessenger* detectorMessenger;
private:
void DefineMaterials();
G4VPhysicalVolume* ConstructVolumes();
G4double worldSizeX;
G4double worldSizeYZ;
G4Material* worldMaterial;
G4double absorSizeX;
G4double absorSizeYZ;
G4double maxStepSize;
G4Material* absorMaterial;
G4UniformMagField* magField;
G4LogicalVolume* lAbsor;
DetectorMessenger* detectorMessenger;
private:
void DefineMaterials();
G4VPhysicalVolume* ConstructVolumes();
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -52,6 +52,7 @@
class G4Monopole : public G4ParticleDefinition
{
private:
static G4Monopole* theMonopole;
G4Monopole(
@@ -65,9 +66,9 @@ private:
G4bool stable, G4double lifetime,
G4DecayTable *decaytable );
public:
virtual ~G4Monopole();
public:
static G4Monopole* MonopoleDefinition(G4double mass_ = 100.*GeV,
G4int magCharge_ = 1,
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4MonopolePhysics.hh,v 1.1 2007/08/16 10:32:04 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4MonopolePhysics.hh,v 1.2 2009/07/15 10:19:47 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -38,11 +38,14 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4MonopolePhysicsMessenger;
class G4MonopolePhysics : public G4VPhysicsConstructor
{
public:
G4MonopolePhysics(const G4String& name = "EM_monopole");
virtual ~G4MonopolePhysics();
G4MonopolePhysics(const G4String& nam = "Monopole Physics");
~G4MonopolePhysics();
// This method is dummy for physics
virtual void ConstructParticle();
@@ -52,11 +55,21 @@ public:
// registered to the process manager of each particle type
virtual void ConstructProcess();
void SetMagneticCharge(G4int);
void SetElectricCharge(G4int);
void SetMonopoleMass(G4double);
private:
// hide assignment operator
G4MonopolePhysics & operator=(const G4MonopolePhysics &right);
G4MonopolePhysics(const G4MonopolePhysics&);
// G4MonopolePhysics & operator=(const G4MonopolePhysics &right);
// G4MonopolePhysics(const G4MonopolePhysics&);
G4int magCharge;
G4int elCharge;
G4double monopoleMass;
G4MonopolePhysicsMessenger* theMessenger;
};
@@ -0,0 +1,69 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4MonopolePhysicsMessenger.hh,v 1.1 2009/07/15 10:20:07 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef G4MonopolePhysicsMessenger_h
#define G4MonopolePhysicsMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class G4MonopolePhysics;
class G4UIdirectory;
class G4UIcommand;
class G4UIcmdWithAnInteger;
class G4UIcmdWithADoubleAndUnit;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4MonopolePhysicsMessenger: public G4UImessenger
{
public:
G4MonopolePhysicsMessenger(G4MonopolePhysics*);
~G4MonopolePhysicsMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
G4MonopolePhysics* phys;
G4UIdirectory* mPhysicsDir;
G4UIcommand* mPhysicsCmd;
G4UIcmdWithAnInteger* mCmd;
G4UIcmdWithAnInteger* zCmd;
G4UIcmdWithADoubleAndUnit* massCmd;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: PrimaryGeneratorAction.hh,v 1.1 2007/08/16 10:32:04 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: PrimaryGeneratorAction.hh,v 1.2 2009/07/15 10:19:47 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -44,25 +44,26 @@ class PrimaryGeneratorMessenger;
class PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
PrimaryGeneratorAction(DetectorConstruction*);
~PrimaryGeneratorAction();
public:
public:
void SetRndmBeam(G4double val) {rndmBeam = val;}
void GeneratePrimaries(G4Event*);
PrimaryGeneratorAction(DetectorConstruction*);
~PrimaryGeneratorAction();
void SetRndmBeam(G4double val) {rndmBeam = val;}
void GeneratePrimaries(G4Event*);
void ResetEbeamCumul() {EbeamCumul = 0.;}
G4double GetEbeamCumul() {return EbeamCumul;}
void ResetEbeamCumul() {EbeamCumul = 0.;}
G4double GetEbeamCumul() {return EbeamCumul;}
G4ParticleGun* GetParticleGun() {return particleGun;}
G4ParticleGun* GetParticleGun() {return particleGun;}
private:
G4ParticleGun* particleGun;
DetectorConstruction* detector;
G4double rndmBeam;
G4double EbeamCumul;
PrimaryGeneratorMessenger* gunMessenger;
private:
G4ParticleGun* particleGun;
DetectorConstruction* detector;
G4double rndmBeam;
G4double EbeamCumul;
PrimaryGeneratorMessenger* gunMessenger;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: monopole.cc,v 1.1 2007/08/16 10:32:04 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: monopole.cc,v 1.2 2009/07/15 10:19:47 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -34,6 +34,7 @@
#include "G4UIterminal.hh"
#include "G4UItcsh.hh"
#include "Randomize.hh"
#include "globals.hh"
#include "DetectorConstruction.hh"
#include "G4MonopolePhysics.hh"
@@ -59,25 +60,35 @@ int main(int argc,char** argv) {
//Construct the default run manager
G4RunManager * runManager = new G4RunManager;
//set mandatory initialization classes
DetectorConstruction* det;
//ceate physicsList
//create physicsList
QGSP* phys = new QGSP();
G4MonopolePhysics * theMonopole = new G4MonopolePhysics;
G4MonopolePhysics * theMonopole = new G4MonopolePhysics();
phys->RegisterPhysics(theMonopole);
PrimaryGeneratorAction* kin;
runManager->SetUserInitialization(det = new DetectorConstruction);
runManager->SetUserInitialization(phys);
runManager->SetUserAction(kin = new PrimaryGeneratorAction(det));
//get the pointer to the User Interface manager
G4UImanager* UI = G4UImanager::GetUIpointer();
// Setup monopole
G4String s = "";
if(argc > 2) s = argv[2];
UI->ApplyCommand("/control/verbose 1");
UI->ApplyCommand("/monopole/setup "+s);
// mandator user classes
DetectorConstruction* det = new DetectorConstruction();
runManager->SetUserInitialization(det);
runManager->SetUserInitialization(phys);
PrimaryGeneratorAction* kin = new PrimaryGeneratorAction(det);
runManager->SetUserAction(kin);
#ifdef G4VIS_USE
//visualization manager
G4VisManager* visManager = 0;
#endif
//set user action classes
//user action classes
RunAction* run;
runManager->SetUserAction(run = new RunAction(det, kin));
@@ -85,10 +96,6 @@ int main(int argc,char** argv) {
runManager->SetUserAction(new TrackingAction(run));
runManager->SetUserAction(new SteppingAction(det, run));
//get the pointer to the User Interface manager
G4UImanager* UI = G4UImanager::GetUIpointer();
G4cout << "User actions are instantiated" << G4endl;
if (argc == 1) // Define UI terminal for interactive mode
{
visManager = new G4VisExecutive();
@@ -99,14 +106,14 @@ int main(int argc,char** argv) {
#else
session = new G4UIterminal();
#endif
session->SessionStart();
delete session;
session->SessionStart();
delete session;
}
else // Batch mode
{
G4String command = "/control/execute ";
G4String fileName = argv[1];
UI->ApplyCommand(command+fileName);
G4String command = "/control/execute ";
G4String fileName = argv[1];
UI->ApplyCommand(command+fileName);
}
//job termination
@@ -17,7 +17,7 @@
#
/run/initialize
#
/process/eLoss/verbose 0
/process/eLoss/verbose 1
/testex/event/printModulo 10
#
/gun/particle monopole
@@ -102,6 +102,7 @@ G4Monopole* G4Monopole::MonopoleDefinition(G4double mass, G4int mCharge, G4int e
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4Monopole* G4Monopole::Monopole()
{
if(!theMonopole) theMonopole = MonopoleDefinition();
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4MonopolePhysics.cc,v 1.1 2007/08/16 10:32:04 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4MonopolePhysics.cc,v 1.2 2009/07/15 10:19:47 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
//---------------------------------------------------------------------------
//
@@ -41,8 +41,10 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4Monopole.hh"
#include "G4MonopolePhysics.hh"
#include "G4MonopolePhysicsMessenger.hh"
#include "G4Monopole.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
@@ -54,38 +56,84 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4MonopolePhysics::G4MonopolePhysics(const G4String& name): G4VPhysicsConstructor(name)
{}
G4MonopolePhysics::G4MonopolePhysics(const G4String& nam)
: G4VPhysicsConstructor(nam)
{
magCharge = 1;
elCharge = 0;
monopoleMass = 100.*GeV;
theMessenger = new G4MonopolePhysicsMessenger(this);
}
G4MonopolePhysics::~G4MonopolePhysics()
{}
{
delete theMessenger;
}
void G4MonopolePhysics::ConstructParticle()
{
G4Monopole::MonopoleDefinition();
G4Monopole::MonopoleDefinition(monopoleMass, magCharge, elCharge);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4MonopolePhysics::ConstructProcess()
{
// Add standard EM Processes for gamma
G4cout << "G4MonopolePhysics::ConstructProcess" << G4endl;
G4Monopole* mpl = G4Monopole::MonopoleDefinition();
if(verboseLevel > 0) {
G4cout << "G4MonopolePhysics::ConstructProcess" << G4endl;
}
G4Monopole* mpl = G4Monopole::Monopole();
G4ProcessManager* pmanager = new G4ProcessManager(mpl);
mpl->SetProcessManager(pmanager);
// defined monopole parameters and binning
G4double emax = 10.*TeV;
G4double magn = mpl->MagneticCharge();
G4double emin = mpl->GetPDGMass()/20000.;
if(emin < keV) emin = keV;
G4int nbin = G4int(std::log10(emin/eV));
emin = std::pow(10.,G4double(nbin))*eV;
nbin = G4int(std::log10(emax/emin));
if(nbin < 1) nbin = 1;
nbin *= 10;
pmanager->AddProcess( new G4Transportation(), -1, 0, 0);
pmanager->AddProcess( new G4mplIonisation(mpl->MagneticCharge()), -1, 1, 1);
pmanager->AddProcess( new G4StepLimiter(), -1, -1, 3);
if(mpl->GetPDGCharge() != 0.0) {
pmanager->AddProcess(new G4hhIonisation(), -1, 2, 2);
if(magn != 0.0) {
G4mplIonisation* mplioni = new G4mplIonisation(magn);
mplioni->SetDEDXBinning(nbin);
mplioni->SetMinKinEnergy(emin);
mplioni->SetMaxKinEnergy(emax);
pmanager->AddProcess(mplioni, -1, 1, 1);
}
if(mpl->GetPDGCharge() != 0.0) {
G4hhIonisation* hhioni = new G4hhIonisation();
hhioni->SetDEDXBinning(nbin);
hhioni->SetMinKinEnergy(emin);
hhioni->SetMaxKinEnergy(emax);
pmanager->AddProcess(hhioni, -1, 2, 2);
}
pmanager->AddProcess( new G4StepLimiter(), -1, -1, 3);
}
void G4MonopolePhysics::SetMagneticCharge(G4int val)
{
magCharge = val;
}
void G4MonopolePhysics::SetElectricCharge(G4int val)
{
elCharge = val;
}
void G4MonopolePhysics::SetMonopoleMass(G4double mass)
{
monopoleMass = mass;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -0,0 +1,125 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4MonopolePhysicsMessenger.cc,v 1.1 2009/07/15 10:20:07 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4MonopolePhysicsMessenger.hh"
#include "G4MonopolePhysics.hh"
#include "G4UIdirectory.hh"
#include "G4UIcommand.hh"
#include "G4UIcmdWithAnInteger.hh"
#include "G4UIcmdWithADoubleAndUnit.hh"
#include <sstream>
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4MonopolePhysicsMessenger::G4MonopolePhysicsMessenger(G4MonopolePhysics* p)
: phys(p)
{
mPhysicsDir = new G4UIdirectory("/monopole/");
mPhysicsDir->SetGuidance("histograms control");
mPhysicsCmd = new G4UIcommand("/monopole/setup",this);
mPhysicsCmd->SetGuidance("Setup monopole");
//
G4UIparameter* qmag = new G4UIparameter("qmag",'i',false);
qmag->SetGuidance("Magnetic charge");
qmag->SetDefaultValue("1");
mPhysicsCmd->SetParameter(qmag);
G4UIparameter* q = new G4UIparameter("qelec",'i',false);
q->SetGuidance("Electric charge charge");
q->SetDefaultValue("0");
mPhysicsCmd->SetParameter(q);
//
G4UIparameter* mass = new G4UIparameter("mass",'d',false);
mass->SetGuidance("mass");
mass->SetParameterRange("mass>0.");
qmag->SetDefaultValue("100");
mPhysicsCmd->SetParameter(mass);
//
G4UIparameter* unit = new G4UIparameter("unit",'s',false);
mPhysicsCmd->SetParameter(unit);
qmag->SetDefaultValue("GeV");
mPhysicsCmd->AvailableForStates(G4State_PreInit);
mCmd = new G4UIcmdWithAnInteger("/monopole/magCharge",this);
mCmd->SetGuidance("Set monopole magnetic charge number");
mCmd->SetParameterName("Qmag",false);
mCmd->AvailableForStates(G4State_PreInit);
zCmd = new G4UIcmdWithAnInteger("/monopole/elCharge",this);
zCmd->SetGuidance("Set monopole electric charge number");
zCmd->SetParameterName("Qel",false);
zCmd->AvailableForStates(G4State_PreInit);
massCmd = new G4UIcmdWithADoubleAndUnit("/monopole/mass",this);
massCmd->SetGuidance("Set monopole mass");
massCmd->SetParameterName("Mass",false);
massCmd->SetRange("Mass>0.");
massCmd->SetUnitCategory("Energy");
massCmd->AvailableForStates(G4State_PreInit);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4MonopolePhysicsMessenger::~G4MonopolePhysicsMessenger()
{
delete mPhysicsCmd;
delete mCmd;
delete zCmd;
delete massCmd;
delete mPhysicsDir;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4MonopolePhysicsMessenger::SetNewValue(G4UIcommand* command,
G4String newValue)
{
if (command == mPhysicsCmd)
{ G4int q, m; G4double mass;
G4String unts;
std::istringstream is(newValue);
is >> m >> q >> mass >> unts;
G4String unit = unts;
G4double vUnit = G4UIcommand::ValueOf(unit);
phys->SetMagneticCharge(m);
phys->SetElectricCharge(q);
phys->SetMonopoleMass(mass*vUnit);
}
if (command == mCmd) {phys->SetMagneticCharge(mCmd->GetNewIntValue(newValue));}
if (command == zCmd) {phys->SetElectricCharge(zCmd->GetNewIntValue(newValue));}
if (command == massCmd) {phys->SetMonopoleMass(massCmd->GetNewDoubleValue(newValue));}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: PrimaryGeneratorAction.cc,v 1.1 2007/08/16 10:32:04 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: PrimaryGeneratorAction.cc,v 1.2 2009/07/15 10:19:47 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -43,10 +43,11 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PrimaryGeneratorAction::PrimaryGeneratorAction(DetectorConstruction* det)
:detector(det)
:detector(det)
{
particleGun = new G4ParticleGun(1);
G4ParticleDefinition* particle = G4ParticleTable::GetParticleTable()->FindParticle("monopole");
G4ParticleDefinition* particle =
G4ParticleTable::GetParticleTable()->FindParticle("monopole");
particleGun->SetParticleDefinition(particle);
particleGun->SetParticleEnergy(100 * GeV);
particleGun->SetParticleMomentumDirection(G4ThreeVector(1., 0., 0.));
@@ -58,7 +59,6 @@ PrimaryGeneratorAction::PrimaryGeneratorAction(DetectorConstruction* det)
gunMessenger = new PrimaryGeneratorMessenger(this);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PrimaryGeneratorAction::~PrimaryGeneratorAction()
{
@@ -66,8 +66,8 @@ PrimaryGeneratorAction::~PrimaryGeneratorAction()
delete gunMessenger;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
//this function is called at the begining of event