Unfortunately, my boss wants an automatic way…he says that he uses an automatic way with other simulation (working on old G4 version). The author of this simulation wrote a personal “confine” code…but
- The confine code looks like similiar to the gps confine code
- My boss gave me these 4 files, but I think that there other files are needed to implement all the code
MGGeneratorPrimary.cc (17.5 KB)
MGGeneratorPrimary.hh (6.3 KB)
MGGeneratorPrimaryMessenger.cc (19.6 KB)
MGGeneratorPrimaryMessenger.hh (4.4 KB)
Can you check if these calculations are correct please?
I need to set the source in the PhysSample. Here all the positions up to PhysSample
new G4PVPlacement(0, G4ThreeVector(), leadshield_log, "leadshield", logicWorld, false, 0);
new G4PVPlacement(0, G4ThreeVector(), coppershield_log, "coppershield", leadshield_log, false, 0);
new G4PVPlacement(0, G4ThreeVector(0., 0., 11.95), Nfilledchamber_log, "Nfilledchamber",coppershield_log, false, 0);
PhysSample = new G4PVPlacement(0, G4ThreeVector(0, 0, (-4.55*cm-1.175*cm+fillingheight/2.-fsmarinelli_height/2.)), sample_log,"sample", Nfilledchamber_log, false, 0);
Then, given that fillingheight=16.4 cm and fsmarinelli_height=0 cm
- leadshield_log is centered in (0,0,0) in the world coordinates
- coppershield is centered in (0,0,0) in the leadshield_log coordinates, corresponding also to (0,0,0) in the world coordinates
- Nfilledchamber_log, is centered in (0,0,11.95) in the coppershield_log coordinates, corresponding also to (0,0,11.95) in the world coordinates
- sample_log is centered in (0,0,2.475) in the Nfilledchamber_log coordinates, corresponding to (0,0,14.425) in the world coordinates
then the command line to set the source should be /gps/pos/centre .0 .0 14.425 cm
is it the rigth way to calculate the coordinates?