aegir
Phlex-based simulation framework for the SHiP experiment.
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
SHiP::g4 Namespace Reference

Namespaces

namespace  scoring_plane_detail
 

Classes

class  ConfigurableDetectorConstruction
 
class  CrossingSD
 
class  EnergyCutAction
 
class  ScoringParallelWorld
 The parallel world holding the scoring planes. More...
 
struct  ScoringPlaneConfig
 One scoring plane, as configured in the geant4 module's scoring_planes. More...
 
struct  ScoringPlaneInfo
 What the sensitive detector needs to know about a placed plane. More...
 
class  ScoringPlaneSD
 Records one SimHit per track entering a scoring plane through its surface, regardless of particle type or energy deposit. More...
 
class  ScoringSD
 
class  TrackingAction
 

Typedefs

using DetectorIdMap = std::unordered_map< G4LogicalVolume *, int >
 
using ScoringPlaneMap = std::unordered_map< G4LogicalVolume *, ScoringPlaneInfo >
 

Enumerations

enum class  SDMode { scoring , crossing }
 
enum class  ScoringShape : std::uint8_t { box , tube }
 

Functions

SimHit make_base_hit (G4Step const *step, int detector_id)
 
SimHit make_base_hit (G4Step const *step, DetectorIdMap const &detector_ids)
 
void validate_scoring_planes (std::vector< ScoringPlaneConfig > const &planes)
 Check a set of plane configurations for consistency on their own (no geometry needed); throws std::invalid_argument naming the offending plane.
 
ScoringPlaneMap place_scoring_planes (G4VPhysicalVolume *mass_world, G4VPhysicalVolume *scoring_world, std::vector< ScoringPlaneConfig > const &planes)
 Build the configured planes and place them in scoring_world, the parallel world; after_volume references are resolved in the detector geometry under mass_world.
 

Variables

thread_local std::vector< SimHit > tl_hits
 
thread_local std::vector< SimParticle > tl_particles
 
thread_local std::unordered_map< int, std::size_t > tl_track_map
 
constexpr std::int32_t kScoringPlaneDetectorId = 100
 SimHit::detectorId of every scoring-plane hit.
 
constexpr char const * kScoringWorldName = "aegir_scoring_planes"
 Name of the parallel world holding the scoring planes, and of the G4ParallelWorldPhysics constructor that makes Geant4 track through it.
 

Typedef Documentation

◆ DetectorIdMap

using SHiP::g4::DetectorIdMap = typedef std::unordered_map<G4LogicalVolume*, int>

◆ ScoringPlaneMap

using SHiP::g4::ScoringPlaneMap = typedef std::unordered_map<G4LogicalVolume*, ScoringPlaneInfo>

Enumeration Type Documentation

◆ ScoringShape

enum class SHiP::g4::ScoringShape : std::uint8_t
strong
Enumerator
box 
tube 

◆ SDMode

enum class SHiP::g4::SDMode
strong
Enumerator
scoring 
crossing 

Function Documentation

◆ make_base_hit() [1/2]

SimHit SHiP::g4::make_base_hit ( G4Step const *  step,
DetectorIdMap const &  detector_ids 
)
inline

◆ make_base_hit() [2/2]

SimHit SHiP::g4::make_base_hit ( G4Step const *  step,
int  detector_id 
)
inline

◆ place_scoring_planes()

ScoringPlaneMap SHiP::g4::place_scoring_planes ( G4VPhysicalVolume *  mass_world,
G4VPhysicalVolume *  scoring_world,
std::vector< ScoringPlaneConfig > const &  planes 
)
inline

Build the configured planes and place them in scoring_world, the parallel world; after_volume references are resolved in the detector geometry under mass_world.

Must run on the geometry-creating thread before the geometry is closed (G4VUserParallelWorld::Construct()). Throws on an ambiguous or missing reference volume, a name clash, two planes that overlap, or a plane that extends beyond the world — all checked before any plane is built.

◆ validate_scoring_planes()

void SHiP::g4::validate_scoring_planes ( std::vector< ScoringPlaneConfig > const &  planes)
inline

Check a set of plane configurations for consistency on their own (no geometry needed); throws std::invalid_argument naming the offending plane.

Variable Documentation

◆ kScoringPlaneDetectorId

constexpr std::int32_t SHiP::g4::kScoringPlaneDetectorId = 100
inlineconstexpr

SimHit::detectorId of every scoring-plane hit.

Kept clear of the SHiP subsystem ids (SHiP::detector_id, 0–4) and of the sensitive-volume indices the geometry's own sensitive detectors write, so a plane hit cannot be mistaken for a detector hit. Which plane recorded the hit is stored in SimHit::geometryNodeId (the plane's configured id).

◆ kScoringWorldName

constexpr char const* SHiP::g4::kScoringWorldName = "aegir_scoring_planes"
inlineconstexpr

Name of the parallel world holding the scoring planes, and of the G4ParallelWorldPhysics constructor that makes Geant4 track through it.

◆ tl_hits

thread_local std::vector<SimHit> SHiP::g4::tl_hits
inline

◆ tl_particles

thread_local std::vector<SimParticle> SHiP::g4::tl_particles
inline

◆ tl_track_map

thread_local std::unordered_map<int, std::size_t> SHiP::g4::tl_track_map
inline