Import Geant4 11.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2023-12-08 10:43:34 +01:00
parent dd1f179cda
commit 860a2b92bf
3962 changed files with 139318 additions and 164259 deletions
@@ -37,7 +37,7 @@
#include "G4LogicalVolume.hh"
#include "G4ios.hh"
G4ThreadLocal G4Allocator<Par01CalorimeterHit>* Par01CalorimeterHitAllocator=0;
G4ThreadLocal G4Allocator<Par01CalorimeterHit>* Par01CalorimeterHitAllocator=nullptr;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -79,7 +79,7 @@ G4bool Par01CalorimeterSD::ProcessHits(G4Step* aStep, G4TouchableHistory*)
G4double edep = aStep->GetTotalEnergyDeposit();
if(edep<=0.) return false;
G4TouchableHistory* hist = (G4TouchableHistory*)(aStep->GetPreStepPoint()->GetTouchable());
auto hist = (G4TouchableHistory*)(aStep->GetPreStepPoint()->GetTouchable());
const G4VPhysicalVolume* physVol = hist->GetVolume();
G4int copyID = hist->GetReplicaNumber();
@@ -228,27 +228,27 @@ G4VPhysicalVolume* Par01DetectorConstruction::Construct()
//--------- Visualization attributes -------------------------------
WorldLog->SetVisAttributes(G4VisAttributes::GetInvisible());
G4VisAttributes * driftchamberTubeVisAtt
auto driftchamberTubeVisAtt
= new G4VisAttributes(G4Colour(0.0,1.0,0.0));
driftchamberTubeVisAtt->SetForceWireframe(true);
driftChamberLog->SetVisAttributes(driftchamberTubeVisAtt);
G4VisAttributes * calorimeterBoxVisAtt
auto calorimeterBoxVisAtt
= new G4VisAttributes(G4Colour(0.0,0.0,1.0));
calorimeterBoxVisAtt->SetForceWireframe(true);
calorimeterLog->SetVisAttributes(calorimeterBoxVisAtt);
G4VisAttributes * crystalVisAtt
auto crystalVisAtt
= new G4VisAttributes(G4Colour(1.0,0.0,0.0));
crystalVisAtt->SetForceWireframe(true);
fCrystalLog->SetVisAttributes(crystalVisAtt);
G4VisAttributes * hadCaloBoxVisAtt
auto hadCaloBoxVisAtt
= new G4VisAttributes(G4Colour(1.0,0.0,1.0));
hadCaloBoxVisAtt->SetForceWireframe(true);
hadCaloLog->SetVisAttributes(hadCaloBoxVisAtt);
G4VisAttributes * towerVisAtt
auto towerVisAtt
= new G4VisAttributes(G4Colour(0.5,0.0,1.0));
towerVisAtt->SetForceWireframe(true);
fTowerLog->SetVisAttributes(towerVisAtt);
@@ -54,7 +54,7 @@ Par01EMShowerModel::Par01EMShowerModel(G4String modelName, G4Region* envelope)
fTouchableHandle = new G4TouchableHistory();
fpNavigator = new G4Navigator();
fNaviSetup = false;
fCsI = 0;
fCsI = nullptr;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -68,7 +68,7 @@ Par01EMShowerModel::Par01EMShowerModel(G4String modelName)
fTouchableHandle = new G4TouchableHistory();
fpNavigator = new G4Navigator();
fNaviSetup = false;
fCsI = 0;
fCsI = nullptr;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -138,7 +138,7 @@ void Par01EMShowerModel::Explode(const G4FastTrack& fastTrack)
// t : reduced quantity = z/X0:
G4double t, bt;
if ( fCsI == 0 ) fCsI = G4NistManager::Instance()->FindOrBuildMaterial("G4_CESIUM_IODIDE");
if ( fCsI == nullptr ) fCsI = G4NistManager::Instance()->FindOrBuildMaterial("G4_CESIUM_IODIDE");
G4double X0 = fCsI->GetRadlen();
// Moliere radius:
G4double Es = 21*MeV;
@@ -225,11 +225,11 @@ void Par01EMShowerModel::AssignSpotAndCallHit(const Par01EnergySpot &eSpot)
fFakeStep->GetPreStepPoint()->GetPhysicalVolume();
G4VSensitiveDetector* pSensitive;
if( pCurrentVolume != 0 )
if( pCurrentVolume != nullptr )
{
pSensitive = pCurrentVolume->GetLogicalVolume()->
GetSensitiveDetector();
if( pSensitive != 0 )
if( pSensitive != nullptr )
{
pSensitive->Hit(fFakeStep);
}
@@ -64,7 +64,7 @@ void Par01EnergySpot::Draw(G4Colour *color)
{
G4Polyline polyline;
G4Colour colour(1.,.5,.5);
if (color != 0) colour = *color;
if (color != nullptr) colour = *color;
polyline.SetVisAttributes(colour);
G4ThreeVector pp(fPoint);
// Draw a "home made" marker:
@@ -202,11 +202,11 @@ void Par01PionShowerModel::AssignSpotAndCallHit(const Par01EnergySpot &eSpot)
fFakeStep->GetPreStepPoint()->GetPhysicalVolume();
G4VSensitiveDetector* pSensitive;
if( pCurrentVolume != 0 )
if( pCurrentVolume != nullptr )
{
pSensitive = pCurrentVolume->GetLogicalVolume()->
GetSensitiveDetector();
if( pSensitive != 0 )
if( pSensitive != nullptr )
{
pSensitive->Hit(fFakeStep);
}