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

update processes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/electromagnetic/highenergy/src/G4eeToHadronsMultiModel.cc

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4eeToHadronsMultiModel.cc,v 1.4 2007/05/23 08:50:41 vnivanch Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: G4eeToHadronsMultiModel.cc,v 1.6 2008/07/11 17:49:11 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929// -------------------------------------------------------------------
     
    3434// File name:     G4eeToHadronsMultiModel
    3535//
    36 // Author:        Vladimir Ivanchenko on base of Michel Maire code
     36// Author:        Vladimir Ivanchenko
    3737//
    3838// Creation date: 02.08.2004
     
    5151#include "G4eeToHadronsMultiModel.hh"
    5252#include "G4eeToTwoPiModel.hh"
     53#include "G4eeTo3PiModel.hh"
     54#include "G4eeToPGammaModel.hh"
     55#include "G4ee2KNeutralModel.hh"
     56#include "G4ee2KChargedModel.hh"
    5357#include "G4eeCrossSections.hh"
     58#include "G4Vee2hadrons.hh"
    5459
    5560//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
     
    8085//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    8186
    82 void G4eeToHadronsMultiModel::Initialise(const G4ParticleDefinition* p, const G4DataVector& v)
     87void G4eeToHadronsMultiModel::Initialise(const G4ParticleDefinition*,
     88                                         const G4DataVector&)
    8389{
    8490  if(!isInitialised) {
    8591    isInitialised = true;
    8692
    87     thKineticEnergy = DBL_MAX;
    88     maxKineticEnergy = HighEnergyLimit();
     93    thKineticEnergy  = DBL_MAX;
     94    maxKineticEnergy = 1.2*GeV;
    8995
    9096    cross = new G4eeCrossSections();
    91     G4eeToHadronsModel* model =
    92       new G4eeToHadronsModel(new G4eeToTwoPiModel(cross), verbose);
    93     models.push_back(model);
    94     model->SetHighEnergyLimit(maxKineticEnergy);
    95     model->Initialise(p, v);
    96     G4double emin = model->LowEnergyLimit();
    97     if(emin < thKineticEnergy) thKineticEnergy = emin;
    98     ekinMin.push_back(emin);
    99     ekinMax.push_back(model->HighEnergyLimit());
    100     ekinPeak.push_back(model->PeakEnergy());
    101     cumSum.push_back(0.0);
    102     nModels = 1;
    103 
    104     if(pParticleChange)
     97
     98    G4eeToTwoPiModel* m2pi = new G4eeToTwoPiModel(cross);
     99    m2pi->SetHighEnergy(maxKineticEnergy);
     100    AddEEModel(m2pi);
     101
     102    G4eeTo3PiModel* m3pi1 = new G4eeTo3PiModel(cross);
     103    m3pi1->SetHighEnergy(0.95*GeV);
     104    AddEEModel(m3pi1);
     105
     106    G4eeTo3PiModel* m3pi2 = new G4eeTo3PiModel(cross);
     107    m3pi2->SetLowEnergy(0.95*GeV);
     108    m3pi2->SetHighEnergy(maxKineticEnergy);
     109    AddEEModel(m3pi2);
     110
     111    G4ee2KChargedModel* m2kc = new G4ee2KChargedModel(cross);
     112    m2kc->SetHighEnergy(maxKineticEnergy);
     113    AddEEModel(m2kc);
     114
     115    G4ee2KNeutralModel* m2kn = new G4ee2KNeutralModel(cross);
     116    m2kn->SetHighEnergy(maxKineticEnergy);
     117    AddEEModel(m2kn);
     118
     119    G4eeToPGammaModel* mpg1 = new G4eeToPGammaModel(cross,"pi0");
     120    mpg1->SetLowEnergy(0.7*GeV);
     121    mpg1->SetHighEnergy(maxKineticEnergy);
     122    AddEEModel(mpg1);
     123
     124    G4eeToPGammaModel* mpg2 = new G4eeToPGammaModel(cross,"eta");
     125    mpg2->SetLowEnergy(0.7*GeV);
     126    mpg2->SetHighEnergy(maxKineticEnergy);
     127    AddEEModel(mpg2);
     128
     129    nModels = models.size();
     130
     131    if(pParticleChange) {
    105132      fParticleChange =
    106133        reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange);
    107     else
     134    } else {
    108135      fParticleChange = new G4ParticleChangeForGamma();
     136    }
     137  }
     138}
     139
     140//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
     141
     142void G4eeToHadronsMultiModel::AddEEModel(G4Vee2hadrons* mod)
     143{
     144  G4eeToHadronsModel* model = new G4eeToHadronsModel(mod, verbose);
     145  model->SetLowEnergyLimit(LowEnergyLimit());
     146  model->SetHighEnergyLimit(HighEnergyLimit());
     147  models.push_back(model);
     148  G4double elow = mod->ThresholdEnergy();
     149  ekinMin.push_back(elow);
     150  if(thKineticEnergy > elow) thKineticEnergy = elow;
     151  ekinMax.push_back(mod->HighEnergy());
     152  ekinPeak.push_back(mod->PeakEnergy());
     153  cumSum.push_back(0.0);
     154}
     155
     156//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
     157
     158G4double G4eeToHadronsMultiModel::CrossSectionPerVolume(
     159                                      const G4Material* mat,
     160                                      const G4ParticleDefinition* p,
     161                                      G4double kineticEnergy,
     162                                      G4double, G4double)
     163{
     164  return mat->GetElectronDensity()*
     165    ComputeCrossSectionPerElectron(p, kineticEnergy);
     166}
     167
     168//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
     169
     170G4double G4eeToHadronsMultiModel::ComputeCrossSectionPerAtom(
     171                                      const G4ParticleDefinition* p,
     172                                      G4double kineticEnergy,
     173                                      G4double Z, G4double,
     174                                      G4double, G4double)
     175{
     176  return Z*ComputeCrossSectionPerElectron(p, kineticEnergy);
     177}
     178
     179
     180//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
     181
     182void G4eeToHadronsMultiModel::SampleSecondaries(std::vector<G4DynamicParticle*>* newp,
     183                                                const G4MaterialCutsCouple* couple,
     184                                                const G4DynamicParticle* dp,
     185                                                G4double, G4double)
     186{
     187  G4double kinEnergy = dp->GetKineticEnergy();
     188  if (kinEnergy > thKineticEnergy) {
     189    G4double q = cumSum[nModels-1]*G4UniformRand();
     190    for(G4int i=0; i<nModels; i++) {
     191      if(q <= cumSum[i]) {
     192        (models[i])->SampleSecondaries(newp, couple,dp);
     193        if(newp->size() > 0) fParticleChange->ProposeTrackStatus(fStopAndKill);
     194        break;
     195      }
     196    }
    109197  }
    110198}
     
    115203{
    116204  if(verbose > 0) {
    117     G4cout << "      e+ annihilation into hadrons active above "
    118            << thKineticEnergy/GeV << " GeV"
     205    G4double e1 = 0.5*thKineticEnergy*thKineticEnergy/electron_mass_c2
     206      - 2.0*electron_mass_c2;
     207    G4double e2 = 0.5*maxKineticEnergy*maxKineticEnergy/electron_mass_c2
     208      - 2.0*electron_mass_c2;
     209    G4cout << "      e+ annihilation into hadrons active from "
     210           << e1/GeV << " GeV to " << e2/GeV << " GeV"
    119211           << G4endl;
    120212  }
     
    128220    csFactor = fac;
    129221    if(verbose > 0)
    130       G4cout << "### G4eeToHadronsMultiModel: The cross section for G4eeToHadronsMultiModel is  "
    131              << "increased by the Factor= " << csFactor << G4endl;
    132   }
    133 }
    134 
    135 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
     222      G4cout << "### G4eeToHadronsMultiModel: The cross section for G4eeToHadronsMultiModel "
     223             << " is increased by the Factor= " << csFactor << G4endl;
     224  }
     225}
     226
     227//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Note: See TracChangeset for help on using the changeset viewer.