diff options
author | Stan Seibert <stan@mtrr.org> | 2011-08-16 13:52:00 -0400 |
---|---|---|
committer | Stan Seibert <stan@mtrr.org> | 2011-08-16 13:52:00 -0400 |
commit | 7d9b50e9e64c9d8d9a25942e2ffaca52142c6c2b (patch) | |
tree | 6eaf16ef125df0b02cff8198e6bece51a093c8fa /generator/G4chroma.hh | |
parent | 0dbfc2d7dc547452372d776ba74ec77838300a9a (diff) | |
download | chroma-7d9b50e9e64c9d8d9a25942e2ffaca52142c6c2b.tar.gz chroma-7d9b50e9e64c9d8d9a25942e2ffaca52142c6c2b.tar.bz2 chroma-7d9b50e9e64c9d8d9a25942e2ffaca52142c6c2b.zip |
Epic restructuring of code to switch to a generator-based style of
event creation.
Now we have vertex generators (that produce initial particles), photon
generators (that create photons to propagate), and a standard data
structure using Python class containers and numpy arrays to hand
around the code.
Also cleaned up some naming of things before they become conventions.
Diffstat (limited to 'generator/G4chroma.hh')
-rw-r--r-- | generator/G4chroma.hh | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/generator/G4chroma.hh b/generator/G4chroma.hh new file mode 100644 index 0000000..4f085aa --- /dev/null +++ b/generator/G4chroma.hh @@ -0,0 +1,49 @@ +#ifndef __G4chroma_hh__ +#define __G4chroma_hh__ + +#include <geant4/G4VModularPhysicsList.hh> +class ChromaPhysicsList: public G4VModularPhysicsList +{ +public: + ChromaPhysicsList(); + virtual ~ChromaPhysicsList(); + virtual void SetCuts(); +}; + +#include <geant4/G4UserTrackingAction.hh> +#include <vector> +#include <geant4/G4ThreeVector.hh> + +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<G4ThreeVector> pos; + std::vector<G4ThreeVector> dir; + std::vector<G4ThreeVector> pol; + std::vector<double> wavelength; + std::vector<double> t0; +}; + +#endif |