BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Primitive scorer for cell flux in a 3D mesh with a conversion factor. More...
#include <BDSPSCellFluxScaled3D.hh>
Public Member Functions | |
BDSPSCellFluxScaled3D (const G4String &scorerName, const BDSHistBinMapper *mapperIn, const G4String &unitIn="percm2", G4int ni=1, G4int nj=1, G4int nk=1, G4int depi=2, G4int depj=1, G4int depk=0) | |
BDSPSCellFluxScaled3D (const G4String &scorerName, const BDSHistBinMapper *mapperIn, const G4String &filename, const G4String &unitIn="percm2", G4int ni=1, G4int nj=1, G4int nk=1, G4int depi=2, G4int depj=1, G4int depk=0) | |
void | Initialize (G4HCofThisEvent *HCE) override |
void | EndOfEvent (G4HCofThisEvent *HCE) override |
void | clear () override |
G4bool | ProcessHits (G4Step *aStep, G4TouchableHistory *) override |
G4int | GetIndex (G4Step *aStep) override |
virtual G4double | GetConversionFactor (G4int particleID, G4double kineticEnergy) const |
Private Member Functions | |
void | DefineUnitAndCategory () const |
Define units -> taken from G4PSCellFlux. | |
Private Attributes | |
G4int | HCID3D |
Collection ID. | |
G4THitsMap< G4double > * | evtMap3D |
Hits map. | |
G4PhysicsVector * | conversionFactor |
Conversion factor interpolator object. | |
const BDSHistBinMapper * | mapper |
Mapping from coordinate systems in mesh to global replica number. | |
std::map< G4VSolid *, G4double > | volumeCache |
G4int | fDepthi |
Depth in replica to look for each dimension. | |
G4int | fDepthj |
Depth in replica to look for each dimension. | |
G4int | fDepthk |
Depth in replica to look for each dimension. | |
Primitive scorer for cell flux in a 3D mesh with a conversion factor.
The cell flux (step length / cell volume) * weight is also multiplied by a conversion factor (just a number) as listed vs energy in a supplied file. The default is none and just a factor of 1.
The implementation also differs from G4PSCellFlux3D as we cache the volume to avoid repeated calculation.
Definition at line 42 of file BDSPSCellFluxScaled3D.hh.
BDSPSCellFluxScaled3D::BDSPSCellFluxScaled3D | ( | const G4String & | scorerName, |
const BDSHistBinMapper * | mapperIn, | ||
const G4String & | unitIn = "percm2" , |
||
G4int | ni = 1 , |
||
G4int | nj = 1 , |
||
G4int | nk = 1 , |
||
G4int | depi = 2 , |
||
G4int | depj = 1 , |
||
G4int | depk = 0 |
||
) |
Constructor where no conversion factor file is provided and all cell fluxes just use conversion factor 1.0.
Definition at line 42 of file BDSPSCellFluxScaled3D.cc.
References DefineUnitAndCategory().
BDSPSCellFluxScaled3D::BDSPSCellFluxScaled3D | ( | const G4String & | scorerName, |
const BDSHistBinMapper * | mapperIn, | ||
const G4String & | filename, | ||
const G4String & | unitIn = "percm2" , |
||
G4int | ni = 1 , |
||
G4int | nj = 1 , |
||
G4int | nk = 1 , |
||
G4int | depi = 2 , |
||
G4int | depj = 1 , |
||
G4int | depk = 0 |
||
) |
Constructor where conversion factor file is provided and loaded into a physics vector. Cell fluxes are multiplied by the factor as a function of the particle kinetic energy.
Definition at line 65 of file BDSPSCellFluxScaled3D.cc.
References conversionFactor, BDS::GetFullPath(), and BDSScorerConversionLoader< T >::Load().
|
overridevirtual |
Definition at line 97 of file BDSPSCellFluxScaled3D.cc.
|
override |
Definition at line 153 of file BDSPSCellFluxScaled3D.cc.
|
private |
Define units -> taken from G4PSCellFlux.
Definition at line 182 of file BDSPSCellFluxScaled3D.cc.
Referenced by BDSPSCellFluxScaled3D().
|
override |
Definition at line 150 of file BDSPSCellFluxScaled3D.cc.
|
virtual |
Definition at line 135 of file BDSPSCellFluxScaled3D.cc.
|
override |
Definition at line 158 of file BDSPSCellFluxScaled3D.cc.
|
override |
Definition at line 141 of file BDSPSCellFluxScaled3D.cc.
|
override |
Definition at line 102 of file BDSPSCellFluxScaled3D.cc.
|
private |
Conversion factor interpolator object.
Definition at line 88 of file BDSPSCellFluxScaled3D.hh.
Referenced by BDSPSCellFluxScaled3D().
|
private |
Hits map.
Definition at line 79 of file BDSPSCellFluxScaled3D.hh.
|
private |
Depth in replica to look for each dimension.
Definition at line 82 of file BDSPSCellFluxScaled3D.hh.
|
private |
Depth in replica to look for each dimension.
Definition at line 83 of file BDSPSCellFluxScaled3D.hh.
|
private |
Depth in replica to look for each dimension.
Definition at line 84 of file BDSPSCellFluxScaled3D.hh.
|
private |
Collection ID.
Definition at line 78 of file BDSPSCellFluxScaled3D.hh.
|
private |
Mapping from coordinate systems in mesh to global replica number.
We don't own this.
Definition at line 91 of file BDSPSCellFluxScaled3D.hh.
|
private |
Definition at line 93 of file BDSPSCellFluxScaled3D.hh.