G4XResonance.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 "G4KineticTrack.hh"
00031 #include "G4XResonance.hh"
00032 #include "Randomize.hh"
00033 #include "G4Proton.hh"
00034 
00035 G4XResonance::G4XResonance(const G4ParticleDefinition* in1, 
00036                            const G4ParticleDefinition* in2,
00037                            G4int iIsospinOut1, G4double spinOut1, G4double massOut1,
00038                            G4int iIsospinOut2, G4double spinOut2, G4double massOut2,
00039                            G4String subType1, G4String subType2,
00040                            const G4VXResonanceTable& sigmaTable) : 
00041   isoOut1(iIsospinOut1), iSpinOut1(spinOut1), mOut1(massOut1),
00042   isoOut2(iIsospinOut2), iSpinOut2(spinOut2), mOut2(massOut2)
00043   
00044 {
00045   table = sigmaTable.CrossSectionTable();
00046   // Check if there is a valid cross section table for this channel
00047   if (table == 0)
00048     throw G4HadronicException(__FILE__, __LINE__, "G4XResonance::G4XResonance - no cross section table available");
00049   
00050   name = in1->GetParticleName() + in2->GetParticleName() + " -> " + subType1 + subType2;
00051 }
00052 
00053 
00054 G4XResonance::~G4XResonance() 
00055 { 
00056   delete table;
00057   table = 0;
00058 }
00059 
00060 
00061 G4bool G4XResonance::operator==(const G4XResonance &right) const
00062 {
00063   return (this == (G4XResonance *) &right);
00064 }
00065 
00066 
00067 G4bool G4XResonance::operator!=(const G4XResonance &right) const
00068 {
00069   return (this != (G4XResonance *) &right);
00070 }
00071 
00072 
00073 G4String G4XResonance::Name() const
00074 {
00075   return name;
00076 }
00077 
00078 G4double G4XResonance::CrossSection(const G4KineticTrack& trk1, const G4KineticTrack& trk2) const
00079 {
00080   G4bool dummy = false;
00081   G4double sqrtS = (trk1.Get4Momentum() + trk2.Get4Momentum()).mag();
00082 
00083   // pp -> trk1 + trk2 cross section
00084   G4double sigma = table->GetValue(sqrtS,dummy);
00085   
00086   // Isospin correction
00087   // from G4VXResonance; 
00088 //   G4cout << "SigmaCheck "<<sigma;
00089   sigma *= IsospinCorrection(trk1,trk2,isoOut1,isoOut2,iSpinOut1,iSpinOut2); // from G4VXResonance
00090 //   G4cout << " "<<sigma<<G4endl;
00091 
00092   // Detailed balance
00093   if (trk1.GetDefinition()->IsShortLived() || trk2.GetDefinition()->IsShortLived())
00094   {
00095    sigma *= DetailedBalance(trk1,trk2, isoOut1,isoOut2, iSpinOut1,iSpinOut2, mOut1,mOut2); 
00096   }
00097 
00098   return sigma;
00099 
00100 }
00101 

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