Import Geant4 11.3.0.beta source tree
This commit is contained in:
@@ -31,21 +31,20 @@
|
||||
#ifndef RE04ActionInitialization_H
|
||||
#define RE04ActionInitialization_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VUserActionInitialization.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class RE04ActionInitialization : public G4VUserActionInitialization
|
||||
{
|
||||
public:
|
||||
RE04ActionInitialization();//G4bool bParallelWorld);
|
||||
RE04ActionInitialization(); // G4bool bParallelWorld);
|
||||
virtual ~RE04ActionInitialization();
|
||||
|
||||
virtual void Build() const;
|
||||
virtual void BuildForMaster() const;
|
||||
|
||||
private:
|
||||
//G4bool m_bParallelWorld;
|
||||
private:
|
||||
// G4bool m_bParallelWorld;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ class RE04DetectorConstruction : public G4VUserDetectorConstruction
|
||||
|
||||
public:
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
|
||||
|
||||
private:
|
||||
void DefineMaterials();
|
||||
void SetupGeometry();
|
||||
@@ -65,8 +65,6 @@ class RE04DetectorConstruction : public G4VUserDetectorConstruction
|
||||
G4Material* fPb;
|
||||
G4VPhysicalVolume* fWorldPhys;
|
||||
G4bool fConstructed;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -46,17 +46,15 @@ class G4PrimaryParticle;
|
||||
//
|
||||
class RE04EventAction : public G4UserEventAction
|
||||
{
|
||||
public:
|
||||
RE04EventAction();
|
||||
~RE04EventAction();
|
||||
public:
|
||||
RE04EventAction();
|
||||
~RE04EventAction();
|
||||
|
||||
public:
|
||||
virtual void BeginOfEventAction(const G4Event*);
|
||||
virtual void EndOfEventAction(const G4Event*);
|
||||
public:
|
||||
virtual void BeginOfEventAction(const G4Event*);
|
||||
virtual void EndOfEventAction(const G4Event*);
|
||||
|
||||
// private:
|
||||
// private:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -56,4 +56,3 @@ class RE04ParallelWorldConstruction : public G4VUserParallelWorld
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
#ifndef RE04ParallelWorldParam_h
|
||||
#define RE04ParallelWorldParam_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VPVParameterisation.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4VPhysicalVolume;
|
||||
class G4Material;
|
||||
@@ -52,7 +52,7 @@ class G4Polycone;
|
||||
class G4Polyhedra;
|
||||
|
||||
//
|
||||
/// Parameterisation class for volumes in a parallel world
|
||||
/// Parameterisation class for volumes in a parallel world
|
||||
///
|
||||
/// - void ComputeTransformation(const G4int copyNo,
|
||||
/// G4VPhysicalVolume *physVol) const
|
||||
@@ -70,48 +70,30 @@ class G4Polyhedra;
|
||||
class RE04ParallelWorldParam : public G4VPVParameterisation
|
||||
{
|
||||
public:
|
||||
|
||||
RE04ParallelWorldParam();
|
||||
~RE04ParallelWorldParam();
|
||||
~RE04ParallelWorldParam();
|
||||
|
||||
public:
|
||||
|
||||
void ComputeTransformation(const G4int copyNo,
|
||||
G4VPhysicalVolume *physVol) const;
|
||||
G4Material* ComputeMaterial(const G4int copyNo,
|
||||
G4VPhysicalVolume* currentVol,
|
||||
const G4VTouchable* parentTouch=0);
|
||||
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume* physVol) const;
|
||||
G4Material* ComputeMaterial(const G4int copyNo, G4VPhysicalVolume* currentVol,
|
||||
const G4VTouchable* parentTouch = 0);
|
||||
|
||||
public:
|
||||
virtual void ComputeDimensions (G4Box&,const G4int,const G4VPhysicalVolume*)
|
||||
const {}
|
||||
virtual void ComputeDimensions(G4Box&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
|
||||
private: // Dummy declarations to get rid of warnings ...
|
||||
|
||||
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 (G4Orb&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Sphere&,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 (G4Tubs&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Polycone&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Polyhedra&,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(G4Orb&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions(G4Sphere&, 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(G4Tubs&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions(G4Polycone&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions(G4Polyhedra&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
|
||||
private:
|
||||
G4Material* fWater;
|
||||
@@ -119,4 +101,3 @@ class RE04ParallelWorldParam : public G4VPVParameterisation
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -40,14 +40,14 @@ class G4Event;
|
||||
/// User primary particle generator class
|
||||
///
|
||||
/// - void GeneratePrimaries(G4Event*)
|
||||
/// an incident particle is mu- with 10 GeV energy at the position
|
||||
/// an incident particle is mu- with 10 GeV energy at the position
|
||||
/// (-75 cm,y,0) toward the (1,0,0) direction. The y position is uniformly
|
||||
/// varied from 95.5 cm to 96.5 cm.
|
||||
//
|
||||
class RE04PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
RE04PrimaryGeneratorAction();
|
||||
RE04PrimaryGeneratorAction();
|
||||
virtual ~RE04PrimaryGeneratorAction();
|
||||
|
||||
public:
|
||||
@@ -55,9 +55,6 @@ class RE04PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
|
||||
private:
|
||||
G4ParticleGun* fParticleGun;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -48,4 +48,3 @@ class RE04SteppingAction : public G4UserSteppingAction
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -41,15 +41,14 @@
|
||||
/// - void PostUserTrackingAction(const G4Track*)
|
||||
/// does nothing
|
||||
//
|
||||
class RE04TrackingAction : public G4UserTrackingAction {
|
||||
|
||||
class RE04TrackingAction : public G4UserTrackingAction
|
||||
{
|
||||
public:
|
||||
RE04TrackingAction() : G4UserTrackingAction() {};
|
||||
virtual ~RE04TrackingAction(){};
|
||||
|
||||
virtual ~RE04TrackingAction() {};
|
||||
|
||||
virtual void PreUserTrackingAction(const G4Track*);
|
||||
virtual void PostUserTrackingAction(const G4Track*);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,20 +30,22 @@
|
||||
#ifndef RE04Trajectory_h
|
||||
#define RE04Trajectory_h 1
|
||||
|
||||
#include "G4VTrajectory.hh"
|
||||
#include "RE04TrajectoryPoint.hh" // Include from 'tracking'
|
||||
|
||||
#include "G4Allocator.hh"
|
||||
#include <stdlib.h> // Include from 'system'
|
||||
#include "G4ios.hh" // Include from 'system'
|
||||
#include <vector> // G4RWTValOrderedVector
|
||||
#include "globals.hh" // Include from 'global'
|
||||
#include "G4ParticleDefinition.hh" // Include from 'particle+matter'
|
||||
#include "RE04TrajectoryPoint.hh" // Include from 'tracking'
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4VTrajectory.hh"
|
||||
#include "G4ios.hh" // Include from 'system'
|
||||
#include "globals.hh" // Include from 'global'
|
||||
|
||||
class G4Polyline; // Forward declaration.
|
||||
#include <stdlib.h> // Include from 'system'
|
||||
#include <vector> // G4RWTValOrderedVector
|
||||
|
||||
typedef std::vector<G4VTrajectoryPoint*> TrajectoryPointContainer;
|
||||
class G4Polyline; // Forward declaration.
|
||||
|
||||
typedef std::vector<G4VTrajectoryPoint*> TrajectoryPointContainer;
|
||||
|
||||
//
|
||||
/// User trajectory class
|
||||
@@ -68,7 +70,7 @@ typedef std::vector<G4VTrajectoryPoint*> TrajectoryPointContainer;
|
||||
/// - int GetPointEntries() const
|
||||
/// returns the number of point entries
|
||||
///
|
||||
/// - G4VTrajectoryPoint* GetPoint(G4int i) const
|
||||
/// - G4VTrajectoryPoint* GetPoint(G4int i) const
|
||||
/// gets the i-th trajectory point
|
||||
///
|
||||
/// - void MergeTrajectory(G4VTrajectory* secondTrajectory)
|
||||
@@ -80,7 +82,7 @@ typedef std::vector<G4VTrajectoryPoint*> TrajectoryPointContainer;
|
||||
/// - const std::map<G4String,G4AttDef>* GetAttDefs() const
|
||||
/// defines the track ID, the parent ID, the particle name, the charge,
|
||||
/// the PDG encoding, the initial kinetic energy, the initial momentum,
|
||||
/// the initial momentum magnitude and the number of points as attiributes
|
||||
/// the initial momentum magnitude and the number of points as attiributes
|
||||
///
|
||||
/// - std::vector<G4AttValue>* CreateAttValues() const
|
||||
/// sets and returns the attributes
|
||||
@@ -89,76 +91,65 @@ typedef std::vector<G4VTrajectoryPoint*> TrajectoryPointContainer;
|
||||
class RE04Trajectory : public G4VTrajectory
|
||||
///////////////////
|
||||
{
|
||||
//--------
|
||||
public:
|
||||
//--------
|
||||
|
||||
//--------
|
||||
public:
|
||||
//--------
|
||||
// Constructor/Destrcutor
|
||||
|
||||
// Constructor/Destrcutor
|
||||
RE04Trajectory();
|
||||
|
||||
RE04Trajectory();
|
||||
RE04Trajectory(const G4Track* aTrack);
|
||||
RE04Trajectory(RE04Trajectory&);
|
||||
virtual ~RE04Trajectory();
|
||||
|
||||
RE04Trajectory(const G4Track* aTrack);
|
||||
RE04Trajectory(RE04Trajectory &);
|
||||
virtual ~RE04Trajectory();
|
||||
// Operators
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void*);
|
||||
inline int operator==(const RE04Trajectory& right) const { return (this == &right); }
|
||||
|
||||
// Operators
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void*);
|
||||
inline int operator == (const RE04Trajectory& right) const
|
||||
{return (this==&right);}
|
||||
// Get/Set functions
|
||||
inline virtual G4int GetTrackID() const { return fTrackID; }
|
||||
inline virtual G4int GetParentID() const { return fParentID; }
|
||||
inline virtual G4String GetParticleName() const { return fParticleName; }
|
||||
inline virtual G4double GetCharge() const { return fPDGCharge; }
|
||||
inline virtual G4int GetPDGEncoding() const { return fPDGEncoding; }
|
||||
inline virtual G4double GetInitialKineticEnergy() const { return fInitialKineticEnergy; }
|
||||
inline virtual G4ThreeVector GetInitialMomentum() const { return fInitialMomentum; }
|
||||
|
||||
// Get/Set functions
|
||||
inline virtual G4int GetTrackID() const
|
||||
{ return fTrackID; }
|
||||
inline virtual G4int GetParentID() const
|
||||
{ return fParentID; }
|
||||
inline virtual G4String GetParticleName() const
|
||||
{ return fParticleName; }
|
||||
inline virtual G4double GetCharge() const
|
||||
{ return fPDGCharge; }
|
||||
inline virtual G4int GetPDGEncoding() const
|
||||
{ return fPDGEncoding; }
|
||||
inline virtual G4double GetInitialKineticEnergy() const
|
||||
{ return fInitialKineticEnergy; }
|
||||
inline virtual G4ThreeVector GetInitialMomentum() const
|
||||
{ return fInitialMomentum; }
|
||||
// Other member functions
|
||||
virtual void ShowTrajectory(std::ostream& os = G4cout) const;
|
||||
// virtual void DrawTrajectory() const;
|
||||
virtual void DrawTrajectory() const;
|
||||
virtual void AppendStep(const G4Step* aStep);
|
||||
virtual int GetPointEntries() const { return fPositionRecord->size(); }
|
||||
virtual G4VTrajectoryPoint* GetPoint(G4int i) const { return (*fPositionRecord)[i]; }
|
||||
virtual void MergeTrajectory(G4VTrajectory* secondTrajectory);
|
||||
|
||||
// Other member functions
|
||||
virtual void ShowTrajectory(std::ostream& os=G4cout) const;
|
||||
//virtual void DrawTrajectory() const;
|
||||
virtual void DrawTrajectory() const;
|
||||
virtual void AppendStep(const G4Step* aStep);
|
||||
virtual int GetPointEntries() const { return fPositionRecord->size(); }
|
||||
virtual G4VTrajectoryPoint* GetPoint(G4int i) const
|
||||
{ return (*fPositionRecord)[i]; }
|
||||
virtual void MergeTrajectory(G4VTrajectory* secondTrajectory);
|
||||
G4ParticleDefinition* GetParticleDefinition();
|
||||
|
||||
G4ParticleDefinition* GetParticleDefinition();
|
||||
virtual const std::map<G4String, G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
|
||||
virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
|
||||
//---------
|
||||
private:
|
||||
//---------
|
||||
|
||||
TrajectoryPointContainer* fPositionRecord;
|
||||
G4int fTrackID;
|
||||
G4int fParentID;
|
||||
G4int fPDGEncoding;
|
||||
G4double fPDGCharge;
|
||||
G4String fParticleName;
|
||||
G4double fInitialKineticEnergy;
|
||||
G4ThreeVector fInitialMomentum;
|
||||
//---------
|
||||
private:
|
||||
//---------
|
||||
|
||||
TrajectoryPointContainer* fPositionRecord;
|
||||
G4int fTrackID;
|
||||
G4int fParentID;
|
||||
G4int fPDGEncoding;
|
||||
G4double fPDGCharge;
|
||||
G4String fParticleName;
|
||||
G4double fInitialKineticEnergy;
|
||||
G4ThreeVector fInitialMomentum;
|
||||
};
|
||||
|
||||
extern G4ThreadLocal G4Allocator<RE04Trajectory> * faTrajAllocator;
|
||||
extern G4ThreadLocal G4Allocator<RE04Trajectory>* faTrajAllocator;
|
||||
|
||||
inline void* RE04Trajectory::operator new(size_t)
|
||||
{
|
||||
if(!faTrajAllocator) faTrajAllocator = new G4Allocator<RE04Trajectory>;
|
||||
if (!faTrajAllocator) faTrajAllocator = new G4Allocator<RE04Trajectory>;
|
||||
return (void*)faTrajAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
@@ -168,4 +159,3 @@ inline void RE04Trajectory::operator delete(void* aTrajectory)
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
#ifndef RE04TrajectoryPoint_h
|
||||
#define RE04TrajectoryPoint_h 1
|
||||
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4VTrajectoryPoint.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4Allocator.hh"
|
||||
class G4Material;
|
||||
|
||||
//
|
||||
@@ -48,65 +48,58 @@ class G4Material;
|
||||
/// gets material that this trajectory has.
|
||||
///
|
||||
/// - const std::map<G4String,G4AttDef>* GetAttDefs() const
|
||||
/// defines the position and the material as attiributes
|
||||
/// defines the position and the material as attiributes
|
||||
///
|
||||
/// - std::vector<G4AttValue>* CreateAttValues() const
|
||||
/// sets and returns the attributes
|
||||
//
|
||||
////////////////////////
|
||||
class RE04TrajectoryPoint : public G4VTrajectoryPoint
|
||||
////////////////////////
|
||||
////////////////////////
|
||||
{
|
||||
//--------
|
||||
public:
|
||||
//--------
|
||||
|
||||
//--------
|
||||
public:
|
||||
//--------
|
||||
// Constructor/Destructor
|
||||
RE04TrajectoryPoint();
|
||||
RE04TrajectoryPoint(G4ThreeVector pos, const G4Material* mat);
|
||||
RE04TrajectoryPoint(const RE04TrajectoryPoint& right);
|
||||
virtual ~RE04TrajectoryPoint();
|
||||
|
||||
// Constructor/Destructor
|
||||
RE04TrajectoryPoint();
|
||||
RE04TrajectoryPoint(G4ThreeVector pos,const G4Material* mat);
|
||||
RE04TrajectoryPoint(const RE04TrajectoryPoint &right);
|
||||
virtual ~RE04TrajectoryPoint();
|
||||
// Operators
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void* aTrajectoryPoint);
|
||||
inline G4bool operator==(const RE04TrajectoryPoint& right) const { return (this == &right); };
|
||||
|
||||
// Operators
|
||||
inline void *operator new(size_t);
|
||||
inline void operator delete(void *aTrajectoryPoint);
|
||||
inline G4bool operator==(const RE04TrajectoryPoint& right) const
|
||||
{ return (this==&right); };
|
||||
// Get/Set functions
|
||||
inline virtual const G4ThreeVector GetPosition() const { return fPosition; };
|
||||
inline const G4Material* GetMaterial() const { return fpMaterial; };
|
||||
|
||||
// Get/Set functions
|
||||
inline virtual const G4ThreeVector GetPosition() const
|
||||
{ return fPosition; };
|
||||
inline const G4Material* GetMaterial() const
|
||||
{ return fpMaterial; };
|
||||
// Get method for HEPRep style attributes
|
||||
virtual const std::map<G4String, G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
|
||||
// Get method for HEPRep style attributes
|
||||
virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
|
||||
//---------
|
||||
private:
|
||||
//---------
|
||||
|
||||
// Member data
|
||||
G4ThreeVector fPosition;
|
||||
const G4Material* fpMaterial;
|
||||
//---------
|
||||
private:
|
||||
//---------
|
||||
|
||||
// Member data
|
||||
G4ThreeVector fPosition;
|
||||
const G4Material* fpMaterial;
|
||||
};
|
||||
|
||||
extern G4ThreadLocal G4Allocator<RE04TrajectoryPoint> * faTrajPointAllocator;
|
||||
extern G4ThreadLocal G4Allocator<RE04TrajectoryPoint>* faTrajPointAllocator;
|
||||
|
||||
inline void* RE04TrajectoryPoint::operator new(size_t)
|
||||
{
|
||||
if(!faTrajPointAllocator)
|
||||
faTrajPointAllocator = new G4Allocator<RE04TrajectoryPoint>;
|
||||
return (void *) faTrajPointAllocator->MallocSingle();
|
||||
if (!faTrajPointAllocator) faTrajPointAllocator = new G4Allocator<RE04TrajectoryPoint>;
|
||||
return (void*)faTrajPointAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
inline void RE04TrajectoryPoint::operator delete(void *aTrajectoryPoint)
|
||||
inline void RE04TrajectoryPoint::operator delete(void* aTrajectoryPoint)
|
||||
{
|
||||
faTrajPointAllocator->FreeSingle((RE04TrajectoryPoint *) aTrajectoryPoint);
|
||||
faTrajPointAllocator->FreeSingle((RE04TrajectoryPoint*)aTrajectoryPoint);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user