Greetings,
I recently convinced myself to work with scoring mesh in macro command rather than using G4VSensitiveDetector. But I am a bit confused about the functionality of it. In the DetectorConstruction.cc, I defined a titanium foil as such,
G4Box *SW = new G4Box("Exit Window", 0.5* 15 *cm, 0.5 * 15 *cm, 0.5 * 0.02*mm);
G4LogicalVolume *LW = new G4LogicalVolume(SW, titanium, "LW");
G4VPhysicalVolume*PW = new G4PVPlacement(0, G4ThreeVector(0, 0, 1*m+0.01*mm), LW, "PW", Lworld, false, 0, true);
And this is what I wrote in my macro,
# ===== Scoring Mesh Setup =====
/score/create/boxMesh exitWindowMesh
# Match your titanium window dimensions exactly
/score/mesh/boxSize 7.5 7.5 0.01 cm # Half dimensions (like G4Box)
/score/mesh/translate/xyz 0 0 100.01 cm # Same as your placement
# Voxel configuration - thin in Z
/score/mesh/nBin 30 30 1
# Define scorer
/score/quantity/energyDeposit eDep
/score/close
# ===== Execution =====
/run/beamOn 10000
# ===== Results =====
/score/dumpQuantityToFile exitWindowMesh eDep window_energy.csv
So the scoring mesh is completely wrapped around the foil because it has the same dimension and location. My question is, ‘Does the scoring mesh automatically consider the material inside itself?’ I mean, if I wrap this mesh around another material, will the scored data change?
And one small question; I am familiar with /score/create/realWorldLogVol
but if I do this, I cannot define voxels and the whole foil will be considered as a voxel and gives one row of data. How can I define voxels but attach it to a specific logical volume instead of translating and shaping the mesh manually?