Links

Content Skeleton

This Page

Previous topic

Chroma Modeling of Sensitive Detectors

Next topic

Chroma ZeroMQ

Chroma Server

This package lets you run a chroma server, which performs GPU-accelerated photon propagation for clients. Clients send chroma-server a list of initial photon vertices, and it replies with the final vertices of detected photons.

The chroma-server:

appears to now be integrated with chroma:

The original not using python objects for communication however, so it might be more directly relevant for usage from inside Geant4 C++.

Transport Mechanism : Feeding the server from Geant4 C++

  1. Geant4 process collects G4Track into a ChromaPhotonList TObject containing contains std::vector<float> and std::vector<int>
  2. My simple class ZMQRoot, serializes the ChromaPhotonList:TObject into bytes (using ROOT TMessage) and thence into a ZMQ message thats sent over the wire to server
  3. Sever deserializes back into ChromaPhotonList:TObject that then gets converted to numpy arrays which can be communicated to GPU using PyCUDA/Chroma capabilities

Alternatives to ROOT TObject Serialization ?

numpy from C ?

pyzmq is able to send/receive numpy arrays (using multipart ZMQ message) with the dtype riding along as a json dict.

Create numpy arrays in C directly from std::vector<float> ? My mysql numpy did something similar from mysql query results.

To do this conveniently would need to use cython