Import Geant4 11.3.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2024-06-28 13:08:51 +02:00
parent f7b23877ed
commit e58e650b32
5232 changed files with 239416 additions and 244360 deletions
+11 -15
View File
@@ -28,23 +28,20 @@
/// \brief Implementation of the B5::EmCalorimeterSD class
#include "EmCalorimeterSD.hh"
#include "EmCalorimeterHit.hh"
#include "Constants.hh"
#include "EmCalorimeterHit.hh"
#include "G4HCofThisEvent.hh"
#include "G4TouchableHistory.hh"
#include "G4Track.hh"
#include "G4Step.hh"
#include "G4SDManager.hh"
#include "G4ios.hh"
#include "G4Step.hh"
namespace B5
{
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
EmCalorimeterSD::EmCalorimeterSD(G4String name)
: G4VSensitiveDetector(name)
EmCalorimeterSD::EmCalorimeterSD(G4String name) : G4VSensitiveDetector(name)
{
collectionName.insert("EMcalorimeterColl");
}
@@ -53,25 +50,24 @@ EmCalorimeterSD::EmCalorimeterSD(G4String name)
void EmCalorimeterSD::Initialize(G4HCofThisEvent* hce)
{
fHitsCollection
= new EmCalorimeterHitsCollection(SensitiveDetectorName,collectionName[0]);
if (fHCID<0) {
fHitsCollection = new EmCalorimeterHitsCollection(SensitiveDetectorName, collectionName[0]);
if (fHCID < 0) {
fHCID = G4SDManager::GetSDMpointer()->GetCollectionID(fHitsCollection);
}
hce->AddHitsCollection(fHCID,fHitsCollection);
hce->AddHitsCollection(fHCID, fHitsCollection);
// fill calorimeter hits with zero energy deposition
for (auto i=0;i<kNofEmCells;i++) {
for (auto i = 0; i < kNofEmCells; i++) {
fHitsCollection->insert(new EmCalorimeterHit(i));
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4bool EmCalorimeterSD::ProcessHits(G4Step*step, G4TouchableHistory*)
G4bool EmCalorimeterSD::ProcessHits(G4Step* step, G4TouchableHistory*)
{
auto edep = step->GetTotalEnergyDeposit();
if (edep==0.) return true;
if (edep == 0.) return true;
auto touchable = step->GetPreStepPoint()->GetTouchable();
auto physical = touchable->GetVolume();
@@ -95,4 +91,4 @@ G4bool EmCalorimeterSD::ProcessHits(G4Step*step, G4TouchableHistory*)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
}
} // namespace B5