Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-13 08:57:56

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 //
0027 // P. Arce, June-2014 Conversion neutron_hp to particle_hp
0028 //
0029 #ifndef G4ParticleHPFSFissionFS_h
0030 #define G4ParticleHPFSFissionFS_h 1
0031 
0032 #include "G4Cache.hh"
0033 #include "G4DynamicParticleVector.hh"
0034 #include "G4HadProjectile.hh"
0035 #include "G4ParticleHPAngular.hh"
0036 #include "G4ParticleHPEnergyDistribution.hh"
0037 #include "G4ParticleHPFinalState.hh"
0038 #include "G4ParticleHPFissionERelease.hh"
0039 #include "G4ParticleHPNames.hh"
0040 #include "G4ParticleHPParticleYield.hh"
0041 #include "G4ParticleHPPhotonDist.hh"
0042 #include "G4ParticleHPVector.hh"
0043 #include "globals.hh"
0044 
0045 class G4ParticleHPFSFissionFS : public G4ParticleHPFinalState
0046 {
0047     struct toBeCached
0048     {
0049         const G4ReactionProduct* theNeutronRP{nullptr};
0050         const G4ReactionProduct* theTarget{nullptr};
0051         toBeCached() = default;
0052     };
0053 
0054   public:
0055 
0056     G4ParticleHPFSFissionFS() { hasXsec = true; }
0057     ~G4ParticleHPFSFissionFS() override = default;
0058 
0059     void Init(G4double A, G4double Z, G4int M, const G4String& dirName,
0060               const G4String& aFSType, G4ParticleDefinition*) override;
0061 
0062     G4DynamicParticleVector* ApplyYourself(G4int Prompt, G4int delayed, G4double* decayconst);
0063 
0064     G4ParticleHPFinalState* New() override
0065     {
0066       auto theNew = new G4ParticleHPFSFissionFS;
0067       return theNew;
0068     }
0069 
0070     inline G4double GetMass() const { return theFinalStateNeutrons.GetTargetMass(); }
0071 
0072     void SampleNeutronMult(G4int& all, G4int& Prompt, G4int& delayed, G4double energy, G4int off);
0073 
0074     inline void SetNeutronRP(const G4ReactionProduct& aNeutron)
0075     {
0076       fCache.Get().theNeutronRP = &aNeutron;
0077       theNeutronAngularDis.SetProjectileRP(aNeutron);
0078     }
0079 
0080     inline void SetTarget(const G4ReactionProduct& aTarget)
0081     {
0082       fCache.Get().theTarget = &aTarget;
0083       theNeutronAngularDis.SetTarget(aTarget);
0084     }
0085 
0086     G4DynamicParticleVector* GetPhotons();
0087 
0088     inline G4ParticleHPFissionERelease* GetEnergyRelease() { return &theEnergyRelease; }
0089 
0090   private:
0091 
0092     G4HadFinalState* ApplyYourself(const G4HadProjectile&) override { return nullptr; }
0093 
0094     G4ParticleHPParticleYield theFinalStateNeutrons;
0095     G4ParticleHPEnergyDistribution thePromptNeutronEnDis;
0096     G4ParticleHPEnergyDistribution theDelayedNeutronEnDis;
0097     G4ParticleHPAngular theNeutronAngularDis;
0098 
0099     G4ParticleHPPhotonDist theFinalStatePhotons;
0100     G4ParticleHPFissionERelease theEnergyRelease;
0101 
0102     G4Cache<toBeCached> fCache;
0103     G4ParticleHPNames theNames;
0104 };
0105 
0106 #endif