Changeset 1342 for trunk/examples/novice/N06/src
- Timestamp:
- Nov 5, 2010, 4:08:39 PM (14 years ago)
- Location:
- trunk/examples/novice/N06/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/novice/N06/src/ExN06DetectorConstruction.cc
r1337 r1342 25 25 // 26 26 // 27 // $Id: ExN06DetectorConstruction.cc,v 1.1 7 2008/07/17 00:32:34gum 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 $ 29 29 // 30 30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 34 34 35 35 #include "G4Material.hh" 36 #include "G4MaterialTable.hh"37 36 #include "G4Element.hh" 38 #include "G4ElementTable.hh"39 37 #include "G4LogicalBorderSurface.hh" 40 38 #include "G4LogicalSkinSurface.hh" 39 #include "G4OpticalSurface.hh" 41 40 #include "G4Box.hh" 42 41 #include "G4LogicalVolume.hh" 43 #include "G4RotationMatrix.hh"44 42 #include "G4ThreeVector.hh" 45 #include "G4Transform3D.hh"46 43 #include "G4PVPlacement.hh" 47 #include "G4OpBoundaryProcess.hh"48 44 49 45 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 51 47 ExN06DetectorConstruction::ExN06DetectorConstruction() 52 48 { 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; 56 52 } 57 53 … … 145 141 myMPT1->AddConstProperty("SLOWTIMECONSTANT",10.*ns); 146 142 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 148 196 Water->SetMaterialPropertiesTable(myMPT1); 149 197 … … 211 259 OpWaterSurface->SetModel(unified); 212 260 213 G4LogicalBorderSurface* WaterSurface = 214 new G4LogicalBorderSurface("WaterSurface", 261 new G4LogicalBorderSurface("WaterSurface", 215 262 waterTank_phys,expHall_phys,OpWaterSurface); 216 217 if(WaterSurface->GetVolume1() == waterTank_phys) G4cout << "Equal" << G4endl;218 if(WaterSurface->GetVolume2() == expHall_phys ) G4cout << "Equal" << G4endl;219 263 220 264 // Air Bubble … … 228 272 new G4LogicalSkinSurface("AirSurface", bubbleAir_log, OpAirSurface); 229 273 230 if(AirSurface->GetLogicalVolume() == bubbleAir_log) G4cout << "Equal" << G4endl;231 274 G4OpticalSurface* opticalSurface = dynamic_cast <G4OpticalSurface*> 232 275 (AirSurface->GetSurface(bubbleAir_log)->GetSurfaceProperty()); … … 238 281 // 239 282 const G4int num = 2; 240 G4double Ephoton[num] = {2.03 8*eV, 4.144*eV};283 G4double Ephoton[num] = {2.034*eV, 4.136*eV}; 241 284 242 285 //OpticalWaterSurface -
trunk/examples/novice/N06/src/ExN06PhysicsList.cc
r1337 r1342 25 25 // 26 26 // 27 // $Id: ExN06PhysicsList.cc,v 1.1 7 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 $ 29 29 // 30 30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 31 31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 32 33 #include "G4ios.hh"34 #include <iomanip>35 32 36 33 #include "globals.hh" … … 42 39 #include "G4ParticleTable.hh" 43 40 44 #include "G4Material.hh"45 #include "G4MaterialTable.hh"46 47 41 #include "G4ProcessManager.hh" 48 #include "G4ProcessVector.hh"49 42 50 43 #include "G4Cerenkov.hh" … … 52 45 #include "G4OpAbsorption.hh" 53 46 #include "G4OpRayleigh.hh" 47 #include "G4OpMieHG.hh" 54 48 #include "G4OpBoundaryProcess.hh" 55 49 … … 61 55 ExN06PhysicsList::ExN06PhysicsList() : G4VUserPhysicsList() 62 56 { 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; 68 63 69 64 pMessenger = new ExN06PhysicsListMessenger(this); … … 110 105 { 111 106 // leptons 107 // e+/- 112 108 G4Electron::ElectronDefinition(); 113 109 G4Positron::PositronDefinition(); 110 // mu+/- 111 G4MuonPlus::MuonPlusDefinition(); 112 G4MuonMinus::MuonMinusDefinition(); 113 // nu_e 114 114 G4NeutrinoE::NeutrinoEDefinition(); 115 115 G4AntiNeutrinoE::AntiNeutrinoEDefinition(); 116 G4MuonPlus::MuonPlusDefinition(); 117 G4MuonMinus::MuonMinusDefinition(); 116 // nu_mu 118 117 G4NeutrinoMu::NeutrinoMuDefinition(); 119 118 G4AntiNeutrinoMu::AntiNeutrinoMuDefinition(); … … 124 123 void ExN06PhysicsList::ConstructMesons() 125 124 { 126 // mesons125 // mesons 127 126 G4PionPlus::PionPlusDefinition(); 128 127 G4PionMinus::PionMinusDefinition(); … … 134 133 void ExN06PhysicsList::ConstructBaryons() 135 134 { 136 // barions135 // barions 137 136 G4Proton::ProtonDefinition(); 138 137 G4AntiProton::AntiProtonDefinition(); 138 139 139 G4Neutron::NeutronDefinition(); 140 140 G4AntiNeutron::AntiNeutronDefinition(); … … 207 207 // gamma 208 208 // 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()); 212 212 213 213 } else if (particleName == "e-") { … … 238 238 if ((particle->GetPDGCharge() != 0.0) && 239 239 (particle->GetParticleName() != "chargedgeantino")) { 240 // all others charged particles except geantino240 // all others charged particles except geantino 241 241 pmanager->AddProcess(new G4hMultipleScattering(),-1,1,1); 242 242 pmanager->AddProcess(new G4hIonisation(), -1,2,2); … … 251 251 { 252 252 theCerenkovProcess = new G4Cerenkov("Cerenkov"); 253 theScintillationProcess = new G4Scintillation("Scintillation");254 theAbsorptionProcess = new G4OpAbsorption();253 theScintillationProcess = new G4Scintillation("Scintillation"); 254 theAbsorptionProcess = new G4OpAbsorption(); 255 255 theRayleighScatteringProcess = new G4OpRayleigh(); 256 theBoundaryProcess = new G4OpBoundaryProcess(); 256 theMieHGScatteringProcess = new G4OpMieHG(); 257 theBoundaryProcess = new G4OpBoundaryProcess(); 257 258 258 259 // theCerenkovProcess->DumpPhysicsTable(); 259 260 // theScintillationProcess->DumpPhysicsTable(); 260 // theAbsorptionProcess->DumpPhysicsTable();261 261 // theRayleighScatteringProcess->DumpPhysicsTable(); 262 262 … … 296 296 pmanager->AddDiscreteProcess(theAbsorptionProcess); 297 297 pmanager->AddDiscreteProcess(theRayleighScatteringProcess); 298 pmanager->AddDiscreteProcess(theMieHGScatteringProcess); 298 299 pmanager->AddDiscreteProcess(theBoundaryProcess); 299 300 } … … 309 310 theAbsorptionProcess->SetVerboseLevel(verbose); 310 311 theRayleighScatteringProcess->SetVerboseLevel(verbose); 312 theMieHGScatteringProcess->SetVerboseLevel(verbose); 311 313 theBoundaryProcess->SetVerboseLevel(verbose); 312 314 }
Note: See TracChangeset
for help on using the changeset viewer.