BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSOutputROOTEventCollimator.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 BDSOUTPUTROOTEVENTCOLLIMATOR_H
20#define BDSOUTPUTROOTEVENTCOLLIMATOR_H
21
22#ifndef __ROOTBUILD__
23#include "BDSOutputROOTEventCollimatorInfo.hh"
24#include "G4Types.hh"
26#endif
27
28#include "TObject.h"
29
30#include <set>
31#include <utility>
32#include <vector>
33
35
42class BDSOutputROOTEventCollimator: public TObject
43{
44public:
47
48 bool primaryInteracted;
49 bool primaryStopped;
50 int n;
51 std::vector<float> energy;
52 std::vector<float> energyDeposited;
53 std::vector<float> xIn;
54 std::vector<float> yIn;
55 std::vector<float> zIn;
56 std::vector<float> xpIn;
57 std::vector<float> ypIn;
58 std::vector<float> zpIn;
59 std::vector<float> T;
60 std::vector<float> weight;
61 std::vector<int> partID;
62 std::vector<int> parentID;
63 std::vector<int> turn;
68 std::vector<bool> firstPrimaryHitThisTurn;
69
70 std::vector<float> impactParameterX;
71 std::vector<float> impactParameterY;
72
73 std::vector<bool> isIon;
74 std::vector<int> ionA;
75 std::vector<int> ionZ;
76
78 std::set<int> turnSet;
79
81 std::vector<int> charge;
82 std::vector<float> kineticEnergy;
83 std::vector<float> mass;
84 std::vector<float> rigidity;
86
88
90#ifndef __ROOTBUILD__
91 void Fill(const BDSHitCollimator* hit,
93 const std::pair<G4double, G4double>& differences,
94 G4bool storeHits);
95 void FillExtras(G4bool fillIonInfo,
96 G4bool fillLinks);
97
99 inline void SetPrimaryStopped(G4bool primaryStoppedIn) {primaryStopped = primaryStoppedIn;}
100
101#endif
103 void Fill(const BDSOutputROOTEventCollimator* other);
104
106 virtual void Flush();
107
108 static BDSOutputROOTParticleData* particleTable;
109
110 ClassDef(BDSOutputROOTEventCollimator, 1);
111};
112
113
114#endif
Snapshot of information for particle passing through a collimator.
Data stored for each collimator in the model.
Data stored for each collimator per event.
std::vector< float > energy
Total energy of particle for each hit.
std::set< int > turnSet
Different length set of turn number.
std::vector< int > charge
These are not filled by default.
std::vector< float > mass
These are not filled by default.
virtual void Flush()
Flush this instance.
void SetPrimaryStopped(G4bool primaryStoppedIn)
Setter for one off flag per event.
std::vector< float > kineticEnergy
These are not filled by default.
BDSOutputROOTEventCollimator()
Default constructor for ROOT.
double totalEnergyDeposited
Sum of energy deposits including weights.
std::vector< float > rigidity
These are not filled by default.
Geant4 particle data for particles used in simulation.