Back to home page

EIC code displayed by LXR

 
 

    


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

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 # <<BEGIN-copyright>>
0028 # <<END-copyright>>
0029 */
0030 #ifndef G4GIDI_target_h_included
0031 #define G4GIDI_target_h_included 1
0032 
0033 #include <vector>
0034 #include <string>
0035 
0036 //using namespace std;
0037 
0038 #include <statusMessageReporting.h>
0039 
0040 #include <MCGIDI.h>
0041 
0042 typedef struct crossSectionData_s crossSectionData;
0043 typedef struct G4GIDI_Product_s G4GIDI_Product;
0044 
0045 struct crossSectionData_s {
0046     int start, end;
0047     std::vector<double> crossSection;
0048 };
0049 
0050 #define channelID std::string
0051 
0052 struct G4GIDI_Product_s {
0053     int A, Z, m;
0054     double kineticEnergy, px, py, pz;
0055     double birthTimeSec;
0056 };
0057 
0058 class G4GIDI_target {
0059 
0060     public:
0061         void init( const char *fileName );
0062         std::string equalProbableBinSampleMethod;
0063         int nElasticIndices, nCaptureIndices, nFissionIndices, nOthersIndices;
0064         int *elasticIndices, *captureIndices, *fissionIndices, *othersIndices;
0065 
0066     public:
0067         GIDI::statusMessageReporting smr;
0068         int projectilesPOPID;
0069         std::string name;
0070         std::string sourceFilename;
0071         double mass;
0072         GIDI::MCGIDI_target *target;
0073 
0074         G4GIDI_target( const char *fileName );
0075         G4GIDI_target( std::string const &fileName );       
0076         ~G4GIDI_target( );
0077 
0078         std::string *getName( void );
0079         std::string *getFilename( void );
0080         int getZ( void );
0081         int getA( void );
0082         int getM( void );
0083         double getMass( void );
0084         int getTemperatures( double *temperatures );
0085         int readTemperature( int index );
0086         std::string getEqualProbableBinSampleMethod( void );
0087         int setEqualProbableBinSampleMethod( std::string method );
0088 
0089         int getNumberOfChannels( void );
0090         int getNumberOfProductionChannels( void );
0091         channelID getChannelsID( int channelIndex );
0092         std::vector<channelID> *getChannelIDs( void );
0093         std::vector<channelID> *getProductionChannelIDs( void );
0094 
0095         std::vector<double> *getEnergyGridAtTIndex( int index );
0096 
0097         double getTotalCrossSectionAtE( double e_in, double temperature );
0098         double getElasticCrossSectionAtE( double e_in, double temperature );
0099         double getCaptureCrossSectionAtE( double e_in, double temperature );
0100         double getFissionCrossSectionAtE( double e_in, double temperature );
0101         double getOthersCrossSectionAtE( double e_in, double temperature );
0102         double sumChannelCrossSectionAtE( int nIndices, int *indices, double e_in, double temperature );
0103         int sampleChannelCrossSectionAtE( int nIndices, int *indices, double e_in, double temperature, double (*rng)( void * ), void *rngState );
0104 
0105         double getElasticFinalState( double e_in, double temperature, double (*rng)( void * ), void *rngState );
0106         std::vector<G4GIDI_Product> *getCaptureFinalState( double e_in, double temperature, double (*rng)( void * ), void *rngState );
0107         std::vector<G4GIDI_Product> *getFissionFinalState( double e_in, double temperature, double (*rng)( void * ), void *rngState );
0108         std::vector<G4GIDI_Product> *getOthersFinalState( double e_in, double temperature, double (*rng)( void * ), void *rngState );
0109         std::vector<G4GIDI_Product> *getFinalState( int nIndices, int *indices, double e_in, double temperature, double (*rng)( void * ), void *rngState );
0110 
0111         double getReactionsThreshold( int index );
0112         double getReactionsDomain( int index, double *EMin, double *EMax );
0113 };
0114 
0115 #endif      // End of G4GIDI_target_h_included