28#include "BDSOutputROOTEventSampler.hh"
30#include "RebdsimTypes.hh"
54 bool processSamplersIn =
false,
55 int dataVersionIn = 0);
115 const RBDS::VectorString* samplerNames =
nullptr,
116 bool allBranchesOn =
false,
117 const RBDS::VectorString* branchesToTurnOn =
nullptr,
118 const RBDS::VectorString* collimatorNamesIn =
nullptr,
119 const RBDS::VectorString* samplerCNamesIn =
nullptr,
120 const RBDS::VectorString* samplerSNamesIn =
nullptr);
140 std::vector<BDSOutputROOTEventSampler<double>*>
Samplers;
142 std::vector<BDSOutputROOTEventSampler<float>*>
Samplers;
154 std::vector<std::string> samplerNames;
155 std::vector<std::string> samplerCNames;
156 std::vector<std::string> samplerSNames;
158 std::map<std::string, BDSOutputROOTEventSampler<double>* > samplerMap;
160 std::map<std::string, BDSOutputROOTEventSampler<float>* > samplerMap;
162 std::map<std::string, BDSOutputROOTEventSamplerC*> samplerCMap;
163 std::map<std::string, BDSOutputROOTEventSamplerS*> samplerSMap;
165 std::vector<std::string> collimatorNames;
166 std::map<std::string, BDSOutputROOTEventCollimator*> collimatorMap;
173 RBDS::VectorString
RemoveDuplicates(
const RBDS::VectorString& namesIn)
const;
188 const RBDS::VectorString* collimatorNames);
190 const std::string& name,
196 bool processSamplers;
Data stored for energy deposition hits per event.
Data stored for each collimator per event.
Holder for a set of histograms to be stored.
Information pertaining to an individual event.
Data stored for world hits per event.
Data stored for energy deposition hits per event.
Information stored per cylindrical sampler per event.
Information stored per spherical sampler per event.
Information stored per sampler per event.
Structure to record a trajectory.
int DataVersion() const
Accessor.
std::vector< BDSOutputROOTEventSampler< float > * > Samplers
Local variable ROOT data is mapped to.
BDSOutputROOTEventLoss * GetLossVacuum()
Accessor.
BDSOutputROOTEventLoss * PrimaryLastHit
Local variable ROOT data is mapped to.
BDSOutputROOTEventLoss * TunnelHit
Local variable ROOT data is mapped to.
BDSOutputROOTEventHistograms * GetHistograms()
Accessor.
void FlushSamplers()
Flushing functions.
BDSOutputROOTEventSampler< double > * GetPrimaries()
Accessor.
BDSOutputROOTEventLoss * ElossVacuum
Local variable ROOT data is mapped to.
BDSOutputROOTEventSampler< double > * GetSampler(const std::string &name)
Accessor.
BDSOutputROOTEventHistograms * Histos
Local variable ROOT data is mapped to.
BDSOutputROOTEventSampler< float > * GetPrimaries()
Accessor.
BDSOutputROOTEventCollimator * GetCollimator(const std::string &name)
Accessor.
BDSOutputROOTEventLossWorld * ElossWorldExit
Local variable ROOT data is mapped to.
BDSOutputROOTEventAperture * GetAperture()
Accessor.
BDSOutputROOTEventLoss * GetLossTunnel()
Accessor.
void RegisterCollimator(std::string collimatorName)
Utility method for interface building events.
RBDS::VectorString RemoveDuplicates(const RBDS::VectorString &namesIn) const
Utility method.
BDSOutputROOTEventLossWorld * ElossWorld
Local variable ROOT data is mapped to.
BDSOutputROOTEventLossWorld * ElossWorldContents
Local variable ROOT data is mapped to.
BDSOutputROOTEventLossWorld * GetLossWorldContents()
Accessor.
void FlushCollimators()
Flushing functions.
BDSOutputROOTEventLossWorld * GetLossWorld()
Accessor.
BDSOutputROOTEventLoss * ElossTunnel
Local variable ROOT data is mapped to.
BDSOutputROOTEventSampler< double > * Primary
Local variable ROOT data is mapped to.
BDSOutputROOTEventSamplerC * GetSamplerC(const std::string &name)
Accessor.
std::vector< BDSOutputROOTEventSamplerC * > SamplersC
Local variable ROOT data is mapped to.
BDSOutputROOTEventSampler< float > * GetSampler(int index)
Accessor.
const std::vector< std::string > & GetSamplerNames() const
Accessor.
BDSOutputROOTEventSamplerS * GetSamplerS(const std::string &name)
Accessor.
BDSOutputROOTEventSampler< float > * GetSampler(const std::string &name)
Accessor.
void Flush()
Flushing functions.
BDSOutputROOTEventTrajectory * Trajectory
Local variable ROOT data is mapped to.
BDSOutputROOTEventLoss * PrimaryFirstHit
Local variable ROOT data is mapped to.
const std::vector< std::string > & GetCollimatorNames() const
Accessor.
bool UsePrimaries() const
Whether there is primary data in the output file.
const std::vector< std::string > & GetSamplerCylinderNames() const
Accessor.
void SetBranchAddressCollimators(TTree *t, const RBDS::VectorString *collimatorNames)
Utility function to avoid repetition of code.
std::vector< BDSOutputROOTEventSampler< double > * > Samplers
Local variable ROOT data is mapped to.
BDSOutputROOTEventLoss * GetTunnelHit()
Accessor.
void Fill(Event *other)
Copy data from another event into this event.
BDSOutputROOTEventLoss * GetLoss()
Accessor.
BDSOutputROOTEventSampler< float > * Primary
Local variable ROOT data is mapped to.
Int_t SetBranchAddressCollimatorSingle(TTree *t, const std::string &name, int i)
Utility function to avoid repetition of code.
BDSOutputROOTEventInfo * Summary
Local variable ROOT data is mapped to.
std::vector< BDSOutputROOTEventSamplerS * > SamplersS
Local variable ROOT data is mapped to.
BDSOutputROOTEventInfo * GetInfo()
Accessor.
BDSOutputROOTEventSampler< double > * GetSampler(int index)
Accessor.
BDSOutputROOTEventLoss * GetPrimaryFirstHit()
Accessor.
void RegisterSampler(std::string samplerName)
Utility method for interface building events.
BDSOutputROOTEventLoss * Eloss
Local variable ROOT data is mapped to.
BDSOutputROOTEventInfo * GetSummary()
Accessor.
BDSOutputROOTEventLossWorld * GetLossWorldExit()
Accessor.
BDSOutputROOTEventCoords * PrimaryGlobal
Local variable ROOT data is mapped to.
void SetDataVersion(int dataVersionIn)
const std::vector< std::string > & GetSamplerSphereNames() const
Accessor.
BDSOutputROOTEventLoss * GetPrimaryLastHit()
Accessor.
BDSOutputROOTEventInfo * Info
For backwards compatibility.
std::vector< BDSOutputROOTEventCollimator * > collimators
Local variable ROOT data is mapped to.
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)
BDSOutputROOTEventTrajectory * GetTrajectory()
Accessor.