BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Attributes
BDSPSPopulationScaled Class Reference

Primitive scorer for population in a volume with a conversion factor based on angle and kinetic energy. More...

#include <BDSPSPopulationScaled.hh>

Inheritance diagram for BDSPSPopulationScaled:
Inheritance graph
Collaboration diagram for BDSPSPopulationScaled:
Collaboration graph

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
 

Detailed Description

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.

Author
Andrey Abramov

Definition at line 43 of file BDSPSPopulationScaled.hh.

Constructor & Destructor Documentation

◆ BDSPSPopulationScaled() [1/2]

BDSPSPopulationScaled::BDSPSPopulationScaled ( const G4String &  name,
G4int  depth = 0 
)
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() [2/2]

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().

Here is the call graph for this function:

◆ ~BDSPSPopulationScaled()

BDSPSPopulationScaled::~BDSPSPopulationScaled ( )
overridevirtual

Definition at line 113 of file BDSPSPopulationScaled.cc.

Member Function Documentation

◆ clear()

void BDSPSPopulationScaled::clear ( )
override

Definition at line 136 of file BDSPSPopulationScaled.cc.

◆ EndOfEvent()

void BDSPSPopulationScaled::EndOfEvent ( G4HCofThisEvent *  HCE)
override

Definition at line 131 of file BDSPSPopulationScaled.cc.

◆ GetConversionFactor()

G4double BDSPSPopulationScaled::GetConversionFactor ( G4int  particleID,
G4double  kineticEnergy,
G4double  angle 
) const
virtual

Definition at line 180 of file BDSPSPopulationScaled.cc.

◆ GetZFromParticleID()

G4int BDSPSPopulationScaled::GetZFromParticleID ( G4int  particleID) const

Definition at line 289 of file BDSPSPopulationScaled.cc.

◆ Initialize()

void BDSPSPopulationScaled::Initialize ( G4HCofThisEvent *  HCE)
override

Definition at line 122 of file BDSPSPopulationScaled.cc.

◆ LoadDirectoryContents()

std::vector< G4String > BDSPSPopulationScaled::LoadDirectoryContents ( const G4String &  dirname)
static

Definition at line 222 of file BDSPSPopulationScaled.cc.

◆ NearestNeighbourAngleIndex()

G4int BDSPSPopulationScaled::NearestNeighbourAngleIndex ( const std::vector< G4double > &  vec,
G4double  value 
) const

Definition at line 245 of file BDSPSPopulationScaled.cc.

◆ NearestNeighbourIonPID()

G4int BDSPSPopulationScaled::NearestNeighbourIonPID ( const std::vector< G4int > &  vec,
G4int  value 
) const

Definition at line 264 of file BDSPSPopulationScaled.cc.

◆ PrintAll()

void BDSPSPopulationScaled::PrintAll ( )
override

Definition at line 299 of file BDSPSPopulationScaled.cc.

◆ ProcessHits()

G4bool BDSPSPopulationScaled::ProcessHits ( G4Step *  aStep,
G4TouchableHistory *   
)
override

Definition at line 142 of file BDSPSPopulationScaled.cc.

Field Documentation

◆ angles

std::vector<G4double> BDSPSPopulationScaled::angles
private

Definition at line 82 of file BDSPSPopulationScaled.hh.

◆ conversionFactors

std::map< G4int, std::map<G4int, G4PhysicsVector*> > BDSPSPopulationScaled::conversionFactors
private

Definition at line 80 of file BDSPSPopulationScaled.hh.

◆ EvtMap

G4THitsMap<G4double>* BDSPSPopulationScaled::EvtMap
private

Definition at line 77 of file BDSPSPopulationScaled.hh.

◆ fCellTrackLogger

std::map<G4int, G4TrackLogger> BDSPSPopulationScaled::fCellTrackLogger
private

Definition at line 79 of file BDSPSPopulationScaled.hh.

◆ HCID

G4int BDSPSPopulationScaled::HCID
private

Definition at line 76 of file BDSPSPopulationScaled.hh.

◆ ionParticleIDs

std::map< G4int, std::vector<G4int> > BDSPSPopulationScaled::ionParticleIDs
private

Definition at line 81 of file BDSPSPopulationScaled.hh.


The documentation for this class was generated from the following files: