Loading...
Searching...
No Matches
Public Member Functions | List of all members
scavenger::DetectorConstruction Class Reference

Defines the geometry and scorers for calculating chemical species yields. More...

#include <Doxymodules_medical.h>

Inheritance diagram for scavenger::DetectorConstruction:
G4VUserDetectorConstruction

Public Member Functions

 DetectorConstruction ()
 
 ~DetectorConstruction () override=default
 
G4VPhysicalVolumeConstruct () override
 
void ConstructSDandField () override
 

Detailed Description

Defines the geometry and scorers for calculating chemical species yields.

Definition at line 345 of file Doxymodules_medical.h.

Constructor & Destructor Documentation

◆ DetectorConstruction()

scavenger::DetectorConstruction::DetectorConstruction ( )

◆ ~DetectorConstruction()

scavenger::DetectorConstruction::~DetectorConstruction ( )
overridedefault

Member Function Documentation

◆ Construct()

G4VPhysicalVolume * scavenger::DetectorConstruction::Construct ( )
override

Definition at line 52 of file DetectorConstruction.cc.

52 {
53 // Water is defined from NIST material database
54 auto *man = G4NistManager::Instance();
55 auto *water = man->FindOrBuildMaterial("G4_WATER");
56
57 // World
58 G4double world_sizeXYZ = 1. * km;
59 auto solidWorld =
60 new G4Box("World",
61 0.5 * world_sizeXYZ,
62 0.5 * world_sizeXYZ,
63 0.5 * world_sizeXYZ);
64
65 auto logicWorld =
66 new G4LogicalVolume(solidWorld,
67 water,
68 "World");
69
70 G4VPhysicalVolume *physWorld =
71 new G4PVPlacement(nullptr, //no rotation
72 G4ThreeVector(), //its position at (0,0,0)
73 logicWorld, //its logical volume
74 "World", //its name
75 nullptr, //its mother volume
76 false, //no boolean operation
77 0, //copy number
78 true); //checking overlaps
79
80 // Visualization attributes
81 auto worldVisAtt = new G4VisAttributes(G4Colour(.5, 1.0, .5));
82 worldVisAtt->SetVisibility(true);
83 logicWorld->SetVisAttributes(worldVisAtt);
84 return physWorld;
85}

◆ ConstructSDandField()

void scavenger::DetectorConstruction::ConstructSDandField ( )
override

declare World as a MultiFunctionalDetector scorer

Definition at line 89 of file DetectorConstruction.cc.

89 {
90 G4SDManager::GetSDMpointer()->SetVerboseLevel(1);
91 /**
92 * declare World as a MultiFunctionalDetector scorer
93 */
94 auto mfDetector = new G4MultiFunctionalDetector("mfDetector");
95
96 // Kill primary track after a chosen energy loss OR under a chosen
97 // kinetic energy
98 auto primaryKiller = new PrimaryKiller("PrimaryKiller");
99 primaryKiller->SetMinLossEnergyLimit(500. * eV); // default value
100 primaryKiller->SetMaxLossEnergyLimit(1. * keV); // default value
101 mfDetector->RegisterPrimitive(primaryKiller);
102
103 // Record Species scorer:
104 // - score number of species over time
105 // - score the total energy deposition
106 // - compute the radiochemical yields (G values)
107 G4VPrimitiveScorer *gValues = new ScoreSpecies("Species");
108 mfDetector->RegisterPrimitive(gValues);
109 G4SDManager::GetSDMpointer()->AddNewDetector(mfDetector);
110 SetSensitiveDetector("World", mfDetector);
111}

The documentation for this class was generated from the following files:

Applications | User Support | Publications | Collaboration