G4eeToHadronsMultiModel.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 // $Id: G4eeToHadronsMultiModel.hh 66996 2013-01-29 14:50:52Z gcosmo $
00027 //
00028 // -------------------------------------------------------------------
00029 //
00030 // GEANT4 Class header file
00031 //
00032 //
00033 // File name:     G4eeToHadronsMultiModel
00034 //
00035 // Author:        Vladimir Ivanchenko
00036 //
00037 // Creation date: 18.05.2005
00038 //
00039 // Modifications:
00040 //
00041 
00042 //
00043 // Class Description: vector of e+e- -> hadrons models
00044 //
00045 
00046 // -------------------------------------------------------------------
00047 //
00048 
00049 #ifndef G4eeToHadronsMultiModel_h
00050 #define G4eeToHadronsMultiModel_h 1
00051 
00052 #include "G4VEmModel.hh"
00053 #include "G4eeToHadronsModel.hh"
00054 #include "G4ParticleChangeForGamma.hh"
00055 #include "G4TrackStatus.hh"
00056 #include "Randomize.hh"
00057 #include <vector>
00058 
00059 class G4eeCrossSections;
00060 class G4Vee2hadrons;
00061 
00062 class G4eeToHadronsMultiModel : public G4VEmModel
00063 {
00064 
00065 public:
00066 
00067   G4eeToHadronsMultiModel(G4int ver=0, const G4String& nam = "eeToHadrons");
00068 
00069   virtual ~G4eeToHadronsMultiModel();
00070 
00071   virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
00072 
00073   virtual G4double CrossSectionPerVolume(const G4Material*,
00074                                          const G4ParticleDefinition*,
00075                                          G4double kineticEnergy,
00076                                          G4double cutEnergy,
00077                                          G4double maxEnergy);
00078 
00079   virtual G4double ComputeCrossSectionPerAtom(
00080                                          const G4ParticleDefinition*,
00081                                          G4double kineticEnergy,
00082                                          G4double Z, G4double A,
00083                                          G4double cutEnergy = 0.0,
00084                                          G4double maxEnergy = DBL_MAX);
00085 
00086   virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
00087                                  const G4MaterialCutsCouple*,
00088                                  const G4DynamicParticle*,
00089                                  G4double tmin = 0.0,
00090                                  G4double maxEnergy = DBL_MAX);
00091 
00092   virtual void PrintInfo();
00093 
00094   // Set the factor to artificially increase the crossSection (default 1)
00095   void SetCrossSecFactor(G4double fac);
00096 
00097   inline G4double ComputeCrossSectionPerElectron(
00098                                          const G4ParticleDefinition*,
00099                                          G4double kineticEnergy,
00100                                          G4double cutEnergy = 0.0,
00101                                          G4double maxEnergy = DBL_MAX);
00102 
00103 private:
00104 
00105   void AddEEModel(G4Vee2hadrons*);
00106 
00107   // hide assignment operator
00108   G4eeToHadronsMultiModel & operator=(const  G4eeToHadronsMultiModel &right);
00109   G4eeToHadronsMultiModel(const  G4eeToHadronsMultiModel&);
00110 
00111   G4eeCrossSections*               cross;
00112   G4ParticleChangeForGamma*        fParticleChange;
00113 
00114   std::vector<G4eeToHadronsModel*> models;
00115 
00116   std::vector<G4double>            ekinMin;
00117   std::vector<G4double>            ekinPeak;
00118   std::vector<G4double>            ekinMax;
00119   std::vector<G4double>            cumSum;
00120 
00121   G4double                         thKineticEnergy;
00122   G4double                         maxKineticEnergy;
00123   G4double                         csFactor;
00124 
00125   G4int                            nModels;
00126   G4int                            verbose;
00127   G4bool                           isInitialised;
00128 };
00129 
00130 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00131 
00132 inline G4double G4eeToHadronsMultiModel::ComputeCrossSectionPerElectron(
00133                                       const G4ParticleDefinition*,
00134                                       G4double kineticEnergy,
00135                                       G4double, G4double)
00136 {
00137   G4double res = 0.0;
00138   if (kineticEnergy > thKineticEnergy) {
00139     for(G4int i=0; i<nModels; i++) {
00140       if(kineticEnergy >= ekinMin[i] && kineticEnergy <= ekinMax[i])
00141         res += (models[i])->ComputeCrossSectionPerElectron(0,kineticEnergy);
00142       cumSum[i] = res;
00143     }
00144   }
00145   return res*csFactor;
00146 }
00147 
00148 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00149 
00150 #endif

Generated on Mon May 27 17:48:06 2013 for Geant4 by  doxygen 1.4.7