BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Information stored per sampler per event. More...
#include <BDSOutputROOTEventSampler.hh>
Public Member Functions | |
BDSOutputROOTEventSampler (std::string samplerNameIn) | |
void | Fill (const BDSHitSampler *hit, G4bool storeMass=false, G4bool storeCharge=false, G4bool storePolarCoords=false, G4bool storeElectrons=false, G4bool storeRigidity=false, G4bool storeKineticEnergy=false) |
void | Fill (const BDSParticleCoordsFull &coords, G4double momentumIn, G4double charge, G4int pdgID, G4int turnsTaken, G4int beamlineIndex, G4int nElectronsIn, G4double massIn, G4double rigidityIn, G4bool fillIon=true, G4bool *isIon=nullptr, G4int *ionA=nullptr, G4int *ionZ=nullptr) |
void | FillPolarCoords (const BDSParticleCoordsFull &coords) |
Calculate polar coords and fill. | |
void | Fill (const BDSPrimaryVertexInformationV *vertexInfos, const G4int turnsTaken) |
Fill a vertex directly. | |
void | Fill (const BDSOutputROOTEventSampler< U > *other) |
void | SetBranchAddress (TTree *) |
virtual void | Flush () |
Clean Sampler. | |
ClassDef (BDSOutputROOTEventSampler, 5) | |
std::vector< U > | getKineticEnergy () |
Function to calculate on the fly the parameters. | |
std::vector< U > | getMass () |
Function to calculate on the fly the parameters. | |
std::vector< U > | getRigidity () |
Function to calculate on the fly the parameters. | |
std::vector< bool > | getIsIon () |
Function to calculate on the fly the parameters. | |
std::vector< int > | getIonA () |
Function to calculate on the fly the parameters. | |
std::vector< int > | getIonZ () |
Function to calculate on the fly the parameters. | |
void | FillIon () |
Calculate and fill calculated variables. | |
Data Fields | |
std::string | samplerName |
int | n |
std::vector< U > | energy |
std::vector< U > | x |
std::vector< U > | y |
U | z |
std::vector< U > | xp |
std::vector< U > | yp |
std::vector< U > | zp |
std::vector< U > | p |
std::vector< U > | T |
std::vector< U > | weight |
std::vector< int > | partID |
std::vector< int > | parentID |
std::vector< int > | trackID |
int | modelID |
std::vector< int > | turnNumber |
U | S |
std::vector< U > | r |
std::vector< U > | rp |
std::vector< U > | phi |
std::vector< U > | phip |
std::vector< U > | theta |
std::vector< int > | charge |
These are not filled by default. | |
std::vector< U > | kineticEnergy |
These are not filled by default. | |
std::vector< U > | mass |
These are not filled by default. | |
std::vector< U > | rigidity |
These are not filled by default. | |
std::vector< bool > | isIon |
These are not filled by default. | |
std::vector< int > | ionA |
These are not filled by default. | |
std::vector< int > | ionZ |
These are not filled by default. | |
std::vector< int > | nElectrons |
These are not filled by default. | |
Static Public Attributes | |
static BDSOutputROOTParticleData * | particleTable = nullptr |
Information stored per sampler per event.
Definition at line 44 of file BDSOutputROOTEventSampler.hh.
|
explicit |
Definition at line 47 of file BDSOutputROOTEventSampler.cc.
|
virtual |
Definition at line 54 of file BDSOutputROOTEventSampler.cc.
void BDSOutputROOTEventSampler< U >::Fill | ( | const BDSHitSampler * | hit, |
G4bool | storeMass = false , |
||
G4bool | storeCharge = false , |
||
G4bool | storePolarCoords = false , |
||
G4bool | storeElectrons = false , |
||
G4bool | storeRigidity = false , |
||
G4bool | storeKineticEnergy = false |
||
) |
Definition at line 59 of file BDSOutputROOTEventSampler.cc.
void BDSOutputROOTEventSampler< U >::Fill | ( | const BDSOutputROOTEventSampler< U > * | other | ) |
Definition at line 219 of file BDSOutputROOTEventSampler.cc.
void BDSOutputROOTEventSampler< U >::Fill | ( | const BDSParticleCoordsFull & | coords, |
G4double | momentumIn, | ||
G4double | charge, | ||
G4int | pdgID, | ||
G4int | turnsTaken, | ||
G4int | beamlineIndex, | ||
G4int | nElectronsIn, | ||
G4double | massIn, | ||
G4double | rigidityIn, | ||
G4bool | fillIon = true , |
||
G4bool * | isIon = nullptr , |
||
G4int * | ionA = nullptr , |
||
G4int * | ionZ = nullptr |
||
) |
Used for filling primary coordinates only. Optional arguments allow us to fill ion information when a particle table is not available. All must be defined to use them.
Definition at line 110 of file BDSOutputROOTEventSampler.cc.
void BDSOutputROOTEventSampler< U >::Fill | ( | const BDSPrimaryVertexInformationV * | vertexInfos, |
const G4int | turnsTaken | ||
) |
Fill a vertex directly.
Definition at line 198 of file BDSOutputROOTEventSampler.cc.
References BDSOutputROOTParticleData::Fill(), and BDSPrimaryVertexInformationV::vertices.
|
inline |
Calculate and fill calculated variables.
Definition at line 129 of file BDSOutputROOTEventSampler.hh.
References BDSOutputROOTEventSampler< U >::getIonA(), BDSOutputROOTEventSampler< U >::getIonZ(), BDSOutputROOTEventSampler< U >::getIsIon(), BDSOutputROOTEventSampler< U >::ionA, BDSOutputROOTEventSampler< U >::ionZ, and BDSOutputROOTEventSampler< U >::isIon.
void BDSOutputROOTEventSampler< U >::FillPolarCoords | ( | const BDSParticleCoordsFull & | coords | ) |
Calculate polar coords and fill.
Definition at line 160 of file BDSOutputROOTEventSampler.cc.
|
virtual |
Clean Sampler.
Definition at line 262 of file BDSOutputROOTEventSampler.cc.
Referenced by BDSOutputStructures::ClearStructuresEventLevel(), and Event::Flush().
std::vector< int > BDSOutputROOTEventSampler< U >::getIonA |
Function to calculate on the fly the parameters.
Definition at line 349 of file BDSOutputROOTEventSampler.cc.
Referenced by BDSOutputROOTEventSampler< U >::FillIon().
std::vector< int > BDSOutputROOTEventSampler< U >::getIonZ |
Function to calculate on the fly the parameters.
Definition at line 360 of file BDSOutputROOTEventSampler.cc.
Referenced by BDSOutputROOTEventSampler< U >::FillIon().
std::vector< bool > BDSOutputROOTEventSampler< U >::getIsIon |
Function to calculate on the fly the parameters.
Definition at line 333 of file BDSOutputROOTEventSampler.cc.
Referenced by BDSOutputROOTEventSampler< U >::FillIon().
std::vector< U > BDSOutputROOTEventSampler< U >::getKineticEnergy |
Function to calculate on the fly the parameters.
Definition at line 300 of file BDSOutputROOTEventSampler.cc.
std::vector< U > BDSOutputROOTEventSampler< U >::getMass |
Function to calculate on the fly the parameters.
Definition at line 311 of file BDSOutputROOTEventSampler.cc.
std::vector< U > BDSOutputROOTEventSampler< U >::getRigidity |
Function to calculate on the fly the parameters.
Definition at line 322 of file BDSOutputROOTEventSampler.cc.
void BDSOutputROOTEventSampler< U >::SetBranchAddress | ( | TTree * | ) |
Definition at line 259 of file BDSOutputROOTEventSampler.cc.
std::vector<int> BDSOutputROOTEventSampler< U >::charge |
These are not filled by default.
Definition at line 76 of file BDSOutputROOTEventSampler.hh.
std::vector<U> BDSOutputROOTEventSampler< U >::energy |
Definition at line 50 of file BDSOutputROOTEventSampler.hh.
std::vector<int> BDSOutputROOTEventSampler< U >::ionA |
These are not filled by default.
Definition at line 81 of file BDSOutputROOTEventSampler.hh.
Referenced by BDSOutputROOTEventSampler< U >::FillIon().
std::vector<int> BDSOutputROOTEventSampler< U >::ionZ |
These are not filled by default.
Definition at line 82 of file BDSOutputROOTEventSampler.hh.
Referenced by BDSOutputROOTEventSampler< U >::FillIon().
std::vector<bool> BDSOutputROOTEventSampler< U >::isIon |
These are not filled by default.
Definition at line 80 of file BDSOutputROOTEventSampler.hh.
Referenced by BDSOutputROOTEventSampler< U >::FillIon().
std::vector<U> BDSOutputROOTEventSampler< U >::kineticEnergy |
These are not filled by default.
Definition at line 77 of file BDSOutputROOTEventSampler.hh.
std::vector<U> BDSOutputROOTEventSampler< U >::mass |
These are not filled by default.
Definition at line 78 of file BDSOutputROOTEventSampler.hh.
int BDSOutputROOTEventSampler< U >::modelID |
Definition at line 64 of file BDSOutputROOTEventSampler.hh.
int BDSOutputROOTEventSampler< U >::n |
Definition at line 49 of file BDSOutputROOTEventSampler.hh.
std::vector<int> BDSOutputROOTEventSampler< U >::nElectrons |
These are not filled by default.
Definition at line 83 of file BDSOutputROOTEventSampler.hh.
std::vector<U> BDSOutputROOTEventSampler< U >::p |
Definition at line 57 of file BDSOutputROOTEventSampler.hh.
std::vector<int> BDSOutputROOTEventSampler< U >::parentID |
Definition at line 62 of file BDSOutputROOTEventSampler.hh.
|
static |
Definition at line 135 of file BDSOutputROOTEventSampler.hh.
std::vector<int> BDSOutputROOTEventSampler< U >::partID |
Definition at line 61 of file BDSOutputROOTEventSampler.hh.
std::vector<U> BDSOutputROOTEventSampler< U >::phi |
Definition at line 71 of file BDSOutputROOTEventSampler.hh.
std::vector<U> BDSOutputROOTEventSampler< U >::phip |
Definition at line 72 of file BDSOutputROOTEventSampler.hh.
std::vector<U> BDSOutputROOTEventSampler< U >::r |
Definition at line 69 of file BDSOutputROOTEventSampler.hh.
std::vector<U> BDSOutputROOTEventSampler< U >::rigidity |
These are not filled by default.
Definition at line 79 of file BDSOutputROOTEventSampler.hh.
std::vector<U> BDSOutputROOTEventSampler< U >::rp |
Definition at line 70 of file BDSOutputROOTEventSampler.hh.
U BDSOutputROOTEventSampler< U >::S |
Definition at line 67 of file BDSOutputROOTEventSampler.hh.
std::string BDSOutputROOTEventSampler< U >::samplerName |
Definition at line 47 of file BDSOutputROOTEventSampler.hh.
std::vector<U> BDSOutputROOTEventSampler< U >::T |
Definition at line 58 of file BDSOutputROOTEventSampler.hh.
std::vector<U> BDSOutputROOTEventSampler< U >::theta |
Definition at line 73 of file BDSOutputROOTEventSampler.hh.
std::vector<int> BDSOutputROOTEventSampler< U >::trackID |
Definition at line 63 of file BDSOutputROOTEventSampler.hh.
std::vector<int> BDSOutputROOTEventSampler< U >::turnNumber |
Definition at line 65 of file BDSOutputROOTEventSampler.hh.
std::vector<U> BDSOutputROOTEventSampler< U >::weight |
Definition at line 60 of file BDSOutputROOTEventSampler.hh.
std::vector<U> BDSOutputROOTEventSampler< U >::x |
Definition at line 51 of file BDSOutputROOTEventSampler.hh.
std::vector<U> BDSOutputROOTEventSampler< U >::xp |
Definition at line 54 of file BDSOutputROOTEventSampler.hh.
std::vector<U> BDSOutputROOTEventSampler< U >::y |
Definition at line 52 of file BDSOutputROOTEventSampler.hh.
std::vector<U> BDSOutputROOTEventSampler< U >::yp |
Definition at line 55 of file BDSOutputROOTEventSampler.hh.
U BDSOutputROOTEventSampler< U >::z |
Definition at line 53 of file BDSOutputROOTEventSampler.hh.
std::vector<U> BDSOutputROOTEventSampler< U >::zp |
Definition at line 56 of file BDSOutputROOTEventSampler.hh.