Import Geant4 3.2.0 source tree
This commit is contained in:
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: Em3PrimaryGeneratorMessenger.cc,v 1.2 1999/12/15 14:49:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: Em3PrimaryGeneratorMessenger.cc,v 1.3.2.1 2001/06/28 19:06:59 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -17,6 +33,7 @@
|
||||
|
||||
#include "Em3PrimaryGeneratorAction.hh"
|
||||
#include "G4UIcmdWithoutParameter.hh"
|
||||
#include "G4UIcmdWithADouble.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -26,6 +43,13 @@ Em3PrimaryGeneratorMessenger::Em3PrimaryGeneratorMessenger(Em3PrimaryGeneratorAc
|
||||
DefaultCmd = new G4UIcmdWithoutParameter("/gun/setDefault",this);
|
||||
DefaultCmd->SetGuidance("set/reset the kinematic defined in PrimaryGenerator");
|
||||
DefaultCmd->AvailableForStates(PreInit,Idle);
|
||||
|
||||
RndmCmd = new G4UIcmdWithADouble("/gun/rndm",this);
|
||||
RndmCmd->SetGuidance("random lateral extension on the beam");
|
||||
RndmCmd->SetGuidance("in fraction of 0.5*sizeYZ");
|
||||
RndmCmd->SetParameterName("rBeam",false);
|
||||
RndmCmd->SetRange("rBeam>=0.&&rBeam<=1.");
|
||||
RndmCmd->AvailableForStates(Idle);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
@@ -33,14 +57,18 @@ Em3PrimaryGeneratorMessenger::Em3PrimaryGeneratorMessenger(Em3PrimaryGeneratorAc
|
||||
Em3PrimaryGeneratorMessenger::~Em3PrimaryGeneratorMessenger()
|
||||
{
|
||||
delete DefaultCmd;
|
||||
delete RndmCmd;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void Em3PrimaryGeneratorMessenger::SetNewValue(G4UIcommand * command,G4String newValue)
|
||||
void Em3PrimaryGeneratorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
|
||||
{
|
||||
if( command == DefaultCmd )
|
||||
{ Em3Action->SetDefaultKinematic();}
|
||||
|
||||
if( command == RndmCmd )
|
||||
{ Em3Action->SetRndmBeam(RndmCmd->GetNewDoubleValue(newValue));}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
Reference in New Issue
Block a user