Import Geant4 0.1.0 source tree
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: ExN03CalorHit.cc,v 1.1 1998/10/09 14:55:09 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: ExN03CalorHit.cc,v 1.1 1999/01/07 16:05:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: ExN03CalorimeterSD.cc,v 1.1 1998/10/09 14:55:09 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: ExN03CalorimeterSD.cc,v 1.2 1999/01/28 17:11:24 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -69,7 +69,8 @@ G4bool ExN03CalorimeterSD::ProcessHits(G4Step* aStep,G4TouchableHistory* ROhist)
|
||||
|
||||
G4VPhysicalVolume* physVol = theTouchable->GetVolume();
|
||||
//theTouchable->MoveUpHistory();
|
||||
G4int LayerNumber = theTouchable->GetReplicaNumber(1);
|
||||
G4int LayerNumber = 0;
|
||||
if (Detector->GetNbOfLayers()>1) LayerNumber=theTouchable->GetReplicaNumber(1);
|
||||
|
||||
if (HitID[LayerNumber]==-1)
|
||||
{
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: ExN03DetectorConstruction.cc,v 2.5 1998/10/09 15:53:49 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: ExN03DetectorConstruction.cc,v 1.2 1999/02/03 16:07:23 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -50,6 +50,7 @@ ExN03DetectorConstruction::ExN03DetectorConstruction()
|
||||
GapThickness = 5.*mm;
|
||||
NbOfLayers = 10;
|
||||
CalorSizeYZ = 10.*cm;
|
||||
ComputeCalorParameters();
|
||||
|
||||
// create commands for interactive definition of the calorimeter
|
||||
detectorMessenger = new ExN03DetectorMessenger(this);
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: ExN03DetectorMessenger.cc,v 2.3 1998/10/09 15:53:49 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: ExN03DetectorMessenger.cc,v 1.1 1999/01/07 16:05:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: ExN03EventAction.cc,v 2.5 1998/10/30 14:41:00 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: ExN03EventAction.cc,v 1.3 1999/04/16 11:55:08 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -31,11 +31,13 @@
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "Randomize.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
ExN03EventAction::ExN03EventAction()
|
||||
:calorimeterCollID(-1),drawFlag("all"),eventMessenger(NULL)
|
||||
:calorimeterCollID(-1),drawFlag("all"),eventMessenger(NULL),
|
||||
printModulo(10000)
|
||||
{
|
||||
eventMessenger = new ExN03EventActionMessenger(this);
|
||||
}
|
||||
@@ -49,20 +51,27 @@ ExN03EventAction::~ExN03EventAction()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void ExN03EventAction::BeginOfEventAction()
|
||||
{ if(calorimeterCollID==-1)
|
||||
{
|
||||
void ExN03EventAction::BeginOfEventAction(const G4Event* evt)
|
||||
{
|
||||
|
||||
G4int evtNb = evt->GetEventID();
|
||||
if (evtNb%printModulo == 0)
|
||||
{
|
||||
G4cout << "\n---> Event: " << evtNb << endl;
|
||||
HepRandom::showEngineStatus();
|
||||
}
|
||||
|
||||
if (calorimeterCollID==-1)
|
||||
{
|
||||
G4SDManager * SDman = G4SDManager::GetSDMpointer();
|
||||
calorimeterCollID = SDman->GetCollectionID("CalCollection");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void ExN03EventAction::EndOfEventAction()
|
||||
void ExN03EventAction::EndOfEventAction(const G4Event* evt)
|
||||
{
|
||||
const G4Event* evt = fpEventManager->GetConstCurrentEvent();
|
||||
|
||||
G4cout << ">>> Event " << evt->GetEventID() << endl;
|
||||
|
||||
G4HCofThisEvent* HCE = evt->GetHCofThisEvent();
|
||||
@@ -102,7 +111,7 @@ void ExN03EventAction::EndOfEventAction()
|
||||
if(G4VVisManager::GetConcreteInstance())
|
||||
{
|
||||
for(G4int i=0; i<n_trajectories; i++)
|
||||
{ G4Trajectory* trj = (*(evt->GetTrajectoryContainer()))[i];
|
||||
{ G4Trajectory* trj = (G4Trajectory *)((*(evt->GetTrajectoryContainer()))[i]);
|
||||
if (drawFlag == "all") trj->DrawTrajectory(50);
|
||||
else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.))
|
||||
trj->DrawTrajectory(50);
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: ExN03EventActionMessenger.cc,v 1.1 1998/10/09 14:55:10 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: ExN03EventActionMessenger.cc,v 1.2 1999/03/10 16:15:38 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#include "ExN03EventAction.hh"
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
#include "G4UIcmdWithAnInteger.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
@@ -31,6 +32,12 @@ ExN03EventActionMessenger::ExN03EventActionMessenger(ExN03EventAction* EvAct)
|
||||
DrawCmd->SetDefaultValue("charged");
|
||||
DrawCmd->SetCandidates("none charged all");
|
||||
DrawCmd->AvailableForStates(Idle);
|
||||
|
||||
PrintCmd = new G4UIcmdWithAnInteger("/event/printModulo",this);
|
||||
PrintCmd->SetGuidance("Print events modulo n");
|
||||
PrintCmd->SetParameterName("EventNb",false);
|
||||
PrintCmd->SetRange("EventNb>0");
|
||||
PrintCmd->AvailableForStates(Idle);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
@@ -38,6 +45,7 @@ ExN03EventActionMessenger::ExN03EventActionMessenger(ExN03EventAction* EvAct)
|
||||
ExN03EventActionMessenger::~ExN03EventActionMessenger()
|
||||
{
|
||||
delete DrawCmd;
|
||||
delete PrintCmd;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
@@ -46,7 +54,9 @@ void ExN03EventActionMessenger::SetNewValue(G4UIcommand * command,G4String newVa
|
||||
{
|
||||
if(command == DrawCmd)
|
||||
{eventAction->SetDrawFlag(newValue);}
|
||||
|
||||
|
||||
if(command == PrintCmd)
|
||||
{eventAction->SetPrintModulo(PrintCmd->GetNewIntValue(newValue));}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: ExN03PhysicsList.cc,v 2.5 1998/10/09 15:53:49 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: ExN03PhysicsList.cc,v 1.2 1999/04/16 11:55:09 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -29,7 +29,11 @@
|
||||
ExN03PhysicsList::ExN03PhysicsList(): G4VUserPhysicsList()
|
||||
{
|
||||
defaultCutValue = 2.0*mm;
|
||||
SetVerboseLevel(1);
|
||||
cutForGamma = defaultCutValue;
|
||||
cutForElectron = defaultCutValue;
|
||||
cutForProton = defaultCutValue;
|
||||
|
||||
SetVerboseLevel(1);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
@@ -209,29 +213,74 @@ void ExN03PhysicsList::ConstructGeneral()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void ExN03PhysicsList::SetCuts(G4double cut)
|
||||
void ExN03PhysicsList::SetCuts()
|
||||
{
|
||||
if (verboseLevel >0){
|
||||
if (verboseLevel >1){
|
||||
G4cout << "ExN03PhysicsList::SetCuts:";
|
||||
G4cout << "CutLength : " << cut/mm << " (mm)" << endl;
|
||||
}
|
||||
|
||||
// set cut values for gamma at first and for e- second and next for e+,
|
||||
// because some processes for e+/e- need cut values for gamma
|
||||
SetCutValue(cut, "gamma");
|
||||
SetCutValue(cut, "e-");
|
||||
SetCutValue(cut, "e+");
|
||||
SetCutValue(cutForGamma, "gamma");
|
||||
SetCutValue(cutForElectron, "e-");
|
||||
SetCutValue(cutForElectron, "e+");
|
||||
|
||||
// set cut values for proton and anti_proton before all other hadrons
|
||||
// because some processes for hadrons need cut values for proton/anti_proton
|
||||
SetCutValue(cut, "proton");
|
||||
SetCutValue(cut, "anti_proton");
|
||||
|
||||
SetCutValueForOthers(cut);
|
||||
SetCutValue(cutForProton, "proton");
|
||||
SetCutValue(cutForProton, "anti_proton");
|
||||
|
||||
SetCutValueForOthers(defaultCutValue);
|
||||
|
||||
if (verboseLevel>1) DumpCutValuesTable();
|
||||
if (verboseLevel>1) {
|
||||
DumpCutValuesTable();
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
|
||||
void ExN03PhysicsList::SetCutForGamma(G4double cut)
|
||||
{
|
||||
ResetCuts();
|
||||
cutForGamma = cut;
|
||||
}
|
||||
|
||||
void ExN03PhysicsList::SetCutForElectron(G4double cut)
|
||||
{
|
||||
ResetCuts();
|
||||
cutForElectron = cut;
|
||||
}
|
||||
|
||||
void ExN03PhysicsList::SetCutForProton(G4double cut)
|
||||
{
|
||||
ResetCuts();
|
||||
cutForProton = cut;
|
||||
}
|
||||
|
||||
G4double ExN03PhysicsList::GetCutForGamma() const
|
||||
{
|
||||
return cutForGamma;
|
||||
}
|
||||
|
||||
G4double ExN03PhysicsList::GetCutForElectron() const
|
||||
{
|
||||
return cutForElectron;
|
||||
}
|
||||
|
||||
G4double ExN03PhysicsList::GetCutForProton() const
|
||||
{
|
||||
return cutForGamma;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: ExN03PrimaryGeneratorAction.cc,v 2.3 1998/10/09 15:53:49 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: ExN03PrimaryGeneratorAction.cc,v 1.1 1999/01/07 16:05:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: ExN03PrimaryGeneratorMessenger.cc,v 2.3 1998/10/09 15:53:49 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: ExN03PrimaryGeneratorMessenger.cc,v 1.1 1999/01/07 16:05:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: ExN03RunAction.cc,v 2.7 1998/10/30 14:41:01 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: ExN03RunAction.cc,v 1.5 1999/04/22 21:45:24 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
ExN03RunAction::ExN03RunAction()
|
||||
{
|
||||
runIDcounter = 0;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
@@ -34,26 +33,26 @@ ExN03RunAction::~ExN03RunAction()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void ExN03RunAction::BeginOfRunAction(G4Run* aRun)
|
||||
void ExN03RunAction::BeginOfRunAction(const G4Run* aRun)
|
||||
{
|
||||
aRun->SetRunID(runIDcounter++);
|
||||
|
||||
|
||||
G4cout << "### Run " << aRun->GetRunID() << " start." << endl;
|
||||
|
||||
if (G4VVisManager::GetConcreteInstance())
|
||||
{
|
||||
G4UImanager* UI = G4UImanager::GetUIpointer();
|
||||
UI->ApplyCommand("/vis~/clear/view");
|
||||
UI->ApplyCommand("/vis~/draw/current");
|
||||
UI->ApplyCommand("/vis/clear/view");
|
||||
UI->ApplyCommand("/vis/draw/current");
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void ExN03RunAction::EndOfRunAction(G4Run* aRun)
|
||||
void ExN03RunAction::EndOfRunAction(const G4Run* )
|
||||
{
|
||||
if (G4VVisManager::GetConcreteInstance())
|
||||
G4UImanager::GetUIpointer()->ApplyCommand("/vis~/show/view");
|
||||
G4UImanager::GetUIpointer()->ApplyCommand("/vis/show/view");
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: ExN03SteppingAction.cc,v 2.2 1998/10/09 15:53:49 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: ExN03SteppingAction.cc,v 1.2 1999/04/16 11:55:11 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -27,9 +27,10 @@ ExN03SteppingAction::~ExN03SteppingAction()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void ExN03SteppingAction::UserSteppingAction()
|
||||
void ExN03SteppingAction::UserSteppingAction(const G4Step*)
|
||||
{ }
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: ExN03VisManager.cc,v 2.9 1998/11/30 10:21:29 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: ExN03VisManager.cc,v 1.1 1999/01/07 16:05:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 24th January 1998.
|
||||
|
||||
Reference in New Issue
Block a user