-
Notifications
You must be signed in to change notification settings - Fork 87
Refactor add_macaco1_camera function #863
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Updated MACACO1 camera configuration with new components and sizes.
anetxe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Zaina,
Can you verify these few things and make the changes accordingly? thank!
| camera.size = [4 * cm, 4 * cm, 7.6 * cm] | ||
| camera.color = [1, 1, 1, 1] # white | ||
| camera.size = [16 * cm, 40 * cm, 7.6 * cm] | ||
| camera.translation = [0, 0, 8.3 * cm] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, put by default the camera at the center of the world. The user should then place it in the main simulation file.
| # Scatterer | ||
| holder1 = sim.add_volume("Box", f"{name}_Holder1") | ||
| holder1.mother = camera.name | ||
| holder1.material = "G4_PLASTIC_SC_VINYLTOLUENE" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not. But check please if this material corresponds to the one defined previously
Plastic: d=1.18 g/cm3 ; n=3; state=solid
+el: name=Carbon ; n=5
+el: name=Hydrogen ; n=8
+el: name=Oxygen ; n=2
| pcb_scatt.mother = camera.name | ||
| pcb_scatt.material = "PCB" | ||
| pcb_scatt.size = [10.89 * cm, 20.7 * cm, 0.4 * cm] | ||
| pcb_scatt.translation = [0, 6.25 * cm, -2.26 * cm] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check translation. Is not -2.46 cm?
| # Absorber | ||
| holder2 = sim.add_volume("Box", f"{name}_Holder2") | ||
| holder2.mother = camera.name | ||
| holder2.material = "G4_PLASTIC_SC_VINYLTOLUENE" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here. Check density and composition please
Thanks for the review! I updated the default camera position to be at the world center, as suggested and fixed the coordinate of pcb_scatt. For the material, I checked the G4 files and it's not the same at all, I'm not sure why I used it in my code before, so I fixed it here and on vs.
Updated MACACO1 camera configuration with new components and sizes.