Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
G4GIDI_Misc.hh File Reference
#include <tpia_map.h>
#include <tpia_target.h>

Go to the source code of this file.

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)
 

Function Documentation

char* G4GIDI_Misc_channelCompound ( char *  particle1,
char *  particle2 
)

Definition at line 99 of file G4GIDI_Misc.cc.

References G4GIDI_Misc_Z_A_m_ToName(), python.hepunit::m2, and tpia_miscNameToZAm().

99  {
100 
101  int Z1, A1, m1, Z2, A2, m2;
102 
103  if( tpia_miscNameToZAm( NULL, particle1, &Z1, &A1, &m1 ) ) return( NULL );
104  if( tpia_miscNameToZAm( NULL, particle2, &Z2, &A2, &m2 ) ) return( NULL );
105  if( A1 == 0 ) A2 = 0;
106  if( A2 == 0 ) A1 = 0;
107  return( G4GIDI_Misc_Z_A_m_ToName( Z1 + Z2, A1 + A2, 0 ) );
108 }
char * G4GIDI_Misc_Z_A_m_ToName(int iZ, int iA, int im)
Definition: G4GIDI_Misc.cc:76
int tpia_miscNameToZAm(statusMessageReporting *smr, const char *name, int *Z, int *A, int *m)
Definition: tpia_misc.cc:105
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(), and xData_malloc2.

Referenced by G4GIDI::dataFilename(), G4GIDI::freeTarget(), G4GIDI_Misc_channelCompound(), G4GIDI_Z_AMass(), G4GIDI::getAlreadyReadTarget(), G4GIDI::getNamesOfAvailableLibraries(), G4GIDI::isThisDataAvailable(), and G4GIDI::readTarget().

76  {
77 
78  const char *Z = tpia_misc_ZToSymbol( iZ );
79  char S[128], mS[32], *name;
80 
81  if( Z == NULL ) return( NULL );
82  if( iA == 0 ) {
83  if( im != 0 ) return( NULL );
84  sprintf( S, "%s_natural", Z ); }
85  else {
86  sprintf( S, "%s_%d", Z, iA );
87  if( im != 0 ) {
88  sprintf( mS, "_m%d", im );
89  strcat( S, mS );
90  }
91  }
92  name = (char *) xData_malloc2( NULL, strlen( S ) + 1, 0, "name" );
93  if( name != NULL ) strcpy( name, S );
94  return( name );
95 }
const XML_Char * name
#define xData_malloc2(smr, size, zero, forItem)
Definition: xData.h:313
const char * tpia_misc_ZToSymbol(int iZ)
Definition: tpia_misc.cc:83
int getNamesOfAvailableTargets_walker ( GIDI::tpia_mapEntry entry,
int  level,
void userData 
)