Ignore:
Timestamp:
Apr 6, 2009, 12:34:39 PM (16 years ago)
Author:
garnier
Message:

update processes

Location:
trunk/source/processes/optical/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/optical/src/G4OpAbsorption.cc

    r819 r963  
    2525//
    2626//
    27 // $Id: G4OpAbsorption.cc,v 1.7 2006/06/29 21:08:50 gunter Exp $
    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 $
    2929//
    3030////////////////////////////////////////////////////////////////////////
     
    5252
    5353#include "G4ios.hh"
     54#include "G4OpProcessSubType.hh"
     55
    5456#include "G4OpAbsorption.hh"
    5557
     
    7678           G4cout << GetProcessName() << " is created " << G4endl;
    7779        }
     80
     81        SetProcessSubType(fOpAbsorption);
    7882}
    7983
  • trunk/source/processes/optical/src/G4OpBoundaryProcess.cc

    r819 r963  
    6767
    6868#include "G4ios.hh"
     69#include "G4OpProcessSubType.hh"
     70
    6971#include "G4OpBoundaryProcess.hh"
    7072#include "G4GeometryTolerance.hh"
     
    9395           G4cout << GetProcessName() << " is created " << G4endl;
    9496        }
     97
     98        SetProcessSubType(fOpBoundary);
    9599
    96100        theStatus = Undefined;
     
    220224        OpticalSurface = NULL;
    221225
    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());
    225231
    226232        if (Surface == NULL){
     
    249255        }
    250256
    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());
    253259
    254260        if (OpticalSurface) {
     
    429435
    430436          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          // }
    431443
    432444        }
     
    579591           if( !G4BooleanRand(theReflectivity) && n == 1 ) {
    580592
     593             // Comment out DoAbsorption and uncomment theStatus = Absorption;
     594             // if you wish to have Transmission instead of Absorption
     595
    581596             DoAbsorption();
     597             // theStatus = Absorption;
    582598             break;
    583599
     
    657673              Through = false;
    658674              theGlobalNormal = -theGlobalNormal;
    659               G4Swap(Material1,Material2);
    660               G4Swap(&Rindex1,&Rindex2);
     675              G4SwapPtr(Material1,Material2);
     676              G4SwapObj(&Rindex1,&Rindex2);
    661677           }
    662678
     
    864880                else {
    865881                   Swap = !Swap;
    866                    G4Swap(Material1,Material2);
    867                    G4Swap(&Rindex1,&Rindex2);
     882                   G4SwapPtr(Material1,Material2);
     883                   G4SwapObj(&Rindex1,&Rindex2);
    868884                }
    869885                if ( theFinish == groundbackpainted )
  • trunk/source/processes/optical/src/G4OpRayleigh.cc

    r819 r963  
    2525//
    2626//
    27 // $Id: G4OpRayleigh.cc,v 1.14 2006/06/29 21:08:54 gunter Exp $
    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 $
    2929//
    3030//
     
    5757
    5858#include "G4ios.hh"
     59#include "G4OpProcessSubType.hh"
     60
    5961#include "G4OpRayleigh.hh"
    6062
     
    7880           : G4VDiscreteProcess(processName, type)
    7981{
     82        SetProcessSubType(fOpRayleigh);
    8083
    8184        thePhysicsTable = 0;
     
    248251        const G4Material* aMaterial = aTrack.GetMaterial();
    249252
    250         G4double thePhotonMomentum = aParticle->GetTotalMomentum();
     253        G4double thePhotonEnergy = aParticle->GetTotalEnergy();
    251254
    252255        G4double AttenuationLength = DBL_MAX;
     
    258261           AttenuationLength =
    259262                (*thePhysicsTable)(aMaterial->GetIndex())->
    260                            GetValue(thePhotonMomentum, isOutRange);
     263                           GetValue(thePhotonEnergy, isOutRange);
    261264        }
    262265        else {
     
    270273             if(AttenuationLengthVector){
    271274               AttenuationLength = AttenuationLengthVector ->
    272                                     GetProperty(thePhotonMomentum);
     275                                    GetProperty(thePhotonEnergy);
    273276             }
    274277             else{
     
    305308
    306309        // Retrieve vectors for refraction index
    307         // and photon momentum from the material properties table
     310        // and photon energy from the material properties table
    308311
    309312        G4MaterialPropertyVector* Rindex = aMPT->GetProperty("RINDEX");
     
    325328           while (++(*Rindex)) {
    326329
    327                 e = (Rindex->GetPhotonMomentum());
     330                e = (Rindex->GetPhotonEnergy());
    328331
    329332                refraction_index = Rindex->GetProperty();
     
    332335
    333336                if (verboseLevel>0) {
    334                         G4cout << Rindex->GetPhotonMomentum() << " MeV\t";
     337                        G4cout << Rindex->GetPhotonEnergy() << " MeV\t";
    335338                        G4cout << xlambda << " mm\t";
    336339                }
     
    347350                }
    348351                RayleighScatteringLengths->
    349                         InsertValues(Rindex->GetPhotonMomentum(), Dist);
     352                        InsertValues(Rindex->GetPhotonEnergy(), Dist);
    350353           }
    351354
  • trunk/source/processes/optical/src/G4OpWLS.cc

    r819 r963  
    2525//
    2626//
    27 // $Id: G4OpWLS.cc,v 1.9 2007/10/30 03:53:36 gum 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 $
    2929//
    3030////////////////////////////////////////////////////////////////////////
     
    4646
    4747#include "G4ios.hh"
     48#include "G4OpProcessSubType.hh"
     49
    4850#include "G4OpWLS.hh"
    4951#include "G4WLSTimeGeneratorProfileDelta.hh"
     
    6163  : G4VDiscreteProcess(processName, type)
    6264{
     65  SetProcessSubType(fOpWLS);
     66
    6367  theIntegralTable = 0;
    6468 
     
    161165  for (G4int i = 0; i < NumPhotons; i++) {
    162166   
    163     // Determine photon momentum
     167    // Determine photon energy
    164168   
    165169    G4double CIIvalue = G4UniformRand()*CIImax;
    166     G4double sampledMomentum =
     170    G4double sampledEnergy =
    167171      WLSIntegral->GetEnergy(CIIvalue);
    168172   
    169173    if (verboseLevel>1) {
    170       G4cout << "sampledMomentum = " << sampledMomentum << G4endl;
     174      G4cout << "sampledEnergy = " << sampledEnergy << G4endl;
    171175      G4cout << "CIIvalue =        " << CIIvalue << G4endl;
    172176    }
     
    217221       photonPolarization.z());
    218222   
    219     aWLSPhoton->SetKineticEnergy(sampledMomentum);
     223    aWLSPhoton->SetKineticEnergy(sampledEnergy);
    220224   
    221225    // Generate new G4Track object:
     
    230234    G4Track* aSecondaryTrack =
    231235      new G4Track(aWLSPhoton,aSecondaryTime,aSecondaryPosition);
    232    
    233     aSecondaryTrack->SetTouchableHandle((G4VTouchable*)0);
     236   
     237    aSecondaryTrack->SetTouchableHandle(aTrack.GetTouchableHandle());
     238    // aSecondaryTrack->SetTouchableHandle((G4VTouchable*)0);
    234239   
    235240    aSecondaryTrack->SetParentID(aTrack.GetTrackID());
     
    285290         
    286291          // Retrieve the first intensity point in vector
    287           // of (photon momentum, intensity) pairs
     292          // of (photon energy, intensity) pairs
    288293         
    289294          theWLSVector->ResetIterator();
     
    295300          if (currentIN >= 0.0) {
    296301
    297             // Create first (photon momentum)
     302            // Create first (photon energy)
    298303           
    299304            G4double currentPM = theWLSVector->
    300               GetPhotonMomentum();
     305              GetPhotonEnergy();
    301306           
    302307            G4double currentCII = 0.0;
     
    311316            G4double prevIN  = currentIN;
    312317           
    313             // loop over all (photon momentum, intensity)
     318            // loop over all (photon energy, intensity)
    314319            // pairs stored for this material
    315320           
     
    317322              {
    318323                currentPM = theWLSVector->
    319                   GetPhotonMomentum();
     324                  GetPhotonEnergy();
    320325               
    321326                currentIN=theWLSVector->
     
    355360  const G4Material* aMaterial = aTrack.GetMaterial();
    356361
    357   G4double thePhotonMomentum = aParticle->GetTotalMomentum();
     362  G4double thePhotonEnergy = aParticle->GetTotalEnergy();
    358363
    359364  G4MaterialPropertiesTable* aMaterialPropertyTable;
     
    369374    if ( AttenuationLengthVector ){
    370375      AttenuationLength = AttenuationLengthVector->
    371         GetProperty (thePhotonMomentum);
     376        GetProperty (thePhotonEnergy);
    372377    }
    373378    else {
Note: See TracChangeset for help on using the changeset viewer.