BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
BDSScorerMeshInfo.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3University of London 2001 - 2022.
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 BDSSCORERMESHINFO_H
20#define BDSSCORERMESHINFO_H
21
22#include "BDSBH4DTypeDefs.hh"
23#include "BDSExtent.hh"
24
25#include "G4String.hh"
26#include "G4Types.hh"
27
28namespace GMAD
29{
30 class ScorerMesh;
31}
32
43{
44public:
45 explicit BDSScorerMeshInfo(const GMAD::ScorerMesh& scorer);
46
47 virtual ~BDSScorerMeshInfo(){;}
48
49 G4String name;
50 G4String geometryType;
51 G4int nBinsX;
52 G4int nBinsY;
53 G4int nBinsZ;
54 G4int nBinsR;
55 G4int nBinsPhi;
56 G4int nBinsE;
57 G4double xLow;
58 G4double xHigh;
59 G4double yLow;
60 G4double yHigh;
61 G4double zLow;
62 G4double zHigh;
63 G4double rLow;
64 G4double rHigh;
65 G4double eLow;
66 G4double eHigh;
67 std::string eScale;
68 std::vector<double> eBinsEdges ={};
69#ifdef USE_BOOST
70 boost_histogram_axes_variant energyAxis;
71#endif
72
73 inline G4double ScoringMeshX() const {return 0.5*(xHigh-xLow);}
74 inline G4double ScoringMeshY() const {return 0.5*(yHigh-yLow);}
75 inline G4double ScoringMeshZ() const {return 0.5*(zHigh-zLow);}
76 inline G4double ScoringMeshR() const {return 0.5*(rHigh-rLow);}
77 inline G4double ScoringMeshE() const {return 0.5*(eHigh-eLow);}
78 inline BDSExtent Extent() const {return extent;}
79
80private:
81 BDSScorerMeshInfo() = delete;
82
83 BDSExtent extent;
84};
85
86#endif
Holder for +- extents in 3 dimensions.
Definition: BDSExtent.hh:39
Recipe class for a scoring mesh.
ScorerMesh class for parser.
Definition: scorermesh.h:38
Parser namespace for GMAD language. Combination of Geant4 and MAD.