BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Holder for output information. More...
#include <BDSOutputStructures.hh>
Protected Member Functions | |
BDSOutputStructures (const BDSGlobalConstants *globals) | |
void | InitialiseSamplers () |
Construct samplers. More... | |
void | InitialiseMaterialMap () |
Construct a map of material pointer to integer ID and name. More... | |
G4int | UpdateSamplerStructures () |
Interface to allow setting up samplers later for dynamic geometry construction a la SixTrack. Not for regular use. More... | |
void | PrepareCollimatorInformation () |
void | InitialiseCollimators () |
Construct collimtors. More... | |
void | ClearStructuresParticleData () |
Clear the local particle data structure. More... | |
void | ClearStructuresHeader () |
Clear the local header structure. More... | |
void | ClearStructuresModel () |
Clear the local model structure. More... | |
void | ClearStructuresBeam () |
Clear the local beam structure. More... | |
void | ClearStructuresOptions () |
Clear the local options structure. More... | |
void | ClearStructuresEventLevel () |
Clear the local structures in this class in preparation for a new event. More... | |
void | ClearStructuresRunLevel () |
Clear the local structures in this class in preparation for a new run. More... | |
G4int | Create1DHistogram (G4String name, G4String title, G4int nbins, G4double xmin, G4double xmax) |
Create histograms for both evtHistos and runHistos. Return index from evtHistos. More... | |
G4int | Create1DHistogram (G4String name, G4String title, std::vector< double > &edges) |
Create histograms for both evtHistos and runHistos. Return index from evtHistos. More... | |
G4int | Create3DHistogram (G4String name, G4String title, G4int nBinsX, G4double xMin, G4double xMax, G4int nBinsY, G4double yMin, G4double yMax, G4int nBinsZ, G4double zMin, G4double zMax) |
Create histograms for both evtHistos and runHistos. Return index from evtHistos. More... | |
G4int | Create4DHistogram (const G4String &name, const G4String &title, const G4String &eScale, const std::vector< double > &eBinsEdges, G4int nBinsX, G4double xMin, G4double xMax, G4int nBinsY, G4double yMin, G4double yMax, G4int nBinsZ, G4double zMin, G4double zMax, G4int nBinsE, G4double eMin, G4double eMax) |
Create histograms for both evtHistos and runHistos. Return index from evtHistos. More... | |
Private Member Functions | |
BDSOutputStructures ()=delete | |
Unused default constructors. | |
BDSOutputStructures (const BDSOutputStructures &)=delete | |
Unused default constructors. | |
BDSOutputStructures & | operator= (const BDSOutputStructures &)=delete |
Unused default constructors. | |
Private Attributes | |
G4bool | localSamplersInitialised |
G4bool | localCollimatorsInitialised |
Whether we've setup the member vector of collimators. Similarly to localSamplersInitialised. More... | |
Holder for output information.
This holds instances of the output classes that can be filled and directly copied to the output file. It also holds and fills the histograms.
Definition at line 61 of file BDSOutputStructures.hh.
|
explicitprotected |
Definition at line 60 of file BDSOutputStructures.cc.
|
protectedvirtual |
Definition at line 116 of file BDSOutputStructures.cc.
|
protected |
Clear the local beam structure.
Definition at line 390 of file BDSOutputStructures.cc.
References beamOutput.
Referenced by BDSOutput::FillBeam().
|
protected |
Clear the local structures in this class in preparation for a new event.
Definition at line 400 of file BDSOutputStructures.cc.
References apertureImpacts, collimators, eLoss, eLossTunnel, eLossVacuum, eLossWorld, eLossWorldContents, eLossWorldExit, evtHistos, evtInfo, BDSOutputROOTEventHistograms::Flush(), BDSOutputROOTEventSampler< U >::Flush(), BDSOutputROOTEventTrajectory::Flush(), pFirstHit, pLastHit, primary, samplerTrees, and traj.
Referenced by BDSOutput::FillEvent(), and BDSOutput::FillEventPrimaryOnly().
|
protected |
Clear the local header structure.
Definition at line 380 of file BDSOutputStructures.cc.
References headerOutput.
Referenced by BDSOutput::FillHeader().
|
protected |
Clear the local model structure.
Definition at line 385 of file BDSOutputStructures.cc.
References BDSOutputROOTEventModel::Flush(), and modelOutput.
Referenced by BDSOutput::FillModel().
|
protected |
Clear the local options structure.
Definition at line 395 of file BDSOutputStructures.cc.
References optionsOutput.
Referenced by BDSOutput::FillOptions().
|
protected |
Clear the local particle data structure.
Definition at line 375 of file BDSOutputStructures.cc.
References BDSOutputROOTParticleData::Flush(), and particleDataOutput.
|
protected |
Clear the local structures in this class in preparation for a new run.
Definition at line 426 of file BDSOutputStructures.cc.
References runInfo.
Referenced by BDSOutput::FillRun().
|
protected |
Create histograms for both evtHistos and runHistos. Return index from evtHistos.
Definition at line 149 of file BDSOutputStructures.cc.
References evtHistos, and runHistos.
Referenced by BDSOutput::CreateHistograms().
|
protected |
Create histograms for both evtHistos and runHistos. Return index from evtHistos.
Definition at line 158 of file BDSOutputStructures.cc.
|
protected |
Create histograms for both evtHistos and runHistos. Return index from evtHistos.
Definition at line 166 of file BDSOutputStructures.cc.
References evtHistos, and runHistos.
Referenced by BDSOutput::CreateHistograms().
|
protected |
Create histograms for both evtHistos and runHistos. Return index from evtHistos.
Definition at line 183 of file BDSOutputStructures.cc.
References evtHistos, and runHistos.
Referenced by BDSOutput::CreateHistograms().
|
protected |
Construct collimtors.
Definition at line 365 of file BDSOutputStructures.cc.
References collimatorIndices, collimators, and localCollimatorsInitialised.
Referenced by BDSOutput::InitialiseGeometryDependent().
|
protected |
Construct a map of material pointer to integer ID and name.
Definition at line 269 of file BDSOutputStructures.cc.
Referenced by BDSOutput::InitialiseGeometryDependent().
|
protected |
Construct samplers.
Definition at line 206 of file BDSOutputStructures.cc.
References BDSSamplerRegistry::Instance(), localSamplersInitialised, samplerNames, and samplerTrees.
Referenced by BDSOutput::InitialiseGeometryDependent().
|
protected |
Extract number of collimators and their names from beam line. Two stage initialisation for collimators so histograms can be made dynamically if required or not based on number of collimators.
Definition at line 336 of file BDSOutputStructures.cc.
References BDSBeamline::at(), BDSAcceleratorModel::BeamlineMain(), collimatorDifferences, collimatorIndices, collimatorIndicesByName, collimatorInfo, collimatorNames, BDSBeamline::GetIndicesOfCollimators(), BDSBeamlineElement::GetName(), BDSBeamlineElement::GetPlacementName(), and nCollimators.
Referenced by BDSOutput::InitialiseGeometryDependent().
|
protected |
Interface to allow setting up samplers later for dynamic geometry construction a la SixTrack. Not for regular use.
TBC - does not do cylinder or spheres
Definition at line 315 of file BDSOutputStructures.cc.
References BDSSamplerRegistry::Instance(), samplerNames, and samplerTrees.
Referenced by BDSOutput::UpdateSamplers(), and BDSOutputROOT::UpdateSamplers().
|
protected |
Impacts on the aperture.
Definition at line 167 of file BDSOutputStructures.hh.
Referenced by ClearStructuresEventLevel(), BDSOutput::FillApertureImpacts(), BDSOutput::FillEvent(), and BDSOutputROOT::NewFile().
|
protected |
Beam output.
Definition at line 131 of file BDSOutputStructures.hh.
Referenced by ClearStructuresBeam(), BDSOutput::FillBeam(), and BDSOutputROOT::NewFile().
|
protected |
Cache of aperture differences for each collimator info to avoid repeated calculation and to avoid storing unnecessary output in the collimator info.
Definition at line 181 of file BDSOutputStructures.hh.
Referenced by BDSOutput::FillCollimatorHits(), and PrepareCollimatorInformation().
|
protected |
Indices in beam line that are collimators.
Definition at line 176 of file BDSOutputStructures.hh.
Referenced by BDSOutput::FillCollimatorHits(), BDSOutput::FillEnergyLoss(), BDSOutput::FillModel(), BDSOutput::FillPrimaryHit(), BDSOutput::FillPrimaryLoss(), InitialiseCollimators(), and PrepareCollimatorInformation().
|
protected |
Indices mapped to their name.
Definition at line 177 of file BDSOutputStructures.hh.
Referenced by BDSOutput::FillModel(), and PrepareCollimatorInformation().
|
protected |
Collimator parameters.
Definition at line 178 of file BDSOutputStructures.hh.
Referenced by BDSOutput::FillCollimatorHits(), BDSOutput::FillModel(), and PrepareCollimatorInformation().
|
protected |
Names of collimators in output structures.
Definition at line 174 of file BDSOutputStructures.hh.
Referenced by BDSOutput::FillModel(), BDSOutputROOT::NewFile(), and PrepareCollimatorInformation().
|
protected |
Collimator output structures.
Definition at line 173 of file BDSOutputStructures.hh.
Referenced by ClearStructuresEventLevel(), BDSOutput::FillCollimatorHits(), InitialiseCollimators(), and BDSOutputROOT::NewFile().
|
protected |
General energy deposition.
Definition at line 159 of file BDSOutputStructures.hh.
Referenced by ClearStructuresEventLevel(), BDSOutput::FillEnergyLoss(), and BDSOutputROOT::NewFile().
|
protected |
Tunnel energy deposition.
Definition at line 163 of file BDSOutputStructures.hh.
Referenced by ClearStructuresEventLevel(), BDSOutput::FillEnergyLoss(), and BDSOutputROOT::NewFile().
|
protected |
General energy deposition.
Definition at line 162 of file BDSOutputStructures.hh.
Referenced by ClearStructuresEventLevel(), BDSOutput::FillEnergyLoss(), and BDSOutputROOT::NewFile().
|
protected |
World energy deposition.
Definition at line 164 of file BDSOutputStructures.hh.
Referenced by ClearStructuresEventLevel(), BDSOutput::FillEnergyLoss(), and BDSOutputROOT::NewFile().
|
protected |
Externally supplied world contents hits.
Definition at line 166 of file BDSOutputStructures.hh.
Referenced by ClearStructuresEventLevel(), BDSOutput::FillEnergyLoss(), and BDSOutputROOT::NewFile().
|
protected |
World exit hits.
Definition at line 165 of file BDSOutputStructures.hh.
Referenced by ClearStructuresEventLevel(), BDSOutput::FillEnergyLoss(), and BDSOutputROOT::NewFile().
|
protected |
Event level histograms.
Definition at line 169 of file BDSOutputStructures.hh.
Referenced by ClearStructuresEventLevel(), BDSOutput::CopyFromHistToHist1D(), Create1DHistogram(), Create3DHistogram(), Create4DHistogram(), BDSOutput::FillApertureImpacts(), BDSOutput::FillCollimatorHits(), BDSOutput::FillEnergyLoss(), BDSOutput::FillPrimaryHit(), BDSOutput::FillPrimaryLoss(), BDSOutput::FillScorerHitsIndividual(), and BDSOutputROOT::NewFile().
|
protected |
Event information.
Definition at line 170 of file BDSOutputStructures.hh.
Referenced by ClearStructuresEventLevel(), BDSOutput::FillEventInfo(), and BDSOutputROOT::NewFile().
|
protected |
Information about the file.
Definition at line 130 of file BDSOutputStructures.hh.
Referenced by ClearStructuresHeader(), BDSOutput::FillHeader(), and BDSOutputROOT::NewFile().
|
private |
Whether we've setup the member vector of collimators. Similarly to localSamplersInitialised.
Definition at line 193 of file BDSOutputStructures.hh.
Referenced by InitialiseCollimators().
|
private |
Whether we've set up the member vector of samplers. Can only be done once the geometry is constructed so it's done in initialisation. This happens with each new file, but we should only prepare the local samplers once, hence this cache variable.
Definition at line 190 of file BDSOutputStructures.hh.
Referenced by InitialiseSamplers().
|
protected |
Definition at line 184 of file BDSOutputStructures.hh.
|
protected |
Definition at line 183 of file BDSOutputStructures.hh.
|
protected |
Model output.
Definition at line 133 of file BDSOutputStructures.hh.
Referenced by ClearStructuresModel(), BDSOutput::FillModel(), and BDSOutputROOT::NewFile().
|
protected |
Number of collimators in beam line.
Definition at line 175 of file BDSOutputStructures.hh.
Referenced by BDSOutput::CreateHistograms(), BDSOutput::FillCollimatorHits(), BDSOutput::FillEnergyLoss(), BDSOutput::FillPrimaryHit(), BDSOutput::FillPrimaryLoss(), and PrepareCollimatorInformation().
|
protected |
Options output.
Definition at line 132 of file BDSOutputStructures.hh.
Referenced by ClearStructuresOptions(), BDSOutput::FillOptions(), and BDSOutputROOT::NewFile().
|
protected |
Geant4 information / particle tables.
Definition at line 129 of file BDSOutputStructures.hh.
Referenced by ClearStructuresParticleData(), BDSOutput::FillParticleData(), and BDSOutputROOT::NewFile().
|
protected |
Primary hit point.
Definition at line 160 of file BDSOutputStructures.hh.
Referenced by ClearStructuresEventLevel(), BDSOutput::FillPrimaryHit(), and BDSOutputROOT::NewFile().
|
protected |
Primary loss point.
Definition at line 161 of file BDSOutputStructures.hh.
Referenced by ClearStructuresEventLevel(), BDSOutput::FillPrimaryLoss(), and BDSOutputROOT::NewFile().
|
protected |
Primary sampler structure.
Definition at line 137 of file BDSOutputStructures.hh.
Referenced by ClearStructuresEventLevel(), BDSOutput::FillEventPrimaryOnly(), BDSOutput::FillPrimary(), and BDSOutputROOT::NewFile().
|
protected |
Definition at line 139 of file BDSOutputStructures.hh.
|
protected |
Definition at line 141 of file BDSOutputStructures.hh.
|
protected |
Run level histograms.
Definition at line 158 of file BDSOutputStructures.hh.
Referenced by BDSOutput::CopyFromHistToHist1D(), Create1DHistogram(), Create3DHistogram(), Create4DHistogram(), BDSOutput::FillEnergyLoss(), BDSOutput::FillPrimaryHit(), BDSOutput::FillPrimaryLoss(), BDSOutput::FillScorerHitsIndividual(), and BDSOutputROOT::NewFile().
|
protected |
Run information.
Definition at line 157 of file BDSOutputStructures.hh.
Referenced by ClearStructuresRunLevel(), BDSOutput::FillRunInfo(), and BDSOutputROOT::NewFile().
|
protected |
Definition at line 151 of file BDSOutputStructures.hh.
|
protected |
Definition at line 149 of file BDSOutputStructures.hh.
|
protected |
Definition at line 154 of file BDSOutputStructures.hh.
|
protected |
Definition at line 153 of file BDSOutputStructures.hh.
|
protected |
Definition at line 155 of file BDSOutputStructures.hh.
|
protected |
Sampler names to use.
Definition at line 148 of file BDSOutputStructures.hh.
Referenced by InitialiseSamplers(), BDSOutputROOT::NewFile(), BDSOutputROOT::UpdateSamplers(), and UpdateSamplerStructures().
|
protected |
Definition at line 152 of file BDSOutputStructures.hh.
|
protected |
Definition at line 150 of file BDSOutputStructures.hh.
|
protected |
Sampler structures.
Global coordinates of primary particle.
Definition at line 144 of file BDSOutputStructures.hh.
Referenced by ClearStructuresEventLevel(), BDSOutput::FillSamplerHits(), BDSOutput::FillSamplerHitsLink(), BDSOutput::FillSamplerHitsVector(), InitialiseSamplers(), BDSOutputROOT::NewFile(), BDSOutputROOT::UpdateSamplers(), and UpdateSamplerStructures().
|
protected |
Definition at line 146 of file BDSOutputStructures.hh.
|
protected |
Trajectories.
Definition at line 168 of file BDSOutputStructures.hh.
Referenced by ClearStructuresEventLevel(), BDSOutput::FillTrajectories(), and BDSOutputROOT::NewFile().