_Geant4 Version: geant4-11-02-patch-02 [MT] (21-June-2024)
_Operating System: Ubuntu 64bit
_Compiler/Version:_g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
_CMake Version: 3.22.1
I have implemented and visualized the HPGe geometry and even confirmed that gammas are interacting with the setup, but Iโm not seeing any energy deposition in the HPGe crystal. I based my work on the rdecay01 example, but I canโt figure out why this is happening. If I send my source code by email, would someone be willing to review it? Iโve been stuck on this for so long and have no idea what Iโm missing. Pleaseโฆ
DetectorConstruction.cc
#include "DetectorConstruction.hh"
#include "G4Box.hh"
#include "G4Tubs.hh"
#include "G4LogicalVolume.hh"
#include "G4NistManager.hh"
#include "G4PVPlacement.hh"
#include "G4VisAttributes.hh"
#include "G4SubtractionSolid.hh"
#include "G4UnionSolid.hh"
//#include "SensitiveDetector.hh"
#include "EdepSD.hh"
#include "G4SDManager.hh"
#include "G4SystemOfUnits.hh"
DetectorConstruction::DetectorConstruction()
: G4VUserDetectorConstruction()
{}
DetectorConstruction::~DetectorConstruction()
{}
G4VPhysicalVolume* DetectorConstruction::Construct() {
auto nist = G4NistManager::Instance();
auto iron = nist->FindOrBuildMaterial("G4_Fe");
G4double density = 1.35 * g/cm3;
G4Material* soil = new G4Material("SoilWithoutCs", density, 8);
G4Material* air = nist->FindOrBuildMaterial("G4_AIR");
// Elements (O๋ ์ ์๋ง ํด ๋์
จ์ผ๋ฏ๋ก, ์๋์ฒ๋ผ ์ฌ์ฉํ์ง ์์๋ ๋ฉ๋๋ค)
G4Element* Si = nist->FindOrBuildElement("Si");
G4Element* Al = nist->FindOrBuildElement("Al");
G4Element* Fe = nist->FindOrBuildElement("Fe");
G4Element* Ca = nist->FindOrBuildElement("Ca");
G4Element* Mg = nist->FindOrBuildElement("Mg");
G4Element* Na = nist->FindOrBuildElement("Na");
G4Element* K = nist->FindOrBuildElement("K");
// Add Elements to Soil (Cs ๋ ์ ๊ฑฐ)
soil->AddElement(Si, 0.66899981937);
soil->AddElement(Al, 0.19899994627);
soil->AddElement(Fe, 0.014799996004);
soil->AddElement(Ca, 0.007299998029);
soil->AddElement(Mg, 0.003499999055);
soil->AddElement(Na, 0.014499996085);
soil->AddElement(K, 0.023499993655);
// ๊ณต๊ทน(air) ๋ถ์จ์ ์๋ 0.068399981532 ์์ 2.7e-07 ๋งํผ ๋ํด ์ค๋๋ค
soil->AddMaterial(air, 0.068399981532 + 2.7e-07);
//
// 1) World
//
auto solWorld = new G4Box("World", 3.0*m, 3.0*m, 4.0*m);
auto matAir = nist->FindOrBuildMaterial("G4_AIR");
auto lvWorld = new G4LogicalVolume(solWorld, matAir, "WorldLV");
auto pvWorld = new G4PVPlacement(
nullptr, G4ThreeVector(), lvWorld, "WorldPV",
nullptr, false, 0, true);
auto visWorld = new G4VisAttributes(G4Colour(1,1,1));
visWorld->SetForceWireframe(true);
lvWorld->SetVisAttributes(visWorld);
// -----------------------------
// ์ธ๋ถ ์ฒ ๋ฐ์ค (๋ชจ๋ ์ง์ค๋ฉํธ๋ฆฌ๋ฅผ ๊ฐ์ธ๋ ์์)
// -----------------------------
// 1. ์ธ๋ถ ๋ฐ์ค ํฌ๊ธฐ (3.0 ร 2.4 ร 2.4 m)
G4double outerFeX = 2.4 * m;
G4double outerFeY = 2.4 * m;
G4double outerFeZ = 3.0 * m;
// 2. ๋๊ป 4T (4 mm)
G4double feThickness = 4.0 * mm;
// 3. ๋ด๋ถ ํฌ๊ธฐ ๊ณ์ฐ
G4double innerFeX = outerFeX - 2 * feThickness;
G4double innerFeY = outerFeY - 2 * feThickness;
G4double innerFeZ = outerFeZ - 2 * feThickness;
// 4. Solid ์์ฑ
G4Box* solidOuterFe = new G4Box("SolidOuterFe", outerFeX/2, outerFeY/2, outerFeZ/2);
G4Box* solidInnerFe = new G4Box("SolidInnerFe", innerFeX/2, innerFeY/2, innerFeZ/2);
// 5. Subtraction์ผ๋ก ์์ด ๋น ์ฒ ์์ ์์ฑ
G4SubtractionSolid* shellFeBox = new G4SubtractionSolid(
"OuterFeShell", solidOuterFe, solidInnerFe, nullptr, G4ThreeVector());
// 6. ๋
ผ๋ฆฌ ๋ณผ๋ฅจ ์ ์
auto lvFeShell = new G4LogicalVolume(shellFeBox, iron, "FeShellLV");
auto visFe = new G4VisAttributes(G4Colour(0.6, 0.6, 0.6));
visFe->SetForceWireframe(true);
lvFeShell->SetVisAttributes(visFe);
// 7. ์๋์ ๋ฐฐ์น (์ค์ ์ ๋ ฌ)
new G4PVPlacement(nullptr, G4ThreeVector(), lvFeShell, "FeShellPV", lvWorld, false, 0, true);
// ์ดํ IronBox, MyBox1, Cryostat1, MyBox2, Cryostat2๋ ๋ด๋ถ์ ์๋ ์์น๋ก ๋ฐฐ์นํ๋ฉด ๋ฉ๋๋ค.
// ๊ธฐ์กด IronBox ๋ฐ Cryostat ์์น ์ค์ ์ ๋ถ๋ชจ ๋ณผ๋ฅจ์ lvWorld โ lvFeShell๋ก ๋ณ๊ฒฝํ๊ณ ,
// ๋ฐฐ์น ์์น๋ฅผ ์ ์ ํ ์คํ์
ํ์ฌ ์ค์์ ๋ง์ถ๋ ๋ฐฉ์์ผ๋ก ๊ตฌํํ์ธ์.
// ์์:
// new G4PVPlacement(..., G4ThreeVector(x, y, z), ..., lvFeShell, ...);
//
// (๊ธฐ์กด IronBox, Soil ๋ฑ์ ๊ทธ๋๋ก ๋์๊ณ โฆ)
// 1. ์ฌ๋ฃ ์ค์
G4double thickness = 3.0 * mm;
// 2. ๋ด๋ถ ๋ฐ์ค (์์ด ๋น ๊ณต๊ฐ ํฌ๊ธฐ)
G4double innerX = 1.0 * m;
G4double innerY = (1.0 + 0.003) * m;
G4double innerZ = 1.0 * m;
G4Box* hollowBox = new G4Box("HollowBox", innerX / 2, innerY / 2, innerZ / 2);
// 3. ์ธ๋ถ ๋ฐ์ค (์ฒ ์ฌ์ง ๊ป๋ฐ๊ธฐ ํฌํจ ํฌ๊ธฐ)
G4double outerX = innerX + 2 * thickness;
G4double outerY = innerY + 2 * thickness;
G4double outerZ = innerZ + 2 * thickness;
G4Box* solidBox = new G4Box("SolidBox", outerX / 2, outerY / 2, outerZ / 2);
// 4. ๋ด๋ถ ๋ฐ์ค๋ฅผ ์๋ก 3mm ์ฌ๋ ค์ ๋๊ป ๋๊ป ์์ฑ
G4ThreeVector translation(0, 3 * mm, 0);
// 5. SubtractionSolid: solidBox - hollowBox = ์ฒ ์์ ๊ป๋ฐ๊ธฐ
G4SubtractionSolid* IronBoxSolid = new G4SubtractionSolid(
"IronBox", solidBox, hollowBox, nullptr, translation);
// 6. ๋
ผ๋ฆฌ ๋ณผ๋ฅจ ์์ฑ
G4LogicalVolume* logicIronBox = new G4LogicalVolume(IronBoxSolid, iron, "LogicIronBox");
auto visIB = new G4VisAttributes(G4Colour(0.6, 0.6, 0.6));
visIB->SetForceWireframe(true);
logicIronBox->SetVisAttributes(visFe);
// 7. ์๋์ ์ฒ ์์ ๋ฐฐ์น
new G4PVPlacement(nullptr, G4ThreeVector(0, 0, 0),
logicIronBox, "IronBox", lvWorld, false, 0);
// =======================
// ๋ด๋ถ์ ํ ์ ์ถ๊ฐ
// =======================
// 8. ํ ์ ๋
ผ๋ฆฌ ๋ณผ๋ฅจ ์ ์
G4LogicalVolume* logicSoil = new G4LogicalVolume(hollowBox, soil, "LogicSoil");
// 9. ์๊ฐํ
auto soilVis = new G4VisAttributes(G4Colour(0.6, 0.4, 0.2, 0.8));
soilVis->SetForceSolid(true);
logicSoil->SetVisAttributes(soilVis);
// 10. ํ ์์ ์ฒ ์์์ ๋ด๋ถ ์์์ผ๋ก ๋ฐฐ์น
new G4PVPlacement(nullptr, translation, // ๋์ผํ translation ์ ์ฉ
logicSoil, "SoilVolume", lvWorld, false, 0);
//
//
// 2) Detector holder: Lead Box ("MyBox")
//
G4double halfX = 14.0*cm/2, halfY = 13.0*cm/2, halfZ = 16.0*cm/2;
G4double num = -200.0*mm - (outerZ/2); // ์๋ offset ๊ฐ
G4Box* detBox = new G4Box("detBox", halfX, halfY, halfZ);
auto matPb = nist->FindOrBuildMaterial("G4_Pb");
auto lvBox = new G4LogicalVolume(detBox, matPb, "MyBoxLV");
new G4PVPlacement(
nullptr,
G4ThreeVector(0,0,-110.0*mm + num),
lvBox, "MyBoxPV", lvWorld, false, 0, true);
//
// 3) Cryostat shell
//
G4double cryo_or = 52.5*mm;
G4double cryo_th = 1.6*mm;
G4double cryo_bh = 48.4*mm;
G4double cryo_ct = 1.6*mm;
G4Tubs* cryoBody = new G4Tubs("CryoBody",
cryo_or-cryo_th, cryo_or,
cryo_bh/2, 0.*deg, 360.*deg);
G4Tubs* cryoCap = new G4Tubs("CryoCap",
0, cryo_or, cryo_ct/2, 0.*deg,360.*deg);
auto cryoShell = new G4UnionSolid(
"CryostatShell", cryoBody, cryoCap,
nullptr, G4ThreeVector(0,0,cryo_bh/2));
auto lvCryo = new G4LogicalVolume(cryoShell,
nist->FindOrBuildMaterial("G4_Al"),
"CryostatLV");
auto visCryo = new G4VisAttributes(G4Colour(1,1,0));
visCryo->SetForceSolid(true);
lvCryo->SetVisAttributes(visCryo);
// Place Cryostat in World
G4double z_box_top = -110.0*mm + num + halfZ ; //140mm (Z)
G4double z_cryo = z_box_top + (cryo_bh + cryo_ct)/2.0;
new G4PVPlacement(
nullptr,
G4ThreeVector(0,0, z_cryo),
lvCryo, "CryostatPV", lvWorld, false, 0, true);
//
// 4) Cryo-Vacuum inside Cryostat
//
G4double vac_margin = 0.01*mm;
G4double vac_r = cryo_or - cryo_th - vac_margin;
G4double vac_h = cryo_bh/2.0 - vac_margin;
G4Tubs* vacSolid = new G4Tubs("CryoVacuumSolid",
0, vac_r, vac_h, 0.*deg,360.*deg);
auto lvVac = new G4LogicalVolume(vacSolid,
nist->FindOrBuildMaterial("G4_Galactic"),
"CryoVacuumLV");
new G4PVPlacement(
nullptr,
G4ThreeVector(),
lvVac, "CryoVacuumPV", lvCryo, false, 0, true);
//
// 5) IR-Shield shell inside Vacuum
//
G4double ir_or = 50.9*mm;
G4double ir_th = 1.5*mm;
G4double ir_bh = (44.4)*mm;
G4double ir_ct = (1.5)*mm;
G4Tubs* irBody = new G4Tubs("IRBody",
ir_or-ir_th, ir_or,
ir_bh/2, 0.*deg,360.*deg);
G4Tubs* irCap = new G4Tubs("IRCap",
0, ir_or, ir_ct/2, 0.*deg,360.*deg);
auto irShell = new G4UnionSolid(
"IRShieldShell", irBody, irCap,
nullptr, G4ThreeVector(0,0,ir_bh/2));
auto lvIR = new G4LogicalVolume(irShell,
nist->FindOrBuildMaterial("G4_Al"),
"IRShieldLV");
auto visIR = new G4VisAttributes(G4Colour(0.5,0.5,0.5));
visIR->SetForceSolid(true);
lvIR->SetVisAttributes(visIR);
// Place IR-Shield shell
G4double z_ir_in_cryo = -(cryo_bh - ir_bh)/2.0;
new G4PVPlacement(
nullptr,
G4ThreeVector(0,0,z_ir_in_cryo),
lvIR, "IRShieldPV", lvVac, false, 0, true);
//
// 6) IR-Shield Vacuum inside IR-Shield shell
//
G4double irVac_margin = 0.01*mm;
G4double irVac_r = ir_or - ir_th - irVac_margin;
G4double irVac_h = ir_bh/2.0 - irVac_margin;
G4Tubs* irVacSolid = new G4Tubs("IRShieldVacuumSolid",
0, irVac_r, irVac_h, 0.*deg,360.*deg);
auto lvIRVac = new G4LogicalVolume(irVacSolid,
nist->FindOrBuildMaterial("G4_Galactic"),
"IRShieldVacuumLV");
new G4PVPlacement(
nullptr,
G4ThreeVector(),
lvIRVac, "IRShieldVacuumPV", lvIR, false, 0, true);
//
// 7) Crystal inside IR-Shield Vacuum
//
G4double cry_r = 42.5*mm;
G4double cry_h = 30.0*mm;
G4Tubs* crySolid = new G4Tubs("CrystalSolid",
0, cry_r, cry_h/2, 0.*deg,360.*deg);
G4Tubs* core = new G4Tubs("CoreSolid",
0, 3.5*mm, 9.0*mm, 0.*deg,360.*deg);
auto cryFinal = new G4SubtractionSolid(
"CrystalWithCore", crySolid, core,
nullptr, G4ThreeVector(0,0,-6.0*mm));
auto lvCrystal = new G4LogicalVolume(cryFinal,
nist->FindOrBuildMaterial("G4_Ge"),
"CrystalLV");
auto visCry = new G4VisAttributes(G4Colour(0,1,1));
visCry->SetForceWireframe(true);
lvCrystal->SetVisAttributes(visCry);
// place Crystal
G4double z_crystal_in_ir = 4.1*mm;
new G4PVPlacement(
nullptr,
G4ThreeVector(0,0,z_crystal_in_ir),
lvCrystal, "CrystalPV", lvIRVac, false, 0, true);
//
// 8) attach SensitiveDetector to CrystalPV
//
// Second Geometry!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//------------------------------
// ์๋๋ Z-์ถ๊ณผ Z+์ถ ์๋ฐฉํฅ์ Cryostat + IRShield + Crystal ๊ตฌ์กฐ๋ฅผ ๊ฐ๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ ๋ฐฐ์นํ ์ ์ฒด ์ฝ๋ ์ค์์
// Z+ ๊ตฌ์กฐ๋ฅผ ์ํ **๋
๋ฆฝ์ ์ธ ๋
ผ๋ฆฌ ๋ณผ๋ฅจ**์ ์์ฑํ๊ณ , ์ค๋ณต ์์ด ๋ฐฐ์นํ๋ ๋ถ๋ถ๋ง ์ ๋ฆฌํ ์ฝ๋์
๋๋ค.
// Z+ ๋ฐฉํฅ Cryostat ๋ด๋ถ ๊ตฌ์กฐ๋ฅผ ์ฌ๋ฐ๋ฅด๊ฒ ๋ฐฐ์นํ๊ธฐ ์ํ ์ ์ฒด ์ฝ๋ (์ค๋ณต ์ ๊ฑฐ ํฌํจ)
// Z+ ๋ฐฉํฅ Cryostat ๋ด๋ถ ๊ตฌ์กฐ๋ฅผ ์ฌ๋ฐ๋ฅด๊ฒ ๋ฐฐ์นํ๊ธฐ ์ํ ์ ์ฒด ์ฝ๋ (์ค๋ณต ์ ๊ฑฐ ํฌํจ)
// -----------------------------
// 1. Z+ ๋ฐฉํฅ ํ์ ํ๋ ฌ
// -----------------------------
auto rot180 = new G4RotationMatrix();
rot180->rotateY(180.*deg);
// -----------------------------
// 2. Z+ ๋ฐฉํฅ ๋ฐ์ค ๋ฐฐ์น
// -----------------------------
G4double z_box_center = -110.0*mm + num;
G4double z_cryo_2 = -z_cryo;
new G4PVPlacement(nullptr, G4ThreeVector(0, 0, -z_box_center), lvBox, "MyBoxPV_2", lvWorld, false, 1, true);
// -----------------------------
// 3. Z+ ๋ฐฉํฅ Cryostat ๋ฐ ๋ด๋ถ ๊ตฌ์กฐ ๋ณ๋ ๋
ผ๋ฆฌ ๋ณผ๋ฅจ์ผ๋ก ๊ตฌ์ฑ ๋ฐ ๋ฐฐ์น
// -----------------------------
auto lvCryo2 = new G4LogicalVolume(cryoShell, nist->FindOrBuildMaterial("G4_Al"), "CryostatLV_2");
auto visCryo2 = new G4VisAttributes(G4Colour(1,1,0));
visCryo2->SetForceWireframe(true);
lvCryo2->SetVisAttributes(visCryo2);
G4Tubs* vacSolid2 = new G4Tubs("CryoVacuumSolid_2", 0, vac_r, vac_h, 0.*deg,360.*deg);
auto lvVac2 = new G4LogicalVolume(vacSolid2, nist->FindOrBuildMaterial("G4_Galactic"), "CryoVacuumLV_2");
G4Tubs* irBody2 = new G4Tubs("IRBody_2", ir_or-ir_th, ir_or, ir_bh/2, 0.*deg,360.*deg);
G4Tubs* irCap2 = new G4Tubs("IRCap_2", 0, ir_or, ir_ct/2, 0.*deg,360.*deg);
auto irShell2 = new G4UnionSolid("IRShieldShell_2", irBody2, irCap2, nullptr, G4ThreeVector(0,0,ir_bh/2));
auto lvIR2 = new G4LogicalVolume(irShell2, nist->FindOrBuildMaterial("G4_Al"), "IRShieldLV_2");
auto visIR2 = new G4VisAttributes(G4Colour(0.5,0.5,0.5));
visIR2->SetForceWireframe(true);
lvIR2->SetVisAttributes(visIR2);
G4Tubs* irVacSolid2 = new G4Tubs("IRShieldVacuumSolid_2", 0, irVac_r, irVac_h, 0.*deg,360.*deg);
auto lvIRVac2 = new G4LogicalVolume(irVacSolid2, nist->FindOrBuildMaterial("G4_Galactic"), "IRShieldVacuumLV_2");
G4Tubs* crySolid2 = new G4Tubs("CrystalSolid_2", 0, cry_r, cry_h/2, 0.*deg,360.*deg);
G4Tubs* core2 = new G4Tubs("CoreSolid_2", 0, 3.5*mm, 9.0*mm, 0.*deg,360.*deg);
auto cryFinal2 = new G4SubtractionSolid("CrystalWithCore_2", crySolid2, core2, nullptr, G4ThreeVector(0,0,-6.0*mm));
auto lvCrystal2 = new G4LogicalVolume(cryFinal2, nist->FindOrBuildMaterial("G4_Ge"), "CrystalLV_2");
auto visCry2 = new G4VisAttributes(G4Colour(0, 1, 1));
visCry2->SetForceWireframe(true);
lvCrystal2->SetVisAttributes(visCry2);
new G4PVPlacement(rot180, G4ThreeVector(0, 0, z_cryo_2), lvCryo2, "CryostatPV_2", lvWorld, false, 1, true);
new G4PVPlacement(nullptr, G4ThreeVector(), lvVac2, "CryoVacuumPV_2", lvCryo2, false, 1, true);
new G4PVPlacement(nullptr, G4ThreeVector(0, 0, z_ir_in_cryo), lvIR2, "IRShieldPV_2", lvVac2, false, 1, true);
new G4PVPlacement(nullptr, G4ThreeVector(), lvIRVac2, "IRShieldVacuumPV_2", lvIR2, false, 1, true);
new G4PVPlacement(nullptr, G4ThreeVector(0, 0, z_crystal_in_ir), lvCrystal2, "CrystalPV_2", lvIRVac2, false, 1, true);
// Sensitive Detector ์ฐ๊ฒฐ
// auto sd1 = new SensitiveDetector("CrystalSD1",0);
// auto sd2 = new SensitiveDetector("CrystalSD2",1);
// G4SDManager::GetSDMpointer()->AddNewDetector(sd1);
// G4SDManager::GetSDMpointer()->AddNewDetector(sd2);
// lvCrystal->SetSensitiveDetector(sd1);
// lvCrystal2->SetSensitiveDetector(sd2);
auto edepSD = new EdepSD("EdepSD");
G4SDManager::GetSDMpointer()->AddNewDetector(edepSD);
// Crystal ๋
ผ๋ฆฌ๋ณผ๋ฅจ์ ๋ถ์ด๊ธฐ
lvCrystal->SetSensitiveDetector(edepSD);
lvCrystal2->SetSensitiveDetector(edepSD);
return pvWorld;
}
EdepSD.cc
// EdepSD.hh
#include "G4VSensitiveDetector.hh"
#include "G4SDManager.hh"
#include "EdepHit.hh"
#include "G4AnalysisManager.hh"
#include "G4Gamma.hh"
class EdepSD : public G4VSensitiveDetector {
public:
EdepSD(const G4String& name)
: G4VSensitiveDetector(name),
fHitsCollection(nullptr) {
collectionName.insert("EdepCollection");
}
virtual ~EdepSD(){}
virtual void Initialize(G4HCofThisEvent* hce) override {
fHitsCollection = new EdepHitsCollection(SensitiveDetectorName, collectionName[0]);
G4int hcID = G4SDManager::GetSDMpointer()->GetCollectionID(collectionName[0]);
hce->AddHitsCollection(hcID, fHitsCollection);
}
virtual G4bool ProcessHits(G4Step* step, G4TouchableHistory*) override {
auto particle = step->GetTrack()->GetDefinition();
//if (particle != G4Gamma::Definition()) return false; // ๊ฐ๋ง๊ฐ ์๋๋ฉด ๋ฌด์
G4double edep = step->GetTotalEnergyDeposit();
if (edep <= 0.) return false;
// ํํธ ์ปฌ๋ ์
์ ๋ฃ๊ธฐ
auto hit = new EdepHit();
hit->SetEdep(edep);
hit->SetPos(step->GetPreStepPoint()->GetPosition());
fHitsCollection->insert(hit);
// ๊ฐ๋ง ์นจ์ ๋ง ํ์คํ ๊ทธ๋จ์ ๊ธฐ๋ก
auto analysis = G4AnalysisManager::Instance();
analysis->FillH1(10, edep);
return true;
}
private:
EdepHitsCollection* fHitsCollection;
};
HistoManager.cc
#include "HistoManager.hh"
#include "G4UnitsTable.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
HistoManager::HistoManager()
{
Book();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void HistoManager::Book()
{
// Create or get analysis manager
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
analysisManager->SetDefaultFileType("csv");
analysisManager->SetFileName(fFileName);
analysisManager->SetVerboseLevel(1);
analysisManager->SetActivation(true); //enable inactivation of histograms
// Define histograms start values
const G4int kMaxHisto = 10;
const G4String id[] = {"0","1","2","3","4","5","6","7","8","9","10"};
const G4String title[] =
{ "dummy", //0
"energy spectrum (%): e+ e-", //1
"energy spectrum (%): nu_e anti_nu_e", //2
"energy spectrum (%): gamma", //3
"energy spectrum (%): alpha", //4
"energy spectrum (%): ions", //5
"total kinetic energy per single decay (Q)",//6
"momentum balance", //7
"total time of life of decay chain", //8
"total visible energy in decay chain", //9
"SD Co60 Deposit"
};
// Default values (to be reset via /analysis/h1/set command)
G4int nbins = 100;
G4double vmin = 0.;
G4double vmax = 100.;
// Create all histograms as inactivated
// as we have not yet set nbins, vmin, vmax
for (G4int k=0; k<kMaxHisto; k++) {
G4int ih = analysisManager->CreateH1(id[k], title[k], nbins, vmin, vmax);
analysisManager->SetH1Activation(ih, false);
}
}
This is how itโs organized