Import Geant4 9.6.0 source tree
This commit is contained in:
@@ -23,9 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file biasing/B01/src/B01DetectorConstruction.cc
|
||||
/// \brief Implementation of the B01DetectorConstruction class
|
||||
//
|
||||
// $Id: B01DetectorConstruction.cc,v 1.20 2007-06-22 13:15:29 ahoward Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
|
||||
#include "G4Types.hh"
|
||||
@@ -43,6 +45,8 @@
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4Colour.hh"
|
||||
#include "G4PhysicalConstants.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
// For Primitive Scorers
|
||||
#include "G4SDManager.hh"
|
||||
@@ -158,7 +162,7 @@ G4VPhysicalVolume* B01DetectorConstruction::Construct()
|
||||
name = "shieldWorld";
|
||||
pWorldVolume = new
|
||||
G4PVPlacement(0, G4ThreeVector(0,0,0), worldCylinder_log,
|
||||
name, 0, false, 0);
|
||||
name, 0, false, 0);
|
||||
|
||||
|
||||
fPhysicalVolumeVector.push_back(pWorldVolume);
|
||||
@@ -195,17 +199,17 @@ G4VPhysicalVolume* B01DetectorConstruction::Construct()
|
||||
for (i=1; i<=18; i++)
|
||||
{
|
||||
name = GetCellName(i);
|
||||
G4double pos_x = 0*cm;
|
||||
G4double pos_y = 0*cm;
|
||||
G4double pos_z = startz + (i-1) * (2*hightShield);
|
||||
pos_x = 0*cm;
|
||||
pos_y = 0*cm;
|
||||
pos_z = startz + (i-1) * (2*hightShield);
|
||||
G4VPhysicalVolume *pvol =
|
||||
new G4PVPlacement(0,
|
||||
G4ThreeVector(pos_x, pos_y, pos_z),
|
||||
aShield_log,
|
||||
name,
|
||||
worldCylinder_log,
|
||||
false,
|
||||
i);
|
||||
G4ThreeVector(pos_x, pos_y, pos_z),
|
||||
aShield_log,
|
||||
name,
|
||||
worldCylinder_log,
|
||||
false,
|
||||
i);
|
||||
fPhysicalVolumeVector.push_back(pvol);
|
||||
}
|
||||
|
||||
@@ -220,11 +224,11 @@ G4VPhysicalVolume* B01DetectorConstruction::Construct()
|
||||
spanningAngleShield = 360*deg;
|
||||
|
||||
G4Tubs *aRest = new G4Tubs("Rest",
|
||||
innerRadiusShield,
|
||||
outerRadiusShield,
|
||||
hightShield,
|
||||
startAngleShield,
|
||||
spanningAngleShield);
|
||||
innerRadiusShield,
|
||||
outerRadiusShield,
|
||||
hightShield,
|
||||
startAngleShield,
|
||||
spanningAngleShield);
|
||||
|
||||
G4LogicalVolume *aRest_log =
|
||||
new G4LogicalVolume(aRest, Galactic, "aRest_log");
|
||||
@@ -236,12 +240,12 @@ G4VPhysicalVolume* B01DetectorConstruction::Construct()
|
||||
pos_z = 95*cm;
|
||||
G4VPhysicalVolume *pvol_rest =
|
||||
new G4PVPlacement(0,
|
||||
G4ThreeVector(pos_x, pos_y, pos_z),
|
||||
aRest_log,
|
||||
name,
|
||||
worldCylinder_log,
|
||||
false,
|
||||
19); // i=19
|
||||
G4ThreeVector(pos_x, pos_y, pos_z),
|
||||
aRest_log,
|
||||
name,
|
||||
worldCylinder_log,
|
||||
false,
|
||||
19); // i=19
|
||||
|
||||
fPhysicalVolumeVector.push_back(pvol_rest);
|
||||
|
||||
@@ -274,7 +278,7 @@ G4VIStore *B01DetectorConstruction::CreateImportanceStore()
|
||||
{
|
||||
imp = std::pow(2., n++);
|
||||
G4cout << "Going to assign importance: " << imp << ", to volume: "
|
||||
<< (*it)->GetName() << G4endl;
|
||||
<< (*it)->GetName() << G4endl;
|
||||
istore->AddImportanceGeometryCell(imp, *(*it),n);
|
||||
}
|
||||
}
|
||||
@@ -283,7 +287,7 @@ G4VIStore *B01DetectorConstruction::CreateImportanceStore()
|
||||
// importance as the last conrete cell
|
||||
//
|
||||
istore->AddImportanceGeometryCell(imp,
|
||||
*(fPhysicalVolumeVector[fPhysicalVolumeVector.size()-1]),++n);
|
||||
*(fPhysicalVolumeVector[fPhysicalVolumeVector.size()-1]),++n);
|
||||
|
||||
return istore;
|
||||
}
|
||||
@@ -323,8 +327,8 @@ G4VWeightWindowStore *B01DetectorConstruction::CreateWeightWindowStore()
|
||||
{
|
||||
lowerWeight = 1./std::pow(2., n++);
|
||||
G4cout << "Going to assign lower weight: " << lowerWeight
|
||||
<< ", to volume: "
|
||||
<< (*it)->GetName() << G4endl;
|
||||
<< ", to volume: "
|
||||
<< (*it)->GetName() << G4endl;
|
||||
G4GeometryCell gCell(*(*it),n);
|
||||
lowerWeights.clear();
|
||||
lowerWeights.push_back(lowerWeight);
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file biasing/B01/src/B01PhysicsList.cc
|
||||
/// \brief Implementation of the B01PhysicsList class
|
||||
//
|
||||
// $Id: B01PhysicsList.cc,v 1.9 2010-03-24 21:04:23 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
|
||||
#include "globals.hh"
|
||||
@@ -47,6 +49,7 @@
|
||||
#include "G4ShortLivedConstructor.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
B01PhysicsList::B01PhysicsList(): G4VUserPhysicsList()
|
||||
{
|
||||
@@ -308,7 +311,7 @@ void B01PhysicsList::ConstructHad()
|
||||
theHandler->SetMultiFragmentation(theMF);
|
||||
theHandler->SetMaxAandZForFermiBreakUp(12, 6);
|
||||
theHandler->SetMinEForMultiFrag(3*MeV);
|
||||
|
||||
|
||||
// Pre equilibrium stage
|
||||
G4PreCompoundModel * thePreEquilib = new G4PreCompoundModel(theHandler);
|
||||
|
||||
@@ -316,7 +319,7 @@ void B01PhysicsList::ConstructHad()
|
||||
// a no-cascade generator-precompound interaface
|
||||
G4GeneratorPrecompoundInterface * theCascade = new G4GeneratorPrecompoundInterface;
|
||||
theCascade->SetDeExcitation(thePreEquilib);
|
||||
|
||||
|
||||
// here come the high energy parts
|
||||
// the string model; still not quite according to design - Explicite use of the forseen interfaces
|
||||
// will be tested and documented in this program by beta-02 at latest.
|
||||
@@ -455,7 +458,7 @@ void B01PhysicsList::ConstructHad()
|
||||
G4LEAntiNeutronInelastic* theInelasticModel =
|
||||
new G4LEAntiNeutronInelastic;
|
||||
theInelasticProcess->RegisterMe(theInelasticModel);
|
||||
theInelasticProcess->RegisterMe(theTheoModel);
|
||||
theInelasticProcess->RegisterMe(theTheoModel);
|
||||
pmanager->AddDiscreteProcess(theInelasticProcess);
|
||||
}
|
||||
else if (particleName == "lambda") {
|
||||
@@ -654,11 +657,11 @@ void B01PhysicsList::AddScoringProcess(){
|
||||
while( (*theParticleIterator)() ){
|
||||
G4ParticleDefinition* particle = theParticleIterator->value();
|
||||
if ( !particle->IsShortLived() ){
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
pmanager->AddProcess(theParallelWorldScoringProcess);
|
||||
pmanager->SetProcessOrderingToLast(theParallelWorldScoringProcess,idxAtRest);
|
||||
pmanager->SetProcessOrdering(theParallelWorldScoringProcess,idxAlongStep,1);
|
||||
pmanager->SetProcessOrderingToLast(theParallelWorldScoringProcess,idxPostStep);
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
pmanager->AddProcess(theParallelWorldScoringProcess);
|
||||
pmanager->SetProcessOrderingToLast(theParallelWorldScoringProcess,idxAtRest);
|
||||
pmanager->SetProcessOrdering(theParallelWorldScoringProcess,idxAlongStep,1);
|
||||
pmanager->SetProcessOrderingToLast(theParallelWorldScoringProcess,idxPostStep);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file biasing/B01/src/B01PrimaryGeneratorAction.cc
|
||||
/// \brief Implementation of the B01PrimaryGeneratorAction class
|
||||
//
|
||||
// $Id: B01PrimaryGeneratorAction.cc,v 1.8 2006-06-29 16:34:20 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
|
||||
#include "globals.hh"
|
||||
@@ -36,6 +38,7 @@
|
||||
#include "G4ParticleGun.hh"
|
||||
#include "G4Neutron.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
B01PrimaryGeneratorAction::B01PrimaryGeneratorAction()
|
||||
{
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file biasing/B01/src/B01Run.cc
|
||||
/// \brief Implementation of the B01Run class
|
||||
//
|
||||
// $Id: B01Run.cc,v 1.4 2007-06-21 15:03:37 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
|
||||
//=====================================================================
|
||||
@@ -79,28 +81,28 @@ B01Run::B01Run(const std::vector<G4String> mfdName): G4Run()
|
||||
(G4MultiFunctionalDetector*)(SDman->FindSensitiveDetector(detName));
|
||||
//
|
||||
if ( mfd ){
|
||||
//--- Loop over the registered primitive scorers.
|
||||
for (G4int icol = 0; icol < mfd->GetNumberOfPrimitives(); icol++){
|
||||
// Get Primitive Scorer object.
|
||||
G4VPrimitiveScorer* scorer=mfd->GetPrimitive(icol);
|
||||
// collection name and collectionID for HitsCollection,
|
||||
//--- Loop over the registered primitive scorers.
|
||||
for (G4int icol = 0; icol < mfd->GetNumberOfPrimitives(); icol++){
|
||||
// Get Primitive Scorer object.
|
||||
G4VPrimitiveScorer* scorer=mfd->GetPrimitive(icol);
|
||||
// collection name and collectionID for HitsCollection,
|
||||
// where type of HitsCollection is G4THitsMap in case of primitive scorer.
|
||||
// The collection name is given by <MFD name>/<Primitive Scorer name>.
|
||||
G4String collectionName = scorer->GetName();
|
||||
G4String fullCollectionName = detName+"/"+collectionName;
|
||||
G4int collectionID = SDman->GetCollectionID(fullCollectionName);
|
||||
//
|
||||
if ( collectionID >= 0 ){
|
||||
G4cout << "++ "<<fullCollectionName<< " id " << collectionID << G4endl;
|
||||
// Store obtained HitsCollection information into data members.
|
||||
// And, creates new G4THitsMap for accumulating quantities during RUN.
|
||||
theCollName.push_back(fullCollectionName);
|
||||
theCollID.push_back(collectionID);
|
||||
theRunMap.push_back(new G4THitsMap<G4double>(detName,collectionName));
|
||||
}else{
|
||||
G4cout << "** collection " << fullCollectionName << " not found. "<<G4endl;
|
||||
}
|
||||
}
|
||||
G4String collectionName = scorer->GetName();
|
||||
G4String fullCollectionName = detName+"/"+collectionName;
|
||||
G4int collectionID = SDman->GetCollectionID(fullCollectionName);
|
||||
//
|
||||
if ( collectionID >= 0 ){
|
||||
G4cout << "++ "<<fullCollectionName<< " id " << collectionID << G4endl;
|
||||
// Store obtained HitsCollection information into data members.
|
||||
// And, creates new G4THitsMap for accumulating quantities during RUN.
|
||||
theCollName.push_back(fullCollectionName);
|
||||
theCollID.push_back(collectionID);
|
||||
theRunMap.push_back(new G4THitsMap<G4double>(detName,collectionName));
|
||||
}else{
|
||||
G4cout << "** collection " << fullCollectionName << " not found. "<<G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -162,7 +164,7 @@ void B01Run::RecordEvent(const G4Event* aEvent)
|
||||
// Access HitsMap.
|
||||
// By MultiFunctionalDetector name and Collection Name.
|
||||
G4THitsMap<G4double>* B01Run::GetHitsMap(const G4String& detName,
|
||||
const G4String& colName){
|
||||
const G4String& colName){
|
||||
G4String fullName = detName+"/"+colName;
|
||||
return GetHitsMap(fullName);
|
||||
}
|
||||
@@ -174,9 +176,9 @@ G4THitsMap<G4double>* B01Run::GetHitsMap(const G4String& detName,
|
||||
G4THitsMap<G4double>* B01Run::GetHitsMap(const G4String& fullName){
|
||||
G4int Ncol = theCollName.size();
|
||||
for ( G4int i = 0; i < Ncol; i++){
|
||||
if ( theCollName[i] == fullName ){
|
||||
return theRunMap[i];
|
||||
}
|
||||
if ( theCollName[i] == fullName ){
|
||||
return theRunMap[i];
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@@ -193,13 +195,13 @@ void B01Run::DumpAllScorer(){
|
||||
G4THitsMap<G4double>* RunMap =GetHitsMap(i);
|
||||
if ( RunMap ) {
|
||||
G4cout << " PrimitiveScorer RUN "
|
||||
<< RunMap->GetSDname() <<","<< RunMap->GetName() << G4endl;
|
||||
<< RunMap->GetSDname() <<","<< RunMap->GetName() << G4endl;
|
||||
G4cout << " Number of entries " << RunMap->entries() << G4endl;
|
||||
std::map<G4int,G4double*>::iterator itr = RunMap->GetMap()->begin();
|
||||
for(; itr != RunMap->GetMap()->end(); itr++) {
|
||||
G4cout << " copy no.: " << itr->first
|
||||
<< " Run Value : " << *(itr->second)
|
||||
<< G4endl;
|
||||
G4cout << " copy no.: " << itr->first
|
||||
<< " Run Value : " << *(itr->second)
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file biasing/B01/src/B01RunAction.cc
|
||||
/// \brief Implementation of the B01RunAction class
|
||||
//
|
||||
// $Id: B01RunAction.cc,v 1.4 2007-06-22 13:29:45 ahoward Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
#include "B01RunAction.hh"
|
||||
#include "B01Run.hh"
|
||||
@@ -151,20 +153,20 @@ void B01RunAction::EndOfRunAction(const G4Run* aRun)
|
||||
if ( *SLs !=0. ) AverageTrackWeight = (*SLWs)/(*SLs);
|
||||
G4String cname = bdet->GetCellName(iz);
|
||||
G4cout
|
||||
<< std::setw(FieldValue) << cname << " |"
|
||||
<< std::setw(FieldValue) << (*TrackEnters) << " |"
|
||||
<< std::setw(FieldValue) << (*Populations) << " |"
|
||||
<< std::setw(FieldValue) << (*SumCollisions) << " |"
|
||||
<< std::setw(FieldValue) << (*SumCollWeight) << " |"
|
||||
<< std::setw(FieldValue) << NumWeightedEnergy << " |"
|
||||
<< std::setw(FieldValue) << FluxWeightedEnergy << " |"
|
||||
<< std::setw(FieldValue) << AverageTrackWeight << " |"
|
||||
<< std::setw(FieldValue) << (*SLs) << " |"
|
||||
<< std::setw(FieldValue) << (*SLWs) << " |"
|
||||
<< std::setw(FieldValue) << (*SLW_Vs) << " |"
|
||||
<< std::setw(FieldValue) << (*SLWEs) << " |"
|
||||
<< std::setw(FieldValue) << (*SLWE_Vs) << " |"
|
||||
<< G4endl;
|
||||
<< std::setw(FieldValue) << cname << " |"
|
||||
<< std::setw(FieldValue) << (*TrackEnters) << " |"
|
||||
<< std::setw(FieldValue) << (*Populations) << " |"
|
||||
<< std::setw(FieldValue) << (*SumCollisions) << " |"
|
||||
<< std::setw(FieldValue) << (*SumCollWeight) << " |"
|
||||
<< std::setw(FieldValue) << NumWeightedEnergy << " |"
|
||||
<< std::setw(FieldValue) << FluxWeightedEnergy << " |"
|
||||
<< std::setw(FieldValue) << AverageTrackWeight << " |"
|
||||
<< std::setw(FieldValue) << (*SLs) << " |"
|
||||
<< std::setw(FieldValue) << (*SLWs) << " |"
|
||||
<< std::setw(FieldValue) << (*SLW_Vs) << " |"
|
||||
<< std::setw(FieldValue) << (*SLWEs) << " |"
|
||||
<< std::setw(FieldValue) << (*SLWE_Vs) << " |"
|
||||
<< G4endl;
|
||||
}
|
||||
G4cout << "============================================="<<G4endl;
|
||||
}
|
||||
@@ -196,9 +198,9 @@ void B01RunAction::PrintHeader(std::ostream *out)
|
||||
for (std::vector<G4String>::iterator it = vecScoreName.begin();
|
||||
it != vecScoreName.end(); it++) {
|
||||
//vname = FillString((*it),
|
||||
// ' ',
|
||||
// FieldValue+1,
|
||||
// false);
|
||||
// ' ',
|
||||
// FieldValue+1,
|
||||
// false);
|
||||
// *out << vname << '|';
|
||||
*out << std::setw(FieldValue) << (*it) << " |";
|
||||
}
|
||||
@@ -206,7 +208,7 @@ void B01RunAction::PrintHeader(std::ostream *out)
|
||||
}
|
||||
|
||||
std::string B01RunAction::FillString(const std::string &name,
|
||||
char c, G4int n, G4bool back)
|
||||
char c, G4int n, G4bool back)
|
||||
{
|
||||
std::string fname("");
|
||||
G4int k = n - name.size();
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file biasing/B01/src/B01ScoreTable.cc
|
||||
/// \brief Implementation of the B01ScoreTable class
|
||||
//
|
||||
// $Id: B01ScoreTable.cc,v 1.2 2007-06-22 13:15:29 ahoward Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -84,9 +86,9 @@ void B01ScoreTable::PrintHeader(std::ostream *out)
|
||||
for (std::vector<G4String>::iterator it = vecScoreName.begin();
|
||||
it != vecScoreName.end(); it++) {
|
||||
vname = FillString((*it),
|
||||
' ',
|
||||
FieldValue+1,
|
||||
false);
|
||||
' ',
|
||||
FieldValue+1,
|
||||
false);
|
||||
*out << vname << '|';
|
||||
}
|
||||
*out << G4endl;
|
||||
@@ -104,13 +106,13 @@ G4String B01ScoreTable::CreateName(const G4GeometryCell &gCell) {
|
||||
|
||||
|
||||
void B01ScoreTable::PrintTable(const G4MapGeometryCellCellScorer &mcs,
|
||||
std::ostream *out) {
|
||||
std::ostream *out) {
|
||||
|
||||
// this lines sort the ScoreValues according to the volume
|
||||
// name they belong to
|
||||
std::map<G4String , G4CellScoreComposer> MapStringSCScorer;
|
||||
for (G4MapGeometryCellCellScorer::const_iterator mit =
|
||||
mcs.begin();
|
||||
mcs.begin();
|
||||
mit != mcs.end(); ++mit) {
|
||||
G4GeometryCell gCell = (*mit).first; // get a key identifying a volume
|
||||
G4String name(CreateName(gCell));
|
||||
@@ -118,7 +120,7 @@ void B01ScoreTable::PrintTable(const G4MapGeometryCellCellScorer &mcs,
|
||||
G4double importance = 1;
|
||||
if (fIStore) {
|
||||
if (fIStore->IsKnown(gCell)) {
|
||||
importance = fIStore->GetImportance(gCell);
|
||||
importance = fIStore->GetImportance(gCell);
|
||||
}
|
||||
}
|
||||
MapStringSCScorer[name] = (*mit).second->GetCellScoreComposer();
|
||||
@@ -126,8 +128,8 @@ void B01ScoreTable::PrintTable(const G4MapGeometryCellCellScorer &mcs,
|
||||
}
|
||||
// now do the printing
|
||||
for ( std::map<G4String , G4CellScoreComposer>::iterator
|
||||
it = MapStringSCScorer.begin();
|
||||
it != MapStringSCScorer.end(); ++it) {
|
||||
it = MapStringSCScorer.begin();
|
||||
it != MapStringSCScorer.end(); ++it) {
|
||||
G4String name((*it).first);
|
||||
PrintLine(name, (*it).second.GetStandardCellScoreValues(), out);
|
||||
}
|
||||
@@ -135,8 +137,8 @@ void B01ScoreTable::PrintTable(const G4MapGeometryCellCellScorer &mcs,
|
||||
}
|
||||
|
||||
void B01ScoreTable::PrintLine(const G4String &name,
|
||||
const G4CellScoreValues &sc_scores,
|
||||
std::ostream *out)
|
||||
const G4CellScoreValues &sc_scores,
|
||||
std::ostream *out)
|
||||
{
|
||||
std::string fname = FillString(name, '.', FieldName);
|
||||
*out << fname << " |";
|
||||
@@ -171,7 +173,7 @@ void B01ScoreTable::PrintLine(const G4String &name,
|
||||
|
||||
|
||||
std::string B01ScoreTable::FillString(const std::string &name,
|
||||
char c, G4int n, G4bool back)
|
||||
char c, G4int n, G4bool back)
|
||||
{
|
||||
std::string fname("");
|
||||
G4int k = n - name.size();
|
||||
|
||||
Reference in New Issue
Block a user