BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSOutputROOTEventLoss.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 BDSOUTPUTROOTEVENTLOSS_H
19#define BDSOUTPUTROOTEVENTLOSS_H
20
21#ifndef __ROOTBUILD__
25#endif
26
27#include "TObject.h"
28
29#include <vector>
30
37class BDSOutputROOTEventLoss: public TObject
38{
39public:
42
43 int n;
44 std::vector<float> energy;
45 std::vector<float> S;
46 std::vector<float> weight;
47
48 std::vector<int> partID;
49 std::vector<int> trackID;
50 std::vector<int> parentID;
51
52 std::vector<int> modelID;
53 std::vector<int> turn;
54
56 std::vector<float> x;
57 std::vector<float> y;
58 std::vector<float> z;
60
62 std::vector<float> X;
63 std::vector<float> Y;
64 std::vector<float> Z;
66
67 std::vector<float> T;
68
69 std::vector<float> stepLength;
70 std::vector<float> preStepKineticEnergy;
71
72 std::vector<int> postStepProcessType;
73 std::vector<int> postStepProcessSubType;
74
76 void Fill(const BDSOutputROOTEventLoss* other);
77 virtual void Flush();
78
79 void FlushLocal();
80
81#ifndef __ROOTBUILD__
82 BDSOutputROOTEventLoss(bool storeTurnIn,
83 bool storeLinksIn,
84 bool storeModleIDIn,
85 bool storeLocalIn,
86 bool storeGobalIn,
87 bool storeTimeIn,
88 bool storeStepLengthIn,
89 bool storePreStepKineticEnergyIn,
90 bool storePhysicsProcessesIn);
91 void Fill(const BDSTrajectoryPointHit* hit);
92 void Fill(const BDSHitEnergyDeposition* hit);
93
94 bool storeTurn = false;
95 bool storeLinks = false;
96 bool storeModelID = false;
97 bool storeLocal = false;
98 bool storeGlobal = false;
99 bool storeTime = false;
100 bool storeStepLength = false;
102 bool storePhysicsProcesses = false;
103#endif
104
105 ClassDef(BDSOutputROOTEventLoss,5);
106};
107
108#endif
Information recorded for a single piece of energy deposition.
Data stored for energy deposition hits per event.
bool storePreStepKineticEnergy
Whether to store pre step kinetic energy.
std::vector< float > y
Local coordinate.
bool storeLinks
Whether to store links between Eloss and model and trajectors.
std::vector< float > preStepKineticEnergy
Kinetic energy in GeV at pre step point.
bool storeLocal
Whether to store local coordinates.
bool storeGlobal
Whether to store global coordinates.
bool storeTurn
Store turn number.
std::vector< int > modelID
Geometry model index.
std::vector< float > weight
Weight associated with loss.
bool storeTime
Whether to store global time.
std::vector< int > trackID
TrackID that created the deposit.
std::vector< int > parentID
ParentID that created the deposit.
std::vector< float > z
Local coordinate.
void FlushLocal()
Non-virtual function for initialising / clearing variables.
std::vector< float > x
Local coordinate.
std::vector< int > turn
Turn number.
std::vector< float > stepLength
Step length taken for hit.
bool storeModelID
Whether to store the beam line index.
void Fill(const BDSOutputROOTEventLoss *other)
Fill from another instance.
std::vector< float > energy
Energy deposited in step.
bool storeStepLength
Whether to store step length.
std::vector< int > partID
ParticleID that create the deposit.
std::vector< float > S
Global curvilinear S coordinate.
std::vector< float > T
Global time (time since beginning of event).
A summary trajectory object of a loss point.
A Point in a trajectory with extra information.