#include <tpia_map.h>
#include <tpia_target.h>
Go to the source code of this file.
Defines | |
#define | G4GIDI_Misc_h_included 1 |
Functions | |
char * | G4GIDI_Misc_Z_A_m_ToName (int iZ, int iA, int im=0) |
char * | G4GIDI_Misc_channelCompound (char *particle1, char *particle2) |
int | G4GIDI_Misc_channelProductsCompare (GIDI::tpia_channel *channel, int nProducts, char **productNames) |
int | getNamesOfAvailableTargets_walker (GIDI::tpia_mapEntry *entry, int level, void *userData) |
#define G4GIDI_Misc_h_included 1 |
Definition at line 62 of file G4GIDI_Misc.hh.
char* G4GIDI_Misc_channelCompound | ( | char * | particle1, | |
char * | particle2 | |||
) |
Definition at line 99 of file G4GIDI_Misc.cc.
References G4GIDI_Misc_Z_A_m_ToName(), and tpia_miscNameToZAm().
00099 { 00100 00101 int Z1, A1, m1, Z2, A2, m2; 00102 00103 if( tpia_miscNameToZAm( NULL, particle1, &Z1, &A1, &m1 ) ) return( NULL ); 00104 if( tpia_miscNameToZAm( NULL, particle2, &Z2, &A2, &m2 ) ) return( NULL ); 00105 if( A1 == 0 ) A2 = 0; 00106 if( A2 == 0 ) A1 = 0; 00107 return( G4GIDI_Misc_Z_A_m_ToName( Z1 + Z2, A1 + A2, 0 ) ); 00108 }
int G4GIDI_Misc_channelProductsCompare | ( | GIDI::tpia_channel * | channel, | |
int | nProducts, | |||
char ** | productNames | |||
) |
char* G4GIDI_Misc_Z_A_m_ToName | ( | int | iZ, | |
int | iA, | |||
int | im = 0 | |||
) |
Definition at line 76 of file G4GIDI_Misc.cc.
References tpia_misc_ZToSymbol().
Referenced by G4GIDI::freeTarget(), G4GIDI_Misc_channelCompound(), G4GIDI_Z_AMass(), G4GIDI::getAlreadyReadTarget(), and G4GIDI::getNamesOfAvailableLibraries().
00076 { 00077 00078 const char *Z = tpia_misc_ZToSymbol( iZ ); 00079 char S[128], mS[32], *name; 00080 00081 if( Z == NULL ) return( NULL ); 00082 if( iA == 0 ) { 00083 if( im != 0 ) return( NULL ); 00084 sprintf( S, "%s_natural", Z ); } 00085 else { 00086 sprintf( S, "%s_%d", Z, iA ); 00087 if( im != 0 ) { 00088 sprintf( mS, "_m%d", im ); 00089 strcat( S, mS ); 00090 } 00091 } 00092 name = (char *) xData_malloc2( NULL, strlen( S ) + 1, 0, "name" ); 00093 if( name != NULL ) strcpy( name, S ); 00094 return( name ); 00095 }
int getNamesOfAvailableTargets_walker | ( | GIDI::tpia_mapEntry * | entry, | |
int | level, | |||
void * | userData | |||
) |
Referenced by G4GIDI::getNamesOfAvailableTargets().