Ignore:
Timestamp:
Nov 25, 2009, 5:13:58 PM (15 years ago)
Author:
garnier
Message:

update CVS release candidate geant4.9.3.01

Location:
trunk/source/processes/hadronic/models/management/src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/management/src/G4HadronicInteraction.cc

    r1055 r1196  
    2424// ********************************************************************
    2525//
    26 // $Id: G4HadronicInteraction.cc,v 1.4 2009/01/24 11:56:27 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
     26// $Id: G4HadronicInteraction.cc,v 1.6 2009/08/30 16:12:34 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929// Hadronic Interaction  base class
     
    3939
    4040G4HadronicInteraction::G4HadronicInteraction(const G4String& modelName) :
    41   verboseLevel(0), theMinEnergy(0.0*GeV), theMaxEnergy(25.0*GeV),
    42   isBlocked(false), theModelName(modelName)
     41  verboseLevel(0), theMinEnergy(0.0), theMaxEnergy(25.0*GeV),
     42  isBlocked(false), recoilEnergyThreshold(0.0), theModelName(modelName)
    4343{
    4444  G4HadronicInteractionRegistry::Instance()->RegisterMe(this);
     
    4848{
    4949  G4HadronicInteractionRegistry::Instance()->RemoveMe(this);
     50}
     51
     52G4double
     53G4HadronicInteraction::SampleInvariantT(const G4ParticleDefinition*,
     54                                        G4double, G4int, G4int)
     55{
     56  return 0.0;
    5057}
    5158 
     
    7582 
    7683void G4HadronicInteraction::SetMinEnergy(G4double anEnergy,
    77                                          G4Element *anElement )
     84                                         const G4Element *anElement )
    7885{
    7986  if( IsBlocked(anElement) )
     
    9097      }
    9198    }
    92   theMinEnergyListElements.push_back(std::pair<G4double, G4Element *>(anEnergy, anElement));
     99  theMinEnergyListElements.push_back(std::pair<G4double, const G4Element *>(anEnergy, anElement));
    93100}
    94101 
    95102void G4HadronicInteraction::SetMinEnergy(G4double anEnergy,
    96                                          G4Material *aMaterial )
     103                                         const G4Material *aMaterial )
    97104{
    98105  if( IsBlocked(aMaterial) )
     
    109116        }
    110117    }
    111   theMinEnergyList.push_back(std::pair<G4double, G4Material *>(anEnergy, aMaterial));
     118  theMinEnergyList.push_back(std::pair<G4double, const G4Material *>(anEnergy, aMaterial));
    112119}
    113120 
     
    116123{
    117124  size_t i;
    118   if( IsBlocked(aMaterial) )return 0.0*GeV;
    119   if( IsBlocked(anElement) )return 0.0*GeV;
     125  if( IsBlocked(aMaterial) )return 0.0;
     126  if( IsBlocked(anElement) )return 0.0;
    120127  for( i=0; i<theMaxEnergyListElements.size(); ++i )
    121128    {
     
    123130        return theMaxEnergyListElements[i].first;
    124131    }
    125     for( i=0; i<theMaxEnergyList.size(); ++i )
     132  for( i=0; i<theMaxEnergyList.size(); ++i )
    126133    {
    127134      if( aMaterial == theMaxEnergyList[i].second )
    128135        return theMaxEnergyList[i].first;
    129136    }
    130     if(IsBlocked()) return 0.*GeV;
    131     if( verboseLevel > 0 )
     137  if(IsBlocked()) return 0.*GeV;
     138  if( verboseLevel > 0 ) {
    132139      G4cout << "*** Warning from HadronicInteraction::GetMaxEnergy" << G4endl
    133140             << "    material " << aMaterial->GetName()
    134141             << " not found in min energy List" << G4endl;
    135    
    136     return theMaxEnergy;
     142  }
     143  return theMaxEnergy;
    137144}
    138145 
    139146void G4HadronicInteraction::SetMaxEnergy(G4double anEnergy,
    140                                          G4Element *anElement )
    141 {
    142   if( IsBlocked(anElement) )
     147                                         const G4Element *anElement )
     148{
     149  if( IsBlocked(anElement) ) {
    143150    G4cout << "*** Warning from HadronicInteraction::SetMaxEnergy" << G4endl
    144151           << "Warning: The model is not active for the Element  "
    145152           << anElement->GetName() << "." << G4endl;
    146    
     153  }
    147154  for( size_t i=0; i<theMaxEnergyListElements.size(); ++i )
    148155    {
     
    153160      }
    154161    }
    155   theMaxEnergyListElements.push_back(std::pair<G4double, G4Element *>(anEnergy, anElement));
     162  theMaxEnergyListElements.push_back(std::pair<G4double, const G4Element *>(anEnergy, anElement));
    156163}
    157164
    158165void G4HadronicInteraction::SetMaxEnergy(G4double anEnergy,
    159                                          G4Material *aMaterial )
    160 {
    161   if( IsBlocked(aMaterial) )
     166                                         const G4Material *aMaterial )
     167{
     168  if( IsBlocked(aMaterial) ) {
    162169    G4cout << "*** Warning from HadronicInteraction::SetMaxEnergy" << G4endl
    163170           << "Warning: The model is not active for the Material "
    164171           << aMaterial->GetName() << "." << G4endl;
    165    
     172  }
    166173  for( size_t i=0; i<theMaxEnergyList.size(); ++i )
    167174    {
    168175      if( aMaterial == theMaxEnergyList[i].second )
    169176        {
    170         theMaxEnergyList[i].first = anEnergy;
    171         return;
    172         }
    173     }
    174   theMaxEnergyList.push_back(std::pair<G4double, G4Material *>(anEnergy, aMaterial));
    175 }
    176 
    177 void G4HadronicInteraction::DeActivateFor( G4Material *aMaterial )
     177          theMaxEnergyList[i].first = anEnergy;
     178          return;
     179        }
     180    }
     181  theMaxEnergyList.push_back(std::pair<G4double, const G4Material *>(anEnergy, aMaterial));
     182}
     183
     184void G4HadronicInteraction::DeActivateFor( const G4Material *aMaterial )
    178185{
    179186  theBlockedList.push_back(aMaterial);
    180187}
    181188
    182 void G4HadronicInteraction::DeActivateFor( G4Element *anElement )
     189void G4HadronicInteraction::DeActivateFor( const G4Element *anElement )
    183190{
    184191  theBlockedListElements.push_back(anElement);
  • trunk/source/processes/hadronic/models/management/src/G4HadronicInteractionRegistry.cc

    r1055 r1196  
    2424// ********************************************************************
    2525//
    26 // $Id: G4HadronicInteractionRegistry.cc,v 1.7 2009/02/25 16:30:18 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
     26// $Id: G4HadronicInteractionRegistry.cc,v 1.8 2009/08/30 16:12:34 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929// 23-Jan-2009 V.Ivanchenko make the class to be a singleton
     
    4444
    4545G4HadronicInteractionRegistry::G4HadronicInteractionRegistry()
    46 {
    47   nModels = 0;
    48 }
     46{}
    4947
    5048G4HadronicInteractionRegistry::~G4HadronicInteractionRegistry()
     
    5654{
    5755  //G4cout << "G4HadronicInteractionRegistry::Clean() start " << nModels << G4endl;
     56  size_t nModels = allModels.size();
    5857  if(0 < nModels) {
    59     for (G4int i=0; i<nModels; i++) {
     58    for (size_t i=0; i<nModels; ++i) {
    6059      if( allModels[i] ) {
    6160        //G4cout << "delete " << i << G4endl;
     
    6665    }
    6766  }
     67  allModels.clear();
    6868  //G4cout << "G4HadronicInteractionRegistry::Clean() is done " << G4endl;
    69   nModels = 0;
    7069}
    7170
     
    7372RegisterMe(G4HadronicInteraction * aModel)
    7473{
     74  size_t nModels = allModels.size();
    7575  if(nModels > 0) {
    76     for (G4int i=0; i<nModels; i++) {
     76    for (size_t i=0; i<nModels; ++i) {
    7777      if( aModel == allModels[i] ) return;
    7878    }
    7979  }
    8080  //G4cout << "Register model <" << aModel->GetModelName()
    81   //<< ">  " << nModels << G4endl;
     81  //<< ">  " << nModels+1 << G4endl;
    8282  allModels.push_back(aModel);
    83   nModels++;
    8483}
    8584
     
    8786RemoveMe(G4HadronicInteraction * aModel)
    8887{
    89   if(nModels > 0) {
    90     for (G4int i=0; i<nModels; i++) {
    91       if( aModel == allModels[i] ) {
    92         //G4cout << "DeRegister model <" << aModel->GetModelName()
    93         //<< ">  " << i << G4endl;
    94         allModels[i] = 0;
    95         return;
    96       }
     88  size_t nModels = allModels.size();
     89  if(0 == nModels) return;
     90  for (size_t i=0; i<nModels; ++i) {
     91    if( aModel == allModels[i] ) {
     92      //G4cout << "DeRegister model <" << aModel->GetModelName()
     93      //<< ">  " << i << G4endl;
     94      allModels[i] = 0;
     95      if(i == nModels-1) allModels.pop_back();
     96      return;
    9797    }
    9898  }
  • trunk/source/processes/hadronic/models/management/src/G4InelasticInteraction.cc

    r1055 r1196  
    2525//
    2626// $Id: G4InelasticInteraction.cc,v 1.12 2009/01/24 11:56:27 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929// Hadronic Process: Inelastic Interaction
  • trunk/source/processes/hadronic/models/management/src/G4V3DNucleus.cc

    r1007 r1196  
    2626//
    2727// $Id: G4V3DNucleus.cc,v 1.5 2006/06/29 20:45:59 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-02 $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030#include "G4V3DNucleus.hh"
  • trunk/source/processes/hadronic/models/management/src/G4VHighEnergyGenerator.cc

    r1007 r1196  
    2626//
    2727// $Id: G4VHighEnergyGenerator.cc,v 1.5 2006/06/29 20:46:03 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-02 $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030// G4VHighEnergyGenerator
  • trunk/source/processes/hadronic/models/management/src/G4VIntraNuclearTransportModel.cc

    r1007 r1196  
    2626//
    2727// $Id: G4VIntraNuclearTransportModel.cc,v 1.5 2007/01/11 05:28:56 dennis Exp $
    28 // GEANT4 tag $Name: geant4-09-02 $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030// $Id: G4VIntraNuclearTransportModel.cc,v 1.0 1998/06/30
  • trunk/source/processes/hadronic/models/management/src/G4VKineticNucleon.cc

    r1007 r1196  
    2626//
    2727// $Id: G4VKineticNucleon.cc,v 1.3 2006/06/29 20:46:07 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-02 $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030#include "G4VKineticNucleon.hh"
  • trunk/source/processes/hadronic/models/management/src/G4VNuclearDensity.cc

    r1007 r1196  
    2626//
    2727// $Id: G4VNuclearDensity.cc,v 1.3 2006/06/29 20:46:09 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-02 $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030
  • trunk/source/processes/hadronic/models/management/src/G4VPreCompoundModel.cc

    r1007 r1196  
    2626//
    2727// $Id: G4VPreCompoundModel.cc,v 1.6 2007/01/11 05:29:10 dennis Exp $
    28 // GEANT4 tag $Name: geant4-09-02 $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030
Note: See TracChangeset for help on using the changeset viewer.