Geant4  10.00.p02
tpia_product.cc
Go to the documentation of this file.
1 /*
2 # <<BEGIN-copyright>>
3 # Copyright (c) 2010, Lawrence Livermore National Security, LLC.
4 # Produced at the Lawrence Livermore National Laboratory
5 # Written by Bret R. Beck, beck6@llnl.gov.
6 # CODE-461393
7 # All rights reserved.
8 #
9 # This file is part of GIDI. For details, see nuclear.llnl.gov.
10 # Please also read the "Additional BSD Notice" at nuclear.llnl.gov.
11 #
12 # Redistribution and use in source and binary forms, with or without modification,
13 # are permitted provided that the following conditions are met:
14 #
15 # 1) Redistributions of source code must retain the above copyright notice,
16 # this list of conditions and the disclaimer below.
17 # 2) Redistributions in binary form must reproduce the above copyright notice,
18 # this list of conditions and the disclaimer (as noted below) in the
19 # documentation and/or other materials provided with the distribution.
20 # 3) Neither the name of the LLNS/LLNL nor the names of its contributors may be
21 # used to endorse or promote products derived from this software without
22 # specific prior written permission.
23 #
24 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
25 # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
26 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
27 # SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, LLC, THE U.S. DEPARTMENT OF ENERGY OR
28 # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
31 # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
33 # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 # <<END-copyright>>
35 */
36 #include <string.h>
37 #include <ctype.h>
38 
39 #include <gString.h>
40 #include <tpia_target.h>
41 #include <tpia_misc.h>
42 
43 #if defined __cplusplus
44 namespace GIDI {
45 using namespace GIDI;
46 #endif
47 
48 //static const int tpia_b_unknown = 0,
49 static const int /*tpia_b_unknown = 0,*/
50  tpia_b_twoBody_angular = tpia_m_angular,
52  tpia_b_NBody_Legendre = tpia_m_Legendre,
53  tpia_b_NBody_angular_energy = tpia_m_angular | tpia_m_angular_energy,
54  tpia_b_NBody_uncorrelate_Legendre = tpia_m_angular | tpia_m_Legendre,
56 
57 const char *tpia_productGenre_unknown = "unknown",
58  *tpia_productGenre_twoBody_angular = "twoBody_angular",
59  *tpia_productGenre_twoBody_formFactor = "twoBody_formFactor",
60  *tpia_productGenre_NBody_Legendre = "NBody_Legendre",
61  *tpia_productGenre_NBody_angular_energy = "NBody_angular_energy",
62  *tpia_productGenre_NBody_uncorrelate_Legendre = "NBody_uncorrelate_Legendre",
63  *tpia_productGenre_NBody_pairProduction = "NBody_pairProduction";
64 
65 static int _tpia_product_getProductOutgoingData( statusMessageReporting *smr, xData_element *productElement, tpia_product *product );
66 static int _tpia_product_checkRequiredData( statusMessageReporting *smr, int allowMany, int m, xData_element *productElement, tpia_product *product, char *str );
67 static int _tpia_product_getDepositionEnergy( statusMessageReporting *smr, xData_element *depositionEnergy, tpia_product *product );
68 static int _tpia_product_getMultiplicityFromElement( statusMessageReporting *smr, xData_element *data, tpia_product *product );
69 /*
70 ************************************************************
71 */
72 tpia_product *tpia_product_create( statusMessageReporting *smr ) {
73 
74  tpia_product *product;
75 
76  //if( ( product = xData_malloc2( smr, sizeof( tpia_product ), 0, "product" ) ) == NULL ) return( NULL );
77  if( ( product = (tpia_product*) xData_malloc2( smr, sizeof( tpia_product ), 0, "product" ) ) == NULL ) return( NULL );
78  if( tpia_product_initialize( smr, product ) ) product = tpia_product_free( smr, product );
79  return( product );
80 }
81 /*
82 ************************************************************
83 */
84 int tpia_product_initialize( statusMessageReporting *smr, tpia_product *product ) {
85 
86  memset( product, 0, sizeof( tpia_product ) );
87  if( tpia_angular_initialize( smr, &(product->angular) ) ) return( 1 );
88  if( tpia_Legendre_initialize( smr, &(product->Legendre) ) ) return( 1 );
89  return( 0 );
90 }
91 /*
92 ************************************************************
93 */
94 tpia_product *tpia_product_createGetFromElement( statusMessageReporting *smr, tpia_channel *channel, tpia_product *parentProduct,
95  xData_element *productElement ) {
96 
97  tpia_product *product;
98 
99  if( ( product = tpia_product_create( smr ) ) == NULL ) return( NULL );
100  if( tpia_product_getFromElement( smr, channel, parentProduct, productElement, product ) != 0 ) product = tpia_product_free( smr, product );
101  return( product );
102 }
103 /*
104 ************************************************************
105 */
106 tpia_product *tpia_product_free( statusMessageReporting *smr, tpia_product *product ) {
107 
108  tpia_product_release( smr, product );
109  xData_free( smr, product );
110  return( NULL );
111 }
112 /*
113 ************************************************************
114 */
115 int tpia_product_release( statusMessageReporting *smr, tpia_product *product) {
116 
117  tpia_multiplicity *multiplicity, *multiplicity_next;
118  tpia_product *decayProduct, *nextProduct;
119 
120  xData_releaseAttributionList( smr, &(product->attributes) );
121  //product->depositionEnergyGrouped.data = xData_free( smr, product->depositionEnergyGrouped.data );
122  product->depositionEnergyGrouped.data = (double*) xData_free( smr, product->depositionEnergyGrouped.data );
123 
124  if( product->multiplicityVsEnergy != NULL ) tpia_multiplicity_free( smr, product->multiplicityVsEnergy );
125  for( multiplicity = product->delayedNeutronMultiplicityVsEnergy; multiplicity != NULL; multiplicity = multiplicity_next ) {
126  multiplicity_next = multiplicity->next;
127  tpia_multiplicity_free( smr, multiplicity );
128  }
129  tpia_angular_release( smr, &(product->angular) );
130  tpia_Legendre_release( smr, &(product->Legendre ) );
131  tpia_angularEnergy_release( smr, &(product->angularEnergy) );
132  for( decayProduct = product->decayChannel.products; decayProduct != NULL; decayProduct = nextProduct ) {
133  nextProduct = decayProduct->next;
134  tpia_product_free( smr, decayProduct );
135  }
136  product->decayChannel.numberOfProducts = 0;
137  product->decayChannel.products = NULL;
138  return( 0 );
139 }
140 /*
141 ************************************************************
142 */
143 int tpia_product_getFromElement( statusMessageReporting *smr, tpia_channel *channel, tpia_product *parentProduct, xData_element *productElement,
144  tpia_product *product ) {
145 
146  char const *productGenre;
147  char *name, *multiplicity, *e;
148 
149  xData_addToAccessed( smr, productElement, 1 );
150  product->channel = channel;
151  product->parentProduct = parentProduct;
152  if( xData_copyAttributionList( smr, &(product->attributes), &(productElement->attributes) ) != 0 ) return( 0 );
153  name = tpia_misc_pointerToAttributeIfAllOk2( smr, productElement, 1, &(product->attributes), "particle" );
154  if( name != NULL ) {
155  product->productID = tpia_particle_getInternalID( smr, name );
156  multiplicity = tpia_misc_pointerToAttributeIfAllOk2( smr, productElement, 1, &(product->attributes), "multiplicity" );
157  if( multiplicity != NULL ) {
158  if( strcmp( multiplicity, "energyDependent" ) && strcmp( multiplicity, "partialProduction" ) ) { /* Must be an integer. */
159  product->multiplicity = strtol( multiplicity, &e, 10 );
160  while( isspace( *e ) ) e++;
161  if( *e != 0 ) tpia_misc_setMessageError_Element( smr, NULL, productElement, __FILE__, __LINE__, 1, "bad multiplicity = %s", multiplicity );
162  }
163  }
164  }
165  if( ( productGenre = tpia_misc_pointerToAttributeIfAllOk2( smr, productElement, 1, &(product->attributes), "genre" ) ) != NULL ) {
166  if( strcmp( productGenre, tpia_productGenre_unknown ) == 0 ) {
167  product->b_dataRequired = 0;
168  product->genre = tpia_productGenre_unknown; }
169  else if( strcmp( productGenre, tpia_productGenre_twoBody_angular ) == 0 ) {
170  product->b_dataRequired = tpia_b_twoBody_angular;
171  product->genre = tpia_productGenre_twoBody_angular; }
172  else if( strcmp( productGenre, tpia_productGenre_twoBody_formFactor ) == 0 ) {
173  product->b_dataRequired = tpia_b_twoBody_formFactor;
174  product->genre = tpia_productGenre_twoBody_formFactor; }
175  else if( strcmp( productGenre, tpia_productGenre_NBody_Legendre ) == 0 ) {
176  product->b_dataRequired = tpia_b_NBody_Legendre;
177  product->genre = tpia_productGenre_NBody_Legendre; }
178  else if( strcmp( productGenre, tpia_productGenre_NBody_angular_energy ) == 0 ) {
179  product->b_dataRequired = tpia_b_NBody_angular_energy;
180  product->genre = tpia_productGenre_NBody_angular_energy; }
181  else if( strcmp( productGenre, tpia_productGenre_NBody_uncorrelate_Legendre ) == 0 ) {
182  product->b_dataRequired = tpia_b_NBody_uncorrelate_Legendre;
184  else if( strcmp( productGenre, tpia_productGenre_NBody_pairProduction ) == 0 ) {
185  product->b_dataRequired = tpia_b_NBody_pairProduction;
186  product->genre = tpia_productGenre_NBody_pairProduction; }
187  else {
188  tpia_misc_setMessageError_Element( smr, NULL, productElement, __FILE__, __LINE__, 1, "unsupported product genre = %s", productGenre );
189  }
190  if( smr_isOk( smr ) ) _tpia_product_getProductOutgoingData( smr, productElement, product );
191  }
192  return( !smr_isOk( smr ) );
193 }
194 /*
195 ************************************************************
196 */
197 static int _tpia_product_getProductOutgoingData( statusMessageReporting *smr, xData_element *productElement, tpia_product *product ) {
198 
199  xData_element *data;
200  int allowMany = 0;
201 
202  for( data = xData_getFirstElement( productElement ); data != NULL; data = xData_getNextElement( data ) ) {
203  if( strcmp( data->name, "depositionEnergy" ) == 0 ) {
204  //if( _tpia_product_checkRequiredData( smr, allowMany, tpia_m_depositionEnergy, productElement, product, "deposition energy" ) ) return( 1 );
205  if( _tpia_product_checkRequiredData( smr, allowMany, tpia_m_depositionEnergy, productElement, product, (char*)"deposition energy" ) ) return( 1 );
206  if( _tpia_product_getDepositionEnergy( smr, data, product ) != 0 ) return( 1 ); }
207  else if( strcmp( data->name, "multiplicity" ) == 0 ) {
208  allowMany = ( product->channel->fission != NULL ) && ( strcmp( product->productID->name, "n_1" ) == 0 );
209  //if( _tpia_product_checkRequiredData( smr, allowMany, tpia_m_multiplicity, productElement, product, "multiplicity" ) ) return( 1 );
210  if( _tpia_product_checkRequiredData( smr, allowMany, tpia_m_multiplicity, productElement, product, (char*) "multiplicity" ) ) return( 1 );
211  if( _tpia_product_getMultiplicityFromElement( smr, data, product ) != 0 ) return( 1 ); }
212  else if( strcmp( data->name, "angular" ) == 0 ) {
213  //if( _tpia_product_checkRequiredData( smr, allowMany, tpia_m_angular, productElement, product, "angular" ) ) return( 1 );
214  if( _tpia_product_checkRequiredData( smr, allowMany, tpia_m_angular, productElement, product, (char*) "angular" ) ) return( 1 );
215  if( tpia_angular_getFromElement( smr, data, &(product->angular) ) != 0 ) return( 1 ); }
216  else if( strcmp( data->name, "Legendre" ) == 0 ) {
217  //if( _tpia_product_checkRequiredData( smr, allowMany, tpia_m_Legendre, productElement, product, "Legendre" ) ) return( 1 );
218  if( _tpia_product_checkRequiredData( smr, allowMany, tpia_m_Legendre, productElement, product, (char*) "Legendre" ) ) return( 1 );
219  if( tpia_Legendre_getFromElement( smr, data, &(product->Legendre) ) != 0 ) return( 1 ); }
220  else if( strcmp( data->name, "angularEnergy" ) == 0 ) {
221  if( _tpia_product_checkRequiredData( smr, allowMany, tpia_m_angular_energy, productElement, product, (char*) "angularEnergy" ) ) return( 1 );
222  if( tpia_angularEnergy_getFromElement( smr, data, &(product->angularEnergy) ) != 0 ) return( 1 ); }
223  else if( strcmp( data->name, "decayChannel" ) == 0 ) {
224  xData_addToAccessed( smr, data, 1 );
225  if( tpia_product_getDecayChannelFromElement( smr, data, product->channel, product, &(product->decayChannel.products) ) ) return( 1 ); }
226  else {
227  printf( " %s\n", data->name );
228  }
229  }
230  if( ( product->b_dataPresent >> tpia_m_commonShift ) != ( product->b_dataRequired >> tpia_m_commonShift ) ) {
231  gString gStr;
232  int missing = ~product->b_dataPresent & product->b_dataRequired;
233  char const *str = "";
234  if( gString_initialize( NULL, &gStr, 100, 100 ) == 0 ) {
235  if( missing & tpia_m_angular ) gString_addTo( NULL, &gStr, "angular " );
236  if( missing & tpia_m_formFactor ) gString_addTo( NULL, &gStr, "formFactor " );
237  if( missing & tpia_m_Legendre ) gString_addTo( NULL, &gStr, "Legendre " );
238  if( missing & tpia_m_angular_energy ) gString_addTo( NULL, &gStr, "angular_energy " );
239  str = gString_string( NULL, &gStr );
240  }
241  tpia_misc_setMessageError_Element( smr, NULL, productElement, __FILE__, __LINE__, 1, "missing data %s for product %s", str,
242  product->productID->name );
243  gString_release( NULL, &gStr );
244  return( 1 );
245  }
246  return( 0 );
247 }
248 /*
249 ************************************************************
250 */
251 static int _tpia_product_checkRequiredData(statusMessageReporting *smr, int allowMany, int m, xData_element *productElement, tpia_product *product, char *str) {
252 
253  if( !allowMany && ( product->b_dataPresent & m ) ) {
254  tpia_misc_setMessageError_Element( smr, NULL, productElement, __FILE__, __LINE__, 1, "multiple %s", str );
255  return( 1 );
256  }
257  if( ( m & ( tpia_m_depositionEnergy | tpia_m_multiplicity | tpia_m_decayChannel ) ) == 0 ) {
258  if( ( product->b_dataRequired & m ) == 0 ) {
259  tpia_misc_setMessageError_Element( smr, NULL, productElement, __FILE__, __LINE__, 1, "extra product data %s", str );
260  return( 1 );
261  }
262  }
263  product->b_dataPresent += m;
264  return( 0 );
265 }
266 /*
267 ************************************************************
268 */
269 int tpia_product_getDecayChannelFromElement( statusMessageReporting *smr, xData_element *parentElement, tpia_channel *channel, tpia_product *parentProduct,
270  tpia_product **priorProductNext ) {
271 
272  xData_elementList *list;
273  tpia_product *product;
274  int i, status = 0;
275 
276  list = xData_getElementsByTagName( smr, parentElement, "product" );
277  for( i = 0; i < list->n; i++ ) {
278  if( ( product = tpia_product_createGetFromElement( smr, channel, parentProduct, list->items[i].element ) ) == NULL ) {
279  status = 1;
280  break;
281  }
282  if( parentProduct == NULL ) {
283  channel->decayChannel.m1_fullMass_MeV = channel->target->projectileID->fullMass_MeV;
284  channel->decayChannel.m2_fullMass_MeV = channel->target->targetID->fullMass_MeV;
285  channel->decayChannel.numberOfProducts++; }
286  else {
287  channel->decayChannel.m1_fullMass_MeV = parentProduct->productID->fullMass_MeV;
288  channel->decayChannel.m2_fullMass_MeV = 0.;
289  parentProduct->decayChannel.numberOfProducts++;
290  }
291  *priorProductNext = product;
292  priorProductNext = &(product->next);
293  }
294  xData_freeElementList( smr, list );
295  return( status );
296 }
297 /*
298 ************************************************************
299 */
300 static int _tpia_product_getDepositionEnergy( statusMessageReporting *smr, xData_element *depositionEnergy, tpia_product *product ) {
301 
302  xData_element *data;
303 
304  xData_addToAccessed( smr, depositionEnergy, 1 );
305  for( data = xData_getFirstElement( depositionEnergy ); data != NULL; data = xData_getNextElement( data ) ) {
306  if( strcmp( data->name, "grouped" ) == 0 ) {
307  if( tpia_misc_get2d_xShared_yHistogram_data_Grouped( smr, data, &(product->depositionEnergyGrouped) ) ) return( 1 ); }
308  else {
309  tpia_misc_setMessageError_Element( smr, NULL, depositionEnergy, __FILE__, __LINE__, 1, "unsupported deposition energy type = %s", data->name );
310  return( 1 );
311  }
312  }
313  return( 0 );
314 }
315 /*
316 ************************************************************
317 */
318 static int _tpia_product_getMultiplicityFromElement( statusMessageReporting *smr, xData_element *data, tpia_product *product ) {
319 
320  tpia_multiplicity *multiplicity, *prior, *current;
321  const char *timeScale;
322  int isDelayedNeutrons;
323  double dTimeScale;
324 
325  if( tpia_multiplicity_getTimeScaleFromElement( smr, data, &timeScale, &isDelayedNeutrons, &dTimeScale ) ) return( 1 );
326  if( ( isDelayedNeutrons == 0 ) && ( product->multiplicityVsEnergy != NULL ) ) {
327  tpia_misc_setMessageError_Element( smr, NULL, data, __FILE__, __LINE__, 1, "extra product multiplicity data" );
328  return( 1 );
329  }
330  if( ( multiplicity = tpia_multiplicity_createGetFromElement( smr, data, product->channel->target->nGroups ) ) == NULL ) return( 1 );
331  if( isDelayedNeutrons == 0 ) {
332  product->multiplicityVsEnergy = multiplicity; }
333  else {
334  if( product->delayedNeutronMultiplicityVsEnergy == NULL ) {
335  product->delayedNeutronMultiplicityVsEnergy = multiplicity; }
336  else {
337  if( product->delayedNeutronMultiplicityVsEnergy->timeScale > multiplicity->timeScale ) {
338  multiplicity->next = product->delayedNeutronMultiplicityVsEnergy;
339  product->delayedNeutronMultiplicityVsEnergy = multiplicity; }
340  else {
341  for( current = product->delayedNeutronMultiplicityVsEnergy->next, prior = product->delayedNeutronMultiplicityVsEnergy; current != NULL;
342  current = current->next ) {
343  if( current->timeScale > multiplicity->timeScale ) {
344  multiplicity->next = current;
345  prior->next = multiplicity;
346  break;
347  }
348  prior = current;
349  }
350  if( current == NULL ) prior->next = multiplicity;
351  }
352  }
353  }
354  return( 0 );
355 }
356 /*
357 ************************************************************
358 */
359 //long tpia_product_dataRequired( statusMessageReporting *smr, tpia_product *product ) {
360 long tpia_product_dataRequired( statusMessageReporting *, tpia_product *product ) {
361 
362  return( product->b_dataRequired );
363 }
364 /*
365 ************************************************************
366 */
367 tpia_product *tpia_product_getFirstProduct( tpia_product *product ) {
368 
369  return( tpia_decayChannel_getFirstProduct( &(product->decayChannel) ) );
370 }
371 /*
372 ************************************************************
373 */
374 //tpia_product *tpia_product_getProductByIndex( statusMessageReporting *smr, tpia_product *product, int index ) {
375 tpia_product *tpia_product_getProductByIndex( statusMessageReporting *, tpia_product *product, int index ) {
376 
377  int i = 0;
378  tpia_product *p;
379 
380  if( index < 0 ) return( NULL );
381  for( p = tpia_product_getFirstProduct( product ); ( p != NULL ) && ( i < index ); p = tpia_decayChannel_getNextProduct( p ), i++ ) ;
382  return( p );
383 }
384 /*
385 ************************************************************
386 */
387 //int tpia_product_doesDecay( statusMessageReporting *smr, tpia_product *product ) {
388 int tpia_product_doesDecay( statusMessageReporting *, tpia_product *product ) {
389 
390  return( product->decayChannel.products != NULL );
391 }
392 /*
393 ************************************************************
394 */
395 //int tpia_product_numberOfProducts( statusMessageReporting *smr, tpia_product *product ) {
396 int tpia_product_numberOfProducts( statusMessageReporting *, tpia_product *product ) {
397 
398  return( product->decayChannel.numberOfProducts );
399 }
400 /*
401 ************************************************************
402 */
403 //int tpia_product_isDataPresent( statusMessageReporting *smr, tpia_product *product, int b_data ) {
404 int tpia_product_isDataPresent( statusMessageReporting *, tpia_product *product, int b_data ) {
405 
406  return( product->b_dataPresent && b_data );
407 }
408 /*
409 ************************************************************
410 */
411 //int tpia_product_sampleMultiplicity( statusMessageReporting *smr, tpia_product *product, double e_in, double r ) {
412 int tpia_product_sampleMultiplicity( statusMessageReporting *, tpia_product *product, double e_in, double r ) {
413 
414  int i, multiplicity;
415  tpia_multiplicity *multiplicityVsEnergy = product->multiplicityVsEnergy;
416  double *p = multiplicityVsEnergy->pointwise, dMult;
417 
418  if( e_in <= p[0] ) {
419  dMult = p[1]; }
420  else if( e_in >= p[2 * ( multiplicityVsEnergy->numberOfPointwise - 1 )] ) {
421  dMult = p[2 * multiplicityVsEnergy->numberOfPointwise - 1]; }
422  else {
423  for( i = 0; i < multiplicityVsEnergy->numberOfPointwise - 1; i++, p += 2 ) if( e_in < p[2] ) break;
424  dMult = ( e_in - p[0] ) / ( p[2] - p[0] );
425  dMult = dMult * p[3] + ( 1. - dMult ) * p[1];
426  }
427  multiplicity = (int) dMult;
428  if( r < ( dMult - multiplicity ) ) multiplicity++;
429 
430  return( multiplicity );
431 }
432 
433 #if defined __cplusplus
434 }
435 #endif
const char * tpia_productGenre_NBody_angular_energy
Definition: tpia_product.cc:61
int tpia_angular_release(statusMessageReporting *smr, tpia_angular *angular)
Definition: tpia_angular.cc:60
tpia_product * tpia_product_free(statusMessageReporting *smr, tpia_product *product)
int xData_addToAccessed(statusMessageReporting *, xData_element *element, int increment)
Definition: xData.cc:1078
const char * tpia_productGenre_twoBody_formFactor
Definition: tpia_product.cc:59
int tpia_Legendre_getFromElement(statusMessageReporting *smr, xData_element *LegendreElement, tpia_Legendre *Legendre)
int tpia_misc_get2d_xShared_yHistogram_data_Grouped(statusMessageReporting *smr, xData_element *element, tpia_1dData *group)
Definition: tpia_misc.cc:289
static const int tpia_b_NBody_angular_energy
Definition: tpia_product.cc:53
tpia_multiplicity * tpia_multiplicity_free(statusMessageReporting *smr, tpia_multiplicity *multiplicity)
static const int tpia_b_twoBody_formFactor
Definition: tpia_product.cc:51
int tpia_product_getDecayChannelFromElement(statusMessageReporting *smr, xData_element *parentElement, tpia_channel *channel, tpia_product *parentProduct, tpia_product **priorProductNext)
const char * tpia_productGenre_NBody_Legendre
Definition: tpia_product.cc:60
static const int tpia_b_NBody_uncorrelate_Legendre
Definition: tpia_product.cc:54
tpia_multiplicity * tpia_multiplicity_createGetFromElement(statusMessageReporting *smr, xData_element *multiplicityElement, int nGroups)
xData_element * xData_getNextElement(xData_element *element)
Definition: xData.cc:478
static int _tpia_product_getProductOutgoingData(statusMessageReporting *smr, xData_element *productElement, tpia_product *product)
G4String name
Definition: TRTMaterials.hh:40
tpia_product * tpia_decayChannel_getNextProduct(tpia_product *product)
tpia_product * tpia_product_create(statusMessageReporting *smr)
Definition: tpia_product.cc:72
int tpia_misc_setMessageError_Element(statusMessageReporting *smr, void *userInterface, xData_element *element, const char *file, int line, int code, const char *fmt,...)
Definition: tpia_misc.cc:183
int tpia_Legendre_initialize(statusMessageReporting *smr, tpia_Legendre *Legendre)
const char * tpia_productGenre_twoBody_angular
Definition: tpia_product.cc:58
int tpia_angularEnergy_release(statusMessageReporting *smr, tpia_angularEnergy *angularEnergy)
int tpia_angular_getFromElement(statusMessageReporting *smr, xData_element *angularElement, tpia_angular *angular)
Definition: tpia_angular.cc:70
int gString_addTo(statusMessageReporting *smr, gString *gStr, char const *str)
Definition: gString.cc:90
static int _tpia_product_checkRequiredData(statusMessageReporting *smr, int allowMany, int m, xData_element *productElement, tpia_product *product, char *str)
const char * tpia_productGenre_unknown
Definition: tpia_product.cc:57
int tpia_product_doesDecay(statusMessageReporting *, tpia_product *product)
static const int tpia_b_NBody_pairProduction
Definition: tpia_product.cc:55
int tpia_angular_initialize(statusMessageReporting *smr, tpia_angular *angular)
Definition: tpia_angular.cc:49
tpia_product * tpia_product_createGetFromElement(statusMessageReporting *smr, tpia_channel *channel, tpia_product *parentProduct, xData_element *productElement)
Definition: tpia_product.cc:94
int tpia_product_getFromElement(statusMessageReporting *smr, tpia_channel *channel, tpia_product *parentProduct, xData_element *productElement, tpia_product *product)
xData_element * xData_getFirstElement(xData_element *element)
Definition: xData.cc:477
int gString_release(statusMessageReporting *smr, gString *gStr)
Definition: gString.cc:69
int smr_isOk(statusMessageReporting *smr)
int tpia_multiplicity_getTimeScaleFromElement(statusMessageReporting *smr, xData_element *element, const char **timeScale, int *isDelayedNeutrons, double *dTimeScale)
int tpia_product_numberOfProducts(statusMessageReporting *, tpia_product *product)
long tpia_product_dataRequired(statusMessageReporting *, tpia_product *product)
int tpia_product_sampleMultiplicity(statusMessageReporting *, tpia_product *product, double e_in, double r)
static int _tpia_product_getMultiplicityFromElement(statusMessageReporting *smr, xData_element *data, tpia_product *product)
static const int tpia_b_NBody_Legendre
Definition: tpia_product.cc:52
xData_elementList * xData_getElementsByTagName(statusMessageReporting *smr, xData_element *element, const char *tagName)
Definition: xData.cc:761
const char * tpia_productGenre_NBody_uncorrelate_Legendre
Definition: tpia_product.cc:62
static const int tpia_b_twoBody_angular
Definition: tpia_product.cc:50
int xData_releaseAttributionList(statusMessageReporting *smr, xData_attributionList *attributes)
Definition: xData.cc:611
int tpia_angularEnergy_getFromElement(statusMessageReporting *smr, xData_element *angularEnergyElement, tpia_angularEnergy *angularEnergy)
void * xData_free(statusMessageReporting *, void *p)
Definition: xDataMisc.cc:89
char const * gString_string(statusMessageReporting *, gString *gStr)
Definition: gString.cc:111
int tpia_product_release(statusMessageReporting *smr, tpia_product *product)
int xData_copyAttributionList(statusMessageReporting *smr, xData_attributionList *dest, xData_attributionList *src)
Definition: xData.cc:564
static const double m
Definition: G4SIunits.hh:110
tpia_product * tpia_product_getFirstProduct(tpia_product *product)
int gString_initialize(statusMessageReporting *smr, gString *gStr, int size, int increment)
Definition: gString.cc:48
int tpia_product_isDataPresent(statusMessageReporting *, tpia_product *product, int b_data)
int tpia_Legendre_release(statusMessageReporting *smr, tpia_Legendre *Legendre)
int tpia_product_initialize(statusMessageReporting *smr, tpia_product *product)
Definition: tpia_product.cc:84
tpia_product * tpia_decayChannel_getFirstProduct(tpia_decayChannel *decayChannel)
tpia_product * tpia_product_getProductByIndex(statusMessageReporting *, tpia_product *product, int index)
tpia_particle * tpia_particle_getInternalID(statusMessageReporting *smr, const char *const name)
const char * tpia_productGenre_NBody_pairProduction
Definition: tpia_product.cc:63
static int _tpia_product_getDepositionEnergy(statusMessageReporting *smr, xData_element *depositionEnergy, tpia_product *product)
void xData_freeElementList(statusMessageReporting *smr, xData_elementList *list)
Definition: xData.cc:832