Import Geant4 10.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-10 11:51:14 +02:00
parent e2d2f9810a
commit 286caacf06
12421 changed files with 730077 additions and 502383 deletions
@@ -23,39 +23,31 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: B2ActionInitialization.hh 68058 2013-03-13 14:47:43Z gcosmo $
//
/// \file B2MagneticField.hh
/// \brief Definition of the B2MagneticField class
/// \file B2ActionInitialization.hh
/// \brief Definition of the B2ActionInitialization class
#ifndef B2MagneticField_h
#define B2MagneticField_h 1
#ifndef B2ActionInitialization_h
#define B2ActionInitialization_h 1
#include "G4UniformMagField.hh"
#include "G4VUserActionInitialization.hh"
class G4FieldManager;
class B4DetectorConstruction;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
/// Action initialization class.
///
/// A class for control of the Magnetic Field of the detector.
/// The field is assumed to be uniform.
class B2MagneticField : public G4UniformMagField
class B2ActionInitialization : public G4VUserActionInitialization
{
public:
B2MagneticField(); // A zero field
B2MagneticField(G4ThreeVector); // The value of the field
virtual ~B2MagneticField();
//Set the field (fieldValue,0,0)
void SetMagFieldValue(G4double fieldValue);
void SetMagFieldValue(G4ThreeVector fieldVector);
protected:
// Find the global Field Manager
G4FieldManager* GetGlobalFieldManager(); // static
B2ActionInitialization();
virtual ~B2ActionInitialization();
virtual void BuildForMaster() const;
virtual void Build() const;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
+1 -12
View File
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: B2EventAction.hh 75214 2013-10-29 16:04:42Z gcosmo $
//
/// \file B2EventAction.hh
/// \brief Definition of the B2EventAction class
@@ -45,19 +45,8 @@ class B2EventAction : public G4UserEventAction
virtual void BeginOfEventAction(const G4Event* );
virtual void EndOfEventAction(const G4Event* );
// Set methods
void SetPrintModulo(G4int value);
private:
G4int fPrintModulo;
};
// inline functions
inline void B2EventAction::SetPrintModulo(G4int value) {
fPrintModulo = value;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: B2PrimaryGeneratorAction.hh 68058 2013-03-13 14:47:43Z gcosmo $
//
/// \file B2PrimaryGeneratorAction.hh
/// \brief Definition of the B2PrimaryGeneratorAction class
+1 -1
View File
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: B2RunAction.hh 68058 2013-03-13 14:47:43Z gcosmo $
//
/// \file B2RunAction.hh
/// \brief Definition of the B2RunAction class
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: B2TrackerHit.hh 69706 2013-05-13 09:12:40Z gcosmo $
//
/// \file B2TrackerHit.hh
/// \brief Definition of the B2TrackerHit class
@@ -35,6 +35,7 @@
#include "G4THitsCollection.hh"
#include "G4Allocator.hh"
#include "G4ThreeVector.hh"
#include "tls.hh"
/// Tracker hit class
///
@@ -84,22 +85,22 @@ class B2TrackerHit : public G4VHit
typedef G4THitsCollection<B2TrackerHit> B2TrackerHitsCollection;
extern G4Allocator<B2TrackerHit> B2TrackerHitAllocator;
extern G4ThreadLocal G4Allocator<B2TrackerHit>* B2TrackerHitAllocator;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline void* B2TrackerHit::operator new(size_t)
{
void *hit;
hit = (void *) B2TrackerHitAllocator.MallocSingle();
return hit;
if(!B2TrackerHitAllocator)
B2TrackerHitAllocator = new G4Allocator<B2TrackerHit>;
return (void *) B2TrackerHitAllocator->MallocSingle();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline void B2TrackerHit::operator delete(void *hit)
{
B2TrackerHitAllocator.FreeSingle((B2TrackerHit*) hit);
B2TrackerHitAllocator->FreeSingle((B2TrackerHit*) hit);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+4 -5
View File
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: B2TrackerSD.hh 69706 2013-05-13 09:12:40Z gcosmo $
//
/// \file B2TrackerSD.hh
/// \brief Definition of the B2TrackerSD class
@@ -44,10 +44,9 @@ class G4HCofThisEvent;
/// B2Tracker sensitive detector class
///
/// In Initialize(), it creates one hit for each tracker volume
///
/// The values are accounted in hits in ProcessHits() function which is called
/// by Geant4 kernel at each step.
/// The hits are accounted in hits in ProcessHits() function which is called
/// by Geant4 kernel at each step. A hit is created with each step with non zero
/// energy deposit.
class B2TrackerSD : public G4VSensitiveDetector
{
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: B2aDetectorConstruction.hh 73722 2013-09-09 10:23:05Z gcosmo $
//
/// \file B2aDetectorConstruction.hh
/// \brief Definition of the B2aDetectorConstruction class
@@ -33,20 +33,18 @@
#include "globals.hh"
#include "G4VUserDetectorConstruction.hh"
#include "tls.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4Material;
class G4UserLimits;
class G4GlobalMagFieldMessenger;
class B2aDetectorMessenger;
class B2MagneticField;
/// Detector construction class to define materials and geometry.
///
/// In addition a transverse uniform magnetic field is defined in
/// SetMagField() method which can be activated via a command
/// defined in the B2aDetectorMessenger class.
/// Detector construction class to define materials, geometry
/// and global uniform magnetic field.
class B2aDetectorConstruction : public G4VUserDetectorConstruction
{
@@ -56,9 +54,9 @@ class B2aDetectorConstruction : public G4VUserDetectorConstruction
public:
virtual G4VPhysicalVolume* Construct();
virtual void ConstructSDandField();
// Set methods
void SetMagField(G4double );
void SetTargetMaterial (G4String );
void SetChamberMaterial(G4String );
void SetMaxStep (G4double );
@@ -81,7 +79,9 @@ class B2aDetectorConstruction : public G4VUserDetectorConstruction
G4UserLimits* fStepLimit; // pointer to user step limits
B2aDetectorMessenger* fMessenger; // messenger
B2MagneticField* fMagField; // magnetic field
static G4ThreadLocal G4GlobalMagFieldMessenger* fMagFieldMessenger;
// magnetic field messenger
G4bool fCheckOverlaps; // option to activate checking of volumes overlaps
};
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: B2aDetectorMessenger.hh 69706 2013-05-13 09:12:40Z gcosmo $
//
/// \file B2aDetectorMessenger.hh
/// \brief Definition of the B2aDetectorMessenger class
@@ -46,7 +46,6 @@ class G4UIcmdWithADoubleAndUnit;
/// It implements commands:
/// - /B2/det/setTargetMaterial name
/// - /B2/det/setChamberMaterial name
/// - /B2/det/setField value unit
/// - /B2/det/stepMax value unit
class B2aDetectorMessenger: public G4UImessenger
@@ -66,7 +65,6 @@ class B2aDetectorMessenger: public G4UImessenger
G4UIcmdWithAString* fTargMatCmd;
G4UIcmdWithAString* fChamMatCmd;
G4UIcmdWithADoubleAndUnit* fSetFieldCmd;
G4UIcmdWithADoubleAndUnit* fStepMaxCmd;
};