Changeset 1196 for trunk/source/run


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/run
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/run/History

    r850 r1196  
    1 $Id: History,v 1.177 2008/07/10 09:27:41 gcosmo Exp $
     1$Id: History,v 1.191 2009/11/18 18:02:06 gcosmo Exp $
    22-------------------------------------------------------------------
    33
     
    1717     * Reverse chronological order (last date on top), please *
    1818     ----------------------------------------------------------
     19
     20November 18th, 2009 G.Cosmo (run-V09-02-09)
     21- Fixes to "Adjoint" classes to allow build of DLLs on Windows: renamed all
     22  methods and data holding "External" as keyword to "Ext".
     23  Cleanup of the code: use "const G4String&" instead of "G4String" wherever
     24  possible; use G4 types in consistent way; avoid usage of "isNan"; code
     25  formatting cleanup; added Geant4 disclaimer.
     26
     27November 13, 2009 Makoto Asai (run-V09-02-08)
     28- Fixing two minor bugs in G4RunManager and G4RunManagerKernel.
     29
     30November 6,2009 L.Desorgher (run-V09-02-07)
     31- First commit of G4Adjoint classes for run category
     32  New classes are G4AdjointSimManager, G4AdjointSimMessenger, G4AdjointPrimaryGeneratorAction
     33
     34Oct 19, 2009, Hisaya Kurashige (run-V09-02-06)
     35- Add /run/setCutForAGivenParticle command in G4UserPhysicsListMessenger
     36
     37Makoto Asai (run-V09-02-05)
     38Sep 20, 2009, Makoto Asai (run-V09-02-05)
     39- G4RunManagerKernel checks G4VUserPhysicsList to confirm no particle
     40  is registered when G4RunManagerKernel is instantiated.
     41
     42Aug 10, 2009, Makoto Asai (run-V09-02-04)
     43- G4RunManagerKernel now invokes G4VUserPhysicsList::CheckParticleList
     44  just before invoking G4VUserPhysicsList::SetCuts.
     45
     46Aug 05, 2009, Hisaya Kurashige (run-V09-02-03)
     47- Add G4VUserPhysicsList::DisableCheckParticleList method
     48- Modify G4VUserPhysicsList::CheckParticleList to check existence
     49   of any EM processes
     50
     51Aug 03, 2009, Hisaya Kurashige (run-V09-02-02)
     52- Modify G4VUserPhysicsList to fit with proton cuts
     53- Modify G4VUserPhysicsList::BuildPhysicsTable
     54  to avoid problem  when ions are created in Pre-Init state
     55 
     56May 22nd, 2009, Hisaya Kurashige (run-V09-02-01)
     57- Add G4VUserPhysicsList::CheckParticleList() to check consistencies of
     58  list of particles before constructing processes
     59- Change severity of G4Exception in G4VUserPhysicsList
     60  'FatalException' is assigned if core dump is foreseen
     61
     62May 21st, 2009, Hisaya Kurashige (run-V09-02-00)
     63- Add check of process manager in G4VUserPhysicsList::BuildPhysicsTable
    1964
    2065July  10th, 2008, Gabriele Cosmo (run-V09-01-02)
  • trunk/source/run/include/G4RunManager.hh

    r1058 r1196  
    2525//
    2626//
    27 // $Id: G4RunManager.hh,v 1.51 2007/11/13 19:25:13 asaim Exp $
    28 // GEANT4 tag $Name: geant4-09-02-ref-02 $
     27// $Id: G4RunManager.hh,v 1.52 2009/11/13 23:14:46 asaim Exp $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
     
    441441  public:
    442442    void ConstructScoringWorlds();
    443   private:
     443  protected:
    444444    void UpdateScoring();
    445445};
  • trunk/source/run/include/G4UserPhysicsListMessenger.hh

    r1058 r1196  
    2525//
    2626//
    27 // $Id: G4UserPhysicsListMessenger.hh,v 1.18 2007/05/30 10:34:54 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-02-ref-02 $
     27// $Id: G4UserPhysicsListMessenger.hh,v 1.20 2009/10/20 07:07:51 kurasige Exp $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
     
    9797    G4UIcmdWithADoubleAndUnit * setCutCmd;
    9898    G4UIcommand *               setCutRCmd;
     99    G4UIcommand *               setCutForAGivenParticleCmd;
    99100    G4UIcmdWithAnInteger *      verboseCmd;
    100101    G4UIcmdWithoutParameter *   dumpListCmd;
  • trunk/source/run/include/G4VUserPhysicsList.hh

    r1058 r1196  
    2525//
    2626//
    27 // $Id: G4VUserPhysicsList.hh,v 1.35 2007/05/30 10:16:27 ahoward Exp $
    28 // GEANT4 tag $Name: geant4-09-02-ref-02 $
     27// $Id: G4VUserPhysicsList.hh,v 1.41 2009/08/09 14:31:46 kurasige Exp $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
     
    3232//      GEANT 4 class header file
    3333// Class Description:
    34 //      This class is an abstruct class for
     34//      This class is an abstract class for
    3535//      constructing particles and processes.
    36 //      User must implement following four virtual methods
    37 //      in his own concrete class derived from this class.
     36//      User must implement following three virtual methods
     37//      in his/her own concrete class derived from this class.
    3838//        G4VUserPhysicsList::ConstructParticle()
    3939//           Construct particles
    40 //        G4VUserPhysicsList::constructPhysics()
     40//        G4VUserPhysicsList::ConstructProcess()
    4141//           Construct procesess and register them to particles
    4242//        G4VUserPhysicsList::SetCuts()
     
    111111   // Each physics process will be instantiated and
    112112   // registered to the process manager of each particle type
    113    // This method is invoked in Construct" method
     113   // This method is invoked in Construct method
    114114   virtual void ConstructProcess() = 0;
    115115
     
    178178    // Request to print out information of cut values
    179179    // Printing will be performed when all tables are made
    180     void DumpCutValuesTable(G4int nParticles=3);
     180    void DumpCutValuesTable(G4int nParticles=4);
    181181
    182182    // The following method actually trigger the print-out requested
     
    258258                           G4ProcessManager*    newManager = 0 );
    259259 
    260  
     260   /////////////////////////////////////////////////////////////////
     261  public:
     262    // check consistencies of list of particles
     263
     264    void CheckParticleList();
     265
     266    void DisableCheckParticleList();
     267 
     268 protected:
     269 
     270    bool fDisableCheckParticleList;
     271
    261272  ////////////////////////////////////////////////////////////////////////
    262273  protected:
     
    292303   // flag for displaying the range cuts & energy thresholds
    293304   G4int fDisplayThreshold;
     305
     306  // flag for Physics Table has been built
     307   G4bool fIsPhysicsTableBuilt;
    294308
    295309  private:
     
    333347#endif
    334348  ConstructProcess();
     349
    335350}
    336351
     
    385400  fStoredInAscii = false;
    386401}
     402
     403inline
     404 void  G4VUserPhysicsList::DisableCheckParticleList()
     405{   
     406  fDisableCheckParticleList = true;
     407}
     408
     409
    387410#endif
    388411
  • trunk/source/run/src/G4RunManagerKernel.cc

    r1058 r1196  
    2525//
    2626//
    27 // $Id: G4RunManagerKernel.cc,v 1.43 2008/07/10 09:27:19 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-02-ref-02 $
     27// $Id: G4RunManagerKernel.cc,v 1.47 2009/11/13 23:13:40 asaim Exp $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
     
    8383  fRunManagerKernel = this;
    8484
     85  G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
     86  if(particleTable->entries()>0)
     87  {
     88    // No particle should be registered beforehand
     89    G4cerr<<"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"<<G4endl;
     90    G4cerr<<" G4RunManagerKernel fatal exception"<<G4endl;
     91    G4cerr<<"  -- Following particles have already been registered"<<G4endl;
     92    G4cerr<<"     before G4RunManagerKernel is instantiated."<<G4endl;
     93    for(int i=0;i<particleTable->entries();i++)
     94    { G4cerr<<"     "<<particleTable->GetParticle(i)->GetParticleName()<<G4endl; }
     95    G4cerr<<"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"<<G4endl;
     96    G4Exception("G4RunManagerKernel::G4RunManagerKernel()","StaticParticleDefinition",
     97       FatalException,"Particles have already been instantiated before G4RunManagerKernel.");
     98  }
     99 
    85100  // construction of Geant4 kernel classes
    86101  eventManager = new G4EventManager();
     
    264279  physicsList->Construct();
    265280
     281  if(verboseLevel>1) G4cout << "physicsList->CheckParticleList() start." << G4endl;
     282  physicsList->CheckParticleList();
    266283  if(verboseLevel>1) G4cout << "physicsList->setCut() start." << G4endl;
    267284  physicsList->SetCuts();
     
    444461    std::vector<G4LogicalVolume*>::iterator lvItr = region->GetRootLogicalVolumeIterator();
    445462    for(size_t j=0;j<nRootLV;j++)
    446     { G4cout << (*lvItr)->GetName() << " "; }
     463    { G4cout << (*lvItr)->GetName() << " "; lvItr++; }
    447464    G4cout << G4endl;
    448465
     
    476493    }
    477494    G4cout << " Production cuts : "
    478            << " gamma " << G4BestUnit(cuts->GetProductionCut("gamma"),"Length")
    479            << "    e- " << G4BestUnit(cuts->GetProductionCut("e-"),"Length")
    480            << "    e+ " << G4BestUnit(cuts->GetProductionCut("e+"),"Length")
     495           << "  gamma " << G4BestUnit(cuts->GetProductionCut("gamma"),"Length")
     496           << "     e- " << G4BestUnit(cuts->GetProductionCut("e-"),"Length")
     497           << "     e+ " << G4BestUnit(cuts->GetProductionCut("e+"),"Length")
     498           << " proton " << G4BestUnit(cuts->GetProductionCut("proton"),"Length")
    481499           << G4endl;
    482500  }
  • trunk/source/run/src/G4UserPhysicsListMessenger.cc

    r1058 r1196  
    2525//
    2626//
    27 // $Id: G4UserPhysicsListMessenger.cc,v 1.28 2007/05/30 10:34:54 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-02-ref-02 $
     27// $Id: G4UserPhysicsListMessenger.cc,v 1.30 2009/10/20 07:07:51 kurasige Exp $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
     
    6868  verboseCmd->SetDefaultValue(0);
    6969  verboseCmd->SetRange("level >=0 && level <=3");
     70 
     71  // /run/setCut command
     72  setCutCmd = new G4UIcmdWithADoubleAndUnit("/run/setCut",this);
     73  setCutCmd->SetGuidance("Set default cut value ");
     74  setCutCmd->SetParameterName("cut",false);
     75  setCutCmd->SetDefaultValue(1.0);
     76  setCutCmd->SetRange("cut >0.0");
     77  setCutCmd->SetDefaultUnit("mm");
     78  setCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
    7079
    7180  // /run/particle/setCut command
     
    7988  setPCutCmd->SetDefaultUnit("mm");
    8089  setPCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
    81  
    82   // /run/setCut command
    83   setCutCmd = new G4UIcmdWithADoubleAndUnit("/run/setCut",this);
    84   setCutCmd->SetGuidance("Set default cut value ");
    85   setCutCmd->SetParameterName("cut",false);
    86   setCutCmd->SetDefaultValue(1.0);
    87   setCutCmd->SetRange("cut >0.0");
    88   setCutCmd->SetDefaultUnit("mm");
    89   setCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
     90
     91  // /run/setCutForAGivenParticle command
     92  setCutForAGivenParticleCmd = new G4UIcommand("/run/setCutForAGivenParticle",this) ;
     93  setCutForAGivenParticleCmd->SetGuidance("Set a cut value to a specific particle") ;
     94  setCutForAGivenParticleCmd->SetGuidance("Usage: /run/setCutForAGivenParticle  gamma  1. mm") ;
     95  param = new G4UIparameter("particleName",'s',false) ;
     96  param->SetParameterCandidates("e- e+ gamma proton");
     97  setCutForAGivenParticleCmd->SetParameter(param) ;
     98  param = new G4UIparameter("cut",'d',false) ;
     99  param->SetDefaultValue("1.") ;
     100  param->SetParameterRange("cut>0.0") ;
     101  setCutForAGivenParticleCmd->SetParameter(param) ;
     102  param = new G4UIparameter("unit",'s',false) ;
     103  param->SetDefaultValue("mm") ;
     104  setCutForAGivenParticleCmd->SetParameter(param) ;
     105  setCutForAGivenParticleCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
    90106
    91107  // /run/setCutForRegion command
     
    187203  delete setPCutCmd;
    188204  delete setCutCmd;
    189   delete setCutRCmd;
     205  delete setCutRCmd;
     206  delete setCutForAGivenParticleCmd;
    190207  delete verboseCmd;
    191208  delete dumpListCmd;
     
    202219void G4UserPhysicsListMessenger::SetNewValue(G4UIcommand * command,G4String newValue)
    203220{
    204   if( command==setCutCmd || command==setPCutCmd ){
     221  if( command==setCutCmd ){
    205222    G4double newCut = setCutCmd->GetNewDoubleValue(newValue);
    206223    thePhysicsList->SetDefaultCutValue(newCut);
    207224    thePhysicsList->SetCutsWithDefault();
    208225
     226  } else if( command==setPCutCmd ){
     227    G4cout << "Please use /run/setCut command instead. This command will be removed" << G4endl;
     228    G4double newCut = setCutCmd->GetNewDoubleValue(newValue);
     229    thePhysicsList->SetDefaultCutValue(newCut);
     230    thePhysicsList->SetCutsWithDefault();
     231
     232  } else if( command==setCutForAGivenParticleCmd ){
     233    G4String particleName, unit ; G4double cut ;
     234    std::istringstream str (newValue) ;
     235    str >> particleName >> cut >> unit ;
     236    thePhysicsList->SetCutValue(cut*G4UIcommand::ValueOf(unit), particleName) ;
     237
    209238  } else if( command==setCutRCmd ){
    210     //G4Tokenizer next( newValue );
    211     //G4String rName = G4String(next());
    212     //G4String cValue = G4String(next())+" "+G4String(next());
    213     //G4double newCut = setCutCmd->GetNewDoubleValue(cValue);
    214     //thePhysicsList->SetCutsForRegion(newCut,rName);
    215239    std::istringstream is(newValue);
    216240    char regName[50];
     
    281305  G4ParticleTable::G4PTblDicIterator *piter = (G4ParticleTable::GetParticleTable())->GetIterator();
    282306 
    283   if( command==setCutCmd || command==setPCutCmd ){
     307  if( command==setCutCmd ) {
    284308    cv = setCutCmd->ConvertToString( thePhysicsList->GetDefaultCutValue(), "mm" );
    285309   
  • trunk/source/run/src/G4VUserPhysicsList.cc

    r1058 r1196  
    2525//
    2626//
    27 // $Id: G4VUserPhysicsList.cc,v 1.64 2008/05/09 13:00:42 kurasige Exp $
    28 // GEANT4 tag $Name: geant4-09-02-ref-02 $
     27// $Id: G4VUserPhysicsList.cc,v 1.71 2009/08/09 14:31:46 kurasige Exp $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
     
    6868////////////////////////////////////////////////////////
    6969G4VUserPhysicsList::G4VUserPhysicsList()
    70                    :verboseLevel(1),
     70                 :  fDisableCheckParticleList(false),
     71                    verboseLevel(1),
    7172                    fRetrievePhysicsTable(false),
    7273                    fStoredInAscii(true),
     
    7576                    directoryPhysicsTable("."),
    7677                    fDisplayThreshold(0),
     78                    fIsPhysicsTableBuilt(false),
    7779                    useCoupledTransportation(false)
    7880{
     
    154156          // no process manager has been registered yet
    155157          newManager = new G4ProcessManager(newParticle);
     158          G4Exception("G4VUserPhysicsList::AddProcessManager","Error in GenericIon",
     159                RunMustBeAborted,"GenericIon has no ProcessMamanger"); 
    156160        }
    157161      } else {
    158162        // "GenericIon" does not exist
    159163        newManager = new G4ProcessManager(newParticle);
     164        G4Exception("G4VUserPhysicsList::AddProcessManager","No GenericIon",
     165                    RunMustBeAborted,"GenericIon does not exist");     
    160166      }
    161167
     
    180186  }
    181187#endif
    182   if (newParticle->GetParticleType() == "nucleus") {
     188  if ( fIsPhysicsTableBuilt
     189       && (newParticle->GetParticleType() == "nucleus")) {
    183190    PreparePhysicsTable(newParticle);
    184191    BuildPhysicsTable(newParticle);
     
    186193}
    187194
     195
     196////////////////////////////////////////////////////////
     197void G4VUserPhysicsList::CheckParticleList()
     198{
     199
     200  // skip if fDisableCheckParticleList is set 
     201  if (fDisableCheckParticleList) return;
     202
     203  bool isElectron = false;
     204  bool isPositron = false;
     205  bool isGamma    = false;
     206  bool isProton   = false;
     207  bool isGenericIon = false;
     208  bool isAnyIon   = false;
     209  bool isAnyChargedBaryon   = false;
     210  bool isEmProc   = false;
     211
     212  // loop over all particles in G4ParticleTable
     213  theParticleIterator->reset();
     214  while( (*theParticleIterator)() ){
     215    G4ParticleDefinition* particle = theParticleIterator->value();
     216    G4String name = particle->GetParticleName();
     217    // check if any EM process exists
     218    if (!isEmProc) {
     219      G4ProcessVector* list = particle->GetProcessManager()->GetProcessList();
     220      for (int idx=0; idx<list->size(); idx++){
     221        isEmProc = ((*list)[idx])->GetProcessType() == fElectromagnetic;
     222        if (isEmProc) break;
     223      }
     224    }
     225   
     226    if      ( name == "e-") isElectron = true;
     227    else if ( name == "e+") isPositron = true;
     228    else if ( name == "gamma") isGamma = true;
     229    else if ( name == "GenericIon") isGenericIon = true;
     230    else if ( name == "proton") isProton = true;
     231    else if ( particle->GetParticleType() == "nucleus") isAnyIon = true;
     232    else if ( particle->GetParticleType() == "baryon") {
     233       if ( particle->GetPDGCharge() != 0.0 ) isAnyChargedBaryon = true;
     234    }
     235  }
     236
     237  if (!isEmProc) return;
     238
     239  // RULE 1
     240  //  e+, e- and gamma should exist
     241  //   if one of them exist
     242  bool isEmBasic =  isElectron || isPositron || isGamma;
     243  bool isMissingEmBasic =  !isElectron || !isPositron || !isGamma;
     244  if (isEmBasic && isMissingEmBasic) {
     245    G4String missingName="";
     246    if (!isElectron) missingName += "e- ";
     247    if (!isPositron) missingName += "e+ ";
     248    if (!isGamma) missingName += "gamma ";
     249
     250#ifdef G4VERBOSE
     251    if (verboseLevel >0){
     252      G4cout << "G4VUserPhysicsList::CheckParticleList: ";
     253      G4cout << missingName << " do not exist " << G4endl;
     254      G4cout << " These particle are necessary for basic EM processes" << G4endl;
     255    }
     256#endif
     257    missingName += " should be created ";
     258    G4Exception("G4VUserPhysicsList::CheckParticleList","Missing EM basic particle",
     259                FatalException, missingName);   
     260  }
     261
     262  // RULE 2
     263  //  proton should exist
     264  //   if any other charged baryon  exist
     265  if (!isProton && isAnyChargedBaryon) {
     266    G4String missingName="proton ";
     267
     268#ifdef G4VERBOSE
     269    if (verboseLevel >0){
     270      G4cout << "G4VUserPhysicsList::CheckParticleList: ";
     271      G4cout << missingName << " does not exist "<< G4endl;
     272      G4cout << " Proton is necessary for EM baryon processes" << G4endl;
     273    }
     274#endif
     275    missingName += " should be created ";
     276    G4Exception("G4VUserPhysicsList::CheckParticleList","Missing Proton",
     277                FatalException, missingName);   
     278  }
     279   
     280  // RULE 3
     281  //  GenericIonn should exist
     282  //   if any other ion  exist
     283  if (!isGenericIon && isAnyIon) {
     284    G4String missingName="GenericIon ";
     285
     286#ifdef G4VERBOSE
     287    if (verboseLevel >0){
     288      G4cout << "G4VUserPhysicsList::CheckParticleList: ";
     289      G4cout << missingName << " does not exist "<< G4endl;
     290      G4cout << " GenericIon should be created if any ion is necessary" << G4endl;
     291    }
     292#endif
     293    missingName += " should be created ";
     294    G4Exception("G4VUserPhysicsList::CheckParticleList","Missing GenericIon",
     295                FatalException, missingName);   
     296  }
     297     
     298}
    188299
    189300////////////////////////////////////////////////////////
     
    203314}
    204315
    205 ////////////////////////////////////////////////////////
     316/////////////////////////////////////////////////////////
    206317void G4VUserPhysicsList::RemoveProcessManager()
    207318{
     
    263374        G4String particleName = particle->GetParticleName();
    264375        G4Exception("G4VUserPhysicsList::AddTransportation","No process manager",
    265                     RunMustBeAborted, particleName );
     376                    FatalException, particleName );
    266377      } else {
    267378        // add transportation with ordering = ( -1, "first", "first" )
     
    277388        G4String particleName = particle->GetParticleName();
    278389        G4Exception("G4VUserPhysicsList::AddTransportation","No process manager",
    279                     RunMustBeAborted, particleName );
     390                    FatalException, particleName );
    280391      } else {
    281392        // add transportation with ordering = ( -1, "first", "first" )
     
    359470  SetCutValue(cut, "e-");
    360471  SetCutValue(cut, "e+");
     472  SetCutValue(cut, "proton");
    361473
    362474  // dump Cut values if verboseLevel==3
     
    374486  SetCutValue(aCut, "e-", rname);
    375487  SetCutValue(aCut, "e+", rname);
     488  SetCutValue(aCut, "proton", rname);
    376489}
    377490
     
    450563    }
    451564  }
     565
     566  // Set flag
     567  fIsPhysicsTableBuilt = true;
     568
    452569}
    453570///////////////////////////////////////////////////////////////
     
    487604  // if particle is not ShortLived
    488605  if(!particle->IsShortLived()) {
    489     G4ProcessVector* pVector = particle->GetProcessManager()->GetProcessList();
     606    G4ProcessManager* pManager =  particle->GetProcessManager();
     607    if (!pManager) {
     608      G4cerr << "G4VUserPhysicsList::BuildPhysicsTable  : No Process Manager for "
     609             << particle->GetParticleName() <<G4endl;
     610      G4cerr << particle->GetParticleName() << " should be created in your PhysicsList" <<G4endl;
     611      G4Exception("G4VUserPhysicsList::BuildPhysicsTable","No process manager",
     612                    FatalException,  particle->GetParticleName() );
     613    }
     614    G4ProcessVector* pVector = pManager->GetProcessList();
     615    if (!pVector) {
     616      G4cerr << "G4VUserPhysicsList::BuildPhysicsTable  : No Process Vector for "
     617             << particle->GetParticleName() <<G4endl;
     618      G4cerr << particle->GetParticleName() << " should be created in your PhysicsList" <<G4endl;
     619      G4Exception("G4VUserPhysicsList::BuildPhysicsTable","No process Vector",
     620                    FatalException,  particle->GetParticleName() );
     621    }
    490622    for (G4int j=0; j < pVector->size(); ++j) {
    491623      (*pVector)[j]->BuildPhysicsTable(*particle);
     
    506638      G4cerr << particle->GetParticleName() << " should be created in your PhysicsList" <<G4endl;
    507639      G4Exception("G4VUserPhysicsList::PreparePhysicsTable","No process manager",
    508                     RunMustBeAborted,  particle->GetParticleName() );
     640                    FatalException,  particle->GetParticleName() );
    509641    }
    510642
    511643    G4ProcessVector* pVector = pManager->GetProcessList();
     644    if (!pVector) {
     645      G4cerr << "G4VUserPhysicsList::PreparePhysicsTable  : No Process Vector for "
     646             << particle->GetParticleName() <<G4endl;
     647      G4cerr << particle->GetParticleName() << " should be created in your PhysicsList" <<G4endl;
     648      G4Exception("G4VUserPhysicsList::PreparePhysicsTable","No process Vector",
     649                    FatalException,  particle->GetParticleName() );
     650    }
    512651    for (G4int j=0; j < pVector->size(); ++j) {
    513652      (*pVector)[j]->PreparePhysicsTable(*particle);
     
    690829    theParticleTable->FindParticle("e-")->SetApplyCutsFlag(value);
    691830    theParticleTable->FindParticle("e+")->SetApplyCutsFlag(value);
     831    theParticleTable->FindParticle("proton")->SetApplyCutsFlag(value);
    692832  } else {
    693833    theParticleTable->FindParticle(name)->SetApplyCutsFlag(value);
Note: See TracChangeset for help on using the changeset viewer.