27#include "BDSOutputROOTEventSampler.hh"
29#include "RebdsimTypes.hh"
53 bool processSamplersIn =
false,
54 int dataVersionIn = 0);
114 const RBDS::VectorString* samplerNames =
nullptr,
115 bool allBranchesOn =
false,
116 const RBDS::VectorString* branchesToTurnOn =
nullptr,
117 const RBDS::VectorString* collimatorNamesIn =
nullptr,
118 const RBDS::VectorString* samplerCNamesIn =
nullptr,
119 const RBDS::VectorString* samplerSNamesIn =
nullptr);
139 std::vector<BDSOutputROOTEventSampler<double>*>
Samplers;
141 std::vector<BDSOutputROOTEventSampler<float>*>
Samplers;
153 std::vector<std::string> samplerNames;
154 std::vector<std::string> samplerCNames;
155 std::vector<std::string> samplerSNames;
157 std::map<std::string, BDSOutputROOTEventSampler<double>* > samplerMap;
159 std::map<std::string, BDSOutputROOTEventSampler<float>* > samplerMap;
161 std::map<std::string, BDSOutputROOTEventSamplerC*> samplerCMap;
162 std::map<std::string, BDSOutputROOTEventSamplerS*> samplerSMap;
164 std::vector<std::string> collimatorNames;
165 std::map<std::string, BDSOutputROOTEventCollimator*> collimatorMap;
172 RBDS::VectorString
RemoveDuplicates(
const RBDS::VectorString& namesIn)
const;
187 const RBDS::VectorString* collimatorNames);
189 const std::string& name,
195 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.
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 RegisterCollimator(const std::string &collimatorName)
Utility method for interface building events.
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.
BDSOutputROOTEventLoss * Eloss
Local variable ROOT data is mapped to.
BDSOutputROOTEventInfo * GetSummary()
Accessor.
void RegisterSampler(const std::string &samplerName)
Utility method for interface building events.
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.