/////////////////////////////////////////////////////////////////// /// \class RAT::DinucleonDecayGen /// /// \brief Generator for invisible dinucleon decay events /// /// \author Ian Coulter -- contact person /// /// REVISION HISTORY: /// 10/08/18 -- Initial commit, I Coulter /// /// \details Allows user to choose pp, pn or nn /// and generates the emitted decay products from /// invisible dinucleon decay in 16O based on /// spectrum drawn from a ratdb file /// /////////////////////////////////////////////////////////////////// #ifndef __RAT_VERTEXGEN_DINUCLEONDECAY__ #define __RAT_VERTEXGEN_DINUCLEONDECAY__ #include #include #include #include #include #include #include class G4Event; namespace RAT { class VertexGen_DinucleonDecay : public GLG4VertexGen { public: VertexGen_DinucleonDecay(); virtual ~VertexGen_DinucleonDecay(); virtual void GeneratePrimaryVertex(G4Event *event, G4ThreeVector &dx, G4double dt); virtual bool IsRepeatable() const { return true; }; virtual void SetState(G4String state); virtual G4String GetState(); virtual void BeginOfRun(); // Returns index of the decay mode from a table of possibilities in the ratdb int SelectDecayMode(G4String nucleonType); // Create a vertex based on particle type and energy void CreateVertex(G4String type, G4double energy, G4Event* event, G4ThreeVector& dx, G4double dt); protected: G4String fStateStr; // generator initialisation, specified by user: G4String fNucleonType; // Type of nucleon decay: proton (default) or neutron DBLinkPtr fDNDecay; // Links to the NUCLEON_DECAY.ratdb /// Vectors recording the energies of the gammas, protons and neutrons for each decay mode. /// The final N or P distinguishes weather there are for neutrons or protons std::vector fEnergyGammaNN, fEnergyGammaPN, fEnergyGammaPP, fEnergyProtonNN, fEnergyProtonPN, fEnergyProtonPP, fEnergyNeutronNN, fEnergyNeutronPN, fEnergyNeutronPP; /// Vectors recording the branching fractions of each decay mode. std::vector fFractionNN, fFractionPN, fFractionPP; private: G4ParticleDefinition *fGamma, *fProton, *fNeutron; }; } // namespace RAT #endif // __RAT_VERTEXGEN_DinucleonDecay__