Warning, file /include/Geant4/RISI.hpp was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef RISI_hpp_included
0011 #define RISI_hpp_included 1
0012
0013 #include <map>
0014 #include <set>
0015
0016 #include <LUPI.hpp>
0017
0018 namespace GIDI {
0019
0020 namespace RISI {
0021
0022 class Projectile;
0023
0024 class Reaction {
0025
0026 public:
0027 double m_effectiveThreshold;
0028 std::vector<std::string> m_products;
0029 std::vector<int> m_multiplicities;
0030 std::vector<std::string> m_intermediates;
0031 std::string m_process;
0032 std::string m_reactionLabel;
0033 std::string m_convarianceFlag;
0034
0035 public:
0036 Reaction( double a_effectiveThreshold, std::vector<std::string> const &a_products, std::vector<int> const &a_multiplicities,
0037 std::vector<std::string> const &a_intermediates, std::string const &a_process, std::string const &reactionLabel,
0038 std::string const &convarianceFlag );
0039
0040 bool isFission( ) const;
0041 int multiplicity( std::string const &a_productId ) const;
0042 void products( double a_energyMax, std::set<std::string> &a_products ) const ;
0043 void printAsRIS_file( int a_labelWidth ) const ;
0044 };
0045
0046 class Protare {
0047
0048 private:
0049 int m_addMode;
0050 std::string m_projectile;
0051 std::string m_target;
0052 std::string m_evaluation;
0053 std::string m_energyUnit;
0054 double m_energyConversionFactor;
0055
0056 std::vector<std::pair<std::string, std::string> > m_aliases;
0057 std::vector<Reaction *> m_reactions;
0058
0059 public:
0060 Protare( std::string const &a_projectile, std::string const &a_target, std::string const &a_evaluation,
0061 std::string const &a_protareEnergyUnit, std::string const &a_requestedEnergyUnit );
0062 ~Protare();
0063
0064 std::string const &projectile( ) { return( m_projectile ); }
0065 std::string const &target( ) { return( m_target ); }
0066 std::string const &evaluation( ) { return( m_evaluation ); }
0067 std::vector<Reaction *> const &reactions( ) const { return( m_reactions ); }
0068
0069 void Oops( std::vector<std::string> const &a_elements );
0070 void addAlias( std::vector<std::string> const &a_elements );
0071 bool fissionPresent( ) const;
0072 void setAddingAliases( ) { m_addMode = 1; }
0073 void addReaction( std::vector<std::string> const &a_elements );
0074 void setAddingReactions( ) { m_addMode = 2; }
0075 void add( std::vector<std::string> const &a_elements );
0076
0077 void products( Projectile const *a_projectile, int a_level, int a_maxLevel, double a_energyMax, std::map<std::string, int> &a_products ) const ;
0078 void printAsRIS_file( ) const ;
0079 };
0080
0081 class Target {
0082
0083 private:
0084 std::string m_id;
0085 std::vector<Protare *> m_protares;
0086
0087 public:
0088 Target( std::string const &a_id ) :
0089 m_id( a_id ) {
0090 }
0091 ~Target( );
0092
0093 void add( Protare *a_protare );
0094 bool fissionPresent( ) const;
0095 std::vector<Reaction *> const &reactions( ) const { return( m_protares[0]->reactions( ) ); }
0096 void products( Projectile const *a_projectile, int a_level, int a_maxLevel, double a_energyMax, std::map<std::string, int> &a_products ) const ;
0097 void print( std::string const &a_indent = "" ) const ;
0098 void printAsRIS_file( ) const ;
0099 };
0100
0101 class Projectile {
0102
0103 private:
0104 std::string m_id;
0105 std::map<std::string, Target *> m_targets;
0106
0107 public:
0108 Projectile( std::string const &a_id ) :
0109 m_id( a_id ) {
0110 }
0111 ~Projectile( );
0112
0113 void add( Protare *a_protare );
0114 bool fissionPresent( std::vector<std::string> targetIds ) const;
0115 std::vector<std::string> targetIds( ) const ;
0116 void products( std::string const &a_target, int a_level, int a_maxLevel, double a_energyMax, std::map<std::string, int> &a_products ) const ;
0117 std::vector<std::string> filterProducts( std::vector<std::string> const &a_productIds ) const ;
0118 Target const *target( std::string const &a_targetName ) const;
0119 void print( std::string const &a_indent = "" ) const ;
0120 void printAsRIS_file( ) const ;
0121 };
0122
0123 class Projectiles {
0124
0125 private:
0126 std::map<std::string, Projectile *> m_projectiles;
0127
0128 public:
0129 Projectiles( ) {}
0130 ~Projectiles( );
0131
0132 void add( Protare *a_protare );
0133 void clear( );
0134 std::vector<std::string> projectileIds( ) const ;
0135 Projectile const *projectile( std::string const &a_projectile ) const ;
0136 std::vector<std::string> products( std::string const &a_projectile, std::vector<std::string> const &a_seedTargets, int a_maxLevel,
0137 double a_energyMax, bool a_onlyIncludeTargets = true ) const ;
0138 void print( std::string const &a_indent = "" ) const ;
0139 void printAsRIS_file( ) const ;
0140 };
0141
0142 void readRIS( std::string const &a_fileName, std::string const &a_energyUnit, Projectiles &a_projectiles );
0143
0144 }
0145
0146 }
0147
0148 #endif