Import Geant4 10.0.0 source tree
This commit is contained in:
+17
-25
@@ -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
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B2EventAction.hh 66536 2012-12-19 14:32:36Z ihrivnac $
|
||||
//
|
||||
/// \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 66536 2012-12-19 14:32:36Z ihrivnac $
|
||||
//
|
||||
/// \file B2PrimaryGeneratorAction.hh
|
||||
/// \brief Definition of the B2PrimaryGeneratorAction class
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B2RunAction.hh 66536 2012-12-19 14:32:36Z ihrivnac $
|
||||
//
|
||||
/// \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 69505 2013-05-07 01:57:27Z asaim $
|
||||
//
|
||||
/// \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......
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B2TrackerSD.hh 66536 2012-12-19 14:32:36Z ihrivnac $
|
||||
//
|
||||
/// \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
|
||||
{
|
||||
|
||||
@@ -43,6 +43,7 @@ class G4Trap;
|
||||
class G4Cons;
|
||||
class G4Orb;
|
||||
class G4Sphere;
|
||||
class G4Ellipsoid;
|
||||
class G4Torus;
|
||||
class G4Para;
|
||||
class G4Hype;
|
||||
@@ -76,17 +77,30 @@ class B2bChamberParameterisation : public G4VPVParameterisation
|
||||
|
||||
private: // Dummy declarations to get rid of warnings ...
|
||||
|
||||
void ComputeDimensions (G4Box&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Trd&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Trap&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Cons&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Sphere&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Orb&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Torus&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Para&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Hype&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Polycone&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Polyhedra&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Box&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Trd&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Trap&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Cons&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Sphere&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Orb&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Ellipsoid&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Torus&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Para&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Hype&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Polycone&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Polyhedra&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -33,20 +33,18 @@
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include "tls.hh"
|
||||
|
||||
class G4VPhysicalVolume;
|
||||
class G4LogicalVolume;
|
||||
class G4Material;
|
||||
class G4UserLimits;
|
||||
class G4GlobalMagFieldMessenger;
|
||||
|
||||
class B2bDetectorMessenger;
|
||||
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 B2bDetectorMessenger class.
|
||||
/// Detector construction class to define materials, geometry
|
||||
/// and global uniform magnetic field.
|
||||
|
||||
class B2bDetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
@@ -56,9 +54,9 @@ class B2bDetectorConstruction : public G4VUserDetectorConstruction
|
||||
|
||||
public:
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
virtual void ConstructSDandField();
|
||||
|
||||
// Set methods
|
||||
void SetMagField(G4double );
|
||||
void SetTargetMaterial (G4String );
|
||||
void SetChamberMaterial(G4String );
|
||||
void SetMaxStep (G4double );
|
||||
@@ -76,10 +74,12 @@ class B2bDetectorConstruction : public G4VUserDetectorConstruction
|
||||
G4Material* fTargetMaterial; // pointer to the target material
|
||||
G4Material* fChamberMaterial; // pointer to the chamber material
|
||||
|
||||
G4UserLimits* fStepLimit; // pointer to user step limits
|
||||
G4UserLimits* fStepLimit; // pointer to user step limits
|
||||
|
||||
B2bDetectorMessenger* fMessenger; // messenger
|
||||
B2MagneticField* fMagField; // magnetic field
|
||||
B2bDetectorMessenger* fMessenger; // detector messenger
|
||||
|
||||
static G4ThreadLocal G4GlobalMagFieldMessenger* fMagFieldMessenger;
|
||||
// magnetic field messenger
|
||||
|
||||
G4bool fCheckOverlaps; // option to activate checking of volumes overlaps
|
||||
};
|
||||
|
||||
@@ -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 B2bDetectorMessenger: public G4UImessenger
|
||||
@@ -66,7 +65,6 @@ class B2bDetectorMessenger: public G4UImessenger
|
||||
G4UIcmdWithAString* fTargMatCmd;
|
||||
G4UIcmdWithAString* fChamMatCmd;
|
||||
|
||||
G4UIcmdWithADoubleAndUnit* fSetFieldCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fStepMaxCmd;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user