Changeset 963 for trunk/source/processes/optical/src
- Timestamp:
- Apr 6, 2009, 12:34:39 PM (16 years ago)
- Location:
- trunk/source/processes/optical/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/optical/src/G4OpAbsorption.cc
r819 r963 25 25 // 26 26 // 27 // $Id: G4OpAbsorption.cc,v 1. 7 2006/06/29 21:08:50 gunterExp $28 // GEANT4 tag $Name: $27 // $Id: G4OpAbsorption.cc,v 1.9 2008/10/24 19:52:28 gum Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 //////////////////////////////////////////////////////////////////////// … … 52 52 53 53 #include "G4ios.hh" 54 #include "G4OpProcessSubType.hh" 55 54 56 #include "G4OpAbsorption.hh" 55 57 … … 76 78 G4cout << GetProcessName() << " is created " << G4endl; 77 79 } 80 81 SetProcessSubType(fOpAbsorption); 78 82 } 79 83 -
trunk/source/processes/optical/src/G4OpBoundaryProcess.cc
r819 r963 67 67 68 68 #include "G4ios.hh" 69 #include "G4OpProcessSubType.hh" 70 69 71 #include "G4OpBoundaryProcess.hh" 70 72 #include "G4GeometryTolerance.hh" … … 93 95 G4cout << GetProcessName() << " is created " << G4endl; 94 96 } 97 98 SetProcessSubType(fOpBoundary); 95 99 96 100 theStatus = Undefined; … … 220 224 OpticalSurface = NULL; 221 225 222 G4LogicalSurface* Surface = G4LogicalBorderSurface::GetSurface 223 (pPreStepPoint ->GetPhysicalVolume(), 224 pPostStepPoint->GetPhysicalVolume()); 226 G4LogicalSurface* Surface = NULL; 227 228 Surface = G4LogicalBorderSurface::GetSurface 229 (pPreStepPoint ->GetPhysicalVolume(), 230 pPostStepPoint->GetPhysicalVolume()); 225 231 226 232 if (Surface == NULL){ … … 249 255 } 250 256 251 // if (Surface) OpticalSurface = dynamic_cast <G4OpticalSurface*> (Surface->GetSurfaceProperty());252 if (Surface) OpticalSurface = (G4OpticalSurface*) Surface->GetSurfaceProperty();257 if (Surface) OpticalSurface = 258 dynamic_cast <G4OpticalSurface*> (Surface->GetSurfaceProperty()); 253 259 254 260 if (OpticalSurface) { … … 429 435 430 436 DielectricMetal(); 437 438 // Uncomment the following lines if you wish to have 439 // Transmission instead of Absorption 440 // if (theStatus == Absorption) { 441 // return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep); 442 // } 431 443 432 444 } … … 579 591 if( !G4BooleanRand(theReflectivity) && n == 1 ) { 580 592 593 // Comment out DoAbsorption and uncomment theStatus = Absorption; 594 // if you wish to have Transmission instead of Absorption 595 581 596 DoAbsorption(); 597 // theStatus = Absorption; 582 598 break; 583 599 … … 657 673 Through = false; 658 674 theGlobalNormal = -theGlobalNormal; 659 G4Swap (Material1,Material2);660 G4Swap (&Rindex1,&Rindex2);675 G4SwapPtr(Material1,Material2); 676 G4SwapObj(&Rindex1,&Rindex2); 661 677 } 662 678 … … 864 880 else { 865 881 Swap = !Swap; 866 G4Swap (Material1,Material2);867 G4Swap (&Rindex1,&Rindex2);882 G4SwapPtr(Material1,Material2); 883 G4SwapObj(&Rindex1,&Rindex2); 868 884 } 869 885 if ( theFinish == groundbackpainted ) -
trunk/source/processes/optical/src/G4OpRayleigh.cc
r819 r963 25 25 // 26 26 // 27 // $Id: G4OpRayleigh.cc,v 1.1 4 2006/06/29 21:08:54 gunterExp $28 // GEANT4 tag $Name: $27 // $Id: G4OpRayleigh.cc,v 1.17 2008/10/24 19:51:12 gum Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // … … 57 57 58 58 #include "G4ios.hh" 59 #include "G4OpProcessSubType.hh" 60 59 61 #include "G4OpRayleigh.hh" 60 62 … … 78 80 : G4VDiscreteProcess(processName, type) 79 81 { 82 SetProcessSubType(fOpRayleigh); 80 83 81 84 thePhysicsTable = 0; … … 248 251 const G4Material* aMaterial = aTrack.GetMaterial(); 249 252 250 G4double thePhoton Momentum = aParticle->GetTotalMomentum();253 G4double thePhotonEnergy = aParticle->GetTotalEnergy(); 251 254 252 255 G4double AttenuationLength = DBL_MAX; … … 258 261 AttenuationLength = 259 262 (*thePhysicsTable)(aMaterial->GetIndex())-> 260 GetValue(thePhoton Momentum, isOutRange);263 GetValue(thePhotonEnergy, isOutRange); 261 264 } 262 265 else { … … 270 273 if(AttenuationLengthVector){ 271 274 AttenuationLength = AttenuationLengthVector -> 272 GetProperty(thePhoton Momentum);275 GetProperty(thePhotonEnergy); 273 276 } 274 277 else{ … … 305 308 306 309 // Retrieve vectors for refraction index 307 // and photon momentumfrom the material properties table310 // and photon energy from the material properties table 308 311 309 312 G4MaterialPropertyVector* Rindex = aMPT->GetProperty("RINDEX"); … … 325 328 while (++(*Rindex)) { 326 329 327 e = (Rindex->GetPhoton Momentum());330 e = (Rindex->GetPhotonEnergy()); 328 331 329 332 refraction_index = Rindex->GetProperty(); … … 332 335 333 336 if (verboseLevel>0) { 334 G4cout << Rindex->GetPhoton Momentum() << " MeV\t";337 G4cout << Rindex->GetPhotonEnergy() << " MeV\t"; 335 338 G4cout << xlambda << " mm\t"; 336 339 } … … 347 350 } 348 351 RayleighScatteringLengths-> 349 InsertValues(Rindex->GetPhoton Momentum(), Dist);352 InsertValues(Rindex->GetPhotonEnergy(), Dist); 350 353 } 351 354 -
trunk/source/processes/optical/src/G4OpWLS.cc
r819 r963 25 25 // 26 26 // 27 // $Id: G4OpWLS.cc,v 1. 9 2007/10/30 03:53:36gum Exp $28 // GEANT4 tag $Name: $27 // $Id: G4OpWLS.cc,v 1.13 2008/10/24 19:50:50 gum Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 //////////////////////////////////////////////////////////////////////// … … 46 46 47 47 #include "G4ios.hh" 48 #include "G4OpProcessSubType.hh" 49 48 50 #include "G4OpWLS.hh" 49 51 #include "G4WLSTimeGeneratorProfileDelta.hh" … … 61 63 : G4VDiscreteProcess(processName, type) 62 64 { 65 SetProcessSubType(fOpWLS); 66 63 67 theIntegralTable = 0; 64 68 … … 161 165 for (G4int i = 0; i < NumPhotons; i++) { 162 166 163 // Determine photon momentum167 // Determine photon energy 164 168 165 169 G4double CIIvalue = G4UniformRand()*CIImax; 166 G4double sampled Momentum=170 G4double sampledEnergy = 167 171 WLSIntegral->GetEnergy(CIIvalue); 168 172 169 173 if (verboseLevel>1) { 170 G4cout << "sampled Momentum = " << sampledMomentum<< G4endl;174 G4cout << "sampledEnergy = " << sampledEnergy << G4endl; 171 175 G4cout << "CIIvalue = " << CIIvalue << G4endl; 172 176 } … … 217 221 photonPolarization.z()); 218 222 219 aWLSPhoton->SetKineticEnergy(sampled Momentum);223 aWLSPhoton->SetKineticEnergy(sampledEnergy); 220 224 221 225 // Generate new G4Track object: … … 230 234 G4Track* aSecondaryTrack = 231 235 new G4Track(aWLSPhoton,aSecondaryTime,aSecondaryPosition); 232 233 aSecondaryTrack->SetTouchableHandle((G4VTouchable*)0); 236 237 aSecondaryTrack->SetTouchableHandle(aTrack.GetTouchableHandle()); 238 // aSecondaryTrack->SetTouchableHandle((G4VTouchable*)0); 234 239 235 240 aSecondaryTrack->SetParentID(aTrack.GetTrackID()); … … 285 290 286 291 // Retrieve the first intensity point in vector 287 // of (photon momentum, intensity) pairs292 // of (photon energy, intensity) pairs 288 293 289 294 theWLSVector->ResetIterator(); … … 295 300 if (currentIN >= 0.0) { 296 301 297 // Create first (photon momentum)302 // Create first (photon energy) 298 303 299 304 G4double currentPM = theWLSVector-> 300 GetPhoton Momentum();305 GetPhotonEnergy(); 301 306 302 307 G4double currentCII = 0.0; … … 311 316 G4double prevIN = currentIN; 312 317 313 // loop over all (photon momentum, intensity)318 // loop over all (photon energy, intensity) 314 319 // pairs stored for this material 315 320 … … 317 322 { 318 323 currentPM = theWLSVector-> 319 GetPhoton Momentum();324 GetPhotonEnergy(); 320 325 321 326 currentIN=theWLSVector-> … … 355 360 const G4Material* aMaterial = aTrack.GetMaterial(); 356 361 357 G4double thePhoton Momentum = aParticle->GetTotalMomentum();362 G4double thePhotonEnergy = aParticle->GetTotalEnergy(); 358 363 359 364 G4MaterialPropertiesTable* aMaterialPropertyTable; … … 369 374 if ( AttenuationLengthVector ){ 370 375 AttenuationLength = AttenuationLengthVector-> 371 GetProperty (thePhoton Momentum);376 GetProperty (thePhotonEnergy); 372 377 } 373 378 else {
Note: See TracChangeset
for help on using the changeset viewer.