//////////////////////////////////////////////////////////////////// /// /// \class RAT::VertexGen_AlphaN /// /// \brief Generates neutrons with the energy spectrum after alpha-n reaction. /// /// \author Aleksandra Bialek -- contact person /// \author Ian Coulter -- contact person /// /// REVISION HISTORY:\n /// Feb 2014 : A.Bialek - new vertex generator to simulate neutrons after alpha-n reaction /// on targets: 13C and 18O in materials LABPPO, TeLAB and AV /// with energy spectra of neutrons and deexcitation particles of 16O and 21Ne /// see documentation: SNO+-doc- /// Aug 2014 : I.Coulter - Add the corresponding alpha alongside the neutron. Its energy is drawn /// between two lower and upper limits for the alpha energy deposited in the /// scintillator before creating a neutron of a given energy. /// These are from a full kinematic calculation (using the true cross-sections /// and angular distributions for each excited state) by Valentina. /// Feb 2017 : N. Barros - Introducing BeginOfRun and EndOfRun /// /// /// /// \details The energy spectrum is given in the data base file called nSPECTRUM /// Arguments of the generator: [MATERIAL] [TARGET] /// //////////////////////////////////////////////////////////////////// #ifndef __RAT_VertexGen_AlphaN__ #define __RAT_VertexGen_AlphaN__ #include #include #include #include #include "G4ParticleDefinition.hh" #include "G4ParticleTable.hh" #include #include namespace RAT { class VertexGen_AlphaN : public GLG4VertexGen { public: /** Constructor sets the default db name **/ VertexGen_AlphaN(const char *arg_dbname="AlphaN"); /** Destructor **/ virtual ~VertexGen_AlphaN(); virtual void GeneratePrimaryVertex(G4Event *argEvent, G4ThreeVector &dx, G4double dt); virtual void SetState(G4String newValues ); virtual G4String GetState(); G4ParticleDefinition *fPartDef; G4ThreeVector GetMomentum(double ke, G4String partName); virtual void BeginOfRun(); protected: G4String fMaterial;///< given in initial macro the material of the volume LAB, TeLAB or AV G4String fTarget; ///< targets: 13C and 18O double GetAlphaLimits(G4String limit, G4int deexlevel, int iBin); double GetAlphaEnergy(double nEnergy, G4int deexlevel); DBLinkPtr fDBName; TH1F *fSpectra[10]; /// fDeexLevels;/// fProb;///< probability of each energy level std::vector > fDeexPart;/// > fDeexEn;/// > fDeexT; /// > fNeutronEn;/// > fNeutronInten;///< spectrum std::vector > fAlphaLimitLowArray; std::vector > fAlphaLimitHighArray; bool fLoadHistos; bool fNotime; }; } // namespace RAT #endif