BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
Model.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) BDSIM Collaboration, 2001 - 2026.
3
4This file is part of BDSIM.
5
6BDSIM is free software: you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published
8by the Free Software Foundation version 3 of the License.
9
10BDSIM is distributed in the hope that it will be useful, but
11WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
17*/
18#ifndef MODEL_H
19#define MODEL_H
20
21#include "Rtypes.h" // for classdef
22
23#include "RebdsimTypes.hh"
24
26class TTree;
27
34class Model
35{
36public:
37 Model();
38 Model(bool debugIn,
39 int dataVersionIn = 0);
40 virtual ~Model();
41
43 std::vector<std::string> SamplerNames() const;
44 std::vector<std::string> SamplerCNames() const;
45 std::vector<std::string> SamplerSNames() const;
46
48 std::vector<std::string> CollimatorNames() const;
49
51 int DataVersion() const {return dataVersion;}
52
55 inline void SetDataVersion(int dataVersionIn) {dataVersion = dataVersionIn;}
56
58 void SetBranchAddress(TTree* t,
59 bool allBranchesOn = true,
60 const RBDS::VectorString* branchesToTurnOn = nullptr);
61
65
66private:
67 bool debug;
68 int dataVersion;
69
70 ClassDef(Model, 2);
71};
72
73#endif
Information stored per model representing accelerator.
Model loader.
Definition Model.hh:35
BDSOutputROOTEventModel * model
Member that ROOT can map file data to locally.
Definition Model.hh:63
std::vector< std::string > CollimatorNames() const
Access all the sampler branch names from the model.
Definition Model.cc:90
void SetBranchAddress(TTree *t, bool allBranchesOn=true, const RBDS::VectorString *branchesToTurnOn=nullptr)
Set the branch addresses to address the contents of the file.
Definition Model.cc:49
void SetDataVersion(int dataVersionIn)
Definition Model.hh:55
std::vector< std::string > SamplerNames() const
Access all the unique sampler names from the model.
Definition Model.cc:72
int DataVersion() const
Accessor.
Definition Model.hh:51