Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:52

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     G4ParticleHPFSFissionFS() { hasXsec = true; }
0056     ~G4ParticleHPFSFissionFS() override = default;
0057 
0058     void Init(G4double A, G4double Z, G4int M, G4String& dirName, G4String& aFSType,
0059               G4ParticleDefinition*) override;
0060 
0061     G4DynamicParticleVector* ApplyYourself(G4int Prompt, G4int delayed, G4double* decayconst);
0062 
0063     G4ParticleHPFinalState* New() override
0064     {
0065       auto theNew = new G4ParticleHPFSFissionFS;
0066       return theNew;
0067     }
0068 
0069     inline G4double GetMass() { return theFinalStateNeutrons.GetTargetMass(); }
0070 
0071     void SampleNeutronMult(G4int& all, G4int& Prompt, G4int& delayed, G4double energy, G4int off);
0072 
0073     inline void SetNeutronRP(const G4ReactionProduct& aNeutron)
0074     {
0075       fCache.Get().theNeutronRP = &aNeutron;
0076       theNeutronAngularDis.SetProjectileRP(aNeutron);
0077     }
0078 
0079     inline void SetTarget(const G4ReactionProduct& aTarget)
0080     {
0081       fCache.Get().theTarget = &aTarget;
0082       theNeutronAngularDis.SetTarget(aTarget);
0083     }
0084 
0085     G4DynamicParticleVector* GetPhotons();
0086 
0087     inline G4ParticleHPFissionERelease* GetEnergyRelease() { return &theEnergyRelease; }
0088 
0089   private:
0090     G4HadFinalState* ApplyYourself(const G4HadProjectile&) override { return nullptr; }
0091 
0092     G4ParticleHPParticleYield theFinalStateNeutrons;
0093     G4ParticleHPEnergyDistribution thePromptNeutronEnDis;
0094     G4ParticleHPEnergyDistribution theDelayedNeutronEnDis;
0095     G4ParticleHPAngular theNeutronAngularDis;
0096 
0097     G4ParticleHPPhotonDist theFinalStatePhotons;
0098     G4ParticleHPFissionERelease theEnergyRelease;
0099 
0100     G4Cache<toBeCached> fCache;
0101     G4ParticleHPNames theNames;
0102 };
0103 
0104 #endif