/[PAMELA software]/PamVMC/PamG4RunConfiguration/src/PamG4RunConfiguration.cxx
ViewVC logotype

Diff of /PamVMC/PamG4RunConfiguration/src/PamG4RunConfiguration.cxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by nikolas, Thu Jun 28 07:16:56 2007 UTC revision 1.2 by nikolas, Wed Feb 18 17:05:15 2009 UTC
# Line 1  Line 1 
1  // $Id: PamG4RunConfiguration.cxx,v 1.0 2007/06/04  #include <TG4ComposedPhysicsList.h>
 //  
 // Class PamG4RunConfiguration  
   
2  #include "PamG4RunConfiguration.h"  #include "PamG4RunConfiguration.h"
3    #include <TG4EmPhysicsList.h>
4    #include <TG4HadronPhysicsList.h>
5    #include <TG4OpticalPhysicsList.h>
6    #include <TG4SpecialPhysicsList.h>
7    #include <TG4Globals.h>
8    
9    
10    #include "PamG4RangeCutsPhysicsList.h"
11    ClassImp(PamG4RunConfiguration)
12    
 #include <LHEP_BIC_HP.hh>  
13    
14  PamG4RunConfiguration::PamG4RunConfiguration(const TString& userGeometry)  PamG4RunConfiguration::PamG4RunConfiguration(const TString& userGeometry,
15    : TG4RunConfiguration(userGeometry) {                                               const TString& physicsList,
16                                                 const TString& specialProcess)
17      : TG4RunConfiguration(userGeometry, physicsList, specialProcess)
18    {
19      
20  }  }
21    
 PamG4RunConfiguration::~PamG4RunConfiguration(){  
22    
23    PamG4RunConfiguration::~PamG4RunConfiguration()
24    {
25    /// Destructor
26  }  }
27    
28    
29  G4VUserPhysicsList*  PamG4RunConfiguration::CreatePhysicsList()  G4VUserPhysicsList* PamG4RunConfiguration::CreatePhysicsList()
30  {  {
31  // Create LHEP_BIC_HP physics list  // Create default Geant4 VMC physics list
32    
33    return new LHEP_BIC_HP();    TG4ComposedPhysicsList* builder = new TG4ComposedPhysicsList();
34      
35      TString token1 = TG4Globals::GetToken(0, fPhysicsListSelection);
36      TString token2 = TG4Globals::GetToken(1, fPhysicsListSelection);
37      
38      if ( token1 == "emStandard" ) {
39      G4cout << "Adding EMPhysicsList" << G4endl;
40      builder->AddPhysicsList(new TG4EmPhysicsList());
41  }    }  
42    else {
43      G4cout << "Adding HadronPhysicsList " << token1.Data() << G4endl;
44      builder->AddPhysicsList(new TG4HadronPhysicsList(token1.Data()));
45    }  
46      
47    if ( token2 == "optical" ) {
48      G4cout << "Adding OpticalPhysicsList " << G4endl;
49      builder->AddPhysicsList(new TG4OpticalPhysicsList());
50    }  
51      
52     // add option here
53      G4cout << "Adding SpecialPhysicsList " << G4endl;
54      builder->AddPhysicsList(new TG4SpecialPhysicsList(
55                                   fSpecialProcessSelection.Data()));
56    
57      G4cout << "Adding Range Cuts PhysicsList " << G4endl;
58      builder->AddPhysicsList(new PamG4RangeCutsPhysicsList());
59    
60    return builder;  
61    }  

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.23