Import Geant4 11.0.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2021-06-25 16:12:29 +02:00
parent c968e26a39
commit 6399a014b6
4200 changed files with 207479 additions and 237366 deletions
@@ -38,32 +38,30 @@
//
// Created: 2007-08-20 Tsukasa ASO
// 2010-07-22 Introduce Unit specification.
//
//
///////////////////////////////////////////////////////////////////////////////
class G4PSCellCharge : public G4VPrimitiveScorer
{
public: // with description
G4PSCellCharge(G4String name, G4int depth=0);
G4PSCellCharge(G4String name, const G4String& unit, G4int depth=0);
virtual ~G4PSCellCharge();
public: // with description
G4PSCellCharge(G4String name, G4int depth = 0);
G4PSCellCharge(G4String name, const G4String& unit, G4int depth = 0);
virtual ~G4PSCellCharge();
protected: // with description
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
protected: // with description
virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
virtual void DrawAll();
virtual void PrintAll();
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
virtual void DrawAll();
virtual void PrintAll();
virtual void SetUnit(const G4String& unit);
virtual void SetUnit(const G4String& unit);
private:
G4int HCID;
G4THitsMap<G4double>* EvtMap;
private:
G4int HCID;
G4THitsMap<G4double>* EvtMap;
};
#endif
@@ -37,28 +37,24 @@
//
// Created: 2007-08-20 Tsukasa ASO
// 2010-07-22 Introduce Unit specification.
//
//
///////////////////////////////////////////////////////////////////////////////
class G4PSCellCharge3D : public G4PSCellCharge
{
public: // with description
G4PSCellCharge3D(G4String name,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
G4PSCellCharge3D(G4String name, const G4String& unit,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
public: // with description
G4PSCellCharge3D(G4String name, G4int ni = 1, G4int nj = 1, G4int nk = 1,
G4int depi = 2, G4int depj = 1, G4int depk = 0);
G4PSCellCharge3D(G4String name, const G4String& unit, G4int ni = 1,
G4int nj = 1, G4int nk = 1, G4int depi = 2, G4int depj = 1,
G4int depk = 0);
virtual ~G4PSCellCharge3D();
virtual ~G4PSCellCharge3D();
protected: // with description
virtual G4int GetIndex(G4Step*);
private:
G4int fDepthi, fDepthj, fDepthk;
protected: // with description
virtual G4int GetIndex(G4Step*);
private:
G4int fDepthi, fDepthj, fDepthk;
};
#endif
@@ -37,10 +37,10 @@ class G4VSolid;
///////////////////////////////////////////////////////////////////////////////
// (Description)
// This is a primitive scorer class for scoring cell flux.
// The Cell Flux is defined by a sum of track length divided
// by the geometry volume, where all of the tracks in the geometry
// The Cell Flux is defined by a sum of track length divided
// by the geometry volume, where all of the tracks in the geometry
// are taken into account. e.g. the unit of Cell Flux is mm/mm3.
//
//
//
// If you want to score only tracks passing through the geometry volume,
// please use G4PSPassageCellFlux.
@@ -51,42 +51,39 @@ class G4VSolid;
// 2010-07-22 Add weighted option
// 2020-10-06 Use G4VPrimitivePlotter and fill 1-D histo of kinetic energy (x)
// vs. cell flux * track weight (y) (Makoto Asai)
//
//
///////////////////////////////////////////////////////////////////////////////
class G4PSCellFlux : public G4VPrimitivePlotter
{
public: // with description
G4PSCellFlux(G4String name, G4int depth=0);
G4PSCellFlux(G4String name, const G4String& unit, G4int depth=0);
virtual ~G4PSCellFlux();
public: // with description
G4PSCellFlux(G4String name, G4int depth = 0);
G4PSCellFlux(G4String name, const G4String& unit, G4int depth = 0);
virtual ~G4PSCellFlux();
inline void Weighted(G4bool flg=true) { weighted = flg; }
// Multiply track weight
inline void Weighted(G4bool flg = true) { weighted = flg; }
// Multiply track weight
protected: // with description
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
protected: // with description
virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
virtual G4double ComputeVolume(G4Step*, G4int idx);
virtual G4double ComputeVolume(G4Step*, G4int idx);
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
virtual void DrawAll();
virtual void PrintAll();
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
virtual void DrawAll();
virtual void PrintAll();
virtual void SetUnit(const G4String& unit);
virtual void SetUnit(const G4String& unit);
protected:
virtual void DefineUnitAndCategory();
private:
G4int HCID;
G4THitsMap<G4double>* EvtMap;
G4bool weighted;
protected:
virtual void DefineUnitAndCategory();
private:
G4int HCID;
G4THitsMap<G4double>* EvtMap;
G4bool weighted;
};
#endif
@@ -44,26 +44,23 @@
//
// Created: 2007-08-14 Tsukasa ASO
// 2010-07-22 Introduce Unit specification.
//
//
///////////////////////////////////////////////////////////////////////////////
class G4PSCellFlux3D : public G4PSCellFlux
{
public: // with description
G4PSCellFlux3D(G4String name,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
G4PSCellFlux3D(G4String name,const G4String& unit,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
virtual ~G4PSCellFlux3D();
public: // with description
G4PSCellFlux3D(G4String name, G4int ni = 1, G4int nj = 1, G4int nk = 1,
G4int depi = 2, G4int depj = 1, G4int depk = 0);
G4PSCellFlux3D(G4String name, const G4String& unit, G4int ni = 1,
G4int nj = 1, G4int nk = 1, G4int depi = 2, G4int depj = 1,
G4int depk = 0);
virtual ~G4PSCellFlux3D();
protected: // with description
virtual G4int GetIndex(G4Step*);
protected: // with description
virtual G4int GetIndex(G4Step*);
private:
G4int fDepthi, fDepthj, fDepthk;
private:
G4int fDepthi, fDepthj, fDepthk;
};
#endif
@@ -44,32 +44,30 @@
//
// Created: 2007-08-14 Tsukasa ASO
// 2010-07-22 Introduce Unit specification.
// 2011-03-24 Give Size and Segmentation for relicated volume in cylinder.
//
// 2011-03-24 Give Size and Segmentation for relicated volume in cylinder.
//
///////////////////////////////////////////////////////////////////////////////
class G4PSCellFluxForCylinder3D : public G4PSCellFlux3D
{
public: // with description
G4PSCellFluxForCylinder3D(G4String name,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
G4PSCellFluxForCylinder3D(G4String name,const G4String& unit,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
virtual ~G4PSCellFluxForCylinder3D();
public: // with description
G4PSCellFluxForCylinder3D(G4String name, G4int ni = 1, G4int nj = 1,
G4int nk = 1, G4int depi = 2, G4int depj = 1,
G4int depk = 0);
G4PSCellFluxForCylinder3D(G4String name, const G4String& unit, G4int ni = 1,
G4int nj = 1, G4int nk = 1, G4int depi = 2,
G4int depj = 1, G4int depk = 0);
virtual ~G4PSCellFluxForCylinder3D();
void SetCylinderSize(G4double dr, G4double dz);
void SetNumberOfSegments(G4int nSeg[3]);
void SetCylinderSize(G4double dr, G4double dz);
void SetNumberOfSegments(G4int nSeg[3]);
protected: // with description
virtual G4double ComputeVolume(G4Step*, G4int idx);
protected: // with description
virtual G4double ComputeVolume(G4Step*, G4int idx);
private:
private:
// Order of segmentation (Z PHI R) in CylinderMesh
G4ThreeVector cylinderSize;
G4int nSegment[3];
G4ThreeVector cylinderSize;
G4int nSegment[3];
};
#endif
@@ -40,10 +40,10 @@
// This is a primitive scorer class for scoring Surface Current.
// Current version assumes only for G4Tubs shape, and the surface
// is defined at the inner plane of the tubs.
// The current is given in the unit of area.
// The current is given in the unit of area.
// e.g. (Number of tracks)/mm2.
//
// Surface is defined at the inner surface of the tube.
// Surface is defined at the inner surface of the tube.
// Direction R R+dR
// 0 IN || OUT ->|<- | fCurrent_InOut
// 1 IN ->| | fCurrent_In
@@ -54,49 +54,45 @@
// 2010-07-22 Introduce Unit specification.
// 2020-10-06 Use G4VPrimitivePlotter and fill 1-D histo of kinetic energy (x)
// vs. surface current * track weight (y) (Makoto Asai)
//
//
///////////////////////////////////////////////////////////////////////////////
class G4PSCylinderSurfaceCurrent : public G4VPrimitivePlotter
{
public: // with description
G4PSCylinderSurfaceCurrent(G4String name ,G4int direction,
G4int depth=0);
G4PSCylinderSurfaceCurrent(G4String name ,G4int direction,
const G4String& unit, G4int depth=0);
virtual ~G4PSCylinderSurfaceCurrent();
public: // with description
G4PSCylinderSurfaceCurrent(G4String name, G4int direction, G4int depth = 0);
G4PSCylinderSurfaceCurrent(G4String name, G4int direction,
const G4String& unit, G4int depth = 0);
virtual ~G4PSCylinderSurfaceCurrent();
inline void Weighted(G4bool flg=true) { weighted = flg; }
// Multiply track weight
inline void Weighted(G4bool flg = true) { weighted = flg; }
// Multiply track weight
inline void DivideByArea(G4bool flg=true) { divideByArea = flg; }
// Divided by Area.
inline void DivideByArea(G4bool flg = true) { divideByArea = flg; }
// Divided by Area.
protected: // with description
virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
G4int IsSelectedSurface(G4Step*, G4Tubs*);
protected: // with description
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
G4int IsSelectedSurface(G4Step*,G4Tubs*);
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
virtual void DrawAll();
virtual void PrintAll();
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
virtual void DrawAll();
virtual void PrintAll();
virtual void SetUnit(const G4String& unit);
virtual void SetUnit(const G4String& unit);
protected:
virtual void DefineUnitAndCategory();
protected:
virtual void DefineUnitAndCategory();
private:
G4int HCID;
G4int fDirection;
G4THitsMap<G4double>* EvtMap;
G4bool weighted;
G4bool divideByArea;
private:
G4int HCID;
G4int fDirection;
G4THitsMap<G4double>* EvtMap;
G4bool weighted;
G4bool divideByArea;
};
#endif
@@ -39,7 +39,7 @@
// e.g. (Number of tracks)/mm2.
//
// Surface is defined at the -Z surface.
// Direction Rmin Rmax
// Direction Rmin Rmax
// 0 IN || OUT ->|<- | fCurrent_InOut
// 1 IN ->| | fCurrent_In
// 2 OUT |<- | fCurrent_Out
@@ -49,24 +49,22 @@
// 2010-07-22 Introduce Unit specification.
///////////////////////////////////////////////////////////////////////////////
class G4PSCylinderSurfaceCurrent3D : public G4PSCylinderSurfaceCurrent
{
public: // with description
G4PSCylinderSurfaceCurrent3D(G4String name, G4int direction,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
G4PSCylinderSurfaceCurrent3D(G4String name, G4int direction,
const G4String& unit,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
virtual ~G4PSCylinderSurfaceCurrent3D();
public: // with description
G4PSCylinderSurfaceCurrent3D(G4String name, G4int direction, G4int ni = 1,
G4int nj = 1, G4int nk = 1, G4int depi = 2,
G4int depj = 1, G4int depk = 0);
G4PSCylinderSurfaceCurrent3D(G4String name, G4int direction,
const G4String& unit, G4int ni = 1, G4int nj = 1,
G4int nk = 1, G4int depi = 2, G4int depj = 1,
G4int depk = 0);
virtual ~G4PSCylinderSurfaceCurrent3D();
protected: // with description
virtual G4int GetIndex(G4Step*);
protected: // with description
virtual G4int GetIndex(G4Step*);
private:
G4int fDepthi, fDepthj, fDepthk;
private:
G4int fDepthi, fDepthj, fDepthk;
};
#endif
@@ -38,7 +38,7 @@
// This is a primitive scorer class for scoring Surface Flux.
// Current version assumes only for G4Tubs shape, and the surface
// is defined at the inner plane of the tube.
// The surface flux is given in the unit of area.
// The surface flux is given in the unit of area.
// e.g. sum of 1/cos(T)/mm2, where T is a incident angle of the
// track on the surface.
//
@@ -54,47 +54,45 @@
// 2010-07-22 Add weighted and divideByArea options
// 2020-10-06 Use G4VPrimitivePlotter and fill 1-D histo of kinetic energy (x)
// vs. surface flux * track weight (y) (Makoto Asai)
//
//
///////////////////////////////////////////////////////////////////////////////
class G4PSCylinderSurfaceFlux : public G4VPrimitivePlotter
{
public: // with description
G4PSCylinderSurfaceFlux(G4String name,G4int direction, G4int depth=0);
G4PSCylinderSurfaceFlux(G4String name,G4int direction,
const G4String& unit, G4int depth=0);
virtual ~G4PSCylinderSurfaceFlux();
public: // with description
G4PSCylinderSurfaceFlux(G4String name, G4int direction, G4int depth = 0);
G4PSCylinderSurfaceFlux(G4String name, G4int direction, const G4String& unit,
G4int depth = 0);
virtual ~G4PSCylinderSurfaceFlux();
inline void Weighted(G4bool flg=true) { weighted = flg; }
// Multiply track weight
inline void Weighted(G4bool flg = true) { weighted = flg; }
// Multiply track weight
inline void DivideByArea(G4bool flg=true) { divideByArea = flg; }
// Divided by Area.
inline void DivideByArea(G4bool flg = true) { divideByArea = flg; }
// Divided by Area.
protected: // with description
virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
G4int IsSelectedSurface(G4Step*, G4Tubs*);
protected: // with description
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
G4int IsSelectedSurface(G4Step*,G4Tubs*);
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
virtual void DrawAll();
virtual void PrintAll();
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
virtual void DrawAll();
virtual void PrintAll();
virtual void SetUnit(const G4String& unit);
virtual void SetUnit(const G4String& unit);
protected:
virtual void DefineUnitAndCategory();
protected:
virtual void DefineUnitAndCategory();
private:
G4int HCID;
G4int fDirection;
G4THitsMap<G4double>* EvtMap;
G4bool weighted;
G4bool divideByArea;
private:
G4int HCID;
G4int fDirection;
G4THitsMap<G4double>* EvtMap;
G4bool weighted;
G4bool divideByArea;
};
#endif
@@ -49,24 +49,22 @@
// 2010-07-22 Introduce Unit specification.
///////////////////////////////////////////////////////////////////////////////
class G4PSCylinderSurfaceFlux3D : public G4PSCylinderSurfaceFlux
{
public: // with description
G4PSCylinderSurfaceFlux3D(G4String name, G4int direction,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int di=2, G4int dj=1, G4int dk=0);
G4PSCylinderSurfaceFlux3D(G4String name, G4int direction,
const G4String& unit,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int di=2, G4int dj=1, G4int dk=0);
virtual ~G4PSCylinderSurfaceFlux3D();
public: // with description
G4PSCylinderSurfaceFlux3D(G4String name, G4int direction, G4int ni = 1,
G4int nj = 1, G4int nk = 1, G4int di = 2,
G4int dj = 1, G4int dk = 0);
G4PSCylinderSurfaceFlux3D(G4String name, G4int direction,
const G4String& unit, G4int ni = 1, G4int nj = 1,
G4int nk = 1, G4int di = 2, G4int dj = 1,
G4int dk = 0);
virtual ~G4PSCylinderSurfaceFlux3D();
protected: // with description
virtual G4int GetIndex(G4Step*);
protected: // with description
virtual G4int GetIndex(G4Step*);
private:
G4int fDepthi, fDepthj, fDepthk;
private:
G4int fDepthi, fDepthj, fDepthk;
};
#endif
@@ -43,26 +43,24 @@
//////////////////
enum G4PSFluxFlag
//////////////////
{
fFlux_InOut,
// For both direction In / Out.
fFlux_In,
// IN : Direction which comes into the geometry
fFlux_Out
{
fFlux_InOut,
// For both direction In / Out.
fFlux_In,
// IN : Direction which comes into the geometry
fFlux_Out
};
/////////////////////
enum G4PSCurrentFlag
/////////////////////
{
fCurrent_InOut,
// For both direction In / Out.
fCurrent_In,
// IN : Direction which comes into the geometry
fCurrent_Out
// OUT : Direction which goes out fromthe geometry
{
fCurrent_InOut,
// For both direction In / Out.
fCurrent_In,
// IN : Direction which comes into the geometry
fCurrent_Out
// OUT : Direction which goes out fromthe geometry
};
#endif
@@ -40,33 +40,32 @@
// 2010-07-22 Introduce Unit specification.
// 2020-10-06 Use G4VPrimitivePlotter and fill 1-D histo of dose deposit (x)
// vs. weight (y) (Makoto Asai)
//
//
///////////////////////////////////////////////////////////////////////////////
class G4PSDoseDeposit : public G4VPrimitivePlotter
{
public: // with description
G4PSDoseDeposit(G4String name, G4int depth=0);
G4PSDoseDeposit(G4String name, const G4String& unit, G4int depth=0);
virtual ~G4PSDoseDeposit();
public: // with description
G4PSDoseDeposit(G4String name, G4int depth = 0);
G4PSDoseDeposit(G4String name, const G4String& unit, G4int depth = 0);
virtual ~G4PSDoseDeposit();
protected: // with description
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
protected: // with description
virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
virtual G4double ComputeVolume(G4Step*, G4int idx);
virtual G4double ComputeVolume(G4Step*, G4int idx);
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
virtual void DrawAll();
virtual void PrintAll();
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
virtual void DrawAll();
virtual void PrintAll();
virtual void SetUnit(const G4String& unit);
private:
G4int HCID;
G4THitsMap<G4double>* EvtMap;
virtual void SetUnit(const G4String& unit);
private:
G4int HCID;
G4THitsMap<G4double>* EvtMap;
};
#endif
@@ -37,26 +37,24 @@
//
// Created: 2008-08-14 Tsukasa ASO
// 2010-07-22 Introduce Unit specification.
//
//
///////////////////////////////////////////////////////////////////////////////
class G4PSDoseDeposit3D : public G4PSDoseDeposit
{
public: // with description
G4PSDoseDeposit3D(G4String name,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
G4PSDoseDeposit3D(G4String name, const G4String& unit,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
public: // with description
G4PSDoseDeposit3D(G4String name, G4int ni = 1, G4int nj = 1, G4int nk = 1,
G4int depi = 2, G4int depj = 1, G4int depk = 0);
G4PSDoseDeposit3D(G4String name, const G4String& unit, G4int ni = 1,
G4int nj = 1, G4int nk = 1, G4int depi = 2, G4int depj = 1,
G4int depk = 0);
virtual ~G4PSDoseDeposit3D();
virtual ~G4PSDoseDeposit3D();
protected: // with description
virtual G4int GetIndex(G4Step*);
private:
G4int fDepthi, fDepthj, fDepthk;
protected: // with description
virtual G4int GetIndex(G4Step*);
private:
G4int fDepthi, fDepthj, fDepthk;
};
#endif
@@ -37,32 +37,31 @@
//
// Created: 2008-08-14 Tsukasa ASO
// 2010-07-22 Introduce Unit specification.
// 2011-03-24 Give Size and Segmentation for relicated volume in cylinder.
//
// 2011-03-24 Give Size and Segmentation for relicated volume in cylinder.
//
///////////////////////////////////////////////////////////////////////////////
class G4PSDoseDepositForCylinder3D : public G4PSDoseDeposit3D
{
public: // with description
G4PSDoseDepositForCylinder3D(G4String name,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
G4PSDoseDepositForCylinder3D(G4String name, const G4String& unit,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
public: // with description
G4PSDoseDepositForCylinder3D(G4String name, G4int ni = 1, G4int nj = 1,
G4int nk = 1, G4int depi = 2, G4int depj = 1,
G4int depk = 0);
G4PSDoseDepositForCylinder3D(G4String name, const G4String& unit,
G4int ni = 1, G4int nj = 1, G4int nk = 1,
G4int depi = 2, G4int depj = 1, G4int depk = 0);
virtual ~G4PSDoseDepositForCylinder3D();
virtual ~G4PSDoseDepositForCylinder3D();
void SetCylinderSize(G4double dr, G4double dz);
void SetNumberOfSegments(G4int nSeg[3]);
void SetCylinderSize(G4double dr, G4double dz);
void SetNumberOfSegments(G4int nSeg[3]);
protected: // with description
virtual G4double ComputeVolume(G4Step*, G4int idx);
protected: // with description
virtual G4double ComputeVolume(G4Step*, G4int idx);
private:
private:
// Order of segmentation (Z PHI R) in CylinderMesh
G4ThreeVector cylinderSize;
G4int nSegment[3];
G4ThreeVector cylinderSize;
G4int nSegment[3];
};
#endif
@@ -35,10 +35,10 @@
////////////////////////////////////////////////////////////////////////////////
// Description:
// This is a primitive scorer class for scoring energy deposit.
//
//
// Created: 2005-11-14 Tsukasa ASO, Akinori Kimura
// 2010-07-22 Introduce Unit specification.
//
//
// 2020-09-03 Use G4VPrimitivePlotter and fill 1-D histo of energy deposit (x)
// vs. track weight (y) (Makoto Asai)
//
@@ -46,26 +46,25 @@
class G4PSEnergyDeposit : public G4VPrimitivePlotter
{
public: // with description
G4PSEnergyDeposit(G4String name, G4int depth=0); // default unit
G4PSEnergyDeposit(G4String name, const G4String& unit, G4int depth=0);
virtual ~G4PSEnergyDeposit();
public: // with description
G4PSEnergyDeposit(G4String name, G4int depth = 0); // default unit
G4PSEnergyDeposit(G4String name, const G4String& unit, G4int depth = 0);
virtual ~G4PSEnergyDeposit();
protected: // with description
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
protected: // with description
virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
virtual void DrawAll();
virtual void PrintAll();
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
virtual void DrawAll();
virtual void PrintAll();
virtual void SetUnit(const G4String& unit);
virtual void SetUnit(const G4String& unit);
private:
G4int HCID;
G4THitsMap<G4double>* EvtMap;
private:
G4int HCID;
G4THitsMap<G4double>* EvtMap;
};
#endif
@@ -38,24 +38,21 @@
// 2010-07-22 Introduce Unit specification.
///////////////////////////////////////////////////////////////////////////////
class G4PSEnergyDeposit3D : public G4PSEnergyDeposit
{
public: // with description
G4PSEnergyDeposit3D(G4String name,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
G4PSEnergyDeposit3D(G4String name, const G4String& unit,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
public: // with description
G4PSEnergyDeposit3D(G4String name, G4int ni = 1, G4int nj = 1, G4int nk = 1,
G4int depi = 2, G4int depj = 1, G4int depk = 0);
G4PSEnergyDeposit3D(G4String name, const G4String& unit, G4int ni = 1,
G4int nj = 1, G4int nk = 1, G4int depi = 2,
G4int depj = 1, G4int depk = 0);
virtual ~G4PSEnergyDeposit3D();
virtual ~G4PSEnergyDeposit3D();
protected: // with description
virtual G4int GetIndex(G4Step*);
protected: // with description
virtual G4int GetIndex(G4Step*);
private:
G4int fDepthi, fDepthj, fDepthk;
private:
G4int fDepthi, fDepthj, fDepthk;
};
#endif
@@ -39,7 +39,7 @@
// This is a primitive scorer class for scoring Surface Current.
// Current version assumes only for G4Box shape, and the surface
// is defined at the -Z plane of the box.
// The current is given in the unit of area.
// The current is given in the unit of area.
// e.g. (Number of tracks)/mm2.
//
// Surface is defined at the -Z surface.
@@ -55,48 +55,45 @@
// 2010-07-22 Introduce Unit specification.
// 2020-10-06 Use G4VPrimitivePlotter and fill 1-D histo of kinetic energy (x)
// vs. Surface Current * track weight (y) (Makoto Asai)
//
//
///////////////////////////////////////////////////////////////////////////////
class G4PSFlatSurfaceCurrent : public G4VPrimitivePlotter
{
public: // with description
G4PSFlatSurfaceCurrent(G4String name ,G4int direction, G4int depth=0);
G4PSFlatSurfaceCurrent(G4String name ,G4int direction,
const G4String& unit, G4int depth=0);
virtual ~G4PSFlatSurfaceCurrent();
public: // with description
G4PSFlatSurfaceCurrent(G4String name, G4int direction, G4int depth = 0);
G4PSFlatSurfaceCurrent(G4String name, G4int direction, const G4String& unit,
G4int depth = 0);
virtual ~G4PSFlatSurfaceCurrent();
// Scoring options
inline void Weighted(G4bool flg=true) { weighted = flg; }
// Multiply track weight
inline void DivideByArea(G4bool flg=true) { divideByArea = flg; }
// Divided By Area
// Scoring options
inline void Weighted(G4bool flg = true) { weighted = flg; }
// Multiply track weight
inline void DivideByArea(G4bool flg = true) { divideByArea = flg; }
// Divided By Area
protected: // with description
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
G4int IsSelectedSurface(G4Step*,G4Box*);
protected: // with description
virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
G4int IsSelectedSurface(G4Step*, G4Box*);
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
virtual void DrawAll();
virtual void PrintAll();
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
virtual void DrawAll();
virtual void PrintAll();
virtual void SetUnit(const G4String& unit);
virtual void SetUnit(const G4String& unit);
protected:
virtual void DefineUnitAndCategory();
private:
G4int HCID;
G4int fDirection;
G4THitsMap<G4double>* EvtMap;
G4bool weighted;
G4bool divideByArea;
protected:
virtual void DefineUnitAndCategory();
private:
G4int HCID;
G4int fDirection;
G4THitsMap<G4double>* EvtMap;
G4bool weighted;
G4bool divideByArea;
};
#endif
@@ -49,24 +49,21 @@
// 2010-07-22 Introduce Unit specification.
///////////////////////////////////////////////////////////////////////////////
class G4PSFlatSurfaceCurrent3D : public G4PSFlatSurfaceCurrent
{
public: // with description
G4PSFlatSurfaceCurrent3D(G4String name, G4int direction,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
G4PSFlatSurfaceCurrent3D(G4String name, G4int direction,
const G4String& unit,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
virtual ~G4PSFlatSurfaceCurrent3D();
public: // with description
G4PSFlatSurfaceCurrent3D(G4String name, G4int direction, G4int ni = 1,
G4int nj = 1, G4int nk = 1, G4int depi = 2,
G4int depj = 1, G4int depk = 0);
G4PSFlatSurfaceCurrent3D(G4String name, G4int direction, const G4String& unit,
G4int ni = 1, G4int nj = 1, G4int nk = 1,
G4int depi = 2, G4int depj = 1, G4int depk = 0);
virtual ~G4PSFlatSurfaceCurrent3D();
protected: // with description
virtual G4int GetIndex(G4Step*);
protected: // with description
virtual G4int GetIndex(G4Step*);
private:
G4int fDepthi, fDepthj, fDepthk;
private:
G4int fDepthi, fDepthj, fDepthk;
};
#endif
@@ -38,7 +38,7 @@
// This is a primitive scorer class for scoring Surface Flux.
// Current version assumes only for G4Box shape, and the surface
// is defined at the -Z plane of the box.
// The surface flux is given in the unit of area.
// The surface flux is given in the unit of area.
// e.g. sum of 1/cos(T)/mm2, where T is a incident angle of the
// track on the surface.
//
@@ -50,7 +50,7 @@
// 2 OUT |<- | fFlux_Out
//
// Created: 2005-11-14 Tsukasa ASO, Akinori Kimura.
//
//
// 18-Nov-2005 T.Aso, To use always positive value for anglefactor.
// Bug fix. Area definition.
// 29-Mar-2007 T.Aso, Bug fix for momentum direction at outgoing flux.
@@ -62,41 +62,40 @@
class G4PSFlatSurfaceFlux : public G4VPrimitivePlotter
{
public: // with description
G4PSFlatSurfaceFlux(G4String name,G4int direction, G4int depth=0);
G4PSFlatSurfaceFlux(G4String name,G4int direction,
const G4String& unit, G4int depth=0);
virtual ~G4PSFlatSurfaceFlux();
public: // with description
G4PSFlatSurfaceFlux(G4String name, G4int direction, G4int depth = 0);
G4PSFlatSurfaceFlux(G4String name, G4int direction, const G4String& unit,
G4int depth = 0);
virtual ~G4PSFlatSurfaceFlux();
inline void Weighted(G4bool flg=true) { weighted = flg; }
// Multiply track weight
inline void Weighted(G4bool flg = true) { weighted = flg; }
// Multiply track weight
inline void DivideByArea(G4bool flg=true) { divideByArea = flg; }
// Divided by Area.
inline void DivideByArea(G4bool flg = true) { divideByArea = flg; }
// Divided by Area.
protected: // with description
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
G4int IsSelectedSurface(G4Step*,G4Box*);
protected: // with description
virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
G4int IsSelectedSurface(G4Step*, G4Box*);
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
virtual void DrawAll();
virtual void PrintAll();
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
virtual void DrawAll();
virtual void PrintAll();
virtual void SetUnit(const G4String& unit);
virtual void SetUnit(const G4String& unit);
protected:
virtual void DefineUnitAndCategory();
protected:
virtual void DefineUnitAndCategory();
private:
G4int HCID;
G4int fDirection;
G4THitsMap<G4double>* EvtMap;
G4bool weighted;
G4bool divideByArea;
private:
G4int HCID;
G4int fDirection;
G4THitsMap<G4double>* EvtMap;
G4bool weighted;
G4bool divideByArea;
};
#endif
@@ -51,24 +51,21 @@
//
///////////////////////////////////////////////////////////////////////////////
class G4PSFlatSurfaceFlux3D : public G4PSFlatSurfaceFlux
{
public: // with description
G4PSFlatSurfaceFlux3D(G4String name, G4int direction,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
G4PSFlatSurfaceFlux3D(G4String name, G4int direction,
const G4String& unit,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
virtual ~G4PSFlatSurfaceFlux3D();
public: // with description
G4PSFlatSurfaceFlux3D(G4String name, G4int direction, G4int ni = 1,
G4int nj = 1, G4int nk = 1, G4int depi = 2,
G4int depj = 1, G4int depk = 0);
G4PSFlatSurfaceFlux3D(G4String name, G4int direction, const G4String& unit,
G4int ni = 1, G4int nj = 1, G4int nk = 1,
G4int depi = 2, G4int depj = 1, G4int depk = 0);
virtual ~G4PSFlatSurfaceFlux3D();
protected: // with description
virtual G4int GetIndex(G4Step*);
protected: // with description
virtual G4int GetIndex(G4Step*);
private:
G4int fDepthi, fDepthj, fDepthk;
private:
G4int fDepthi, fDepthj, fDepthk;
};
#endif
@@ -42,44 +42,37 @@
// 2020-10-06 Use G4VPrimitivePlotter and fill 1-D histo of kinetic energy (x)
// vs. track weight (y) (Makoto Asai)
//
//
//
///////////////////////////////////////////////////////////////////////////////
class G4PSMinKinEAtGeneration : public G4VPrimitivePlotter
{
public: // with description
G4PSMinKinEAtGeneration(G4String name, G4int depth=0);
G4PSMinKinEAtGeneration(G4String name, const G4String& unit,
G4int depth=0);
public: // with description
G4PSMinKinEAtGeneration(G4String name, G4int depth = 0);
G4PSMinKinEAtGeneration(G4String name, const G4String& unit, G4int depth = 0);
protected: // with description
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
protected: // with description
virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
public:
virtual ~G4PSMinKinEAtGeneration();
public:
virtual ~G4PSMinKinEAtGeneration();
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
public:
virtual void DrawAll();
virtual void PrintAll();
public:
virtual void DrawAll();
virtual void PrintAll();
virtual void SetUnit(const G4String& unit);
private:
G4int HCID;
G4THitsMap<G4double>* EvtMap;
public:
virtual void SetUnit(const G4String& unit);
private:
G4int HCID;
G4THitsMap<G4double>* EvtMap;
public:
};
#endif
@@ -44,20 +44,19 @@
class G4PSMinKinEAtGeneration3D : public G4PSMinKinEAtGeneration
{
public: // with description
G4PSMinKinEAtGeneration3D(G4String name,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
G4PSMinKinEAtGeneration3D(G4String name,const G4String& unit,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
virtual ~G4PSMinKinEAtGeneration3D();
public: // with description
G4PSMinKinEAtGeneration3D(G4String name, G4int ni = 1, G4int nj = 1,
G4int nk = 1, G4int depi = 2, G4int depj = 1,
G4int depk = 0);
G4PSMinKinEAtGeneration3D(G4String name, const G4String& unit, G4int ni = 1,
G4int nj = 1, G4int nk = 1, G4int depi = 2,
G4int depj = 1, G4int depk = 0);
virtual ~G4PSMinKinEAtGeneration3D();
protected: // with description
virtual G4int GetIndex(G4Step*);
protected: // with description
virtual G4int GetIndex(G4Step*);
private:
G4int fDepthi, fDepthj, fDepthk;
private:
G4int fDepthi, fDepthj, fDepthk;
};
#endif
@@ -32,53 +32,46 @@
#include "G4VPrimitiveScorer.hh"
#include "G4THitsMap.hh"
//////////////////////////////////////////////////////////////////////////////////
// (Description)
// This is a primitive scorer class for scoring Number of Steps in the cell.
//
//
// Created: 2007-2-2 Tsukasa ASO, Akinori Kimura.
// 2010-07-22 Introduce Unit specification.
//
//
///////////////////////////////////////////////////////////////////////////////
class G4PSNofCollision : public G4VPrimitiveScorer
{
public: // with description
G4PSNofCollision(G4String name, G4int depth=0);
public: // with description
G4PSNofCollision(G4String name, G4int depth = 0);
protected: // with description
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
protected: // with description
virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
public:
virtual ~G4PSNofCollision();
public:
virtual ~G4PSNofCollision();
inline void Weighted(G4bool flg=true) { weighted = flg; }
// Multiply track weight
inline void Weighted(G4bool flg = true) { weighted = flg; }
// Multiply track weight
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
public:
virtual void DrawAll();
virtual void PrintAll();
public:
virtual void DrawAll();
virtual void PrintAll();
virtual void SetUnit(const G4String& unit);
private:
G4int HCID;
G4THitsMap<G4double>* EvtMap;
G4bool weighted;
public:
virtual void SetUnit(const G4String& unit);
private:
G4int HCID;
G4THitsMap<G4double>* EvtMap;
G4bool weighted;
public:
};
#endif
@@ -34,30 +34,25 @@
//////////////////////////////////////////////////////////////////////////////////
// (Description)
// This is a primitive scorer class for scoring Number of Steps in the cell.
//
//
// Created: 2007-08-14 Tsukasa ASO
//
//
///////////////////////////////////////////////////////////////////////////////
class G4PSNofCollision3D : public G4PSNofCollision
{
public: // with description
G4PSNofCollision3D(G4String name,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
public: // with description
G4PSNofCollision3D(G4String name, G4int ni = 1, G4int nj = 1, G4int nk = 1,
G4int depi = 2, G4int depj = 1, G4int depk = 0);
public:
virtual ~G4PSNofCollision3D();
public:
virtual ~G4PSNofCollision3D();
protected: // with description
virtual G4int GetIndex(G4Step*);
protected: // with description
virtual G4int GetIndex(G4Step*);
private:
G4int fDepthi, fDepthj, fDepthk;
private:
G4int fDepthi, fDepthj, fDepthk;
};
#endif
@@ -37,7 +37,7 @@
// (Description)
// This is a primitive scorer class for scoring Number of particles
// generated in the geometry.
//
//
// Created: 2005-11-18 Tsukasa ASO, Akinori Kimura.
// Modified: 2007-03-23 Tsukasa ASO, Introduce SetSecondary() method for
// specifying a particluar secondary. If the pointer
@@ -45,52 +45,46 @@
// But onece user sets it, it accepts only the particle.
// 2010-07-22 Introduce Unit specification.
// 2020-10-06 Use G4VPrimitivePlotter and fill 1-D histo of kinetic
// energy of the secondary in MeV (x) vs. track weight (y)
// energy of the secondary in MeV (x) vs. track weight (y)
// (Makoto Asai)
//
//
///////////////////////////////////////////////////////////////////////////////
class G4PSNofSecondary : public G4VPrimitivePlotter
{
public: // with description
G4PSNofSecondary(G4String name, G4int depth=0);
public: // with description
G4PSNofSecondary(G4String name, G4int depth = 0);
// Scoring option
void SetParticle(const G4String& particleName);
// Scoring option
void SetParticle(const G4String& particleName);
inline void Weighted(G4bool flg=true) { weighted = flg; }
// Multiply track weight
inline void Weighted(G4bool flg = true) { weighted = flg; }
// Multiply track weight
protected: // with description
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
protected: // with description
virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
public:
virtual ~G4PSNofSecondary();
public:
virtual ~G4PSNofSecondary();
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
public:
virtual void DrawAll();
virtual void PrintAll();
public:
virtual void DrawAll();
virtual void PrintAll();
virtual void SetUnit(const G4String& unit);
private:
G4int HCID;
G4THitsMap<G4double>* EvtMap;
G4ParticleDefinition* particleDef;
G4bool weighted;
public:
virtual void SetUnit(const G4String& unit);
private:
G4int HCID;
G4THitsMap<G4double>* EvtMap;
G4ParticleDefinition* particleDef;
G4bool weighted;
public:
};
#endif
@@ -40,17 +40,15 @@
class G4PSNofSecondary3D : public G4PSNofSecondary
{
public: // with description
G4PSNofSecondary3D(G4String name,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
virtual ~G4PSNofSecondary3D();
public: // with description
G4PSNofSecondary3D(G4String name, G4int ni = 1, G4int nj = 1, G4int nk = 1,
G4int depi = 2, G4int depj = 1, G4int depk = 0);
virtual ~G4PSNofSecondary3D();
protected: // with description
virtual G4int GetIndex(G4Step*);
protected: // with description
virtual G4int GetIndex(G4Step*);
private:
G4int fDepthi, fDepthj, fDepthk;
private:
G4int fDepthi, fDepthj, fDepthk;
};
#endif
@@ -35,53 +35,46 @@
////////////////////////////////////////////////////////////////////////////////
// (Description)
// This is a primitive scorer class for scoring Number of Steps in the cell.
//
//
// Created: 2005-11-14 Tsukasa ASO, Akinori Kimura.
// 2010-07-22 Introduce Unit specification.
// 2020-10-06 Use G4VPrimitivePlotter and fill 1-D histo of step length
// 2020-10-06 Use G4VPrimitivePlotter and fill 1-D histo of step length
// in mm vs. number of steps (not weighted) (Makoto Asai)
//
//
///////////////////////////////////////////////////////////////////////////////
class G4PSNofStep : public G4VPrimitivePlotter
{
public: // with description
G4PSNofStep(G4String name, G4int depth=0);
public: // with description
G4PSNofStep(G4String name, G4int depth = 0);
protected: // with description
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
protected: // with description
virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
public:
virtual ~G4PSNofStep();
public:
virtual ~G4PSNofStep();
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
public:
virtual void DrawAll();
virtual void PrintAll();
public:
virtual void DrawAll();
virtual void PrintAll();
virtual void SetUnit(const G4String& unit);
virtual void SetUnit(const G4String& unit);
public:
void SetBoundaryFlag(G4bool flg=true)
{boundaryFlag = flg;}
public:
void SetBoundaryFlag(G4bool flg = true) { boundaryFlag = flg; }
private:
G4int HCID;
G4THitsMap<G4double>* EvtMap;
G4bool boundaryFlag;
public:
private:
G4int HCID;
G4THitsMap<G4double>* EvtMap;
G4bool boundaryFlag;
public:
};
#endif
@@ -39,20 +39,17 @@
//
///////////////////////////////////////////////////////////////////////////////
class G4PSNofStep3D : public G4PSNofStep
{
public: // with description
G4PSNofStep3D(G4String name,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
virtual ~G4PSNofStep3D();
public: // with description
G4PSNofStep3D(G4String name, G4int ni = 1, G4int nj = 1, G4int nk = 1,
G4int depi = 2, G4int depj = 1, G4int depk = 0);
virtual ~G4PSNofStep3D();
protected: // with description
virtual G4int GetIndex(G4Step*);
protected: // with description
virtual G4int GetIndex(G4Step*);
private:
G4int fDepthi, fDepthj, fDepthk;
private:
G4int fDepthi, fDepthj, fDepthk;
};
#endif
@@ -35,7 +35,7 @@
////////////////////////////////////////////////////////////////////////////////
// (Description)
// This is a primitive scorer class for scoring current.
// The number of tracks passing through the geometry are taken
// The number of tracks passing through the geometry are taken
// into account.
//
// Created: 2005-11-14 Tsukasa ASO, Akinori Kimura.
@@ -43,44 +43,40 @@
// 2010-07-22 Add weighted option
// 2020-10-06 Use G4VPrimitivePlotter and fill 1-D histo of kinetic energy (x)
// vs. current * track weight (y) (Makoto Asai)
//
//
///////////////////////////////////////////////////////////////////////////////
class G4PSPassageCellCurrent : public G4VPrimitivePlotter
{
public: // with description
G4PSPassageCellCurrent(G4String name, G4int depth=0);
virtual ~G4PSPassageCellCurrent();
public: // with description
G4PSPassageCellCurrent(G4String name, G4int depth = 0);
virtual ~G4PSPassageCellCurrent();
inline void Weighted(G4bool flg=true) { weighted = flg; }
inline void Weighted(G4bool flg = true) { weighted = flg; }
// Multiply track weight
protected: // with description
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
protected: // with description
virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
virtual G4bool IsPassed(G4Step*);
virtual G4bool IsPassed(G4Step*);
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
public:
virtual void DrawAll();
virtual void PrintAll();
public:
virtual void DrawAll();
virtual void PrintAll();
virtual void SetUnit(const G4String& unit);
private:
G4int HCID;
G4int fCurrentTrkID;
G4double fCurrent;
G4THitsMap<G4double>* EvtMap;
G4bool weighted;
virtual void SetUnit(const G4String& unit);
private:
G4int HCID;
G4int fCurrentTrkID;
G4double fCurrent;
G4THitsMap<G4double>* EvtMap;
G4bool weighted;
};
#endif
@@ -34,28 +34,26 @@
////////////////////////////////////////////////////////////////////////////////
// (Description)
// This is a primitive scorer class for scoring a current.
// The number of tracks passing through the geometry are taken
// The number of tracks passing through the geometry are taken
// into account.
//
// Created: 2007-08-14 Tsukasa ASO
// 2010-07-22 Introduce Unit specification.
//
//
///////////////////////////////////////////////////////////////////////////////
class G4PSPassageCellCurrent3D : public G4PSPassageCellCurrent
{
public: // with description
G4PSPassageCellCurrent3D(G4String name,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
virtual ~G4PSPassageCellCurrent3D();
public: // with description
G4PSPassageCellCurrent3D(G4String name, G4int ni = 1, G4int nj = 1,
G4int nk = 1, G4int depi = 2, G4int depj = 1,
G4int depk = 0);
virtual ~G4PSPassageCellCurrent3D();
protected: // with description
virtual G4int GetIndex(G4Step*);
protected: // with description
virtual G4int GetIndex(G4Step*);
private:
G4int fDepthi, fDepthj, fDepthk;
private:
G4int fDepthi, fDepthj, fDepthk;
};
#endif
@@ -36,7 +36,7 @@
// (Description)
// This is a primitive scorer class for scoring cell flux.
// The Cell Flux is defined by a track length divided by a geometry
// volume, where only tracks passing through the geometry are taken
// volume, where only tracks passing through the geometry are taken
// into account. e.g. the unit of Cell Flux is mm/mm3.
//
// If you want to score all tracks in the geometry volume,
@@ -47,46 +47,43 @@
// 2010-07-22 Add weighted option
// 2020-10-06 Use G4VPrimitivePlotter and fill 1-D histo of kinetic energy (x)
// vs. cell flux * track weight (y) (Makoto Asai)
//
//
///////////////////////////////////////////////////////////////////////////////
class G4PSPassageCellFlux : public G4VPrimitivePlotter
{
public: // with description
G4PSPassageCellFlux(G4String name, G4int depth=0);
G4PSPassageCellFlux(G4String name, const G4String& unit, G4int depth=0);
public: // with description
G4PSPassageCellFlux(G4String name, G4int depth = 0);
G4PSPassageCellFlux(G4String name, const G4String& unit, G4int depth = 0);
virtual ~G4PSPassageCellFlux();
virtual ~G4PSPassageCellFlux();
inline void Weighted(G4bool flg=true) { weighted = flg; }
// Multiply track weight
inline void Weighted(G4bool flg = true) { weighted = flg; }
// Multiply track weight
protected: // with description
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
virtual G4bool IsPassed(G4Step*);
virtual G4double ComputeVolume(G4Step*, G4int idx);
protected: // with description
virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
virtual G4bool IsPassed(G4Step*);
virtual G4double ComputeVolume(G4Step*, G4int idx);
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
virtual void DrawAll();
virtual void PrintAll();
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
virtual void DrawAll();
virtual void PrintAll();
virtual void SetUnit(const G4String& unit);
virtual void SetUnit(const G4String& unit);
protected:
virtual void DefineUnitAndCategory();
private:
G4int HCID;
G4int fCurrentTrkID;
G4double fCellFlux;
G4THitsMap<G4double>* EvtMap;
G4bool weighted;
protected:
virtual void DefineUnitAndCategory();
private:
G4int HCID;
G4int fCurrentTrkID;
G4double fCellFlux;
G4THitsMap<G4double>* EvtMap;
G4bool weighted;
};
#endif
@@ -44,23 +44,20 @@
// 2010-07-22 Introduce Unit specification.
///////////////////////////////////////////////////////////////////////////////
class G4PSPassageCellFlux3D : public G4PSPassageCellFlux
{
public: // with description
G4PSPassageCellFlux3D(G4String name,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
G4PSPassageCellFlux3D(G4String name,const G4String& unit,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
virtual ~G4PSPassageCellFlux3D();
public: // with description
G4PSPassageCellFlux3D(G4String name, G4int ni = 1, G4int nj = 1, G4int nk = 1,
G4int depi = 2, G4int depj = 1, G4int depk = 0);
G4PSPassageCellFlux3D(G4String name, const G4String& unit, G4int ni = 1,
G4int nj = 1, G4int nk = 1, G4int depi = 2,
G4int depj = 1, G4int depk = 0);
virtual ~G4PSPassageCellFlux3D();
protected: // with description
virtual G4int GetIndex(G4Step*);
protected: // with description
virtual G4int GetIndex(G4Step*);
private:
G4int fDepthi, fDepthj, fDepthk;
private:
G4int fDepthi, fDepthj, fDepthk;
};
#endif
@@ -45,29 +45,27 @@
// 2011-03-24 Give Size and Segmentation for relicated volume in cylinder.
///////////////////////////////////////////////////////////////////////////////
class G4PSPassageCellFluxForCylinder3D : public G4PSPassageCellFlux3D
{
public: // with description
G4PSPassageCellFluxForCylinder3D(G4String name,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
G4PSPassageCellFluxForCylinder3D(G4String name,const G4String& unit,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
virtual ~G4PSPassageCellFluxForCylinder3D();
public: // with description
G4PSPassageCellFluxForCylinder3D(G4String name, G4int ni = 1, G4int nj = 1,
G4int nk = 1, G4int depi = 2, G4int depj = 1,
G4int depk = 0);
G4PSPassageCellFluxForCylinder3D(G4String name, const G4String& unit,
G4int ni = 1, G4int nj = 1, G4int nk = 1,
G4int depi = 2, G4int depj = 1,
G4int depk = 0);
virtual ~G4PSPassageCellFluxForCylinder3D();
void SetCylinderSize(G4double dr, G4double dz);
void SetNumberOfSegments(G4int nSeg[3]);
void SetCylinderSize(G4double dr, G4double dz);
void SetNumberOfSegments(G4int nSeg[3]);
protected: // with description
virtual G4double ComputeVolume(G4Step*, G4int idx);
protected: // with description
virtual G4double ComputeVolume(G4Step*, G4int idx);
private:
private:
// Order of segmentation (Z PHI R) in CylinderMesh
G4ThreeVector cylinderSize;
G4int nSegment[3];
G4ThreeVector cylinderSize;
G4int nSegment[3];
};
#endif
@@ -36,48 +36,44 @@
// (Description)
// This is a primitive scorer class for scoring only track length.
// The tracks which passed a geometry is taken into account.
//
//
//
// Created: 2005-11-14 Tsukasa ASO, Akinori Kimura.
// 2010-07-22 Introduce Unit specification.
// 2020-10-06 Use G4VPrimitivePlotter and fill 1-D histo of track length
// 2020-10-06 Use G4VPrimitivePlotter and fill 1-D histo of track length
// vs. number of tracks (not weighted) (Makoto Asai)
//
//
///////////////////////////////////////////////////////////////////////////////
class G4PSPassageTrackLength : public G4VPrimitivePlotter
{
public: // with description
G4PSPassageTrackLength(G4String name, G4int depth=0);
G4PSPassageTrackLength(G4String name, const G4String& unit,
G4int depth=0);
virtual ~G4PSPassageTrackLength();
public: // with description
G4PSPassageTrackLength(G4String name, G4int depth = 0);
G4PSPassageTrackLength(G4String name, const G4String& unit, G4int depth = 0);
virtual ~G4PSPassageTrackLength();
inline void Weighted(G4bool flg=true) { weighted = flg; }
// Multiply track weight
inline void Weighted(G4bool flg = true) { weighted = flg; }
// Multiply track weight
protected: // with description
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
G4bool IsPassed(G4Step*);
protected: // with description
virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
G4bool IsPassed(G4Step*);
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
virtual void DrawAll();
virtual void PrintAll();
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
virtual void DrawAll();
virtual void PrintAll();
virtual void SetUnit(const G4String& unit);
private:
G4int HCID;
G4int fCurrentTrkID;
G4double fTrackLength;
G4THitsMap<G4double>* EvtMap;
G4bool weighted;
virtual void SetUnit(const G4String& unit);
private:
G4int HCID;
G4int fCurrentTrkID;
G4double fTrackLength;
G4THitsMap<G4double>* EvtMap;
G4bool weighted;
};
#endif
@@ -35,33 +35,30 @@
// (Description)
// This is a primitive scorer class for scoring only track length.
// The tracks which passed a geometry is taken into account.
//
//
//
// Created: 2008-08-14 Tsukasa ASO
// 2010-07-22 Introduce Unit specification.
//
//
///////////////////////////////////////////////////////////////////////////////
class G4PSPassageTrackLength3D : public G4PSPassageTrackLength
{
public: // with description
G4PSPassageTrackLength3D(G4String name,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
G4PSPassageTrackLength3D(G4String name,const G4String& unit,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
public: // with description
G4PSPassageTrackLength3D(G4String name, G4int ni = 1, G4int nj = 1,
G4int nk = 1, G4int depi = 2, G4int depj = 1,
G4int depk = 0);
G4PSPassageTrackLength3D(G4String name, const G4String& unit, G4int ni = 1,
G4int nj = 1, G4int nk = 1, G4int depi = 2,
G4int depj = 1, G4int depk = 0);
virtual ~G4PSPassageTrackLength3D();
virtual ~G4PSPassageTrackLength3D();
protected: // with description
virtual G4int GetIndex(G4Step*);
private:
G4int fDepthi, fDepthj, fDepthk;
protected: // with description
virtual G4int GetIndex(G4Step*);
private:
G4int fDepthi, fDepthj, fDepthk;
};
#endif
@@ -44,45 +44,38 @@
//
///////////////////////////////////////////////////////////////////////////////
class G4PSPopulation : public G4VPrimitiveScorer
{
public: // with description
G4PSPopulation(G4String name, G4int depth=0);
public: // with description
G4PSPopulation(G4String name, G4int depth = 0);
protected: // with description
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
protected: // with description
virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
public:
virtual ~G4PSPopulation();
public:
virtual ~G4PSPopulation();
inline void Weighted(G4bool flg=true) { weighted = flg; }
// Multiply track weight
inline void Weighted(G4bool flg = true) { weighted = flg; }
// Multiply track weight
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
public:
virtual void DrawAll();
virtual void PrintAll();
public:
virtual void DrawAll();
virtual void PrintAll();
virtual void SetUnit(const G4String& unit);
private:
G4int HCID;
G4THitsMap<G4double>* EvtMap;
G4bool weighted;
std::map<G4int,G4TrackLogger> fCellTrackLogger;
public:
virtual void SetUnit(const G4String& unit);
private:
G4int HCID;
G4THitsMap<G4double>* EvtMap;
G4bool weighted;
std::map<G4int, G4TrackLogger> fCellTrackLogger;
public:
};
#endif
@@ -41,24 +41,18 @@
class G4PSPopulation3D : public G4PSPopulation
{
public: // with description
G4PSPopulation3D(G4String name,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
public: // with description
G4PSPopulation3D(G4String name, G4int ni = 1, G4int nj = 1, G4int nk = 1,
G4int depi = 2, G4int depj = 1, G4int depk = 0);
public:
virtual ~G4PSPopulation3D();
protected: // with description
virtual G4int GetIndex(G4Step*);
private:
G4int fDepthi, fDepthj, fDepthk;
public:
virtual ~G4PSPopulation3D();
protected: // with description
virtual G4int GetIndex(G4Step*);
private:
G4int fDepthi, fDepthj, fDepthk;
};
#endif
@@ -39,7 +39,7 @@
// This is a primitive scorer class for scoring Surface Current.
// Current version assumes only for G4Sphere shape, and the surface
// is defined at the inside of the sphere.
// The current is given in the unit of area.
// The current is given in the unit of area.
// e.g. (Number of tracks)/mm2.
//
// Surface is defined at the inside of sphere.
@@ -52,47 +52,44 @@
// 17-Nov-2005 Bug fix. square definition.
// 31-Mar-2007 T.Aso, Add option for normalizing by the area.
// 2010-07-22 Introduce Unit specification.
//
//
///////////////////////////////////////////////////////////////////////////////
class G4PSSphereSurfaceCurrent : public G4VPrimitiveScorer
{
public: // with description
G4PSSphereSurfaceCurrent(G4String name, G4int direction, G4int depth=0);
G4PSSphereSurfaceCurrent(G4String name, G4int direction,
const G4String& unit, G4int depth=0);
virtual ~G4PSSphereSurfaceCurrent();
public: // with description
G4PSSphereSurfaceCurrent(G4String name, G4int direction, G4int depth = 0);
G4PSSphereSurfaceCurrent(G4String name, G4int direction, const G4String& unit,
G4int depth = 0);
virtual ~G4PSSphereSurfaceCurrent();
inline void Weighted(G4bool flg=true) { weighted = flg; }
// Multiply track weight
inline void DivideByArea(G4bool flg=true) { divideByArea = flg; }
// Divided by Area.
inline void Weighted(G4bool flg = true) { weighted = flg; }
// Multiply track weight
inline void DivideByArea(G4bool flg = true) { divideByArea = flg; }
// Divided by Area.
protected: // with description
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
G4int IsSelectedSurface(G4Step*,G4Sphere*);
protected: // with description
virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
G4int IsSelectedSurface(G4Step*, G4Sphere*);
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
virtual void DrawAll();
virtual void PrintAll();
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
virtual void DrawAll();
virtual void PrintAll();
virtual void SetUnit(const G4String& unit);
virtual void SetUnit(const G4String& unit);
protected:
virtual void DefineUnitAndCategory();
private:
G4int HCID;
G4int fDirection;
G4THitsMap<G4double>* EvtMap;
G4bool weighted;
G4bool divideByArea;
protected:
virtual void DefineUnitAndCategory();
private:
G4int HCID;
G4int fDirection;
G4THitsMap<G4double>* EvtMap;
G4bool weighted;
G4bool divideByArea;
};
#endif
@@ -35,7 +35,7 @@
// This is a primitive scorer class for scoring Surface Current.
// Current version assumes only for G4Sphere shape, and the surface
// is defined at the inside of the sphere.
// The current is given in the unit of area.
// The current is given in the unit of area.
// e.g. (Number of tracks)/mm2.
//
// Surface is defined at the inside of sphere.
@@ -46,32 +46,27 @@
//
// Created: 2007-08-14 Tsukasa ASO
// 2010-07-22 Introduce Unit specification.
//
//
///////////////////////////////////////////////////////////////////////////////
class G4PSSphereSurfaceCurrent3D : public G4PSSphereSurfaceCurrent
{
public: // with description
G4PSSphereSurfaceCurrent3D(G4String name, G4int direction,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
G4PSSphereSurfaceCurrent3D(G4String name, G4int direction,
const G4String& unit,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
public: // with description
G4PSSphereSurfaceCurrent3D(G4String name, G4int direction, G4int ni = 1,
G4int nj = 1, G4int nk = 1, G4int depi = 2,
G4int depj = 1, G4int depk = 0);
G4PSSphereSurfaceCurrent3D(G4String name, G4int direction,
const G4String& unit, G4int ni = 1, G4int nj = 1,
G4int nk = 1, G4int depi = 2, G4int depj = 1,
G4int depk = 0);
virtual ~G4PSSphereSurfaceCurrent3D();
protected: // with description
virtual G4int GetIndex(G4Step*);
private:
G4int fDepthi, fDepthj, fDepthk;
virtual ~G4PSSphereSurfaceCurrent3D();
protected: // with description
virtual G4int GetIndex(G4Step*);
private:
G4int fDepthi, fDepthj, fDepthk;
};
#endif
@@ -39,7 +39,7 @@
// This is a primitive scorer class for scoring Surface Flux.
// Flux version assumes only for G4Sphere shape, and the surface
// is defined at the inside of the sphere.
// The current is given in the unit of area.
// The current is given in the unit of area.
// e.g. (Number of tracks)/mm2.
//
// Surface is defined at the inside of sphere.
@@ -53,47 +53,45 @@
// 29-Mar-2007 T.Aso, Bug fix for momentum direction for out-going flux.
// 2010-07-22 Introduce Unit specification.
// 2010-07-22 Add weighted and divideByArea options
//
//
///////////////////////////////////////////////////////////////////////////////
class G4PSSphereSurfaceFlux : public G4VPrimitiveScorer
{
public: // with description
G4PSSphereSurfaceFlux(G4String name, G4int direction, G4int depth=0);
G4PSSphereSurfaceFlux(G4String name, G4int direction,
const G4String& unit, G4int depth=0);
virtual ~G4PSSphereSurfaceFlux();
public: // with description
G4PSSphereSurfaceFlux(G4String name, G4int direction, G4int depth = 0);
G4PSSphereSurfaceFlux(G4String name, G4int direction, const G4String& unit,
G4int depth = 0);
virtual ~G4PSSphereSurfaceFlux();
inline void Weighted(G4bool flg=true) { weighted = flg; }
// Multiply track weight
inline void Weighted(G4bool flg = true) { weighted = flg; }
// Multiply track weight
inline void DivideByArea(G4bool flg=true) { divideByArea = flg; }
// Divided by Area.
inline void DivideByArea(G4bool flg = true) { divideByArea = flg; }
// Divided by Area.
protected: // with description
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
G4int IsSelectedSurface(G4Step*,G4Sphere*);
protected: // with description
virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
G4int IsSelectedSurface(G4Step*, G4Sphere*);
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
virtual void DrawAll();
virtual void PrintAll();
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
virtual void DrawAll();
virtual void PrintAll();
virtual void SetUnit(const G4String& unit);
virtual void SetUnit(const G4String& unit);
protected:
virtual void DefineUnitAndCategory();
protected:
virtual void DefineUnitAndCategory();
private:
G4int HCID;
G4int fDirection;
G4THitsMap<G4double>* EvtMap;
G4bool weighted;
G4bool divideByArea;
private:
G4int HCID;
G4int fDirection;
G4THitsMap<G4double>* EvtMap;
G4bool weighted;
G4bool divideByArea;
};
#endif
@@ -36,7 +36,7 @@
// This is a primitive scorer class for scoring Surface Flux.
// Flux version assumes only for G4Sphere shape, and the surface
// is defined at the inside of the sphere.
// The current is given in the unit of area.
// The current is given in the unit of area.
// e.g. (Number of tracks)/mm2.
//
// Surface is defined at the inside of sphere.
@@ -51,26 +51,22 @@
class G4PSSphereSurfaceFlux3D : public G4PSSphereSurfaceFlux
{
public: // with description
G4PSSphereSurfaceFlux3D(G4String name, G4int direction,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
public: // with description
G4PSSphereSurfaceFlux3D(G4String name, G4int direction, G4int ni = 1,
G4int nj = 1, G4int nk = 1, G4int depi = 2,
G4int depj = 1, G4int depk = 0);
G4PSSphereSurfaceFlux3D(G4String name, G4int direction,
const G4String& unit,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
G4PSSphereSurfaceFlux3D(G4String name, G4int direction, const G4String& unit,
G4int ni = 1, G4int nj = 1, G4int nk = 1,
G4int depi = 2, G4int depj = 1, G4int depk = 0);
virtual ~G4PSSphereSurfaceFlux3D();
virtual ~G4PSSphereSurfaceFlux3D();
protected: // with description
virtual G4int GetIndex(G4Step*);
private:
G4int fDepthi, fDepthj, fDepthk;
protected: // with description
virtual G4int GetIndex(G4Step*);
private:
G4int fDepthi, fDepthj, fDepthk;
};
#endif
@@ -32,44 +32,36 @@
#include "G4VPrimitiveScorer.hh"
#include "G4THitsMap.hh"
//////////////////////////////////////////////////////////////////////////////////
// (Description)
// This is a primitive scorer class for Debug.
//
//
// Created: 2011-03-24 Tsukasa ASO
//
//
///////////////////////////////////////////////////////////////////////////////
class G4PSStepChecker : public G4VPrimitiveScorer
{
public: // with description
G4PSStepChecker(G4String name, G4int depth=0);
public: // with description
G4PSStepChecker(G4String name, G4int depth = 0);
protected: // with description
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
protected: // with description
virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
public:
virtual ~G4PSStepChecker();
public:
virtual ~G4PSStepChecker();
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
public:
virtual void DrawAll();
virtual void PrintAll();
private:
public:
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
public:
virtual void DrawAll();
virtual void PrintAll();
private:
public:
};
#endif
@@ -34,29 +34,25 @@
//////////////////////////////////////////////////////////////////////////////////
// (Description)
// This is a primitive scorer class for debug.
//
//
// Created: 2011-03-24 Tsukasa ASO
//
//
///////////////////////////////////////////////////////////////////////////////
class G4PSStepChecker3D : public G4PSStepChecker
{
public: // with description
G4PSStepChecker3D(G4String name, G4int ni = 1, G4int nj = 1, G4int nk = 1,
G4int depi = 2, G4int depj = 1, G4int depk = 0);
class G4PSStepChecker3D : public G4PSStepChecker{
public: // with description
G4PSStepChecker3D(G4String name,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
public:
virtual ~G4PSStepChecker3D();
public:
virtual ~G4PSStepChecker3D();
protected: // with description
virtual G4int GetIndex(G4Step*);
protected: // with description
virtual G4int GetIndex(G4Step*);
private:
G4int fDepthi, fDepthj, fDepthk;
private:
G4int fDepthi, fDepthj, fDepthk;
};
#endif
@@ -32,53 +32,46 @@
#include "G4VPrimitiveScorer.hh"
#include "G4THitsMap.hh"
//////////////////////////////////////////////////////////////////////////////////
// (Description)
// This is a primitive scorer class for scoring Number of Steps in the cell.
//
//
// Created: 2007-2-2 Tsukasa ASO, Akinori Kimura.
// 2010-07-22 Introduce Unit specification.
//
//
///////////////////////////////////////////////////////////////////////////////
class G4PSTermination : public G4VPrimitiveScorer
{
public: // with description
G4PSTermination(G4String name, G4int depth=0);
public: // with description
G4PSTermination(G4String name, G4int depth = 0);
protected: // with description
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
protected: // with description
virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
public:
virtual ~G4PSTermination();
public:
virtual ~G4PSTermination();
inline void Weighted(G4bool flg=true) { weighted = flg; }
// Multiply track weight
inline void Weighted(G4bool flg = true) { weighted = flg; }
// Multiply track weight
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
public:
virtual void DrawAll();
virtual void PrintAll();
public:
virtual void DrawAll();
virtual void PrintAll();
virtual void SetUnit(const G4String& unit);
private:
G4int HCID;
G4THitsMap<G4double>* EvtMap;
G4bool weighted;
public:
virtual void SetUnit(const G4String& unit);
private:
G4int HCID;
G4THitsMap<G4double>* EvtMap;
G4bool weighted;
public:
};
#endif
@@ -34,29 +34,23 @@
// (Description)
// This is a primitive scorer class for scoring Number of tracks
// which stops(terminated) in the cell.
//
//
// Created: 2007-08-14 Tsukasa ASO
//
//
///////////////////////////////////////////////////////////////////////////////
class G4PSTermination3D : public G4PSTermination
{
public: // with description
G4PSTermination3D(G4String name,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int di=2, G4int dj=1, G4int dk=0);
virtual ~G4PSTermination3D();
public: // with description
G4PSTermination3D(G4String name, G4int ni = 1, G4int nj = 1, G4int nk = 1,
G4int di = 2, G4int dj = 1, G4int dk = 0);
virtual ~G4PSTermination3D();
protected: // with description
virtual G4int GetIndex(G4Step*);
protected: // with description
virtual G4int GetIndex(G4Step*);
private:
G4int fDepthi, fDepthj, fDepthk;
G4int fDepthi, fDepthj, fDepthk;
};
#endif
@@ -47,41 +47,36 @@
class G4PSTrackCounter : public G4VPrimitivePlotter
{
public: // with description
G4PSTrackCounter(G4String name, G4int direction, G4int depth=0);
public: // with description
G4PSTrackCounter(G4String name, G4int direction, G4int depth = 0);
protected: // with description
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
protected: // with description
virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
public:
virtual ~G4PSTrackCounter();
public:
virtual ~G4PSTrackCounter();
inline void Weighted(G4bool flg=true) { weighted = flg; }
// Multiply track weight
inline void Weighted(G4bool flg = true) { weighted = flg; }
// Multiply track weight
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
public:
virtual void DrawAll();
virtual void PrintAll();
public:
virtual void DrawAll();
virtual void PrintAll();
virtual void SetUnit(const G4String& unit);
private:
G4int HCID;
G4int fDirection;
G4THitsMap<G4double>* EvtMap;
G4bool weighted;
public:
virtual void SetUnit(const G4String& unit);
private:
G4int HCID;
G4int fDirection;
G4THitsMap<G4double>* EvtMap;
G4bool weighted;
public:
};
#endif
@@ -31,7 +31,6 @@
#include "G4PSTrackCounter.hh"
///////////////////////////////////////////////////////////////////////////////
// (Description)
// This is a primitive scorer class for scoring number of tracks in a cell.
@@ -41,25 +40,20 @@
//
///////////////////////////////////////////////////////////////////////////////
class G4PSTrackCounter3D : public G4PSTrackCounter
{
public: // with description
G4PSTrackCounter3D(G4String name, G4int direction,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int di=2, G4int dj=1, G4int dk=0);
public:
virtual ~G4PSTrackCounter3D();
public: // with description
G4PSTrackCounter3D(G4String name, G4int direction, G4int ni = 1, G4int nj = 1,
G4int nk = 1, G4int di = 2, G4int dj = 1, G4int dk = 0);
protected: // with description
virtual G4int GetIndex(G4Step*);
public:
virtual ~G4PSTrackCounter3D();
private:
G4int fDepthi, fDepthj, fDepthk;
protected: // with description
virtual G4int GetIndex(G4Step*);
private:
G4int fDepthi, fDepthj, fDepthk;
};
#endif
@@ -35,54 +35,52 @@
////////////////////////////////////////////////////////////////////////////////
// (Description)
// This is a primitive scorer class for scoring track length.
//
//
//
// Created: 2005-11-14 Tsukasa ASO, Akinori Kimura.
// Modified: 2007-02-02 Tsukasa ASO, Add MultiplyKineticEnergy()
// and DivideByVelocity().
// Modified: 2007-02-02 Tsukasa ASO, Add MultiplyKineticEnergy()
// and DivideByVelocity().
// 2010-07-22 Introduce Unit specification.
//
//
//
///////////////////////////////////////////////////////////////////////////////
class G4PSTrackLength : public G4VPrimitiveScorer
{
public: // with description
G4PSTrackLength(G4String name, G4int depth=0);
G4PSTrackLength(G4String name, const G4String& unit, G4int depth=0);
virtual ~G4PSTrackLength();
public: // with description
G4PSTrackLength(G4String name, G4int depth = 0);
G4PSTrackLength(G4String name, const G4String& unit, G4int depth = 0);
virtual ~G4PSTrackLength();
inline void Weighted(G4bool flg=true) { weighted = flg; }
// Multiply track weight
inline void Weighted(G4bool flg = true) { weighted = flg; }
// Multiply track weight
void MultiplyKineticEnergy(G4bool flg=true);
// Multiply Kinetic Energy
void MultiplyKineticEnergy(G4bool flg = true);
// Multiply Kinetic Energy
void DivideByVelocity(G4bool flg=true);
// Divide by velocity
void DivideByVelocity(G4bool flg = true);
// Divide by velocity
protected: // with description
virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
protected: // with description
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
virtual void DrawAll();
virtual void PrintAll();
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
virtual void DrawAll();
virtual void PrintAll();
virtual void SetUnit(const G4String& unit);
virtual void SetUnit(const G4String& unit);
protected:
virtual void DefineUnitAndCategory();
protected:
virtual void DefineUnitAndCategory();
private:
G4int HCID;
G4THitsMap<G4double>* EvtMap;
G4bool weighted;
G4bool multiplyKinE;
G4bool divideByVelocity;
private:
G4int HCID;
G4THitsMap<G4double>* EvtMap;
G4bool weighted;
G4bool multiplyKinE;
G4bool divideByVelocity;
};
#endif
@@ -34,31 +34,28 @@
////////////////////////////////////////////////////////////////////////////////
// (Description)
// This is a primitive scorer class for scoring track length.
//
//
//
// Created: 2008-08-14 Tsukasa ASO
// 2010-07-22 Introduce Unit specification.
//
//
///////////////////////////////////////////////////////////////////////////////
class G4PSTrackLength3D : public G4PSTrackLength
{
public: // with description
G4PSTrackLength3D(G4String name,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
G4PSTrackLength3D(G4String name, const G4String& unit,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
public: // with description
G4PSTrackLength3D(G4String name, G4int ni = 1, G4int nj = 1, G4int nk = 1,
G4int depi = 2, G4int depj = 1, G4int depk = 0);
G4PSTrackLength3D(G4String name, const G4String& unit, G4int ni = 1,
G4int nj = 1, G4int nk = 1, G4int depi = 2, G4int depj = 1,
G4int depk = 0);
virtual ~G4PSTrackLength3D();
virtual ~G4PSTrackLength3D();
protected: // with description
virtual G4int GetIndex(G4Step*);
private:
G4int fDepthi, fDepthj, fDepthk;
protected: // with description
virtual G4int GetIndex(G4Step*);
private:
G4int fDepthi, fDepthj, fDepthk;
};
#endif
@@ -42,33 +42,30 @@
class G4PSVolumeFlux : public G4VPrimitivePlotter
{
public: // with description
G4PSVolumeFlux(G4String name,G4int direction=1, G4int depth=0);
virtual ~G4PSVolumeFlux();
public: // with description
G4PSVolumeFlux(G4String name, G4int direction = 1, G4int depth = 0);
virtual ~G4PSVolumeFlux();
protected: // with description
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
protected: // with description
virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
virtual void DrawAll();
virtual void PrintAll();
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
virtual void DrawAll();
virtual void PrintAll();
private:
G4int HCID;
G4int fDirection;
G4THitsMap<G4double>* EvtMap;
G4bool divare = false; // divide by the surface area
G4bool divcos = false; // divide by cos(theta)
private:
G4int HCID;
G4int fDirection;
G4THitsMap<G4double>* EvtMap;
G4bool divare = false; // divide by the surface area
G4bool divcos = false; // divide by cos(theta)
public:
void SetDivAre(G4bool val)
{ divare = val; }
void SetDivCos(G4bool val)
{ divcos = val; }
public:
void SetDivAre(G4bool val) { divare = val; }
void SetDivCos(G4bool val) { divcos = val; }
};
#endif
@@ -40,19 +40,17 @@
class G4PSVolumeFlux3D : public G4PSVolumeFlux
{
public: // with description
G4PSVolumeFlux3D(G4String name, G4int direction=1,
G4int ni=1,G4int nj=1, G4int nk=1,
G4int depi=2, G4int depj=1, G4int depk=0);
public: // with description
G4PSVolumeFlux3D(G4String name, G4int direction = 1, G4int ni = 1,
G4int nj = 1, G4int nk = 1, G4int depi = 2, G4int depj = 1,
G4int depk = 0);
virtual ~G4PSVolumeFlux3D();
virtual ~G4PSVolumeFlux3D();
protected: // with description
virtual G4int GetIndex(G4Step*);
private:
G4int fDepthi, fDepthj, fDepthk;
protected: // with description
virtual G4int GetIndex(G4Step*);
private:
G4int fDepthi, fDepthj, fDepthk;
};
#endif
@@ -38,23 +38,20 @@ class G4ChargedDefinition;
// class description:
//
// This is the class of a filter to be associated with a
// sensitive detector.
// sensitive detector.
// This fileter accepts charged particles.
//
// Created: 2005-11-14 Tsukasa ASO.
//
//
///////////////////////////////////////////////////////////////////////////////
class G4SDChargedFilter : public G4VSDFilter
class G4SDChargedFilter : public G4VSDFilter
{
public: // with description
G4SDChargedFilter(G4String name);
virtual ~G4SDChargedFilter();
public: // with description
G4SDChargedFilter(G4String name);
virtual ~G4SDChargedFilter();
public: // with description
virtual G4bool Accept(const G4Step*) const;
public: // with description
virtual G4bool Accept(const G4Step*) const;
};
#endif
@@ -36,7 +36,7 @@
// class description:
//
// This is the class of a filter to be associated with a
// sensitive detector.
// sensitive detector.
//
// This filter accepts particles defined energy range.
// The energy range is given at constructor, or Set methods.
@@ -44,36 +44,32 @@
//
//
// Created: 2005-11-14 Tsukasa ASO.
//
//
///////////////////////////////////////////////////////////////////////////////
class G4SDKineticEnergyFilter : public G4VSDFilter
class G4SDKineticEnergyFilter : public G4VSDFilter
{
//-------
public: // with description
G4SDKineticEnergyFilter(G4String name, G4double elow = 0.0,
G4double ehigh = DBL_MAX);
// Constructor. Filter name and kinetic energy range( elow, ehigh).
//-------
public: // with description
G4SDKineticEnergyFilter(G4String name,
G4double elow=0.0,
G4double ehigh=DBL_MAX);
// Constructor. Filter name and kinetic energy range( elow, ehigh).
virtual ~G4SDKineticEnergyFilter();
virtual ~G4SDKineticEnergyFilter();
public: // with description
virtual G4bool Accept(const G4Step*) const;
public: // with description
virtual G4bool Accept(const G4Step*) const;
void SetKineticEnergy(G4double elow, G4double ehigh);
void SetLowEnergy(G4double elow);
void SetHighEnergy(G4double ehigh);
// Set methods for kinetic energy range.
//
void show();
private:
G4double fLowEnergy;
G4double fHighEnergy;
void SetKineticEnergy(G4double elow, G4double ehigh);
void SetLowEnergy(G4double elow);
void SetHighEnergy(G4double ehigh);
// Set methods for kinetic energy range.
//
void show();
private:
G4double fLowEnergy;
G4double fHighEnergy;
};
#endif
@@ -38,25 +38,22 @@ class G4NeutralDefinition;
// class description:
//
// This is the class of a filter to be associated with a
// sensitive detector.
// sensitive detector.
//
// This filter accepts neutral tracks.
//
// Created: 2005-11-14 Tsukasa ASO.
//
//
///////////////////////////////////////////////////////////////////////////////
class G4SDNeutralFilter : public G4VSDFilter
class G4SDNeutralFilter : public G4VSDFilter
{
public: // with description
G4SDNeutralFilter(G4String name);
virtual ~G4SDNeutralFilter();
public: // with description
G4SDNeutralFilter(G4String name);
virtual ~G4SDNeutralFilter();
public: // with description
virtual G4bool Accept(const G4Step*) const;
public: // with description
virtual G4bool Accept(const G4Step*) const;
};
#endif
@@ -40,45 +40,41 @@ class G4ParticleDefinition;
// class description:
//
// This is the class of a filter to be associated with a
// sensitive detector.
// sensitive detector.
// This class filters steps by partilce definition.
// The particles are given at constructor or add() method.
//
// Created: 2005-11-14 Tsukasa ASO.
// 2010-07-22 T.Aso Filter for Ions
//
//
///////////////////////////////////////////////////////////////////////////////
class G4SDParticleFilter : public G4VSDFilter
class G4SDParticleFilter : public G4VSDFilter
{
public: // with description
G4SDParticleFilter(G4String name);
G4SDParticleFilter(G4String name, const G4String& particleName);
G4SDParticleFilter(G4String name, const std::vector<G4String>& particleNames);
G4SDParticleFilter(G4String name,
const std::vector<G4ParticleDefinition*>& particleDef);
// Constructors. Filter name and particle's name.
//
public: // with description
G4SDParticleFilter(G4String name);
G4SDParticleFilter(G4String name,const G4String& particleName);
G4SDParticleFilter(G4String name,
const std::vector<G4String>& particleNames);
G4SDParticleFilter(G4String name,
const std::vector<G4ParticleDefinition*>& particleDef);
// Constructors. Filter name and particle's name.
//
virtual ~G4SDParticleFilter();
virtual ~G4SDParticleFilter();
public: // with description
virtual G4bool Accept(const G4Step*) const;
public: // with description
virtual G4bool Accept(const G4Step*) const;
void add(const G4String& particleName);
// set method for acceptable particle name.
//
void addIon(G4int Z, G4int A);
void show();
private:
std::vector<G4ParticleDefinition*> thePdef;
std::vector<G4int> theIonZ;
std::vector<G4int> theIonA;
void add(const G4String& particleName);
// set method for acceptable particle name.
//
void addIon(G4int Z, G4int A);
void show();
private:
std::vector<G4ParticleDefinition*> thePdef;
std::vector<G4int> theIonZ;
std::vector<G4int> theIonA;
};
#endif
@@ -40,38 +40,38 @@ class G4ParticleDefinition;
// class description:
//
// This is the class of a filter to be associated with a
// sensitive detector.
// sensitive detector.
// This class filters steps by partilce definition and kinetic energy.
//
// Created: 2005-11-14 Tsukasa ASO.
//
//
///////////////////////////////////////////////////////////////////////////////
class G4SDParticleWithEnergyFilter : public G4VSDFilter
class G4SDParticleWithEnergyFilter : public G4VSDFilter
{
public: // with description
G4SDParticleWithEnergyFilter(G4String name,
G4double elow=0.0, G4double ehigh=DBL_MAX);
virtual ~G4SDParticleWithEnergyFilter();
public: // with description
G4SDParticleWithEnergyFilter(G4String name, G4double elow = 0.0,
G4double ehigh = DBL_MAX);
virtual ~G4SDParticleWithEnergyFilter();
public: // with description
virtual G4bool Accept(const G4Step*) const;
public: // with description
virtual G4bool Accept(const G4Step*) const;
void add(const G4String& particleName);
// add the particle into accepatable particle list.
//
void SetKineticEnergy(G4double elow, G4double ehigh);
// Set acceptable kinetic energy range.
//
void show();
void add(const G4String& particleName);
// add the particle into accepatable particle list.
//
void SetKineticEnergy(G4double elow, G4double ehigh);
// Set acceptable kinetic energy range.
//
void show();
private:
G4SDParticleFilter* fParticleFilter;
G4SDKineticEnergyFilter* fKineticFilter;
public:
G4SDParticleWithEnergyFilter(const G4SDParticleWithEnergyFilter&);
G4SDParticleWithEnergyFilter& operator=(const G4SDParticleWithEnergyFilter&);
private:
G4SDParticleFilter* fParticleFilter;
G4SDKineticEnergyFilter* fKineticFilter;
public:
G4SDParticleWithEnergyFilter(const G4SDParticleWithEnergyFilter&);
G4SDParticleWithEnergyFilter& operator=(const G4SDParticleWithEnergyFilter&);
};
#endif