BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSOutputROOTEventAperture.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3University of London 2001 - 2023.
4
5This file is part of BDSIM.
6
7BDSIM is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published
9by the Free Software Foundation version 3 of the License.
10
11BDSIM is distributed in the hope that it will be useful, but
12WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
18*/
19#ifndef BDSOUTPUTROOTEVENTAPERTURE_H
20#define BDSOUTPUTROOTEVENTAPERTURE_H
21
22#ifndef __ROOTBUILD__
23#include "G4Types.hh"
25#endif
26
27#include "TObject.h"
28
29#include <vector>
30
32
39class BDSOutputROOTEventAperture: public TObject
40{
41public:
42 int n = 0;
43 std::vector<float> energy;
44 std::vector<double> S;
45 std::vector<float> weight;
46 std::vector<bool> isPrimary;
47 std::vector<bool> firstPrimaryImpact;
48 std::vector<int> partID;
49 std::vector<int> turn;
50 std::vector<float> x;
51 std::vector<float> y;
52 std::vector<float> xp;
53 std::vector<float> yp;
54 std::vector<float> T;
55 std::vector<float> kineticEnergy;
56 std::vector<bool> isIon;
57 std::vector<int> ionA;
58 std::vector<int> ionZ;
59 std::vector<int> nElectrons;
60
61 std::vector<int> trackID;
62 std::vector<int> parentID;
63 std::vector<int> modelID;
64
67
68#ifndef __ROOTBUILD__
69 void Fill(const BDSHitApertureImpact* hit,
70 G4bool isPrimaryFirstImpact);
71#endif
72 void Fill(const BDSOutputROOTEventAperture* other);
73 virtual void Flush(){FlushLocal();}
74
77 void FlushLocal();
78
79 static BDSOutputROOTParticleData* particleTable;
80
82};
83
84#endif
Snapshot of information for particle passing through a collimator.
Data stored for energy deposition hits per event.
std::vector< float > kineticEnergy
Kinetic energy in GeV at pre step point.
std::vector< int > parentID
ParentID that created the deposit.
std::vector< int > turn
Turn number.
std::vector< float > energy
Total energy of particle.
std::vector< int > trackID
TrackID that created the deposit.
std::vector< bool > firstPrimaryImpact
Whether the first time the primary is passing through.
std::vector< int > modelID
Geometry model index.
std::vector< float > weight
Weight associated with loss.
std::vector< float > T
Global time (time since beginning of event).
std::vector< double > S
Global curvilinear S coordinate.
std::vector< int > partID
ParticleID that create the deposit.
Geant4 particle data for particles used in simulation.