BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSParallelWorldImportance.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 BDSPARALLELWORLDIMPORTANCE_H
19#define BDSPARALLELWORLDIMPORTANCE_H
20
21#include "BDSExtent.hh"
22#include "BDSImportanceVolumeStore.hh"
23
24#include "globals.hh" // geant4 types / globals
25#include "G4GeometryCell.hh"
26#include "G4VUserParallelWorld.hh"
27
28#include <map>
29
30class G4UserLimits;
31class G4VisAttributes;
32class G4VPhysicalVolume;
33
34namespace GMAD {
35 struct Element;
36 template<typename T> class FastList;
37 class Placement;
38}
39
46class BDSParallelWorldImportance: public G4VUserParallelWorld
47{
48public:
49 BDSParallelWorldImportance(G4String name,
50 G4String importanceWorldGeometryFile,
51 G4String importanceValuesFile);
53
56 void Construct();
57
60
63
65 G4GeometryCell GetGeometryCell(G4int i) const;
66
68 void AddIStore();
69
70 virtual void ConstructSD();
71
73 inline G4VPhysicalVolume* GetWorldVolume() {return imWorldPV;}
74
75private:
79
82 void BuildWorld();
83
85 G4VPhysicalVolume* imWorldPV;
86
88
91
93 std::map<G4String, G4double> imVolumesAndValues;
94
95 G4String imGeomFile;
96 G4String imVolMap;
97 const G4String componentName;
98
101 G4UserLimits* userLimits;
102 G4VisAttributes* visAttr;
104
106 G4double GetCellImportanceValue(const G4String& cellName);
107};
108
109#endif
110
Holder for +- extents in 3 dimensions.
Definition BDSExtent.hh:38
Registry of importance values.
Class that constructs a parallel importance world.
const G4String componentName
String preprended to geometry with preprocessGDML.
BDSImportanceVolumeStore imVolumeStore
Store of geometry cells for importance volumes.
G4double GetCellImportanceValue(const G4String &cellName)
Get importance value of a given physical volume name.
BDSParallelWorldImportance & operator=(const BDSParallelWorldImportance &)
assignment and copy constructor not implemented nor used
void AddIStore()
Create IStore for all importance sampling geometry cells.
std::map< G4String, G4double > imVolumesAndValues
Container for all user placed physical volumes and corresponding importance values.
G4VPhysicalVolume * GetWorldVolume()
World volume getter required in parallel world utilities.
BDSExtent worldExtent
Record of the world extent.
G4VPhysicalVolume * imWorldPV
Importance sampling world volume.
G4int verbosity
Cached global constants values.
BDSExtent WorldExtent() const
Public access to the world extent.
G4GeometryCell GetGeometryCell(G4int i) const
Get geometry cell from store.
void BuildPhysicsBias()
Create biasing operations.
G4VisAttributes * visAttr
Cached global constants values.
G4UserLimits * userLimits
Cached global constants values.
Parser namespace for GMAD language. Combination of Geant4 and MAD.