|
BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
#include <Event.hh>

Public Member Functions | |
| Event (bool debugIn, bool processSamplersIn=false, int dataVersionIn=0) | |
| void | CommonCtor () |
| void | Fill (Event *other) |
| Copy data from another event into this event. | |
| bool | UsePrimaries () const |
| Whether there is primary data in the output file. | |
| void | SetDataVersion (int dataVersionIn) |
| void | SetBranchAddress (TTree *t, const RBDS::VectorString *samplerNames=nullptr, bool allBranchesOn=false, const RBDS::VectorString *branchesToTurnOn=nullptr, const RBDS::VectorString *collimatorNamesIn=nullptr, const RBDS::VectorString *samplerCNamesIn=nullptr, const RBDS::VectorString *samplerSNamesIn=nullptr) |
| void | RelinkSamplers () |
| RBDS::VectorString | RemoveDuplicates (const RBDS::VectorString &namesIn) const |
| Utility method. | |
| BDSOutputROOTEventSampler< double > * | GetPrimaries () |
| Accessor. | |
| BDSOutputROOTEventSampler< float > * | GetPrimaries () |
| Accessor. | |
| BDSOutputROOTEventLoss * | GetLoss () |
| Accessor. | |
| BDSOutputROOTEventLoss * | GetLossVacuum () |
| Accessor. | |
| BDSOutputROOTEventLoss * | GetLossTunnel () |
| Accessor. | |
| BDSOutputROOTEventLossWorld * | GetLossWorld () |
| Accessor. | |
| BDSOutputROOTEventLossWorld * | GetLossWorldContents () |
| Accessor. | |
| BDSOutputROOTEventLossWorld * | GetLossWorldExit () |
| Accessor. | |
| BDSOutputROOTEventLoss * | GetPrimaryFirstHit () |
| Accessor. | |
| BDSOutputROOTEventLoss * | GetPrimaryLastHit () |
| Accessor. | |
| BDSOutputROOTEventLoss * | GetTunnelHit () |
| Accessor. | |
| BDSOutputROOTEventTrajectory * | GetTrajectory () |
| Accessor. | |
| BDSOutputROOTEventHistograms * | GetHistograms () |
| Accessor. | |
| BDSOutputROOTEventInfo * | GetSummary () |
| Accessor. | |
| BDSOutputROOTEventInfo * | GetInfo () |
| Accessor. | |
| BDSOutputROOTEventSampler< double > * | GetSampler (const std::string &name) |
| Accessor. | |
| BDSOutputROOTEventSampler< float > * | GetSampler (const std::string &name) |
| Accessor. | |
| BDSOutputROOTEventSampler< double > * | GetSampler (int index) |
| Accessor. | |
| BDSOutputROOTEventSampler< float > * | GetSampler (int index) |
| Accessor. | |
| BDSOutputROOTEventSamplerC * | GetSamplerC (const std::string &name) |
| Accessor. | |
| BDSOutputROOTEventSamplerC * | GetSamplerC (int index) |
| Accessor. | |
| BDSOutputROOTEventSamplerS * | GetSamplerS (const std::string &name) |
| Accessor. | |
| BDSOutputROOTEventSamplerS * | GetSamplerS (int index) |
| Accessor. | |
| BDSOutputROOTEventAperture * | GetAperture () |
| Accessor. | |
| BDSOutputROOTEventCollimator * | GetCollimator (const std::string &name) |
| Accessor. | |
| BDSOutputROOTEventCollimator * | GetCollimator (int index) |
| Accessor. | |
| int | DataVersion () const |
| Accessor. | |
| const std::vector< std::string > & | GetSamplerNames () const |
| Accessor. | |
| const std::vector< std::string > & | GetSamplerCylinderNames () const |
| Accessor. | |
| const std::vector< std::string > & | GetSamplerSphereNames () const |
| Accessor. | |
| const std::vector< std::string > & | GetCollimatorNames () const |
| Accessor. | |
| void | RegisterCollimator (const std::string &collimatorName) |
| Utility method for interface building events. | |
| void | RegisterSampler (const std::string &samplerName) |
| Utility method for interface building events. | |
| void | Flush () |
| Flushing functions. | |
| void | FlushSamplers () |
| Flushing functions. | |
| void | FlushCollimators () |
| Flushing functions. | |
Data Fields | |
| BDSOutputROOTEventInfo * | Info |
| For backwards compatibility. | |
| BDSOutputROOTEventAperture * | ApertureImpacts |
| std::vector< std::string > | samplerNames |
| std::vector< std::string > | samplerCNames |
| std::vector< std::string > | samplerSNames |
| std::map< std::string, BDSOutputROOTEventSampler< double > * > | samplerMap |
| std::map< std::string, BDSOutputROOTEventSampler< float > * > | samplerMap |
| std::map< std::string, BDSOutputROOTEventSamplerC * > | samplerCMap |
| std::map< std::string, BDSOutputROOTEventSamplerS * > | samplerSMap |
| std::vector< std::string > | collimatorNames |
| std::map< std::string, BDSOutputROOTEventCollimator * > | collimatorMap |
| BDSOutputROOTEventSampler< double > * | Primary |
| Local variable ROOT data is mapped to. | |
| BDSOutputROOTEventSampler< float > * | Primary |
| Local variable ROOT data is mapped to. | |
| BDSOutputROOTEventCoords * | PrimaryGlobal |
| Local variable ROOT data is mapped to. | |
| BDSOutputROOTEventLoss * | Eloss |
| Local variable ROOT data is mapped to. | |
| BDSOutputROOTEventLoss * | ElossVacuum |
| Local variable ROOT data is mapped to. | |
| BDSOutputROOTEventLoss * | ElossTunnel |
| Local variable ROOT data is mapped to. | |
| BDSOutputROOTEventLossWorld * | ElossWorld |
| Local variable ROOT data is mapped to. | |
| BDSOutputROOTEventLossWorld * | ElossWorldContents |
| Local variable ROOT data is mapped to. | |
| BDSOutputROOTEventLossWorld * | ElossWorldExit |
| Local variable ROOT data is mapped to. | |
| BDSOutputROOTEventLoss * | PrimaryFirstHit |
| Local variable ROOT data is mapped to. | |
| BDSOutputROOTEventLoss * | PrimaryLastHit |
| Local variable ROOT data is mapped to. | |
| BDSOutputROOTEventLoss * | TunnelHit |
| Local variable ROOT data is mapped to. | |
| BDSOutputROOTEventTrajectory * | Trajectory |
| Local variable ROOT data is mapped to. | |
| std::vector< BDSOutputROOTEventSampler< double > * > | Samplers |
| Local variable ROOT data is mapped to. | |
| std::vector< BDSOutputROOTEventSampler< float > * > | Samplers |
| Local variable ROOT data is mapped to. | |
| std::vector< BDSOutputROOTEventSamplerC * > | SamplersC |
| Local variable ROOT data is mapped to. | |
| std::vector< BDSOutputROOTEventSamplerS * > | SamplersS |
| Local variable ROOT data is mapped to. | |
| BDSOutputROOTEventHistograms * | Histos |
| Local variable ROOT data is mapped to. | |
| BDSOutputROOTEventInfo * | Summary |
| Local variable ROOT data is mapped to. | |
| std::vector< BDSOutputROOTEventCollimator * > | collimators |
| Local variable ROOT data is mapped to. | |
Private Member Functions | |
| ClassDef (Event, 3) | |
| void | SetBranchAddressCollimators (TTree *t, const RBDS::VectorString *collimatorNames) |
| Utility function to avoid repetition of code. | |
| Int_t | SetBranchAddressCollimatorSingle (TTree *t, const std::string &name, int i) |
| Utility function to avoid repetition of code. | |
Private Attributes | |
| TTree * | tree |
| bool | debug |
| bool | processSamplers |
| int | dataVersion |
| bool | usePrimaries |
| Event::Event | ( | bool | debugIn, |
| bool | processSamplersIn = false, |
||
| int | dataVersionIn = 0 |
||
| ) |
| void Event::Fill | ( | Event * | other | ) |
Copy data from another event into this event.
Definition at line 495 of file Event.cc.
References collimators, Eloss, ElossTunnel, ElossVacuum, ElossWorld, ElossWorldContents, ElossWorldExit, BDSOutputROOTEventCoords::Fill(), BDSOutputROOTEventInfo::Fill(), BDSOutputROOTEventLoss::Fill(), BDSOutputROOTEventHistograms::FillSimple(), Histos, Info, Primary, PrimaryFirstHit, PrimaryGlobal, PrimaryLastHit, Samplers, SamplersC, SamplersS, Summary, Trajectory, and TunnelHit.

| void Event::Flush | ( | ) |
Flushing functions.
Definition at line 527 of file Event.cc.
References Eloss, ElossTunnel, ElossVacuum, ElossWorld, ElossWorldContents, ElossWorldExit, BDSOutputROOTEventHistograms::Flush(), BDSOutputROOTEventSampler< U >::Flush(), BDSOutputROOTEventTrajectory::Flush(), FlushCollimators(), FlushSamplers(), Histos, Info, Primary, PrimaryFirstHit, PrimaryGlobal, PrimaryLastHit, Summary, Trajectory, and TunnelHit.

| void Event::FlushCollimators | ( | ) |
Flushing functions.
Definition at line 559 of file Event.cc.
References collimators.
Referenced by Flush().

| void Event::FlushSamplers | ( | ) |
|
inline |
| BDSOutputROOTEventCollimator * Event::GetCollimator | ( | const std::string & | name | ) |
| BDSOutputROOTEventCollimator * Event::GetCollimator | ( | int | index | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Accessor.
Definition at line 60 of file Event.hh.
References Primary.
Referenced by EventAnalysis::EventAnalysis().

|
inline |
|
inline |
|
inline |
| BDSOutputROOTEventSampler< double > * Event::GetSampler | ( | const std::string & | name | ) |
| BDSOutputROOTEventSamplerC * Event::GetSamplerC | ( | int | index | ) |
|
inline |
|
inline |
| BDSOutputROOTEventSamplerS * Event::GetSamplerS | ( | const std::string & | name | ) |
| BDSOutputROOTEventSamplerS * Event::GetSamplerS | ( | int | index | ) |
|
inline |
|
inline |
|
inline |
|
inline |
| void Event::RegisterCollimator | ( | const std::string & | collimatorName | ) |
Utility method for interface building events.
Definition at line 438 of file Event.cc.
References collimators.
| void Event::RegisterSampler | ( | const std::string & | samplerName | ) |
| void Event::RelinkSamplers | ( | ) |
| RBDS::VectorString Event::RemoveDuplicates | ( | const RBDS::VectorString & | namesIn | ) | const |
Utility method.
Definition at line 431 of file Event.cc.
Referenced by SetBranchAddress().

| void Event::SetBranchAddress | ( | TTree * | t, |
| const RBDS::VectorString * | samplerNames = nullptr, |
||
| bool | allBranchesOn = false, |
||
| const RBDS::VectorString * | branchesToTurnOn = nullptr, |
||
| const RBDS::VectorString * | collimatorNamesIn = nullptr, |
||
| const RBDS::VectorString * | samplerCNamesIn = nullptr, |
||
| const RBDS::VectorString * | samplerSNamesIn = nullptr |
||
| ) |
Set the branch addresses to address the contents of the file. The vector of sampler names is used to turn only the samplers required.
Definition at line 205 of file Event.cc.
References collimators, Eloss, ElossTunnel, ElossVacuum, ElossWorld, ElossWorldContents, ElossWorldExit, Histos, Info, Primary, PrimaryFirstHit, PrimaryGlobal, PrimaryLastHit, RemoveDuplicates(), Samplers, SamplersC, SamplersS, SetBranchAddressCollimatorSingle(), Summary, Trajectory, and TunnelHit.
Referenced by DataLoader::SetBranchAddress().


|
private |
Utility function to avoid repetition of code.
Definition at line 463 of file Event.cc.
References collimators, and SetBranchAddressCollimatorSingle().

|
private |
Utility function to avoid repetition of code.
Definition at line 478 of file Event.cc.
References collimators.
Referenced by SetBranchAddress(), and SetBranchAddressCollimators().

|
inline |
Allow setting of data version if default constructor is used. If the default constructor was used, this function should be used before SetBranchAddress().
|
inline |
Whether there is primary data in the output file.
Definition at line 105 of file Event.hh.
Referenced by EventAnalysis::EventAnalysis().

| BDSOutputROOTEventAperture* Event::ApertureImpacts |
| std::map<std::string, BDSOutputROOTEventCollimator*> Event::collimatorMap |
| std::vector<BDSOutputROOTEventCollimator*> Event::collimators |
Local variable ROOT data is mapped to.
Definition at line 147 of file Event.hh.
Referenced by Fill(), FlushCollimators(), GetCollimator(), RegisterCollimator(), SetBranchAddress(), SetBranchAddressCollimators(), and SetBranchAddressCollimatorSingle().
| BDSOutputROOTEventLoss* Event::Eloss |
Local variable ROOT data is mapped to.
Definition at line 128 of file Event.hh.
Referenced by EventDisplay::DrawElossHits(), Fill(), Flush(), GetLoss(), and SetBranchAddress().
| BDSOutputROOTEventLoss* Event::ElossTunnel |
Local variable ROOT data is mapped to.
Definition at line 130 of file Event.hh.
Referenced by Fill(), Flush(), GetLossTunnel(), and SetBranchAddress().
| BDSOutputROOTEventLoss* Event::ElossVacuum |
Local variable ROOT data is mapped to.
Definition at line 129 of file Event.hh.
Referenced by Fill(), Flush(), GetLossVacuum(), and SetBranchAddress().
| BDSOutputROOTEventLossWorld* Event::ElossWorld |
Local variable ROOT data is mapped to.
Definition at line 131 of file Event.hh.
Referenced by Fill(), Flush(), GetLossWorld(), and SetBranchAddress().
| BDSOutputROOTEventLossWorld* Event::ElossWorldContents |
Local variable ROOT data is mapped to.
Definition at line 132 of file Event.hh.
Referenced by Fill(), Flush(), GetLossWorldContents(), and SetBranchAddress().
| BDSOutputROOTEventLossWorld* Event::ElossWorldExit |
Local variable ROOT data is mapped to.
Definition at line 133 of file Event.hh.
Referenced by Fill(), Flush(), GetLossWorldExit(), and SetBranchAddress().
| BDSOutputROOTEventHistograms* Event::Histos |
Local variable ROOT data is mapped to.
Definition at line 145 of file Event.hh.
Referenced by Fill(), Flush(), GetHistograms(), EventAnalysis::Process(), and SetBranchAddress().
| BDSOutputROOTEventInfo* Event::Info |
| BDSOutputROOTEventSampler<double>* Event::Primary |
Local variable ROOT data is mapped to.
Definition at line 123 of file Event.hh.
Referenced by Fill(), Flush(), GetPrimaries(), and SetBranchAddress().
| BDSOutputROOTEventSampler<float>* Event::Primary |
| BDSOutputROOTEventLoss* Event::PrimaryFirstHit |
Local variable ROOT data is mapped to.
Definition at line 134 of file Event.hh.
Referenced by Fill(), Flush(), GetPrimaryFirstHit(), and SetBranchAddress().
| BDSOutputROOTEventCoords* Event::PrimaryGlobal |
Local variable ROOT data is mapped to.
Definition at line 127 of file Event.hh.
Referenced by Fill(), Flush(), and SetBranchAddress().
| BDSOutputROOTEventLoss* Event::PrimaryLastHit |
Local variable ROOT data is mapped to.
Definition at line 135 of file Event.hh.
Referenced by Fill(), Flush(), GetPrimaryLastHit(), and SetBranchAddress().
| std::map<std::string, BDSOutputROOTEventSamplerC*> Event::samplerCMap |
| std::map<std::string, BDSOutputROOTEventSampler<double>* > Event::samplerMap |
| std::map<std::string, BDSOutputROOTEventSampler<float>* > Event::samplerMap |
| std::vector<BDSOutputROOTEventSampler<double>*> Event::Samplers |
Local variable ROOT data is mapped to.
Definition at line 139 of file Event.hh.
Referenced by Fill(), FlushSamplers(), RegisterSampler(), and SetBranchAddress().
| std::vector<BDSOutputROOTEventSampler<float>*> Event::Samplers |
| std::vector<BDSOutputROOTEventSamplerC*> Event::SamplersC |
Local variable ROOT data is mapped to.
Definition at line 143 of file Event.hh.
Referenced by Fill(), FlushSamplers(), GetSamplerC(), and SetBranchAddress().
| std::map<std::string, BDSOutputROOTEventSamplerS*> Event::samplerSMap |
| std::vector<BDSOutputROOTEventSamplerS*> Event::SamplersS |
Local variable ROOT data is mapped to.
Definition at line 144 of file Event.hh.
Referenced by Fill(), FlushSamplers(), GetSamplerS(), and SetBranchAddress().
| BDSOutputROOTEventInfo* Event::Summary |
Local variable ROOT data is mapped to.
Definition at line 146 of file Event.hh.
Referenced by Fill(), Flush(), GetSummary(), and SetBranchAddress().
| BDSOutputROOTEventTrajectory* Event::Trajectory |
Local variable ROOT data is mapped to.
Definition at line 137 of file Event.hh.
Referenced by EventDisplay::DrawTrajectories(), Fill(), Flush(), GetTrajectory(), and SetBranchAddress().
| BDSOutputROOTEventLoss* Event::TunnelHit |
Local variable ROOT data is mapped to.
Definition at line 136 of file Event.hh.
Referenced by EventDisplay::DrawTunnelHits(), Fill(), Flush(), GetTunnelHit(), and SetBranchAddress().