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) 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 BDSOUTPUTROOTEVENTCOLLIMATOR_H
19#define BDSOUTPUTROOTEVENTCOLLIMATOR_H
20
21#ifndef __ROOTBUILD__
22#include "BDSOutputROOTEventCollimatorInfo.hh"
23#include "G4Types.hh"
25#endif
26
27#include "TObject.h"
28
29#include <set>
30#include <utility>
31#include <vector>
32
34
41class BDSOutputROOTEventCollimator: public TObject
42{
43public:
46
47 bool primaryInteracted;
48 bool primaryStopped;
49 int n;
50 std::vector<float> energy;
51 std::vector<float> energyDeposited;
52 std::vector<float> xIn;
53 std::vector<float> yIn;
54 std::vector<float> zIn;
55 std::vector<float> xpIn;
56 std::vector<float> ypIn;
57 std::vector<float> zpIn;
58 std::vector<float> T;
59 std::vector<float> weight;
60 std::vector<int> partID;
61 std::vector<int> parentID;
62 std::vector<int> turn;
67 std::vector<bool> firstPrimaryHitThisTurn;
68
69 std::vector<float> impactParameterX;
70 std::vector<float> impactParameterY;
71
72 std::vector<bool> isIon;
73 std::vector<int> ionA;
74 std::vector<int> ionZ;
75
77 std::set<int> turnSet;
78
80 std::vector<int> charge;
81 std::vector<float> kineticEnergy;
82 std::vector<float> mass;
83 std::vector<float> rigidity;
85
87
89#ifndef __ROOTBUILD__
90 void Fill(const BDSHitCollimator* hit,
92 const std::pair<G4double, G4double>& differences,
93 G4bool storeHits);
94 void FillExtras(G4bool fillIonInfo,
95 G4bool fillLinks);
96
98 inline void SetPrimaryStopped(G4bool primaryStoppedIn) {primaryStopped = primaryStoppedIn;}
99
100#endif
102 void Fill(const BDSOutputROOTEventCollimator* other);
103
105 virtual void Flush();
106
107 static BDSOutputROOTParticleData* particleTable;
108
109 ClassDef(BDSOutputROOTEventCollimator, 1);
110};
111
112
113#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.