From 91bf7a2e2371a321b3bd402810cfe3b2774e2777 Mon Sep 17 00:00:00 2001 From: Stan Seibert Date: Wed, 3 Aug 2011 13:44:24 -0400 Subject: GEANT4-based photon vertex generator. Propagates a particle through a huge volume of some material and harvest the photon vertices that are created for propagation with Chroma. Relies on a patched version of g4py, plus a local boost.python module that is built at import time if needed. (Does not detect changes to rebuild, however.) Chroma materials can now have a density set, as well as an elemental composition (by weight) that is used by this generator. --- G4chroma.hh | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 G4chroma.hh (limited to 'G4chroma.hh') diff --git a/G4chroma.hh b/G4chroma.hh new file mode 100644 index 0000000..4f085aa --- /dev/null +++ b/G4chroma.hh @@ -0,0 +1,49 @@ +#ifndef __G4chroma_hh__ +#define __G4chroma_hh__ + +#include +class ChromaPhysicsList: public G4VModularPhysicsList +{ +public: + ChromaPhysicsList(); + virtual ~ChromaPhysicsList(); + virtual void SetCuts(); +}; + +#include +#include +#include + +class PhotonTrackingAction : public G4UserTrackingAction +{ +public: + PhotonTrackingAction(); + virtual ~PhotonTrackingAction(); + + int GetNumPhotons() const; + void Clear(); + + void GetX(double *x) const; + void GetY(double *y) const; + void GetZ(double *z) const; + void GetDirX(double *dir_x) const; + void GetDirY(double *dir_y) const; + void GetDirZ(double *dir_z) const; + void GetPolX(double *pol_x) const; + void GetPolY(double *pol_y) const; + void GetPolZ(double *pol_z) const; + + void GetWavelength(double *wl) const; + void GetT0(double *t) const; + + virtual void PreUserTrackingAction(const G4Track *); + +protected: + std::vector pos; + std::vector dir; + std::vector pol; + std::vector wavelength; + std::vector t0; +}; + +#endif -- cgit