20#include "BDSException.hh"
21#include "BDSHistBinMapper.hh"
22#include "BDSScoringMeshBox.hh"
23#include "BDSScorerMeshInfo.hh"
26#include "G4RotationMatrix.hh"
30 const G4Transform3D& placementTransform):
31 BDSScoringMeshBox(name, placementTransform.getTranslation(), placementTransform.getRotation())
34 scorerSize[0] = recipe.ScoringMeshX();
35 scorerSize[1] = recipe.ScoringMeshY();
36 scorerSize[2] = recipe.ScoringMeshZ();
40 nSegment[0] = recipe.nBinsX;
41 nSegment[1] = recipe.nBinsY;
42 nSegment[2] = recipe.nBinsZ;
43 nEnergySegments = recipe.nBinsE;
44 SetNumberOfSegments(nSegment);
47 mapper =
new BDSHistBinMapper(fNSegment[0], fNSegment[1], fNSegment[2], nEnergySegments, recipe.energyAxis);
49 mapper =
new BDSHistBinMapper(fNSegment[0], fNSegment[1], fNSegment[2], nEnergySegments);
54 const G4ThreeVector& translation,
55 const G4RotationMatrix& rotation):
59 fRotationMatrix =
new G4RotationMatrix(rotation.inverse());
60 fCenterPosition = translation;
66 {
throw BDSException(__METHOD_NAME__,
"mesh \"" + fWorldName +
"\" size not set but queried");}
68 {
throw BDSException(__METHOD_NAME__,
"mesh \"" + fWorldName +
"\" mapper has mysteriously disappeared");}
72BDSScoringMeshBox::~BDSScoringMeshBox()
General exception with possible name of object and message.
Mapping from axis indices to 1D index.
Recipe class for a scoring mesh.
Wrapper for G4ScoringBox to allow full access to placement.
BDSScoringMeshBox(const G4String &name, const BDSScorerMeshInfo &recipe, const G4Transform3D &placementTransform)