Ignore:
Timestamp:
Apr 17, 2009, 12:17:14 PM (15 years ago)
Author:
garnier
Message:

update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/electromagnetic/standard/src/G4PAIPhotonModel.cc

    r961 r991  
    2424// ********************************************************************
    2525//
    26 // $Id: G4PAIPhotonModel.cc,v 1.21 2009/02/19 19:17:50 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02-ref-02 $
    28 //
    29 // -------------------------------------------------------------------
    30 //
    31 // GEANT4 Class
    3226// File name:     G4PAIPhotonModel.cc
    3327//
     
    223217//////////////////////////////////////////////////////////////////
    224218
    225 void G4PAIPhotonModel::InitialiseMe(const G4ParticleDefinition*)
    226 {}
    227 
    228 //////////////////////////////////////////////////////////////////
    229 
    230219void G4PAIPhotonModel::ComputeSandiaPhotoAbsCof()
    231220{
     
    498487  {
    499488    //  if ( x1 == x2  ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ;
    500     //    if ( std::abs(x1-x2) <= eV  ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ;
    501     if ( std::abs(x1-x2) <= eV  ) dNdxCut = y1 + (y2 - y1)*0.5 ;
     489    if ( std::abs(x1-x2) <= eV  ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ;
    502490    else             dNdxCut = y1 + (transferCut - x1)*(y2 - y1)/(x2 - x1) ;     
    503491  }
     
    542530  {
    543531    //  if ( x1 == x2  ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ;
    544     //    if ( std::abs(x1-x2) <= eV  ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ;
    545     if ( std::abs(x1-x2) <= eV  ) dNdxCut = y1 + (y2 - y1)*0.5 ;
     532    if ( std::abs(x1-x2) <= eV  ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ;
    546533    else             dNdxCut = y1 + (transferCut - x1)*(y2 - y1)/(x2 - x1) ;     
    547534  }
     
    587574  {
    588575    //  if ( x1 == x2  ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ;
    589     //    if ( std::abs(x1-x2) <= eV  ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ;
    590     if ( std::abs(x1-x2) <= eV  ) dNdxCut = y1 + (y2 - y1)*0.5 ;
     576    if ( std::abs(x1-x2) <= eV  ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ;
    591577    else             dNdxCut = y1 + (transferCut - x1)*(y2 - y1)/(x2 - x1) ;     
    592578  }
     
    631617  {
    632618    //  if ( x1 == x2  ) dEdxCut = y1 + (y2 - y1)*G4UniformRand() ;
    633     //    if ( std::abs(x1-x2) <= eV  ) dEdxCut = y1 + (y2 - y1)*G4UniformRand() ;
    634     if ( std::abs(x1-x2) <= eV  ) dEdxCut = y1 + (y2 - y1)*0.5 ;
     619    if ( std::abs(x1-x2) <= eV  ) dEdxCut = y1 + (y2 - y1)*G4UniformRand() ;
    635620    else             dEdxCut = y1 + (transferCut - x1)*(y2 - y1)/(x2 - x1) ;     
    636621  }
     
    641626//////////////////////////////////////////////////////////////////////////////
    642627
    643 G4double G4PAIPhotonModel::ComputeDEDXPerVolume(const G4Material*,
    644                                                 const G4ParticleDefinition* p,
    645                                                 G4double kineticEnergy,
    646                                                 G4double cutEnergy)
     628G4double G4PAIPhotonModel::ComputeDEDX(const G4MaterialCutsCouple* matCC,
     629                                 const G4ParticleDefinition* p,
     630                                       G4double kineticEnergy,
     631                                       G4double cutEnergy)
    647632{
    648633  G4int iTkin,iPlace;
    649634  size_t jMat;
    650 
    651   //G4double cut = std::min(MaxSecondaryEnergy(p, kineticEnergy), cutEnergy);
    652   G4double cut = cutEnergy;
    653 
    654635  G4double particleMass = p->GetPDGMass();
    655636  G4double scaledTkin   = kineticEnergy*proton_mass_c2/particleMass;
     
    657638  G4double charge2      = charge*charge;
    658639  G4double dEdx         = 0.;
    659   const G4MaterialCutsCouple* matCC = CurrentCouple();
    660640
    661641  for( jMat = 0 ;jMat < fMaterialCutsCoupleVector.size() ; ++jMat )
     
    673653  iPlace = iTkin - 1;
    674654  if(iPlace < 0) iPlace = 0;
    675   dEdx = charge2*( (*fdEdxVector)(iPlace) - GetdEdxCut(iPlace,cut) ) ; 
     655  dEdx = charge2*( (*fdEdxVector)(iPlace) - GetdEdxCut(iPlace,cutEnergy) ) ; 
    676656
    677657  if( dEdx < 0.) dEdx = 0.;
     
    681661/////////////////////////////////////////////////////////////////////////
    682662
    683 G4double G4PAIPhotonModel::CrossSectionPerVolume( const G4Material*,
    684                                                   const G4ParticleDefinition* p,
    685                                                   G4double kineticEnergy,
    686                                                   G4double cutEnergy,
    687                                                   G4double maxEnergy  )
     663G4double G4PAIPhotonModel::CrossSection( const G4MaterialCutsCouple* matCC,
     664                                   const G4ParticleDefinition* p,
     665                                         G4double kineticEnergy,
     666                                         G4double cutEnergy,
     667                                         G4double maxEnergy  )
    688668{
    689669  G4int iTkin,iPlace;
    690670  size_t jMat, jMatCC;
    691   G4double tmax = std::min(MaxSecondaryEnergy(p, kineticEnergy), maxEnergy);
    692   if(cutEnergy >= tmax) return 0.0;
     671  G4double tmax = min(MaxSecondaryEnergy(p, kineticEnergy), maxEnergy);
    693672  G4double particleMass = p->GetPDGMass();
    694673  G4double scaledTkin   = kineticEnergy*proton_mass_c2/particleMass;
     
    696675  G4double charge2      = charge*charge, cross, cross1, cross2;
    697676  G4double photon1, photon2, plasmon1, plasmon2;
    698 
    699   const G4MaterialCutsCouple* matCC = CurrentCouple();
    700677
    701678  const G4ProductionCutsTable* theCoupleTable=
     
    12481225}
    12491226
    1250 /////////////////////////////////////////////////////////////////////
    1251 
    1252 G4double G4PAIPhotonModel::MaxSecondaryEnergy( const G4ParticleDefinition* p,
    1253                                                       G4double kinEnergy)
    1254 {
    1255   G4double tmax = kinEnergy;
    1256   if(p == fElectron) tmax *= 0.5;
    1257   else if(p != fPositron) {
    1258     G4double mass = p->GetPDGMass();
    1259     G4double ratio= electron_mass_c2/mass;
    1260     G4double gamma= kinEnergy/mass + 1.0;
    1261     tmax = 2.0*electron_mass_c2*(gamma*gamma - 1.) /
    1262                   (1. + 2.0*gamma*ratio + ratio*ratio);
    1263   }
    1264   return tmax;
    1265 }
    1266 
    1267 ///////////////////////////////////////////////////////////////
    1268 
    1269 void G4PAIPhotonModel::DefineForRegion(const G4Region* r)
    1270 {
    1271   fPAIRegionVector.push_back(r);
    1272 }
    1273 
    12741227
    12751228//
Note: See TracChangeset for help on using the changeset viewer.