PremModel.cxx
//......................................................................
///
/// Get the effective Z/A value for all layers of a given type, e.g. all
/// outer-core layers.
///
/// @param layer - The index of the layer type
///
Get the effective Z/A value for all layers of a given type, e.g. all
outer-core layers.
Get the effective Z / A value for all layers of a given type e . g . all outer - core layers .
double PremModel::GetLayerZoA(int layer)
{
  int nlayers = fPremLayers.size();
  if(layer > fPremLayers.back().layer){
    cout << "ERROR: Not that many layer types" << endl;
    cout << "Returning 0" << endl;
    return 0;
  }
  for(int i=0; i<nlayers; i++){
    if(fPremLayers[i].layer != layer) continue;
    else return fPremLayers[i].zoa;
  }
  cout << "ERROR: layer type not found" << endl;
  cout << "Returning 0" << endl;
  return 0;
}
double PremModel :: GetLayerZoA ( int layer ) { int nlayers = fPremLayers . size ( ) ; if ( layer > fPremLayers . back ( ) . layer ) { cout << " " << endl ; cout << " " << endl ; return 0 ; } for ( int i = 0 ; i < nlayers ; i ++ ) { if ( fPremLayers [ i ] . layer != layer ) continue ; else return fPremLayers [ i ] . zoa ; } cout << " " << endl ; cout << " " << endl ; return 0 ; }
......................................................................
Get the effective Z/A value for all layers of a given type, e.g.
...................................................................... Get the effective Z / A value for all layers of a given type e . g .
// This check assumes the layer types are in increasing order // End of vector reached without finding input type