Hey Bucky,
The only difference between a PMT and a normal solid in chroma is that
you typically add a surface to the PMT solid which has a non zero
"detect" probability. Basically, each solid in the geometry file has
an associated inside and outside material and an inside and outside
surface. The material determines which material is present inside and
outside the solid (for example the outside material would be water in
a Water Cerenkov detector), while the surface determines properties at
the surface layer like diffuse reflection or photon absorption. You
can see examples for different surfaces and materials here:
https://bitbucket.org/chroma/chroma/src/b565b38ae23a5b7522b54af51091e2f7c4267c9c/chroma/demo/optics.py?at=default&fileviewer=file-view-default.
So, to create a PMT you just create a mesh that has the correct shape
and then attach a photocathode surface to whichever triangles in your
mesh have a photocathode (in fact, the surface and material properties
can be defined not just for an entire solid but per triangle in the
mesh). See the build_pmt function here:
https://bitbucket.org/chroma/chroma/src/b565b38ae23a5b7522b54af51091e2f7c4267c9c/chroma/pmt.py?at=default&fileviewer=file-view-default,
which takes a profile in x, y coordinates and then constructs the PMT
and adds a photocathode material to the inside of the mesh wherever
the y coordinate is > 0.
Finally, when you add the solid to the geometry (see
https://bitbucket.org/chroma/chroma/src/b565b38ae23a5b7522b54af51091e2f7c4267c9c/chroma/demo/__init__.py?at=default&fileviewer=file-view-default#__init__.py-51)
it will return an integer so that you can later tell which photons hit
that PMT. After propagating the photons you can select which photons
were detected (a detected bit gets set in the photon flag) and then
map the last hit triangle to a solid id to determine which PMT
detected it.
The last steps of having to find out which photons got detected and
mapping them back to the PMT id is all handled for you if you just use
the Detector class
(
https://bitbucket.org/chroma/chroma/src/b565b38ae23a5b7522b54af51091e2f7c4267c9c/chroma/detector.py?at=default&fileviewer=file-view-default#detector.py-5).
Check out the chroma-sim script in the bin/ directory to see how to
run a simulation.
Hope that helps,
Tony
> --
> You received this message because you are subscribed to the Google Groups
> "chroma-sim" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
chroma-sim+...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.