/* * NeutrinoVertexGen.hh * * Created on: Feb 7, 2016 * Author: nbarros */ #ifndef SRC_GEN_NEUTRINOVERTEXGEN_HH_ #define SRC_GEN_NEUTRINOVERTEXGEN_HH_ #include "GLG4VertexGen.hh" namespace RAT { class NeutrinoVertexGen: public GLG4VertexGen { public: NeutrinoVertexGen(const char *arg_dbname="neutrino") : GLG4VertexGen(arg_dbname),fEmin(0.0),fEmax(9999) { }; virtual ~NeutrinoVertexGen() { }; // Generate and add new vertex to this event. Position and // time of vertex are offset from 0 by dx and dt. (These // are usually derived from GLG4PosGen and GLG4TimeGen.) virtual void GeneratePrimaryVertex( G4Event *argEvent, G4ThreeVector &dx, G4double dt) = 0; // This one only makes sense for neutrino sources such as ES and IBD virtual void GeneratePrimaryVertex( G4Event *argEvent, G4ThreeVector &dx, G4double dt, G4ThreeVector &nu_dir) = 0; virtual G4double GetRatePerTarget() = 0; // returns the current state information in a form that can be understood // by SetState (and, hopefully, a well-informed human) /** This method tells us that you can't limit the output energies (overload if true)*/ // Both should be limitable virtual bool ELimitable() { return true; }; /** Optional method to limit the energies, must be supplied if ELimitable returns true */ virtual void LimitEnergies( float emin, float emax) {fEmin = emin; fEmax = emax;}; /** Optional method to return maximum energy possible for generator */ virtual float EMaximum() { return fEmax; }; /** Optional method to return minimum energy possible for generator */ virtual float EMinimum() { return fEmin; }; bool GetStandaloneMode() const {return fStandaloneMode;}; void SetStandaloneMode(bool status) {fStandaloneMode = status;}; protected: G4double fEmin; G4double fEmax; bool fStandaloneMode; }; } /* namespace RAT */ #endif /* SRC_GEN_NEUTRINOVERTEXGEN_HH_ */