Hello, in the B1DetectorConstruction I definend 2 circular targets along the z-axis. They have radius 0.75cm, thikness 0.3cm and the distance betwenn them is 2cm.
This is my code
G4double pi = 3.14159265358979323846;
G4double pRMin = 0., pRMax = 0.75*cm, pDz = 1.5*mm, pSPhi = 0., pDPhi = 2*pi;
G4Tubs* solidEnv =
new G4Tubs("Envelope", //its name
pRMin, pRMax, pDz, pSPhi, pDPhi); //its size*/
G4Tubs* solidEnv2 =
new G4Tubs("Envelope2", //its name
pRMin, pRMax, pDz, pSPhi, pDPhi); //its size*/
G4LogicalVolume* logicEnv =
new G4LogicalVolume(solidEnv, //its solid
env_mat, //its material
"Envelope"); //its name
G4LogicalVolume* logicEnv2 =
new G4LogicalVolume(solidEnv, //its solid
env_mat, //its material
"Envelope2"); //its name
new G4PVPlacement(0, //no rotation
G4ThreeVector(), //at (0,0,0)
logicEnv, //its logical volume
"Envelope", //its name
logicWorld, //its mother volume
false, //no boolean operation
0, //copy number
checkOverlaps); //overlaps checking
new G4PVPlacement(0, //no rotation
G4ThreeVector(0,0,2.3*cm), //at (0,0,2.3) 2.3= 0.3*cm+2*cm
logicEnv2, //its logical volume
"Envelope2", //its name
logicWorld, //its mother volume
false, //no boolean operation
0, //copy number
checkOverlaps); //overlaps checking
fScoringVolume = logicEnv;
fScoringVolume2 = logicEnv2;
B1DetectorConstruction.cc (10.0 KB)
Given that the thickness of the targets is 0.3cm and the the 2 targets are placed at at z=0cm and z=2.3cm, I expect that the volumes are defined in the range z€[0, 0.3]cm for the first target adn z€[2.3, 2.6]cm for the second… but when I store the z position in the stepping action,
double PosDirz = step->GetTrack()->GetPosition().z();
I get these plots having positions out of my z range
First target
Second target
and also when I plot the released energy in function of the endstepposition along the z axis
double EndStepPosz2 = step->GetPostStepPoint()->GetPosition().z();
I get points out of my z-range…
@anna you helped me to write the code for the detector construction…maybe, do you know the reason because of I get points out of the z-range?
Thank you