BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Public Member Functions | Data Fields
BDSOutputROOTEventModel Class Reference

Information stored per model representing accelerator. More...

#include <BDSOutputROOTEventModel.hh>

Inheritance diagram for BDSOutputROOTEventModel:
Inheritance graph
Collaboration diagram for BDSOutputROOTEventModel:
Collaboration graph

Public Member Functions

 BDSOutputROOTEventModel ()
 Default constructor.
 
virtual ~BDSOutputROOTEventModel ()
 Destructor. More...
 
void Flush ()
 Initialise all members. More...
 
int findNearestElement (const TVector3 &point) const
 Find element index closest to point. More...
 
 BDSOutputROOTEventModel (G4bool storeCollimatorInfoIn)
 Constructor for whether to store collimator information or not. More...
 
TRotation ConvertToROOT (const G4RotationMatrix *rm) const
 Utility function. More...
 
TRotation ConvertToROOT (const G4RotationMatrix &rm) const
 
TVector3 ConvertToROOT (const G4ThreeVector &v) const
 
virtual void Fill (const std::vector< G4int > &collimatorIndicesIn={}, const std::map< G4String, G4int > &collimatorIndicesByNameIn={}, const std::vector< BDSOutputROOTEventCollimatorInfo > &collimatorInfoIn={}, const std::vector< G4String > &collimatorBranchNamesIn={}, const std::map< G4String, G4Transform3D > *scorerMeshPlacements=nullptr, const std::map< short int, G4String > *materialIDToNameUnique=nullptr, G4bool storeTrajectory=false)
 Fill root output. More...
 
 ClassDef (BDSOutputROOTEventModel, 6)
 

Data Fields

int n
 
std::vector< std::string > componentName
 
std::vector< std::string > placementName
 
std::vector< std::string > componentType
 
std::vector< float > length
 
std::vector< float > angle
 
std::vector< TVector3 > staPos
 
std::vector< TVector3 > midPos
 
std::vector< TVector3 > endPos
 
std::vector< TRotation > staRot
 
std::vector< TRotation > midRot
 
std::vector< TRotation > endRot
 
std::vector< TVector3 > staRefPos
 
std::vector< TVector3 > midRefPos
 
std::vector< TVector3 > endRefPos
 
std::vector< TRotation > staRefRot
 
std::vector< TRotation > midRefRot
 
std::vector< TRotation > endRefRot
 
std::vector< float > tilt
 
std::vector< float > offsetX
 
std::vector< float > offsetY
 
std::vector< float > staS
 
std::vector< float > midS
 
std::vector< float > endS
 
std::vector< std::string > beamPipeType
 
std::vector< double > beamPipeAper1
 
std::vector< double > beamPipeAper2
 
std::vector< double > beamPipeAper3
 
std::vector< double > beamPipeAper4
 
std::vector< std::string > material
 Material associated with element if any. More...
 
std::vector< float > k1
 
std::vector< float > k2
 
std::vector< float > k3
 
std::vector< float > k4
 
std::vector< float > k5
 
std::vector< float > k6
 
std::vector< float > k7
 
std::vector< float > k8
 
std::vector< float > k9
 
std::vector< float > k10
 
std::vector< float > k11
 
std::vector< float > k12
 
std::vector< float > k1s
 
std::vector< float > k2s
 
std::vector< float > k3s
 
std::vector< float > k4s
 
std::vector< float > k5s
 
std::vector< float > k6s
 
std::vector< float > k7s
 
std::vector< float > k8s
 
std::vector< float > k9s
 
std::vector< float > k10s
 
std::vector< float > k11s
 
std::vector< float > k12s
 
std::vector< float > ks
 Solenoid strength. More...
 
std::vector< float > hkick
 Horizontal fractional momentum kick. More...
 
std::vector< float > vkick
 Vertical fractional momentum kick. More...
 
std::vector< float > bField
 B field in T. More...
 
std::vector< float > eField
 E field in V/m. More...
 
std::vector< float > e1
 
std::vector< float > e2
 
std::vector< float > hgap
 
std::vector< float > fint
 
std::vector< float > fintx
 
std::vector< float > fintk2
 
std::vector< float > fintxk2
 
bool storeCollimatorInfo
 Whether optional collimator information was stored. More...
 
std::vector< int > collimatorIndices
 
std::map< std::string, int > collimatorIndicesByName
 Similar cache but by name of collimator as built by BDSIM. More...
 
int nCollimators
 Number of collimators in beam line. More...
 
std::vector< BDSOutputROOTEventCollimatorInfocollimatorInfo
 Collimator information explicitly. More...
 
std::vector< std::string > collimatorBranchNamesUnique
 Vector of all collimator branch names in event tree used to load data. More...
 
std::map< std::string, TVector3 > scoringMeshTranslation
 
std::map< std::string, TRotation > scoringMeshRotation
 
std::vector< std::string > scoringMeshName
 
std::map< short int, std::string > materialIDToName
 
std::map< std::string, short int > materialNameToID
 
std::vector< std::string > samplerNamesUnique
 
std::vector< double > samplerSPosition
 
std::vector< std::string > samplerCNamesUnique
 
std::vector< std::string > samplerSNamesUnique
 
std::map< std::string, double > samplerCRadius
 
std::map< std::string, double > samplerSRadius
 

Detailed Description

Information stored per model representing accelerator.

Author
Stewart Boogert

Definition at line 46 of file BDSOutputROOTEventModel.hh.

Constructor & Destructor Documentation

◆ ~BDSOutputROOTEventModel()

BDSOutputROOTEventModel::~BDSOutputROOTEventModel ( )
virtual

Destructor.

Definition at line 51 of file BDSOutputROOTEventModel.cc.

◆ BDSOutputROOTEventModel()

BDSOutputROOTEventModel::BDSOutputROOTEventModel ( G4bool  storeCollimatorInfoIn)
explicit

Constructor for whether to store collimator information or not.

Definition at line 161 of file BDSOutputROOTEventModel.cc.

Member Function Documentation

◆ ConvertToROOT() [1/3]

TRotation BDSOutputROOTEventModel::ConvertToROOT ( const G4RotationMatrix &  rm) const

Definition at line 182 of file BDSOutputROOTEventModel.cc.

◆ ConvertToROOT() [2/3]

TRotation BDSOutputROOTEventModel::ConvertToROOT ( const G4RotationMatrix *  rm) const

Utility function.

Definition at line 167 of file BDSOutputROOTEventModel.cc.

Referenced by Fill().

Here is the caller graph for this function:

◆ ConvertToROOT() [3/3]

TVector3 BDSOutputROOTEventModel::ConvertToROOT ( const G4ThreeVector &  v) const

Definition at line 187 of file BDSOutputROOTEventModel.cc.

◆ Fill()

void BDSOutputROOTEventModel::Fill ( const std::vector< G4int > &  collimatorIndicesIn = {},
const std::map< G4String, G4int > &  collimatorIndicesByNameIn = {},
const std::vector< BDSOutputROOTEventCollimatorInfo > &  collimatorInfoIn = {},
const std::vector< G4String > &  collimatorBranchNamesIn = {},
const std::map< G4String, G4Transform3D > *  scorerMeshPlacements = nullptr,
const std::map< short int, G4String > *  materialIDToNameUnique = nullptr,
G4bool  storeTrajectory = false 
)
virtual

◆ findNearestElement()

int BDSOutputROOTEventModel::findNearestElement ( const TVector3 &  point) const

Find element index closest to point.

Definition at line 54 of file BDSOutputROOTEventModel.cc.

◆ Flush()

void BDSOutputROOTEventModel::Flush ( )

Initialise all members.

Definition at line 71 of file BDSOutputROOTEventModel.cc.

References bField, collimatorBranchNamesUnique, collimatorIndices, collimatorIndicesByName, collimatorInfo, eField, hkick, ks, material, nCollimators, storeCollimatorInfo, and vkick.

Referenced by BDSOutputStructures::ClearStructuresModel().

Here is the caller graph for this function:

Field Documentation

◆ angle

std::vector<float> BDSOutputROOTEventModel::angle

Definition at line 84 of file BDSOutputROOTEventModel.hh.

◆ beamPipeAper1

std::vector<double> BDSOutputROOTEventModel::beamPipeAper1

Definition at line 104 of file BDSOutputROOTEventModel.hh.

◆ beamPipeAper2

std::vector<double> BDSOutputROOTEventModel::beamPipeAper2

Definition at line 105 of file BDSOutputROOTEventModel.hh.

◆ beamPipeAper3

std::vector<double> BDSOutputROOTEventModel::beamPipeAper3

Definition at line 106 of file BDSOutputROOTEventModel.hh.

◆ beamPipeAper4

std::vector<double> BDSOutputROOTEventModel::beamPipeAper4

Definition at line 107 of file BDSOutputROOTEventModel.hh.

◆ beamPipeType

std::vector<std::string> BDSOutputROOTEventModel::beamPipeType

Definition at line 103 of file BDSOutputROOTEventModel.hh.

◆ bField

std::vector<float> BDSOutputROOTEventModel::bField

B field in T.

Definition at line 136 of file BDSOutputROOTEventModel.hh.

Referenced by Fill(), and Flush().

◆ collimatorBranchNamesUnique

std::vector<std::string> BDSOutputROOTEventModel::collimatorBranchNamesUnique

Vector of all collimator branch names in event tree used to load data.

Definition at line 160 of file BDSOutputROOTEventModel.hh.

Referenced by Model::CollimatorNames(), Fill(), and Flush().

◆ collimatorIndices

std::vector<int> BDSOutputROOTEventModel::collimatorIndices

Optional cache of indices in beam line of collimators used to extract collimator information.

Definition at line 151 of file BDSOutputROOTEventModel.hh.

Referenced by Fill(), and Flush().

◆ collimatorIndicesByName

std::map<std::string, int> BDSOutputROOTEventModel::collimatorIndicesByName

Similar cache but by name of collimator as built by BDSIM.

Definition at line 154 of file BDSOutputROOTEventModel.hh.

Referenced by Fill(), and Flush().

◆ collimatorInfo

std::vector<BDSOutputROOTEventCollimatorInfo> BDSOutputROOTEventModel::collimatorInfo

Collimator information explicitly.

Definition at line 157 of file BDSOutputROOTEventModel.hh.

Referenced by Fill(), and Flush().

◆ componentName

std::vector<std::string> BDSOutputROOTEventModel::componentName

Definition at line 80 of file BDSOutputROOTEventModel.hh.

◆ componentType

std::vector<std::string> BDSOutputROOTEventModel::componentType

Definition at line 82 of file BDSOutputROOTEventModel.hh.

◆ e1

std::vector<float> BDSOutputROOTEventModel::e1

Definition at line 138 of file BDSOutputROOTEventModel.hh.

◆ e2

std::vector<float> BDSOutputROOTEventModel::e2

Definition at line 139 of file BDSOutputROOTEventModel.hh.

◆ eField

std::vector<float> BDSOutputROOTEventModel::eField

E field in V/m.

Definition at line 137 of file BDSOutputROOTEventModel.hh.

Referenced by Fill(), and Flush().

◆ endPos

std::vector<TVector3> BDSOutputROOTEventModel::endPos

Definition at line 87 of file BDSOutputROOTEventModel.hh.

◆ endRefPos

std::vector<TVector3> BDSOutputROOTEventModel::endRefPos

Definition at line 93 of file BDSOutputROOTEventModel.hh.

◆ endRefRot

std::vector<TRotation> BDSOutputROOTEventModel::endRefRot

Definition at line 96 of file BDSOutputROOTEventModel.hh.

◆ endRot

std::vector<TRotation> BDSOutputROOTEventModel::endRot

Definition at line 90 of file BDSOutputROOTEventModel.hh.

◆ endS

std::vector<float> BDSOutputROOTEventModel::endS

Definition at line 102 of file BDSOutputROOTEventModel.hh.

◆ fint

std::vector<float> BDSOutputROOTEventModel::fint

Definition at line 141 of file BDSOutputROOTEventModel.hh.

◆ fintk2

std::vector<float> BDSOutputROOTEventModel::fintk2

Definition at line 143 of file BDSOutputROOTEventModel.hh.

◆ fintx

std::vector<float> BDSOutputROOTEventModel::fintx

Definition at line 142 of file BDSOutputROOTEventModel.hh.

◆ fintxk2

std::vector<float> BDSOutputROOTEventModel::fintxk2

Definition at line 144 of file BDSOutputROOTEventModel.hh.

◆ hgap

std::vector<float> BDSOutputROOTEventModel::hgap

Definition at line 140 of file BDSOutputROOTEventModel.hh.

◆ hkick

std::vector<float> BDSOutputROOTEventModel::hkick

Horizontal fractional momentum kick.

Definition at line 134 of file BDSOutputROOTEventModel.hh.

Referenced by Fill(), and Flush().

◆ k1

std::vector<float> BDSOutputROOTEventModel::k1

Definition at line 109 of file BDSOutputROOTEventModel.hh.

◆ k10

std::vector<float> BDSOutputROOTEventModel::k10

Definition at line 118 of file BDSOutputROOTEventModel.hh.

◆ k10s

std::vector<float> BDSOutputROOTEventModel::k10s

Definition at line 130 of file BDSOutputROOTEventModel.hh.

◆ k11

std::vector<float> BDSOutputROOTEventModel::k11

Definition at line 119 of file BDSOutputROOTEventModel.hh.

◆ k11s

std::vector<float> BDSOutputROOTEventModel::k11s

Definition at line 131 of file BDSOutputROOTEventModel.hh.

◆ k12

std::vector<float> BDSOutputROOTEventModel::k12

Definition at line 120 of file BDSOutputROOTEventModel.hh.

◆ k12s

std::vector<float> BDSOutputROOTEventModel::k12s

Definition at line 132 of file BDSOutputROOTEventModel.hh.

◆ k1s

std::vector<float> BDSOutputROOTEventModel::k1s

Definition at line 121 of file BDSOutputROOTEventModel.hh.

◆ k2

std::vector<float> BDSOutputROOTEventModel::k2

Definition at line 110 of file BDSOutputROOTEventModel.hh.

◆ k2s

std::vector<float> BDSOutputROOTEventModel::k2s

Definition at line 122 of file BDSOutputROOTEventModel.hh.

◆ k3

std::vector<float> BDSOutputROOTEventModel::k3

Definition at line 111 of file BDSOutputROOTEventModel.hh.

◆ k3s

std::vector<float> BDSOutputROOTEventModel::k3s

Definition at line 123 of file BDSOutputROOTEventModel.hh.

◆ k4

std::vector<float> BDSOutputROOTEventModel::k4

Definition at line 112 of file BDSOutputROOTEventModel.hh.

◆ k4s

std::vector<float> BDSOutputROOTEventModel::k4s

Definition at line 124 of file BDSOutputROOTEventModel.hh.

◆ k5

std::vector<float> BDSOutputROOTEventModel::k5

Definition at line 113 of file BDSOutputROOTEventModel.hh.

◆ k5s

std::vector<float> BDSOutputROOTEventModel::k5s

Definition at line 125 of file BDSOutputROOTEventModel.hh.

◆ k6

std::vector<float> BDSOutputROOTEventModel::k6

Definition at line 114 of file BDSOutputROOTEventModel.hh.

◆ k6s

std::vector<float> BDSOutputROOTEventModel::k6s

Definition at line 126 of file BDSOutputROOTEventModel.hh.

◆ k7

std::vector<float> BDSOutputROOTEventModel::k7

Definition at line 115 of file BDSOutputROOTEventModel.hh.

◆ k7s

std::vector<float> BDSOutputROOTEventModel::k7s

Definition at line 127 of file BDSOutputROOTEventModel.hh.

◆ k8

std::vector<float> BDSOutputROOTEventModel::k8

Definition at line 116 of file BDSOutputROOTEventModel.hh.

◆ k8s

std::vector<float> BDSOutputROOTEventModel::k8s

Definition at line 128 of file BDSOutputROOTEventModel.hh.

◆ k9

std::vector<float> BDSOutputROOTEventModel::k9

Definition at line 117 of file BDSOutputROOTEventModel.hh.

◆ k9s

std::vector<float> BDSOutputROOTEventModel::k9s

Definition at line 129 of file BDSOutputROOTEventModel.hh.

◆ ks

std::vector<float> BDSOutputROOTEventModel::ks

Solenoid strength.

Definition at line 133 of file BDSOutputROOTEventModel.hh.

Referenced by Fill(), and Flush().

◆ length

std::vector<float> BDSOutputROOTEventModel::length

Definition at line 83 of file BDSOutputROOTEventModel.hh.

◆ material

std::vector<std::string> BDSOutputROOTEventModel::material

Material associated with element if any.

Definition at line 108 of file BDSOutputROOTEventModel.hh.

Referenced by Fill(), and Flush().

◆ materialIDToName

std::map<short int, std::string> BDSOutputROOTEventModel::materialIDToName

Definition at line 166 of file BDSOutputROOTEventModel.hh.

◆ materialNameToID

std::map<std::string, short int> BDSOutputROOTEventModel::materialNameToID

Definition at line 167 of file BDSOutputROOTEventModel.hh.

◆ midPos

std::vector<TVector3> BDSOutputROOTEventModel::midPos

Definition at line 86 of file BDSOutputROOTEventModel.hh.

◆ midRefPos

std::vector<TVector3> BDSOutputROOTEventModel::midRefPos

Definition at line 92 of file BDSOutputROOTEventModel.hh.

◆ midRefRot

std::vector<TRotation> BDSOutputROOTEventModel::midRefRot

Definition at line 95 of file BDSOutputROOTEventModel.hh.

◆ midRot

std::vector<TRotation> BDSOutputROOTEventModel::midRot

Definition at line 89 of file BDSOutputROOTEventModel.hh.

◆ midS

std::vector<float> BDSOutputROOTEventModel::midS

Definition at line 101 of file BDSOutputROOTEventModel.hh.

◆ n

int BDSOutputROOTEventModel::n

Definition at line 79 of file BDSOutputROOTEventModel.hh.

◆ nCollimators

int BDSOutputROOTEventModel::nCollimators

Number of collimators in beam line.

Definition at line 156 of file BDSOutputROOTEventModel.hh.

Referenced by Fill(), and Flush().

◆ offsetX

std::vector<float> BDSOutputROOTEventModel::offsetX

Definition at line 98 of file BDSOutputROOTEventModel.hh.

◆ offsetY

std::vector<float> BDSOutputROOTEventModel::offsetY

Definition at line 99 of file BDSOutputROOTEventModel.hh.

◆ placementName

std::vector<std::string> BDSOutputROOTEventModel::placementName

Definition at line 81 of file BDSOutputROOTEventModel.hh.

◆ samplerCNamesUnique

std::vector<std::string> BDSOutputROOTEventModel::samplerCNamesUnique

Definition at line 171 of file BDSOutputROOTEventModel.hh.

◆ samplerCRadius

std::map<std::string, double> BDSOutputROOTEventModel::samplerCRadius

Definition at line 173 of file BDSOutputROOTEventModel.hh.

◆ samplerNamesUnique

std::vector<std::string> BDSOutputROOTEventModel::samplerNamesUnique

Definition at line 169 of file BDSOutputROOTEventModel.hh.

◆ samplerSNamesUnique

std::vector<std::string> BDSOutputROOTEventModel::samplerSNamesUnique

Definition at line 172 of file BDSOutputROOTEventModel.hh.

◆ samplerSPosition

std::vector<double> BDSOutputROOTEventModel::samplerSPosition

Definition at line 170 of file BDSOutputROOTEventModel.hh.

◆ samplerSRadius

std::map<std::string, double> BDSOutputROOTEventModel::samplerSRadius

Definition at line 174 of file BDSOutputROOTEventModel.hh.

◆ scoringMeshName

std::vector<std::string> BDSOutputROOTEventModel::scoringMeshName

Definition at line 164 of file BDSOutputROOTEventModel.hh.

◆ scoringMeshRotation

std::map<std::string, TRotation> BDSOutputROOTEventModel::scoringMeshRotation

Definition at line 163 of file BDSOutputROOTEventModel.hh.

◆ scoringMeshTranslation

std::map<std::string, TVector3> BDSOutputROOTEventModel::scoringMeshTranslation

Definition at line 162 of file BDSOutputROOTEventModel.hh.

◆ staPos

std::vector<TVector3> BDSOutputROOTEventModel::staPos

Definition at line 85 of file BDSOutputROOTEventModel.hh.

◆ staRefPos

std::vector<TVector3> BDSOutputROOTEventModel::staRefPos

Definition at line 91 of file BDSOutputROOTEventModel.hh.

◆ staRefRot

std::vector<TRotation> BDSOutputROOTEventModel::staRefRot

Definition at line 94 of file BDSOutputROOTEventModel.hh.

◆ staRot

std::vector<TRotation> BDSOutputROOTEventModel::staRot

Definition at line 88 of file BDSOutputROOTEventModel.hh.

◆ staS

std::vector<float> BDSOutputROOTEventModel::staS

Definition at line 100 of file BDSOutputROOTEventModel.hh.

◆ storeCollimatorInfo

bool BDSOutputROOTEventModel::storeCollimatorInfo

Whether optional collimator information was stored.

Definition at line 147 of file BDSOutputROOTEventModel.hh.

Referenced by Fill(), and Flush().

◆ tilt

std::vector<float> BDSOutputROOTEventModel::tilt

Definition at line 97 of file BDSOutputROOTEventModel.hh.

◆ vkick

std::vector<float> BDSOutputROOTEventModel::vkick

Vertical fractional momentum kick.

Definition at line 135 of file BDSOutputROOTEventModel.hh.

Referenced by Fill(), and Flush().


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