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

update processes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/electromagnetic/highenergy/include/G4eeToHadronsMultiModel.hh

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4eeToHadronsMultiModel.hh,v 1.5 2007/05/23 08:50:41 vnivanch Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: G4eeToHadronsMultiModel.hh,v 1.7 2009/02/20 16:38:33 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929// -------------------------------------------------------------------
     
    5959
    6060class G4eeCrossSections;
     61class G4Vee2hadrons;
    6162
    6263class G4eeToHadronsMultiModel : public G4VEmModel
     
    8485                                         G4double maxEnergy = DBL_MAX);
    8586
    86   virtual G4double ComputeCrossSectionPerElectron(
    87                                          const G4ParticleDefinition*,
    88                                          G4double kineticEnergy,
    89                                          G4double cutEnergy = 0.0,
    90                                          G4double maxEnergy = DBL_MAX);
    91 
    9287  virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
    9388                                 const G4MaterialCutsCouple*,
     
    9691                                 G4double maxEnergy = DBL_MAX);
    9792
    98   void PrintInfo();
     93  virtual void PrintInfo();
    9994
    10095  // Set the factor to artificially increase the crossSection (default 1)
    10196  void SetCrossSecFactor(G4double fac);
    10297
     98  inline G4double ComputeCrossSectionPerElectron(
     99                                         const G4ParticleDefinition*,
     100                                         G4double kineticEnergy,
     101                                         G4double cutEnergy = 0.0,
     102                                         G4double maxEnergy = DBL_MAX);
     103
    103104private:
     105
     106  void AddEEModel(G4Vee2hadrons*);
    104107
    105108  // hide assignment operator
     
    128131//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    129132
    130 inline G4double G4eeToHadronsMultiModel::CrossSectionPerVolume(
    131                                       const G4Material* mat,
    132                                       const G4ParticleDefinition* p,
    133                                       G4double kineticEnergy,
    134                                       G4double, G4double)
    135 {
    136   return mat->GetElectronDensity()*
    137     ComputeCrossSectionPerElectron(p, kineticEnergy);
    138 }
    139 
    140 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    141 
    142 inline G4double G4eeToHadronsMultiModel::ComputeCrossSectionPerAtom(
    143                                       const G4ParticleDefinition* p,
    144                                       G4double kineticEnergy,
    145                                       G4double Z, G4double,
    146                                       G4double, G4double)
    147 {
    148   return Z*ComputeCrossSectionPerElectron(p, kineticEnergy);
    149 }
    150 
    151 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    152 
    153133inline G4double G4eeToHadronsMultiModel::ComputeCrossSectionPerElectron(
    154134                                      const G4ParticleDefinition*,
     
    169149//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    170150
    171 inline
    172 void G4eeToHadronsMultiModel::SampleSecondaries(std::vector<G4DynamicParticle*>* newp,
    173                                                 const G4MaterialCutsCouple* couple,
    174                                                 const G4DynamicParticle* dp,
    175                                                 G4double, G4double)
    176 {
    177   G4double kinEnergy = dp->GetKineticEnergy();
    178   if (kinEnergy > thKineticEnergy) {
    179     G4double q = cumSum[nModels-1]*G4UniformRand();
    180     for(G4int i=0; i<nModels; i++) {
    181       if(q <= cumSum[i]) {
    182         (models[i])->SampleSecondaries(newp, couple,dp);
    183         if(newp->size() > 0) fParticleChange->ProposeTrackStatus(fStopAndKill);
    184         break;
    185       }
    186     }
    187   }
    188 }
    189 
    190 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    191 
    192151#endif
Note: See TracChangeset for help on using the changeset viewer.