Hi @anna, thank you. Yes, I want the two cylinders behind each other, like this picture
Then, modified the B1Detecotrconstruction.cc, by writing
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
I setted the position of the second target in
(0,0,2.3*cm), because 0.3cm is the thickness of the first one, and 2cm is the distance between the two targets (the 0.3+2.0=2.3). I hope this will fix the first problem.
This is the new B1Detectorconstruction.cc file
B1DetectorConstruction.cc (9.7 KB)
For the second error, I wrote
to put the particle beam 1m beafore the first target (because the first target is in 0.,0.,0).
and I commented all the code above it. I hope it will fix the second problem.
This is the new B1PrimaryGeneratorAction.cc
B1PrimaryGeneratorAction.cc (4.3 KB)
Then I compiled and runned the B1 example and this is the log
log B1.txt (96.2 KB)
I read about warnings just in this line
Visualization Manager instantiating with verbosity "warnings (3)"...
Should I fix it ?