Ignore:
Timestamp:
Nov 5, 2010, 4:08:39 PM (14 years ago)
Author:
garnier
Message:

update ti head

Location:
trunk/examples/novice/N06/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/novice/N06/src/ExN06DetectorConstruction.cc

    r1337 r1342  
    2525//
    2626//
    27 // $Id: ExN06DetectorConstruction.cc,v 1.17 2008/07/17 00:32:34 gum Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     27// $Id: ExN06DetectorConstruction.cc,v 1.18 2010/10/23 19:27:38 gum Exp $
     28// GEANT4 tag $Name: examples-V09-03-09 $
    2929//
    3030//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    3434
    3535#include "G4Material.hh"
    36 #include "G4MaterialTable.hh"
    3736#include "G4Element.hh"
    38 #include "G4ElementTable.hh"
    3937#include "G4LogicalBorderSurface.hh"
    4038#include "G4LogicalSkinSurface.hh"
     39#include "G4OpticalSurface.hh"
    4140#include "G4Box.hh"
    4241#include "G4LogicalVolume.hh"
    43 #include "G4RotationMatrix.hh"
    4442#include "G4ThreeVector.hh"
    45 #include "G4Transform3D.hh"
    4643#include "G4PVPlacement.hh"
    47 #include "G4OpBoundaryProcess.hh"
    4844
    4945//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    5147ExN06DetectorConstruction::ExN06DetectorConstruction()
    5248{
    53   expHall_x = expHall_y = expHall_z = 10*m;
    54   tank_x    = tank_y    = tank_z    = 5*m;
    55   bubble_x  = bubble_y  = bubble_z  = 0.5*m;
     49  expHall_x = expHall_y = expHall_z = 10.0*m;
     50  tank_x    = tank_y    = tank_z    =  5.0*m;
     51  bubble_x  = bubble_y  = bubble_z  =  0.5*m;
    5652}
    5753
     
    145141  myMPT1->AddConstProperty("SLOWTIMECONSTANT",10.*ns);
    146142  myMPT1->AddConstProperty("YIELDRATIO",0.8);
    147  
     143
     144  const G4int NUMENTRIES_water = 90;
     145
     146  G4double ENERGY_water[NUMENTRIES_water] = {
     147     1.56962*eV, 1.58974*eV, 1.61039*eV, 1.63157*eV,
     148     1.65333*eV, 1.67567*eV, 1.69863*eV, 1.72222*eV,
     149     1.74647*eV, 1.77142*eV, 1.7971 *eV, 1.82352*eV,
     150     1.85074*eV, 1.87878*eV, 1.90769*eV, 1.93749*eV,
     151     1.96825*eV, 1.99999*eV, 2.03278*eV, 2.06666*eV,
     152     2.10169*eV, 2.13793*eV, 2.17543*eV, 2.21428*eV,
     153     2.25454*eV, 2.29629*eV, 2.33962*eV, 2.38461*eV,
     154     2.43137*eV, 2.47999*eV, 2.53061*eV, 2.58333*eV,
     155     2.63829*eV, 2.69565*eV, 2.75555*eV, 2.81817*eV,
     156     2.88371*eV, 2.95237*eV, 3.02438*eV, 3.09999*eV,
     157     3.17948*eV, 3.26315*eV, 3.35134*eV, 3.44444*eV,
     158     3.54285*eV, 3.64705*eV, 3.75757*eV, 3.87499*eV,
     159     3.99999*eV, 4.13332*eV, 4.27585*eV, 4.42856*eV,
     160     4.59258*eV, 4.76922*eV, 4.95999*eV, 5.16665*eV,
     161     5.39129*eV, 5.63635*eV, 5.90475*eV, 6.19998*eV
     162  };
     163
     164  //assume 100 times larger than the rayleigh scattering for now.
     165  G4double MIE_water[NUMENTRIES_water] = {
     166     167024.4*m, 158726.7*m, 150742  *m,
     167     143062.5*m, 135680.2*m, 128587.4*m,
     168     121776.3*m, 115239.5*m, 108969.5*m,
     169     102958.8*m, 97200.35*m, 91686.86*m,
     170     86411.33*m, 81366.79*m, 76546.42*m,
     171     71943.46*m, 67551.29*m, 63363.36*m,
     172     59373.25*m, 55574.61*m, 51961.24*m,
     173     48527.00*m, 45265.87*m, 42171.94*m,
     174     39239.39*m, 36462.50*m, 33835.68*m,
     175     31353.41*m, 29010.30*m, 26801.03*m,
     176     24720.42*m, 22763.36*m, 20924.88*m,
     177     19200.07*m, 17584.16*m, 16072.45*m,
     178     14660.38*m, 13343.46*m, 12117.33*m,
     179     10977.70*m, 9920.416*m, 8941.407*m,
     180     8036.711*m, 7202.470*m, 6434.927*m,
     181     5730.429*m, 5085.425*m, 4496.467*m,
     182     3960.210*m, 3473.413*m, 3032.937*m,
     183     2635.746*m, 2278.907*m, 1959.588*m,
     184     1675.064*m, 1422.710*m, 1200.004*m,
     185     1004.528*m, 833.9666*m, 686.1063*m
     186  };
     187
     188  // gforward, gbackward, forward backward ratio
     189  G4double MIE_water_const[3]={0.99,0.99,0.8};
     190
     191  myMPT1->AddProperty("MIEHG",ENERGY_water,MIE_water,NUMENTRIES_water);
     192  myMPT1->AddConstProperty("MIEHG_FORWARD",MIE_water_const[0]);
     193  myMPT1->AddConstProperty("MIEHG_BACKWARD",MIE_water_const[1]);
     194  myMPT1->AddConstProperty("MIEHG_FORWARD_RATIO",MIE_water_const[2]);
     195
    148196  Water->SetMaterialPropertiesTable(myMPT1);
    149197
     
    211259  OpWaterSurface->SetModel(unified);
    212260
    213   G4LogicalBorderSurface* WaterSurface =
    214                                  new G4LogicalBorderSurface("WaterSurface",
     261  new G4LogicalBorderSurface("WaterSurface",
    215262                                 waterTank_phys,expHall_phys,OpWaterSurface);
    216 
    217   if(WaterSurface->GetVolume1() == waterTank_phys) G4cout << "Equal" << G4endl;
    218   if(WaterSurface->GetVolume2() == expHall_phys  ) G4cout << "Equal" << G4endl;
    219263
    220264// Air Bubble
     
    228272          new G4LogicalSkinSurface("AirSurface", bubbleAir_log, OpAirSurface);
    229273
    230   if(AirSurface->GetLogicalVolume() == bubbleAir_log) G4cout << "Equal" << G4endl;
    231274  G4OpticalSurface* opticalSurface = dynamic_cast <G4OpticalSurface*>
    232275        (AirSurface->GetSurface(bubbleAir_log)->GetSurfaceProperty());
     
    238281//
    239282  const G4int num = 2;
    240   G4double Ephoton[num] = {2.038*eV, 4.144*eV};
     283  G4double Ephoton[num] = {2.034*eV, 4.136*eV};
    241284
    242285  //OpticalWaterSurface
  • trunk/examples/novice/N06/src/ExN06PhysicsList.cc

    r1337 r1342  
    2525//
    2626//
    27 // $Id: ExN06PhysicsList.cc,v 1.17 2009/11/10 05:16:23 gum Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     27// $Id: ExN06PhysicsList.cc,v 1.19 2010/10/23 19:14:03 gum Exp $
     28// GEANT4 tag $Name: examples-V09-03-09 $
    2929//
    3030//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    3131//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    32 
    33 #include "G4ios.hh"
    34 #include <iomanip>
    3532
    3633#include "globals.hh"
     
    4239#include "G4ParticleTable.hh"
    4340
    44 #include "G4Material.hh"
    45 #include "G4MaterialTable.hh"
    46 
    4741#include "G4ProcessManager.hh"
    48 #include "G4ProcessVector.hh"
    4942
    5043#include "G4Cerenkov.hh"
     
    5245#include "G4OpAbsorption.hh"
    5346#include "G4OpRayleigh.hh"
     47#include "G4OpMieHG.hh"
    5448#include "G4OpBoundaryProcess.hh"
    5549
     
    6155ExN06PhysicsList::ExN06PhysicsList() :  G4VUserPhysicsList()
    6256{
    63   theCerenkovProcess           = 0;
    64   theScintillationProcess      = 0;
    65   theAbsorptionProcess         = 0;
    66   theRayleighScatteringProcess = 0;
    67   theBoundaryProcess           = 0;
     57  theCerenkovProcess           = NULL;
     58  theScintillationProcess      = NULL;
     59  theAbsorptionProcess         = NULL;
     60  theRayleighScatteringProcess = NULL;
     61  theMieHGScatteringProcess    = NULL;
     62  theBoundaryProcess           = NULL;
    6863 
    6964  pMessenger = new ExN06PhysicsListMessenger(this); 
     
    110105{
    111106  // leptons
     107  //  e+/-
    112108  G4Electron::ElectronDefinition();
    113109  G4Positron::PositronDefinition();
     110  // mu+/-
     111  G4MuonPlus::MuonPlusDefinition();
     112  G4MuonMinus::MuonMinusDefinition();
     113  // nu_e
    114114  G4NeutrinoE::NeutrinoEDefinition();
    115115  G4AntiNeutrinoE::AntiNeutrinoEDefinition();
    116   G4MuonPlus::MuonPlusDefinition();
    117   G4MuonMinus::MuonMinusDefinition();
     116  // nu_mu
    118117  G4NeutrinoMu::NeutrinoMuDefinition();
    119118  G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
     
    124123void ExN06PhysicsList::ConstructMesons()
    125124{
    126  //  mesons
     125  //  mesons
    127126  G4PionPlus::PionPlusDefinition();
    128127  G4PionMinus::PionMinusDefinition();
     
    134133void ExN06PhysicsList::ConstructBaryons()
    135134{
    136 //  barions
     135  //  barions
    137136  G4Proton::ProtonDefinition();
    138137  G4AntiProton::AntiProtonDefinition();
     138
    139139  G4Neutron::NeutronDefinition();
    140140  G4AntiNeutron::AntiNeutronDefinition();
     
    207207    // gamma
    208208      // Construct processes for gamma
    209 //      pmanager->AddDiscreteProcess(new G4GammaConversion());
    210 //      pmanager->AddDiscreteProcess(new G4ComptonScattering());
    211 //      pmanager->AddDiscreteProcess(new G4PhotoElectricEffect());
     209      pmanager->AddDiscreteProcess(new G4GammaConversion());
     210      pmanager->AddDiscreteProcess(new G4ComptonScattering());
     211      pmanager->AddDiscreteProcess(new G4PhotoElectricEffect());
    212212
    213213    } else if (particleName == "e-") {
     
    238238      if ((particle->GetPDGCharge() != 0.0) &&
    239239          (particle->GetParticleName() != "chargedgeantino")) {
    240      // all others charged particles except geantino
     240       // all others charged particles except geantino
    241241       pmanager->AddProcess(new G4hMultipleScattering(),-1,1,1);
    242242       pmanager->AddProcess(new G4hIonisation(),       -1,2,2);
     
    251251{
    252252  theCerenkovProcess           = new G4Cerenkov("Cerenkov");
    253   theScintillationProcess = new G4Scintillation("Scintillation");
    254   theAbsorptionProcess     = new G4OpAbsorption();
     253  theScintillationProcess      = new G4Scintillation("Scintillation");
     254  theAbsorptionProcess         = new G4OpAbsorption();
    255255  theRayleighScatteringProcess = new G4OpRayleigh();
    256   theBoundaryProcess  = new G4OpBoundaryProcess();
     256  theMieHGScatteringProcess    = new G4OpMieHG();
     257  theBoundaryProcess           = new G4OpBoundaryProcess();
    257258
    258259//  theCerenkovProcess->DumpPhysicsTable();
    259260//  theScintillationProcess->DumpPhysicsTable();
    260 //  theAbsorptionProcess->DumpPhysicsTable();
    261261//  theRayleighScatteringProcess->DumpPhysicsTable();
    262262
     
    296296      pmanager->AddDiscreteProcess(theAbsorptionProcess);
    297297      pmanager->AddDiscreteProcess(theRayleighScatteringProcess);
     298      pmanager->AddDiscreteProcess(theMieHGScatteringProcess);
    298299      pmanager->AddDiscreteProcess(theBoundaryProcess);
    299300    }
     
    309310  theAbsorptionProcess->SetVerboseLevel(verbose);
    310311  theRayleighScatteringProcess->SetVerboseLevel(verbose);
     312  theMieHGScatteringProcess->SetVerboseLevel(verbose);
    311313  theBoundaryProcess->SetVerboseLevel(verbose); 
    312314}
Note: See TracChangeset for help on using the changeset viewer.