Changeset 1196 for trunk/source/processes/electromagnetic/muons
- Timestamp:
- Nov 25, 2009, 5:13:58 PM (15 years ago)
- Location:
- trunk/source/processes/electromagnetic/muons
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/electromagnetic/muons/History
r1055 r1196 1 $Id: History,v 1.1 27 2009/04/12 17:19:01 vnivanch Exp $1 $Id: History,v 1.134 2009/11/09 19:18:01 vnivanch Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 18 18 ---------------------------------------------------------- 19 19 20 09 November 09: V.Ivant (emmuons-V09-02-08) 21 - G4MuBetheBlochModel - compute density effect correction using method of 22 G4IonisParamMat class applying revised parameterisation 23 24 30 October 09: V.Ivant (emmuons-V09-02-07) 25 G4MuMultipleScattering - use G4UrbanMscModel90 by default 26 27 11 August 09: V.Ivant (emmuons-V09-02-06) 28 G4MuPairProductionModel - restore the head 29 30 24 July 09: V.Ivant (emmuons-V09-02-05) 31 G4MuMultipleScattering - removed obosolete members and methods (they 32 are in the base class) 33 34 09 July 09: V.Ivant (emmuons-V09-02-04) 35 G4EnergyLossForExtrapolator - removed hidden bin to use full scale of 36 of PhysicsVector; linLossLimit = 0.01 37 38 02 June 09: V.Ivant (emmuons-V09-02-03) 39 G4MuPairProductionModel - added protection for the case when 40 maxPairEnergy<minPairEnergy (empty interval for energy transfer 41 observed for rare case happens with kaons) 42 20 43 12 April 09: V.Ivant (emmuons-V09-02-02) 21 44 G4MuBetheBlochModel, G4MuBremsstrahlungModel, G4MuPairProductionModel … … 28 51 20 February 09: V.Ivant (emmuons-V09-02-00) 29 52 - Cleanup: improved comments, move virtual methods from .hh to .cc 53 54 11 August 09: V.Ivant (emmuons-V09-01-15a) 55 G4MuPairProductionModel - added protection against numerical problem 56 due to negative value of transfered energy 30 57 31 58 12 November 08: V.Ivant (emmuons-V09-01-15) -
trunk/source/processes/electromagnetic/muons/include/G4EnergyLossForExtrapolator.hh
r1007 r1196 25 25 // 26 26 // $Id: G4EnergyLossForExtrapolator.hh,v 1.12 2008/11/13 14:14:07 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-0 2$27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //--------------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/muons/include/G4MuBetheBlochModel.hh
r1055 r1196 25 25 // 26 26 // $Id: G4MuBetheBlochModel.hh,v 1.18 2009/02/20 14:48:16 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03- beta-cand-01 $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/muons/include/G4MuBremsstrahlung.hh
r1055 r1196 25 25 // 26 26 // $Id: G4MuBremsstrahlung.hh,v 1.31 2009/02/20 14:48:16 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03- beta-cand-01 $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/muons/include/G4MuBremsstrahlungModel.hh
r1055 r1196 25 25 // 26 26 // $Id: G4MuBremsstrahlungModel.hh,v 1.22 2009/02/20 14:48:16 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03- beta-cand-01 $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/muons/include/G4MuIonisation.hh
r1055 r1196 25 25 // 26 26 // $Id: G4MuIonisation.hh,v 1.31 2009/02/20 14:48:16 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03- beta-cand-01 $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/muons/include/G4MuMultipleScattering.hh
r1007 r1196 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MuMultipleScattering.hh,v 1. 2 2008/04/13 17:19:13vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4MuMultipleScattering.hh,v 1.4 2009/10/30 18:37:06 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 // ----------------------------------------------------------------------------- … … 60 60 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 61 61 62 class G4VMscModel;63 64 62 class G4MuMultipleScattering : public G4VMultipleScattering 65 66 63 { 67 64 public: // with description 68 65 69 G4MuMultipleScattering(G4double tet = 0.2, 70 const G4String& processName="muMsc"); 66 G4MuMultipleScattering(const G4String& processName="muMsc"); 71 67 72 68 virtual ~G4MuMultipleScattering(); … … 78 74 void PrintInfo(); 79 75 80 // geom. step length distribution should be sampled or not81 void Setsamplez(G4bool value) { samplez = value;};82 83 // to reduce the energy/step dependence84 void Setdtrl(G4double value) { dtrl = value;};85 86 // 'soften' step limitation above lambdalimit87 void SetLimitTheta(G4double value) { thetaLimit = value;};88 89 76 protected: 90 77 … … 94 81 private: // data members 95 82 96 G4VMscModel* mscModel; 83 // hide assignment operator 84 G4MuMultipleScattering & operator=(const G4MuMultipleScattering &right); 85 G4MuMultipleScattering(const G4MuMultipleScattering&); 97 86 98 G4double thetaLimit;99 G4double dtrl;100 101 G4bool samplez;102 87 G4bool isInitialized; 103 88 -
trunk/source/processes/electromagnetic/muons/include/G4MuPairProduction.hh
r1055 r1196 25 25 // 26 26 // $Id: G4MuPairProduction.hh,v 1.31 2009/02/20 14:48:16 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03- beta-cand-01 $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/muons/include/G4MuPairProductionModel.hh
r1055 r1196 25 25 // 26 26 // $Id: G4MuPairProductionModel.hh,v 1.28 2009/02/20 14:48:16 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03- beta-cand-01 $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/muons/src/G4EnergyLossForExtrapolator.cc
r1007 r1196 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4EnergyLossForExtrapolator.cc,v 1.1 8 2008/11/13 14:14:07vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4EnergyLossForExtrapolator.cc,v 1.19 2009/07/09 17:04:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //--------------------------------------------------------------------------- … … 230 230 currentParticleName = ""; 231 231 232 linLossLimit = 0.0 01;232 linLossLimit = 0.01; 233 233 emin = 1.*MeV; 234 234 emax = 10.*TeV; … … 406 406 G4PhysicsVector* aVector = (*table)[i]; 407 407 408 for(G4int j=0; j< nbins; j++) {408 for(G4int j=0; j<=nbins; j++) { 409 409 410 G4double e = aVector-> GetLowEdgeEnergy(j);410 G4double e = aVector->Energy(j); 411 411 G4double dedx = ioni->ComputeDEDX(couple,part,e,e) + brem->ComputeDEDX(couple,part,e,e); 412 412 if(1<verbose) { … … 454 454 const G4MaterialCutsCouple* couple = couples[i]; 455 455 G4PhysicsVector* aVector = (*table)[i]; 456 for(G4int j=0; j< nbins; j++) {456 for(G4int j=0; j<=nbins; j++) { 457 457 458 G4double e = aVector-> GetLowEdgeEnergy(j);458 G4double e = aVector->Energy(j); 459 459 G4double dedx = ioni->ComputeDEDX(couple,part,e,e) + 460 460 pair->ComputeDEDX(couple,part,e,e) + … … 499 499 const G4MaterialCutsCouple* couple = couples[i]; 500 500 G4PhysicsVector* aVector = (*table)[i]; 501 for(G4int j=0; j< nbins; j++) {501 for(G4int j=0; j<=nbins; j++) { 502 502 503 G4double e = aVector-> GetLowEdgeEnergy(j);503 G4double e = aVector->Energy(j); 504 504 G4double dedx = ioni->ComputeDEDX(couple,part,e,e); 505 505 aVector->PutValue(j,dedx); … … 542 542 G4cout << "i= " << i << " mat= " << mat->GetName() << G4endl; 543 543 G4PhysicsVector* aVector = (*table)[i]; 544 for(G4int j=0; j< nbins; j++) {544 for(G4int j=0; j<=nbins; j++) { 545 545 546 G4double e = aVector-> GetLowEdgeEnergy(j);546 G4double e = aVector->Energy(j); 547 547 G4double xs = msc->CrossSectionPerVolume(mat,part,e); 548 548 aVector->PutValue(j,xs); -
trunk/source/processes/electromagnetic/muons/src/G4MuBetheBlochModel.cc
r1055 r1196 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MuBetheBlochModel.cc,v 1.2 6 2009/04/12 17:19:01 vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-03- beta-cand-01 $26 // $Id: G4MuBetheBlochModel.cc,v 1.27 2009/11/09 19:18:01 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 220 220 G4double eexc = material->GetIonisation()->GetMeanExcitationEnergy(); 221 221 G4double eexc2 = eexc*eexc; 222 G4double cden = material->GetIonisation()->GetCdensity();223 G4double mden = material->GetIonisation()->GetMdensity();224 G4double aden = material->GetIonisation()->GetAdensity();225 G4double x0den = material->GetIonisation()->GetX0density();226 G4double x1den = material->GetIonisation()->GetX1density();222 //G4double cden = material->GetIonisation()->GetCdensity(); 223 //G4double mden = material->GetIonisation()->GetMdensity(); 224 //G4double aden = material->GetIonisation()->GetAdensity(); 225 //G4double x0den = material->GetIonisation()->GetX0density(); 226 //G4double x1den = material->GetIonisation()->GetX1density(); 227 227 228 228 G4double eDensity = material->GetElectronDensity(); … … 237 237 // density correction 238 238 G4double x = log(bg2)/twoln10; 239 if ( x >= x0den ) { 240 dedx -= twoln10*x - cden ; 241 if ( x < x1den ) dedx -= aden*pow((x1den-x),mden) ; 242 } 239 //if ( x >= x0den ) { 240 // dedx -= twoln10*x - cden ; 241 // if ( x < x1den ) dedx -= aden*pow((x1den-x),mden) ; 242 //} 243 dedx -= material->GetIonisation()->DensityCorrection(x); 243 244 244 245 // shell correction -
trunk/source/processes/electromagnetic/muons/src/G4MuBremsstrahlung.cc
r1055 r1196 25 25 // 26 26 // $Id: G4MuBremsstrahlung.cc,v 1.42 2009/02/20 14:48:16 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03- beta-cand-01 $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/muons/src/G4MuBremsstrahlungModel.cc
r1055 r1196 25 25 // 26 26 // $Id: G4MuBremsstrahlungModel.cc,v 1.35 2009/04/12 17:48:45 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03- beta-cand-01 $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/muons/src/G4MuIonisation.cc
r1055 r1196 25 25 // 26 26 // $Id: G4MuIonisation.cc,v 1.59 2009/02/26 11:04:20 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03- beta-cand-01 $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/muons/src/G4MuMultipleScattering.cc
r1007 r1196 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MuMultipleScattering.cc,v 1.1 2 2008/10/16 13:37:04vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4MuMultipleScattering.cc,v 1.14 2009/10/30 18:37:06 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 // ----------------------------------------------------------------------------- … … 48 48 #include "G4MuMultipleScattering.hh" 49 49 #include "G4WentzelVIModel.hh" 50 #include "G4UrbanMscModel90.hh" 50 51 #include "G4MscStepLimitType.hh" 51 52 … … 54 55 using namespace std; 55 56 56 G4MuMultipleScattering::G4MuMultipleScattering(G4double tet, 57 const G4String& processName) 58 : G4VMultipleScattering(processName), thetaLimit(tet) 57 G4MuMultipleScattering::G4MuMultipleScattering(const G4String& pnam) 58 : G4VMultipleScattering(pnam) 59 59 { 60 dtrl = 0.05; 61 samplez = false ; 62 isInitialized = false; 63 SetRangeFactor(0.2); 64 SetLateralDisplasmentFlag(true); 60 isInitialized = false; 61 SetStepLimitType(fMinimal); 62 //SetPolarAngleLimit(CLHEP::twopi); 63 //SetRangeFactor(0.2); 65 64 } 66 65 … … 79 78 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 80 79 81 void G4MuMultipleScattering::InitialiseProcess(const G4ParticleDefinition* p)80 void G4MuMultipleScattering::InitialiseProcess(const G4ParticleDefinition*) 82 81 { 83 82 // Modification of parameters between runs 84 if(isInitialized) { 85 86 if (p->GetParticleType() != "nucleus" && p->GetPDGMass() < GeV) { 87 mscModel->SetStepLimitType(StepLimitType()); 88 mscModel->SetLateralDisplasmentFlag(LateralDisplasmentFlag()); 89 mscModel->SetRangeFactor(RangeFactor()); 90 } 91 mscModel->SetPolarAngleLimit(PolarAngleLimit()); 92 return; 93 } 94 95 if (p->GetParticleType() == "nucleus" || p->GetPDGMass() > GeV) { 96 SetLateralDisplasmentFlag(false); 97 SetBuildLambdaTable(false); 98 } 99 100 // initialisation of the model 101 102 mscModel = new G4WentzelVIModel(); 103 mscModel->SetStepLimitType(StepLimitType()); 104 mscModel->SetLateralDisplasmentFlag(LateralDisplasmentFlag()); 105 mscModel->SetRangeFactor(RangeFactor()); 106 mscModel->SetPolarAngleLimit(PolarAngleLimit()); 107 mscModel->SetLowEnergyLimit(MinKinEnergy()); 108 mscModel->SetHighEnergyLimit(MaxKinEnergy()); 109 110 AddEmModel(1,mscModel); 83 if(isInitialized) return; 84 AddEmModel(1, new G4UrbanMscModel90()); 85 // AddEmModel(1, new G4WentzelVIModel()); 111 86 isInitialized = true; 112 87 } … … 119 94 << ", step limit type: " << StepLimitType() 120 95 << ", lateralDisplacement: " << LateralDisplasmentFlag() 96 << ", polarAngleLimit(deg)= " << PolarAngleLimit()/degree 121 97 << G4endl; 122 98 } -
trunk/source/processes/electromagnetic/muons/src/G4MuPairProduction.cc
r1055 r1196 25 25 // 26 26 // $Id: G4MuPairProduction.cc,v 1.52 2009/02/20 14:48:16 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03- beta-cand-01 $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/muons/src/G4MuPairProductionModel.cc
r1055 r1196 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MuPairProductionModel.cc,v 1.4 1 2009/04/12 17:19:01vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-03- beta-cand-01 $26 // $Id: G4MuPairProductionModel.cc,v 1.44 2009/08/11 16:50:07 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 389 389 390 390 SetCurrentElement(Z); 391 G4double tmax = std::min(maxEnergy, kineticEnergy); 392 G4double cut = std::min(cutEnergy, kineticEnergy); 393 if(cut < minPairEnergy) cut = minPairEnergy; 391 392 G4double maxPairEnergy = MaxSecondaryEnergy(particle,kineticEnergy); 393 G4double tmax = std::min(maxEnergy, maxPairEnergy); 394 G4double cut = std::max(cutEnergy, minPairEnergy); 394 395 if (cut >= tmax) return cross; 395 396 … … 457 458 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 458 459 459 void G4MuPairProductionModel::SampleSecondaries(std::vector<G4DynamicParticle*>* vdp, 460 const G4MaterialCutsCouple* couple, 461 const G4DynamicParticle* aDynamicParticle, 462 G4double tmin, 463 G4double tmax) 460 void 461 G4MuPairProductionModel::SampleSecondaries(std::vector<G4DynamicParticle*>* vdp, 462 const G4MaterialCutsCouple* couple, 463 const G4DynamicParticle* aDynamicParticle, 464 G4double tmin, 465 G4double tmax) 464 466 { 465 467 G4double kineticEnergy = aDynamicParticle->GetKineticEnergy(); … … 611 613 612 614 G4double sum = 0.0; 615 G4double dl; 613 616 614 617 size_t i; … … 618 621 G4double maxPairEnergy = MaxSecondaryEnergy(particle,kinEnergy); 619 622 G4double minEnergy = std::max(tmin, minPairEnergy); 620 621 G4int iz; 622 for(iz=1; iz<nzdat; iz++) {if(Z <= zdat[iz]) break;} 623 if(iz == nzdat) iz--; 624 G4double dz = log(Z/zdat[iz-1])/log(zdat[iz]/zdat[iz-1]); 625 626 G4double sigcut; 627 if(minEnergy <= minPairEnergy) 628 sigcut = 0.; 629 else 630 { 631 G4double xc = log(minEnergy/minPairEnergy)/log(maxPairEnergy/minPairEnergy); 632 G4int iy = (G4int)((log(xc) - ymin)/dy); 633 if(iy < 0) iy = 0; 634 if(iy >= nbiny) iy = nbiny-1; 635 sigcut = InterpolatedIntegralCrossSection(dt,dz,iz,it,iy, Z); 623 dl = 0.0; 624 if(minEnergy < maxPairEnergy) { 625 626 G4int iz; 627 for(iz=1; iz<nzdat; iz++) {if(Z <= zdat[iz]) break;} 628 if(iz == nzdat) iz--; 629 G4double dz = log(Z/zdat[iz-1])/log(zdat[iz]/zdat[iz-1]); 630 631 G4double sigcut; 632 if(minEnergy <= minPairEnergy) 633 sigcut = 0.; 634 else 635 { 636 G4double xc = log(minEnergy/minPairEnergy)/log(maxPairEnergy/minPairEnergy); 637 G4int iy = (G4int)((log(xc) - ymin)/dy); 638 if(iy < 0) iy = 0; 639 if(iy >= nbiny) iy = nbiny-1; 640 sigcut = InterpolatedIntegralCrossSection(dt,dz,iz,it,iy, Z); 641 } 642 643 G4double sigtot = InterpolatedIntegralCrossSection(dt,dz,iz,it,nbiny,Z); 644 dl = (sigtot - sigcut)*theAtomNumDensityVector[i]; 636 645 } 637 638 G4double sigtot = InterpolatedIntegralCrossSection(dt,dz,iz,it,nbiny,Z);639 G4double dl = (sigtot - sigcut)*theAtomNumDensityVector[i];640 641 646 // protection 642 647 if(dl < 0.0) dl = 0.0;
Note: See TracChangeset
for help on using the changeset viewer.