Import Geant4 11.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2022-12-09 14:43:28 +01:00
parent c07cea1fe0
commit 9f34590941
3810 changed files with 200490 additions and 182326 deletions
+2 -12
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
/// \file ActionInitialization.cc
/// \file B5/src/ActionInitialization.cc
/// \brief Implementation of the B5::ActionInitialization class
#include "ActionInitialization.hh"
@@ -37,19 +37,9 @@ namespace B5
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ActionInitialization::ActionInitialization()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ActionInitialization::~ActionInitialization()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ActionInitialization::BuildForMaster() const
{
EventAction* eventAction = new EventAction;
auto eventAction = new EventAction;
SetUserAction(new RunAction(eventAction));
}
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
/// \file CellParameterisation.cc
/// \file B5/src/CellParameterisation.cc
/// \brief Implementation of the B5::CellParameterisation class
#include "CellParameterisation.hh"
@@ -51,11 +51,6 @@ CellParameterisation::CellParameterisation()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
CellParameterisation::~CellParameterisation()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void CellParameterisation::ComputeTransformation(
const G4int copyNo,G4VPhysicalVolume *physVol) const
{
+27 -38
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
/// \file DetectorConstruction.cc
/// \file B5/src/DetectorConstruction.cc
/// \brief Implementation of the B5::DetectorConstruction class
#include "DetectorConstruction.hh"
@@ -70,8 +70,8 @@ namespace B5
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4ThreadLocal MagneticField* DetectorConstruction::fMagneticField = 0;
G4ThreadLocal G4FieldManager* DetectorConstruction::fFieldMgr = 0;
G4ThreadLocal MagneticField* DetectorConstruction::fMagneticField = nullptr;
G4ThreadLocal G4FieldManager* DetectorConstruction::fFieldMgr = nullptr;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -119,9 +119,8 @@ G4VPhysicalVolume* DetectorConstruction::Construct()
= new G4Box("worldBox",10.*m,3.*m,10.*m);
auto worldLogical
= new G4LogicalVolume(worldSolid,air,"worldLogical");
auto worldPhysical
= new G4PVPlacement(0,G4ThreeVector(),worldLogical,"worldPhysical",0,
false,0,checkOverlaps);
auto worldPhysical = new G4PVPlacement(
nullptr, G4ThreeVector(), worldLogical, "worldPhysical", nullptr, false, 0, checkOverlaps);
// Tube with Local Magnetic field
@@ -133,14 +132,14 @@ G4VPhysicalVolume* DetectorConstruction::Construct()
// placement of Tube
G4RotationMatrix* fieldRot = new G4RotationMatrix();
auto fieldRot = new G4RotationMatrix();
fieldRot->rotateX(90.*deg);
new G4PVPlacement(fieldRot,G4ThreeVector(),fMagneticLogical,
"magneticPhysical",worldLogical,
false,0,checkOverlaps);
// set step limit in tube with magnetic field
G4UserLimits* userLimits = new G4UserLimits(1*m);
auto userLimits = new G4UserLimits(1 * m);
fMagneticLogical->SetUserLimits(userLimits);
// first arm
@@ -148,9 +147,8 @@ G4VPhysicalVolume* DetectorConstruction::Construct()
= new G4Box("firstArmBox",1.5*m,1.*m,3.*m);
auto firstArmLogical
= new G4LogicalVolume(firstArmSolid,air,"firstArmLogical");
new G4PVPlacement(0,G4ThreeVector(0.,0.,-5.*m),firstArmLogical,
"firstArmPhysical",worldLogical,
false,0,checkOverlaps);
new G4PVPlacement(nullptr, G4ThreeVector(0., 0., -5. * m), firstArmLogical, "firstArmPhysical",
worldLogical, false, 0, checkOverlaps);
// second arm
auto secondArmSolid
@@ -172,9 +170,8 @@ G4VPhysicalVolume* DetectorConstruction::Construct()
for (auto i=0;i<kNofHodoscopes1;i++) {
G4double x1 = (i-kNofHodoscopes1/2)*10.*cm;
new G4PVPlacement(0,G4ThreeVector(x1,0.,-1.5*m),fHodoscope1Logical,
"hodoscope1Physical",firstArmLogical,
false,i,checkOverlaps);
new G4PVPlacement(nullptr, G4ThreeVector(x1, 0., -1.5 * m), fHodoscope1Logical,
"hodoscope1Physical", firstArmLogical, false, i, checkOverlaps);
}
// drift chambers in first arm
@@ -185,9 +182,8 @@ G4VPhysicalVolume* DetectorConstruction::Construct()
for (auto i=0;i<kNofChambers;i++) {
G4double z1 = (i-kNofChambers/2)*0.5*m;
new G4PVPlacement(0,G4ThreeVector(0.,0.,z1),chamber1Logical,
"chamber1Physical",firstArmLogical,
false,i,checkOverlaps);
new G4PVPlacement(nullptr, G4ThreeVector(0., 0., z1), chamber1Logical, "chamber1Physical",
firstArmLogical, false, i, checkOverlaps);
}
// "virtual" wire plane
@@ -195,9 +191,8 @@ G4VPhysicalVolume* DetectorConstruction::Construct()
= new G4Box("wirePlane1Box",1.*m,30.*cm,0.1*mm);
fWirePlane1Logical
= new G4LogicalVolume(wirePlane1Solid,argonGas,"wirePlane1Logical");
new G4PVPlacement(0,G4ThreeVector(0.,0.,0.),fWirePlane1Logical,
"wirePlane1Physical",chamber1Logical,
false,0,checkOverlaps);
new G4PVPlacement(nullptr, G4ThreeVector(0., 0., 0.), fWirePlane1Logical, "wirePlane1Physical",
chamber1Logical, false, 0, checkOverlaps);
// hodoscopes in second arm
auto hodoscope2Solid
@@ -207,9 +202,8 @@ G4VPhysicalVolume* DetectorConstruction::Construct()
for (auto i=0;i<kNofHodoscopes2;i++) {
G4double x2 = (i-kNofHodoscopes2/2)*10.*cm;
new G4PVPlacement(0,G4ThreeVector(x2,0.,0.),fHodoscope2Logical,
"hodoscope2Physical",secondArmLogical,
false,i,checkOverlaps);
new G4PVPlacement(nullptr, G4ThreeVector(x2, 0., 0.), fHodoscope2Logical,
"hodoscope2Physical", secondArmLogical, false, i, checkOverlaps);
}
// drift chambers in second arm
@@ -220,9 +214,8 @@ G4VPhysicalVolume* DetectorConstruction::Construct()
for (auto i=0;i<kNofChambers;i++) {
G4double z2 = (i-kNofChambers/2)*0.5*m - 1.5*m;
new G4PVPlacement(0,G4ThreeVector(0.,0.,z2),chamber2Logical,
"chamber2Physical",secondArmLogical,
false,i,checkOverlaps);
new G4PVPlacement(nullptr, G4ThreeVector(0., 0., z2), chamber2Logical, "chamber2Physical",
secondArmLogical, false, i, checkOverlaps);
}
// "virtual" wire plane
@@ -230,18 +223,16 @@ G4VPhysicalVolume* DetectorConstruction::Construct()
= new G4Box("wirePlane2Box",1.5*m,30.*cm,0.1*mm);
fWirePlane2Logical
= new G4LogicalVolume(wirePlane2Solid,argonGas,"wirePlane2Logical");
new G4PVPlacement(0,G4ThreeVector(0.,0.,0.),fWirePlane2Logical,
"wirePlane2Physical",chamber2Logical,
false,0,checkOverlaps);
new G4PVPlacement(nullptr, G4ThreeVector(0., 0., 0.), fWirePlane2Logical, "wirePlane2Physical",
chamber2Logical, false, 0, checkOverlaps);
// CsI calorimeter
auto emCalorimeterSolid
= new G4Box("EMcalorimeterBox",1.5*m,30.*cm,15.*cm);
auto emCalorimeterLogical
= new G4LogicalVolume(emCalorimeterSolid,csI,"EMcalorimeterLogical");
new G4PVPlacement(0,G4ThreeVector(0.,0.,2.*m),emCalorimeterLogical,
"EMcalorimeterPhysical",secondArmLogical,
false,0,checkOverlaps);
new G4PVPlacement(nullptr, G4ThreeVector(0., 0., 2. * m), emCalorimeterLogical,
"EMcalorimeterPhysical", secondArmLogical, false, 0, checkOverlaps);
// EMcalorimeter cells
auto cellSolid
@@ -257,9 +248,8 @@ G4VPhysicalVolume* DetectorConstruction::Construct()
= new G4Box("HadCalorimeterBox",1.5*m,30.*cm,50.*cm);
auto hadCalorimeterLogical
= new G4LogicalVolume(hadCalorimeterSolid,lead,"HadCalorimeterLogical");
new G4PVPlacement(0,G4ThreeVector(0.,0.,3.*m),hadCalorimeterLogical,
"HadCalorimeterPhysical",secondArmLogical,
false,0,checkOverlaps);
new G4PVPlacement(nullptr, G4ThreeVector(0., 0., 3. * m), hadCalorimeterLogical,
"HadCalorimeterPhysical", secondArmLogical, false, 0, checkOverlaps);
// hadron calorimeter column
auto HadCalColumnSolid
@@ -291,9 +281,8 @@ G4VPhysicalVolume* DetectorConstruction::Construct()
fHadCalScintiLogical
= new G4LogicalVolume(HadCalScintiSolid,scintillator,
"HadCalScintiLogical");
new G4PVPlacement(0,G4ThreeVector(0.,0.,2.*cm),fHadCalScintiLogical,
"HadCalScintiPhysical",HadCalLayerLogical,
false,0,checkOverlaps);
new G4PVPlacement(nullptr, G4ThreeVector(0., 0., 2. * cm), fHadCalScintiLogical,
"HadCalScintiPhysical", HadCalLayerLogical, false, 0, checkOverlaps);
// visualization attributes ------------------------------------------------
+1 -32
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
/// \file DriftChamberHit.cc
/// \file B5/src/DriftChamberHit.cc
/// \brief Implementation of the B5::DriftChamberHit class
#include "DriftChamberHit.hh"
@@ -50,43 +50,12 @@ G4ThreadLocal G4Allocator<DriftChamberHit>* DriftChamberHitAllocator;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
DriftChamberHit::DriftChamberHit()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
DriftChamberHit::DriftChamberHit(G4int layerID)
: fLayerID(layerID)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
DriftChamberHit::~DriftChamberHit()
{}
// //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// DriftChamberHit::DriftChamberHit(const DriftChamberHit &right)
// : G4VHit(),
// fLayerID(right.fLayerID),
// fTime(right.fTime),
// fLocalPos(right.fLocalPos),
// fWorldPos(right.fWorldPos)
// {}
// //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// const DriftChamberHit& DriftChamberHit::operator=(const DriftChamberHit &right)
// {
// fLayerID = right.fLayerID;
// fTime = right.fTime;
// fLocalPos = right.fLocalPos;
// fWorldPos = right.fWorldPos;
// return *this;
// }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4bool DriftChamberHit::operator==(const DriftChamberHit &/*right*/) const
{
return false;
+1 -6
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
/// \file DriftChamberSD.cc
/// \file B5/src/DriftChamberSD.cc
/// \brief Implementation of the B5::DriftChamber class
#include "DriftChamberSD.hh"
@@ -50,11 +50,6 @@ DriftChamberSD::DriftChamberSD(G4String name)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
DriftChamberSD::~DriftChamberSD()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DriftChamberSD::Initialize(G4HCofThisEvent* hce)
{
fHitsCollection
+1 -35
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
/// \file EmCalorimeterHit.cc
/// \file B5/src/EmCalorimeterHit.cc
/// \brief Implementation of the B5::EmCalorimeterHit class
#include "EmCalorimeterHit.hh"
@@ -49,46 +49,12 @@ G4ThreadLocal G4Allocator<EmCalorimeterHit>* EmCalorimeterHitAllocator;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
EmCalorimeterHit::EmCalorimeterHit()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
EmCalorimeterHit::EmCalorimeterHit(G4int cellID)
: fCellID(cellID)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
EmCalorimeterHit::~EmCalorimeterHit()
{}
// //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// EmCalorimeterHit::EmCalorimeterHit(const EmCalorimeterHit &right)
// : G4VHit(),
// fCellID(right.fCellID),
// fEdep(right.fEdep),
// fPos(right.fPos),
// fRot(right.fRot),
// fPLogV(right.fPLogV)
// {}
// //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// const EmCalorimeterHit& EmCalorimeterHit::operator=(const EmCalorimeterHit
// &right)
// {
// fCellID = right.fCellID;
// fEdep = right.fEdep;
// fPos = right.fPos;
// fRot = right.fRot;
// fPLogV = right.fPLogV;
// return *this;
// }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4bool EmCalorimeterHit::operator==(const EmCalorimeterHit &right) const
{
return (fCellID==right.fCellID);
+1 -6
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
/// \file EmCalorimeterSD.cc
/// \file B5/src/EmCalorimeterSD.cc
/// \brief Implementation of the B5::EmCalorimeterSD class
#include "EmCalorimeterSD.hh"
@@ -51,11 +51,6 @@ EmCalorimeterSD::EmCalorimeterSD(G4String name)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
EmCalorimeterSD::~EmCalorimeterSD()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void EmCalorimeterSD::Initialize(G4HCofThisEvent* hce)
{
fHitsCollection
+1 -15
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
/// \file EventAction.cc
/// \file B5/src/EventAction.cc
/// \brief Implementation of the B5::EventAction class
#include "EventAction.hh"
@@ -79,15 +79,6 @@ namespace B5
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
EventAction::EventAction()
// : G4UserEventAction(),
// fHodHCID {{ -1, -1 }},
// fDriftHCID{{ -1, -1 }},
// fCalHCID {{ -1, -1 }},
// fDriftHistoID{{ {{ -1, -1 }}, {{ -1, -1 }} }},
// fCalEdep{{ vector<G4double>(kNofEmCells, 0.), vector<G4double>(kNofHadCells, 0.) }}
// // std::array<T, N> is an aggregate that contains a C array.
// // To initialize it, we need outer braces for the class itself
// // and inner braces for the C array
{
// set printing per each event
G4RunManager::GetRunManager()->SetPrintProgress(1);
@@ -95,11 +86,6 @@ EventAction::EventAction()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
EventAction::~EventAction()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void EventAction::BeginOfEventAction(const G4Event*)
{
// Find hit collections and histogram Ids by names (just once)
+1 -35
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
/// \file HadCalorimeterHit.cc
/// \file B5/src/HadCalorimeterHit.cc
/// \brief Implementation of the B5::HadCalorimeterHit class
#include "HadCalorimeterHit.hh"
@@ -51,46 +51,12 @@ G4ThreadLocal G4Allocator<HadCalorimeterHit>* HadCalorimeterHitAllocator;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
HadCalorimeterHit::HadCalorimeterHit()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
HadCalorimeterHit::HadCalorimeterHit(G4int columnID,G4int rowID)
: fColumnID(columnID), fRowID(rowID)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
HadCalorimeterHit::~HadCalorimeterHit()
{}
// //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// HadCalorimeterHit::HadCalorimeterHit(const HadCalorimeterHit &right)
// : G4VHit(),
// fColumnID(right.fColumnID),
// fRowID(right.fRowID),
// fEdep(right.fEdep),
// fPos(right.fPos),
// fRot(right.fRot)
// {}
// //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// const HadCalorimeterHit& HadCalorimeterHit::operator=(
// const HadCalorimeterHit &right)
// {
// fColumnID = right.fColumnID;
// fRowID = right.fRowID;
// fEdep = right.fEdep;
// fPos = right.fPos;
// fRot = right.fRot;
// return *this;
// }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4bool HadCalorimeterHit::operator==(const HadCalorimeterHit &right) const
{
return ( fColumnID==right.fColumnID && fRowID==right.fRowID );
+1 -6
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
/// \file HadCalorimeterSD.cc
/// \file B5/src/HadCalorimeterSD.cc
/// \brief Implementation of the B5::HadCalorimeterSD class
#include "HadCalorimeterSD.hh"
@@ -51,11 +51,6 @@ HadCalorimeterSD::HadCalorimeterSD(G4String name)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
HadCalorimeterSD::~HadCalorimeterSD()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void HadCalorimeterSD::Initialize(G4HCofThisEvent* hce)
{
fHitsCollection
+1 -29
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
/// \file HodoscopeHit.cc
/// \file B5/src/HodoscopeHit.cc
/// \brief Implementation of the B5::HodoscopeHit class
#include "HodoscopeHit.hh"
@@ -56,34 +56,6 @@ HodoscopeHit::HodoscopeHit(G4int id,G4double time)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
HodoscopeHit::~HodoscopeHit()
{}
// //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// HodoscopeHit::HodoscopeHit(const HodoscopeHit &right)
// : G4VHit(),
// fId(right.fId),
// fTime(right.fTime),
// fPos(right.fPos),
// fRot(right.fRot),
// fPLogV(right.fPLogV)
// {}
// //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// const HodoscopeHit& HodoscopeHit::operator=(const HodoscopeHit &right)
// {
// fId = right.fId;
// fTime = right.fTime;
// fPos = right.fPos;
// fRot = right.fRot;
// fPLogV = right.fPLogV;
// return *this;
// }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4bool HodoscopeHit::operator==(const HodoscopeHit &/*right*/) const
{
return false;
+1 -6
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
/// \file HodoscopeSD.cc
/// \file B5/src/HodoscopeSD.cc
/// \brief Implementation of the B5::HodoscopeSD class
#include "HodoscopeSD.hh"
@@ -50,11 +50,6 @@ HodoscopeSD::HodoscopeSD(G4String name)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
HodoscopeSD::~HodoscopeSD()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void HodoscopeSD::Initialize(G4HCofThisEvent* hce)
{
fHitsCollection = new HodoscopeHitsCollection
+1 -1
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
/// \file MagneticField.cc
/// \file B5/src/MagneticField.cc
/// \brief Implementation of the B5::MagneticField class
#include "MagneticField.hh"
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
/// \file PrimaryGeneratorAction.cc
/// \file B5/src/PrimaryGeneratorAction.cc
/// \brief Implementation of the B5::PrimaryGeneratorAction class
#include "PrimaryGeneratorAction.hh"
@@ -84,7 +84,7 @@ void PrimaryGeneratorAction::GeneratePrimaries(G4Event* event)
{
G4ParticleDefinition* particle;
if (fRandomizePrimary) {
G4int i = (int)(5.*G4UniformRand());
auto i = (int)(5. * G4UniformRand());
switch(i) {
case 0:
particle = fPositron;
+1 -7
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
/// \file RunAction.cc
/// \file B5/src/RunAction.cc
/// \brief Implementation of the B5::RunAction class
#include "RunAction.hh"
@@ -93,12 +93,6 @@ RunAction::RunAction(EventAction* eventAction)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RunAction::~RunAction()
{
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RunAction::BeginOfRunAction(const G4Run* /*run*/)
{
//inform the runManager to save random number seed