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) 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 BDSOUTPUTROOTEVENTAPERTURE_H
19#define BDSOUTPUTROOTEVENTAPERTURE_H
20
21#ifndef __ROOTBUILD__
22#include "G4Types.hh"
24#endif
25
26#include "TObject.h"
27
28#include <vector>
29
31
38class BDSOutputROOTEventAperture: public TObject
39{
40public:
41 int n = 0;
42 std::vector<float> energy;
43 std::vector<double> S;
44 std::vector<float> weight;
45 std::vector<bool> isPrimary;
46 std::vector<bool> firstPrimaryImpact;
47 std::vector<int> partID;
48 std::vector<int> turn;
49 std::vector<float> x;
50 std::vector<float> y;
51 std::vector<float> xp;
52 std::vector<float> yp;
53 std::vector<float> T;
54 std::vector<float> kineticEnergy;
55 std::vector<bool> isIon;
56 std::vector<int> ionA;
57 std::vector<int> ionZ;
58 std::vector<int> nElectrons;
59
60 std::vector<int> trackID;
61 std::vector<int> parentID;
62 std::vector<int> modelID;
63
66
67#ifndef __ROOTBUILD__
68 void Fill(const BDSHitApertureImpact* hit,
69 G4bool isPrimaryFirstImpact);
70#endif
71 void Fill(const BDSOutputROOTEventAperture* other);
72 virtual void Flush(){FlushLocal();}
73
76 void FlushLocal();
77
78 static BDSOutputROOTParticleData* particleTable;
79
81};
82
83#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.