G4XMesonBaryonElastic.cc

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 //
00027 
00028 #include "globals.hh"
00029 #include "G4ios.hh"
00030 #include "G4XMesonBaryonElastic.hh"
00031 #include "G4KineticTrack.hh"
00032 #include "G4Gamma.hh"
00033 #include "G4PionPlus.hh"
00034 #include "G4Proton.hh"
00035 #include "G4XAqmElastic.hh"
00036 #include "G4XPDGElastic.hh"
00037 
00038 G4XMesonBaryonElastic::G4XMesonBaryonElastic()
00039 { 
00040   // As a first approximation the model is assumed to be valid over 
00041   // the entire energy range
00042   lowLimit = 0.;
00043   highLimit = DBL_MAX;
00044 }
00045 
00046 
00047 G4XMesonBaryonElastic::~G4XMesonBaryonElastic()
00048 { }
00049 
00050 
00051 G4bool G4XMesonBaryonElastic::operator==(const G4XMesonBaryonElastic &right) const
00052 {
00053   return (this == (G4XMesonBaryonElastic *) &right);
00054 }
00055 
00056 
00057 G4bool G4XMesonBaryonElastic::operator!=(const G4XMesonBaryonElastic &right) const
00058 {
00059   return (this != (G4XMesonBaryonElastic *) &right);
00060 }
00061 
00062 
00063 G4double G4XMesonBaryonElastic::CrossSection(const G4KineticTrack& trk1, const G4KineticTrack& trk2) const
00064 {
00065   G4double sigma;
00066 
00067   // No gamma-baryon elastic scattering 
00068   const G4ParticleDefinition* defLight = FindLightParticle(trk1,trk2);
00069   if (defLight == G4Gamma::GammaDefinition())
00070     {
00071       sigma = 0;
00072     }
00073   else
00074     {
00075 
00076       G4LorentzVector p41 = trk1.Get4Momentum();
00077       G4ThreeVector p3 = trk1.GetPosition();
00078       G4ParticleDefinition* def = G4PionPlus::PionPlusDefinition();
00079 
00080       G4KineticTrack piTrk(def,
00081                            trk1.GetFormationTime(),
00082                            p3,
00083                            (G4LorentzVector&)p41);
00084 
00085       G4LorentzVector p42 = trk2.Get4Momentum();    
00086       G4KineticTrack pTrk(((G4ParticleDefinition*)G4Proton::ProtonDefinition()),
00087                           trk2.GetFormationTime(),
00088                           (G4ThreeVector)trk2.GetPosition(),
00089                           (G4LorentzVector&)p42);
00090       
00091       G4XAqmElastic aqm;
00092       G4double xAqmDummy = aqm.CrossSection(piTrk,pTrk);
00093       G4double xAqm = aqm.CrossSection(trk1,trk2);
00094       G4double factor = 1.;
00095       if (xAqmDummy != 0.0)
00096         {
00097           factor = xAqm / xAqmDummy;
00098         }
00099       G4XPDGElastic pdg;
00100       
00101       sigma = pdg.CrossSection(piTrk,pTrk);
00102       sigma = sigma * factor;
00103     }
00104   
00105   return sigma;
00106 }
00107 
00108 
00109 G4String G4XMesonBaryonElastic::Name() const
00110 {
00111   G4String name("MesonBaryonElasticCrossSection");
00112   return name;
00113 }
00114 
00115 
00116 
00117 G4bool G4XMesonBaryonElastic::IsValid(G4double e) const
00118 {
00119   G4bool answer = InLimits(e,lowLimit,highLimit);
00120 
00121   return answer;
00122 }

Generated on Mon May 27 17:50:26 2013 for Geant4 by  doxygen 1.4.7