Import Geant4 10.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-12-09 12:35:28 +01:00
parent 4ec577e5c4
commit a3452e42ac
3514 changed files with 210500 additions and 89628 deletions
+1
View File
@@ -33,5 +33,6 @@
#include "g4root.hh"
//#include "g4xml.hh"
//#include "g4csv.hh"
#endif
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B5CellParameterisation.hh 76474 2013-11-11 10:36:34Z gcosmo $
// $Id: B5CellParameterisation.hh 101036 2016-11-04 09:00:23Z gcosmo $
//
/// \file B5CellParameterisation.hh
/// \brief Definition of the B5CellParameterisation class
@@ -31,24 +31,29 @@
#ifndef B5CellParameterisation_H
#define B5CellParameterisation_H 1
#include "B5Constants.hh"
#include "globals.hh"
#include "G4VPVParameterisation.hh"
#include <array>
class G4VPhysicalVolume;
/// EM Calorimeter cell parameterisation
class B5CellParameterisation : public G4VPVParameterisation
{
public:
public:
B5CellParameterisation();
virtual ~B5CellParameterisation();
virtual void ComputeTransformation(
const G4int copyNo,G4VPhysicalVolume *physVol) const;
private:
G4double fXCell[80];
G4double fYCell[80];
private:
std::array<G4double, kNofEmCells> fXCell;
std::array<G4double, kNofEmCells> fYCell;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+46
View File
@@ -0,0 +1,46 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
//
/// \file B5Constants.hh
/// \brief Definition of constants.
#ifndef B5Constants_h
#define B5Constants_h 1
#include "globals.hh"
constexpr G4int kNofHodoscopes1 = 15;
constexpr G4int kNofHodoscopes2 = 25;
constexpr G4int kNofChambers = 5;
constexpr G4int kNofEmColumns = 20;
constexpr G4int kNofEmRows = 4;
constexpr G4int kNofEmCells = kNofEmColumns * kNofEmRows;
constexpr G4int kNofHadColumns = 10;
constexpr G4int kNofHadRows = 2;
constexpr G4int kNofHadCells = kNofHadColumns * kNofHadRows;
#endif
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B5DetectorConstruction.hh 76474 2013-11-11 10:36:34Z gcosmo $
// $Id: B5DetectorConstruction.hh 101036 2016-11-04 09:00:23Z gcosmo $
//
/// \file B5DetectorConstruction.hh
/// \brief Definition of the B5DetectorConstruction class
@@ -50,7 +50,7 @@ class G4GenericMessenger;
class B5DetectorConstruction : public G4VUserDetectorConstruction
{
public:
public:
B5DetectorConstruction();
virtual ~B5DetectorConstruction();
@@ -62,7 +62,7 @@ public:
void ConstructMaterials();
private:
private:
void DefineCommands();
G4GenericMessenger* fMessenger;
+10 -9
View File
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B5DriftChamberHit.hh 76474 2013-11-11 10:36:34Z gcosmo $
// $Id: B5DriftChamberHit.hh 101036 2016-11-04 09:00:23Z gcosmo $
//
/// \file B5DriftChamberHit.hh
/// \brief Definition of the B5DriftChamberHit class
@@ -51,9 +51,9 @@ class G4AttValue;
class B5DriftChamberHit : public G4VHit
{
public:
public:
B5DriftChamberHit();
B5DriftChamberHit(G4int z);
B5DriftChamberHit(G4int layerID);
B5DriftChamberHit(const B5DriftChamberHit &right);
virtual ~B5DriftChamberHit();
@@ -80,27 +80,28 @@ public:
void SetWorldPos(G4ThreeVector xyz) { fWorldPos = xyz; }
G4ThreeVector GetWorldPos() const { return fWorldPos; }
private:
private:
G4int fLayerID;
G4double fTime;
G4ThreeVector fLocalPos;
G4ThreeVector fWorldPos;
};
typedef G4THitsCollection<B5DriftChamberHit> B5DriftChamberHitsCollection;
using B5DriftChamberHitsCollection = G4THitsCollection<B5DriftChamberHit>;
extern G4ThreadLocal G4Allocator<B5DriftChamberHit>* B5DriftChamberHitAllocator;
inline void* B5DriftChamberHit::operator new(size_t)
{
if (!B5DriftChamberHitAllocator)
B5DriftChamberHitAllocator = new G4Allocator<B5DriftChamberHit>;
return (void*)B5DriftChamberHitAllocator->MallocSingle();
if (!B5DriftChamberHitAllocator) {
B5DriftChamberHitAllocator = new G4Allocator<B5DriftChamberHit>;
}
return (void*)B5DriftChamberHitAllocator->MallocSingle();
}
inline void B5DriftChamberHit::operator delete(void* aHit)
{
B5DriftChamberHitAllocator->FreeSingle((B5DriftChamberHit*) aHit);
B5DriftChamberHitAllocator->FreeSingle((B5DriftChamberHit*) aHit);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B5DriftChamberSD.hh 76474 2013-11-11 10:36:34Z gcosmo $
// $Id: B5DriftChamberSD.hh 101036 2016-11-04 09:00:23Z gcosmo $
//
/// \file B5DriftChamberSD.hh
/// \brief Definition of the B5DriftChamberSD class
@@ -43,14 +43,14 @@ class G4TouchableHistory;
class B5DriftChamberSD : public G4VSensitiveDetector
{
public:
public:
B5DriftChamberSD(G4String name);
virtual ~B5DriftChamberSD();
virtual void Initialize(G4HCofThisEvent*HCE);
virtual G4bool ProcessHits(G4Step* aStep, G4TouchableHistory* ROhist);
private:
private:
B5DriftChamberHitsCollection* fHitsCollection;
G4int fHCID;
};
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B5EmCalorimeterHit.hh 76474 2013-11-11 10:36:34Z gcosmo $
// $Id: B5EmCalorimeterHit.hh 101036 2016-11-04 09:00:23Z gcosmo $
//
/// \file B5EmCalorimeterHit.hh
/// \brief Definition of the B5EmCalorimeterHit class
@@ -51,9 +51,9 @@ class G4AttValue;
class B5EmCalorimeterHit : public G4VHit
{
public:
public:
B5EmCalorimeterHit();
B5EmCalorimeterHit(G4int z);
B5EmCalorimeterHit(G4int cellID);
B5EmCalorimeterHit(const B5EmCalorimeterHit &right);
virtual ~B5EmCalorimeterHit();
@@ -84,7 +84,7 @@ public:
void SetLogV(G4LogicalVolume* val) { fPLogV = val; }
const G4LogicalVolume* GetLogV() const { return fPLogV; }
private:
private:
G4int fCellID;
G4double fEdep;
G4ThreeVector fPos;
@@ -92,20 +92,21 @@ private:
const G4LogicalVolume* fPLogV;
};
typedef G4THitsCollection<B5EmCalorimeterHit> B5EmCalorimeterHitsCollection;
using B5EmCalorimeterHitsCollection = G4THitsCollection<B5EmCalorimeterHit>;
extern G4ThreadLocal G4Allocator<B5EmCalorimeterHit>* B5EmCalorimeterHitAllocator;
inline void* B5EmCalorimeterHit::operator new(size_t)
{
if (!B5EmCalorimeterHitAllocator)
B5EmCalorimeterHitAllocator = new G4Allocator<B5EmCalorimeterHit>;
return (void*)B5EmCalorimeterHitAllocator->MallocSingle();
if (!B5EmCalorimeterHitAllocator) {
B5EmCalorimeterHitAllocator = new G4Allocator<B5EmCalorimeterHit>;
}
return (void*)B5EmCalorimeterHitAllocator->MallocSingle();
}
inline void B5EmCalorimeterHit::operator delete(void* aHit)
{
B5EmCalorimeterHitAllocator->FreeSingle((B5EmCalorimeterHit*) aHit);
B5EmCalorimeterHitAllocator->FreeSingle((B5EmCalorimeterHit*) aHit);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B5EmCalorimeterSD.hh 76474 2013-11-11 10:36:34Z gcosmo $
// $Id: B5EmCalorimeterSD.hh 101036 2016-11-04 09:00:23Z gcosmo $
//
/// \file B5EmCalorimeterSD.hh
/// \brief Definition of the B5EmCalorimeterSD class
@@ -42,16 +42,15 @@ class G4TouchableHistory;
/// EM calorimeter sensitive detector
class B5EmCalorimeterSD : public G4VSensitiveDetector
{
public:
{
public:
B5EmCalorimeterSD(G4String name);
virtual ~B5EmCalorimeterSD();
virtual void Initialize(G4HCofThisEvent*HCE);
virtual G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist);
private:
private:
B5EmCalorimeterHitsCollection* fHitsCollection;
G4int fHCID;
};
+7 -7
View File
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B5EventAction.hh 94486 2015-11-19 08:33:37Z gcosmo $
// $Id: B5EventAction.hh 101036 2016-11-04 09:00:23Z gcosmo $
//
/// \file B5EventAction.hh
/// \brief Definition of the B5EventAction class
@@ -52,12 +52,12 @@ public:
std::vector<G4double>& GetHadCalEdep() { return fEmCalEdep; }
private:
G4int fHHC1ID;
G4int fHHC2ID;
G4int fDHC1ID;
G4int fDHC2ID;
G4int fECHCID;
G4int fHCHCID;
G4int fHodHC1ID;
G4int fHodHC2ID;
G4int fDriftHC1ID;
G4int fDriftHC2ID;
G4int fEmCalHCID;
G4int fHadCalHCID;
std::vector<G4double> fEmCalEdep;
std::vector<G4double> fHadCalEdep;
};
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B5HadCalorimeterHit.hh 76474 2013-11-11 10:36:34Z gcosmo $
// $Id: B5HadCalorimeterHit.hh 101036 2016-11-04 09:00:23Z gcosmo $
//
/// \file B5HadCalorimeterHit.hh
/// \brief Definition of the B5HadCalorimeterHit class
@@ -51,7 +51,7 @@ class G4AttValue;
class B5HadCalorimeterHit : public G4VHit
{
public:
public:
B5HadCalorimeterHit();
B5HadCalorimeterHit(G4int iCol,G4int iRow);
B5HadCalorimeterHit(const B5HadCalorimeterHit &right);
@@ -84,7 +84,7 @@ public:
void SetRot(G4RotationMatrix rmat) { fRot = rmat; }
G4RotationMatrix GetRot() const { return fRot; }
private:
private:
G4int fColumnID;
G4int fRowID;
G4double fEdep;
@@ -92,20 +92,21 @@ private:
G4RotationMatrix fRot;
};
typedef G4THitsCollection<B5HadCalorimeterHit> B5HadCalorimeterHitsCollection;
using B5HadCalorimeterHitsCollection = G4THitsCollection<B5HadCalorimeterHit>;
extern G4ThreadLocal G4Allocator<B5HadCalorimeterHit>* B5HadCalorimeterHitAllocator;
inline void* B5HadCalorimeterHit::operator new(size_t)
{
if (!B5HadCalorimeterHitAllocator)
B5HadCalorimeterHitAllocator = new G4Allocator<B5HadCalorimeterHit>;
return (void*)B5HadCalorimeterHitAllocator->MallocSingle();
if (!B5HadCalorimeterHitAllocator) {
B5HadCalorimeterHitAllocator = new G4Allocator<B5HadCalorimeterHit>;
}
return (void*)B5HadCalorimeterHitAllocator->MallocSingle();
}
inline void B5HadCalorimeterHit::operator delete(void* aHit)
{
B5HadCalorimeterHitAllocator->FreeSingle((B5HadCalorimeterHit*) aHit);
B5HadCalorimeterHitAllocator->FreeSingle((B5HadCalorimeterHit*) aHit);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B5HadCalorimeterSD.hh 76474 2013-11-11 10:36:34Z gcosmo $
// $Id: B5HadCalorimeterSD.hh 101036 2016-11-04 09:00:23Z gcosmo $
//
/// \file B5HadCalorimeterSD.hh
/// \brief Definition of the B5HadCalorimeterSD class
@@ -43,14 +43,14 @@ class G4TouchableHistory;
class B5HadCalorimeterSD : public G4VSensitiveDetector
{
public:
public:
B5HadCalorimeterSD(G4String name);
virtual ~B5HadCalorimeterSD();
virtual void Initialize(G4HCofThisEvent*HCE);
virtual G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist);
private:
private:
B5HadCalorimeterHitsCollection* fHitsCollection;
G4int fHCID;
};
+9 -8
View File
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B5HodoscopeHit.hh 76474 2013-11-11 10:36:34Z gcosmo $
// $Id: B5HodoscopeHit.hh 101036 2016-11-04 09:00:23Z gcosmo $
//
/// \file B5HodoscopeHit.hh
/// \brief Definition of the B5HodoscopeHit class
@@ -51,7 +51,7 @@ class G4AttValue;
class B5HodoscopeHit : public G4VHit
{
public:
public:
B5HodoscopeHit(G4int i,G4double t);
B5HodoscopeHit(const B5HodoscopeHit &right);
virtual ~B5HodoscopeHit();
@@ -81,7 +81,7 @@ public:
void SetLogV(G4LogicalVolume* val) { fPLogV = val; }
const G4LogicalVolume* GetLogV() const { return fPLogV; }
private:
private:
G4int fId;
G4double fTime;
G4ThreeVector fPos;
@@ -89,20 +89,21 @@ private:
const G4LogicalVolume* fPLogV;
};
typedef G4THitsCollection<B5HodoscopeHit> B5HodoscopeHitsCollection;
using B5HodoscopeHitsCollection = G4THitsCollection<B5HodoscopeHit>;
extern G4ThreadLocal G4Allocator<B5HodoscopeHit>* B5HodoscopeHitAllocator;
inline void* B5HodoscopeHit::operator new(size_t)
{
if (!B5HodoscopeHitAllocator)
B5HodoscopeHitAllocator = new G4Allocator<B5HodoscopeHit>;
return (void*)B5HodoscopeHitAllocator->MallocSingle();
if (!B5HodoscopeHitAllocator) {
B5HodoscopeHitAllocator = new G4Allocator<B5HodoscopeHit>;
}
return (void*)B5HodoscopeHitAllocator->MallocSingle();
}
inline void B5HodoscopeHit::operator delete(void*aHit)
{
B5HodoscopeHitAllocator->FreeSingle((B5HodoscopeHit*) aHit);
B5HodoscopeHitAllocator->FreeSingle((B5HodoscopeHit*) aHit);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+3 -3
View File
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B5HodoscopeSD.hh 76474 2013-11-11 10:36:34Z gcosmo $
// $Id: B5HodoscopeSD.hh 101036 2016-11-04 09:00:23Z gcosmo $
//
/// \file B5HodoscopeSD.hh
/// \brief Definition of the B5HodoscopeSD class
@@ -42,14 +42,14 @@ class G4TouchableHistory;
class B5HodoscopeSD : public G4VSensitiveDetector
{
public:
public:
B5HodoscopeSD(G4String name);
virtual ~B5HodoscopeSD();
virtual void Initialize(G4HCofThisEvent*HCE);
virtual G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist);
private:
private:
B5HodoscopeHitsCollection* fHitsCollection;
G4int fHCID;
};
+3 -3
View File
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B5MagneticField.hh 76474 2013-11-11 10:36:34Z gcosmo $
// $Id: B5MagneticField.hh 101036 2016-11-04 09:00:23Z gcosmo $
//
/// \file B5MagneticField.hh
/// \brief Definition of the B5MagneticField class
@@ -40,7 +40,7 @@ class G4GenericMessenger;
class B5MagneticField : public G4MagneticField
{
public:
public:
B5MagneticField();
virtual ~B5MagneticField();
@@ -49,7 +49,7 @@ public:
void SetField(G4double val) { fBy = val; }
G4double GetField() const { return fBy; }
private:
private:
void DefineCommands();
G4GenericMessenger* fMessenger;
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B5PrimaryGeneratorAction.hh 76474 2013-11-11 10:36:34Z gcosmo $
// $Id: B5PrimaryGeneratorAction.hh 101036 2016-11-04 09:00:23Z gcosmo $
//
/// \file B5PrimaryGeneratorAction.hh
/// \brief Definition of the B5PrimaryGeneratorAction class
@@ -50,7 +50,7 @@ class G4ParticleDefinition;
class B5PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
public:
B5PrimaryGeneratorAction();
virtual ~B5PrimaryGeneratorAction();
@@ -68,7 +68,7 @@ public:
void SetRandomize(G4bool val) { fRandomizePrimary = val; }
G4bool GetRandomize() const { return fRandomizePrimary; }
private:
private:
void DefineCommands();
G4ParticleGun* fParticleGun;