BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Primitive scorer for population in a volume with a conversion factor based on angle and kinetic energy. More...
#include <BDSPSPopulationScaled.hh>
Public Member Functions | |
BDSPSPopulationScaled (const G4String &name, G4int depth=0) | |
BDSPSPopulationScaled (const G4String &scorerName, const G4String &pathname, G4int depth=0) | |
void | Initialize (G4HCofThisEvent *HCE) override |
void | EndOfEvent (G4HCofThisEvent *HCE) override |
void | clear () override |
G4bool | ProcessHits (G4Step *aStep, G4TouchableHistory *) override |
virtual G4double | GetConversionFactor (G4int particleID, G4double kineticEnergy, G4double angle) const |
G4int | NearestNeighbourAngleIndex (const std::vector< G4double > &vec, G4double value) const |
G4int | NearestNeighbourIonPID (const std::vector< G4int > &vec, G4int value) const |
G4int | GetZFromParticleID (G4int particleID) const |
void | PrintAll () override |
Static Public Member Functions | |
static std::vector< G4String > | LoadDirectoryContents (const G4String &dirname) |
Private Attributes | |
G4int | HCID |
G4THitsMap< G4double > * | EvtMap |
std::map< G4int, G4TrackLogger > | fCellTrackLogger |
std::map< G4int, std::map< G4int, G4PhysicsVector * > > | conversionFactors |
std::map< G4int, std::vector< G4int > > | ionParticleIDs |
std::vector< G4double > | angles |
Primitive scorer for population in a volume with a conversion factor based on angle and kinetic energy.
Recorded particles are multiplied by a conversion factor based on the particle id, kinetic energy and incident angle. The tables for the conversion factor are provided in a directory and file structure.
The angle used for the lookup is the angle between the track and the detector axis.
Definition at line 43 of file BDSPSPopulationScaled.hh.
|
explicit |
Constructor where no conversion factor file is provided and all cell fluxes just use conversion factor 1.0.
Definition at line 43 of file BDSPSPopulationScaled.cc.
BDSPSPopulationScaled::BDSPSPopulationScaled | ( | const G4String & | scorerName, |
const G4String & | pathname, | ||
G4int | depth = 0 |
||
) |
Constructor where conversion factor file is provided and loaded into a map of maps of physics vectors. Population is multiplied by the factor as a function of the particle id, kinetic energy and angle.
Definition at line 50 of file BDSPSPopulationScaled.cc.
References BDS::FileExists(), BDS::GetFullPath(), and BDSScorerConversionLoader< T >::Load().
|
overridevirtual |
Definition at line 113 of file BDSPSPopulationScaled.cc.
|
override |
Definition at line 136 of file BDSPSPopulationScaled.cc.
|
override |
Definition at line 131 of file BDSPSPopulationScaled.cc.
|
virtual |
Definition at line 180 of file BDSPSPopulationScaled.cc.
G4int BDSPSPopulationScaled::GetZFromParticleID | ( | G4int | particleID | ) | const |
Definition at line 289 of file BDSPSPopulationScaled.cc.
|
override |
Definition at line 122 of file BDSPSPopulationScaled.cc.
|
static |
Definition at line 222 of file BDSPSPopulationScaled.cc.
G4int BDSPSPopulationScaled::NearestNeighbourAngleIndex | ( | const std::vector< G4double > & | vec, |
G4double | value | ||
) | const |
Definition at line 245 of file BDSPSPopulationScaled.cc.
G4int BDSPSPopulationScaled::NearestNeighbourIonPID | ( | const std::vector< G4int > & | vec, |
G4int | value | ||
) | const |
Definition at line 264 of file BDSPSPopulationScaled.cc.
|
override |
Definition at line 299 of file BDSPSPopulationScaled.cc.
|
override |
Definition at line 142 of file BDSPSPopulationScaled.cc.
|
private |
Definition at line 82 of file BDSPSPopulationScaled.hh.
|
private |
Definition at line 80 of file BDSPSPopulationScaled.hh.
|
private |
Definition at line 77 of file BDSPSPopulationScaled.hh.
|
private |
Definition at line 79 of file BDSPSPopulationScaled.hh.
|
private |
Definition at line 76 of file BDSPSPopulationScaled.hh.
|
private |
Definition at line 81 of file BDSPSPopulationScaled.hh.