Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/Geant4/G4ParticleHPData.hh was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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 //
0028 // Hadronic Process: Very Low Energy Neutron X-Sections
0029 // original by H.P. Wellisch, TRIUMF, 14-Feb-97
0030 // Has the Cross-section data for all materials.
0031 // P. Arce, June-2014 Conversion neutron_hp to particle_hp
0032 //
0033 #ifndef G4ParticleHPData_h
0034 #define G4ParticleHPData_h 1
0035 
0036 #include "G4Element.hh"
0037 #include "G4NeutronHPCaptureData.hh"
0038 #include "G4ParticleHPElasticData.hh"
0039 #include "G4ParticleHPElementData.hh"
0040 #include "G4ParticleHPFissionData.hh"
0041 #include "G4ParticleHPInelasticData.hh"
0042 #include "globals.hh"
0043 
0044 #include <vector>
0045 
0046 class G4ParticleHPData
0047 {
0048   public:
0049     explicit G4ParticleHPData(G4ParticleDefinition* projectile);
0050 
0051     ~G4ParticleHPData();
0052 
0053     inline G4PhysicsVector* MakePhysicsVector(const G4Element* thE, G4ParticleHPFissionData* theP)
0054     {
0055       auto idx = (G4int)thE->GetIndex();
0056       if (numEle <= idx) addPhysicsVector();
0057       return DoPhysicsVector((*theData[idx]).GetData(theP));
0058     }
0059     inline G4PhysicsVector* MakePhysicsVector(const G4Element* thE, G4NeutronHPCaptureData* theP)
0060     {
0061       auto idx = (G4int)thE->GetIndex();
0062       if (numEle <= idx) addPhysicsVector();
0063       return DoPhysicsVector((*theData[idx]).GetData(theP));
0064     }
0065     inline G4PhysicsVector* MakePhysicsVector(const G4Element* thE, G4ParticleHPElasticData* theP)
0066     {
0067       auto idx = (G4int)thE->GetIndex();
0068       if (numEle <= idx) addPhysicsVector();
0069       return DoPhysicsVector((*theData[idx]).GetData(theP));
0070     }
0071     inline G4PhysicsVector* MakePhysicsVector(const G4Element* thE, G4ParticleHPInelasticData* theP)
0072     {
0073       auto idx = (G4int)thE->GetIndex();
0074       if (numEle <= idx) addPhysicsVector();
0075       return DoPhysicsVector((*theData[idx]).GetData(theP));
0076     }
0077 
0078     G4PhysicsVector* DoPhysicsVector(G4ParticleHPVector* theVector);
0079 
0080     static G4ParticleHPData* Instance(G4ParticleDefinition* projectile);
0081 
0082   private:
0083     std::vector<G4ParticleHPElementData*> theData;
0084     G4int numEle;
0085     void addPhysicsVector();
0086 
0087     G4ParticleDefinition* theProjectile;
0088     G4String theDataDirVariable;
0089 };
0090 
0091 #endif