G4IonQMDPhysics.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 // $Id$
00027 //
00028 //---------------------------------------------------------------------------
00029 //
00030 // ClassName:   G4IonQMDPhysics
00031 //   Created from G4IonBinaryCascadePhysics
00032 //
00033 // Author:      G.Folger
00034 //
00035 // Modified:
00036 //
00037 //----------------------------------------------------------------------------
00038 //
00039 
00040 #include "G4IonQMDPhysics.hh"
00041 
00042 #include "G4SystemOfUnits.hh"
00043 #include "G4DeuteronInelasticProcess.hh"
00044 #include "G4TritonInelasticProcess.hh"
00045 #include "G4AlphaInelasticProcess.hh"
00046 #include "G4HadronInelasticProcess.hh"
00047 
00048 #include "G4BinaryLightIonReaction.hh"
00049 #include "G4QMDReaction.hh"
00050 
00051 //#include "G4TripathiCrossSection.hh"
00052 //#include "G4TripathiLightCrossSection.hh"
00053 //#include "G4IonsShenCrossSection.hh"
00054 
00055 #include "G4GGNuclNuclCrossSection.hh"
00056 #include "G4CrossSectionDataSetRegistry.hh"
00057 
00058 #include "G4ParticleDefinition.hh"
00059 #include "G4ParticleTable.hh"
00060 #include "G4ProcessManager.hh"
00061 
00062 // Nuclei
00063 #include "G4IonConstructor.hh"
00064 #include "G4BuilderType.hh"
00065 
00066 // factory
00067 #include "G4PhysicsConstructorFactory.hh"
00068 //
00069 G4_DECLARE_PHYSCONSTR_FACTORY(G4IonQMDPhysics);
00070 
00071 G4IonQMDPhysics::G4IonQMDPhysics(G4int ver)
00072   :  G4VPhysicsConstructor("IonQMD"), verbose(ver), wasActivated(false)
00073 {
00074   fLEDModel = 0;
00075   fLETModel = 0;
00076   fLEAModel = 0;
00077 //  fTripathi = 0;
00078 //  fTripathiLight = 0;
00079 //  fShen = 0;
00080   eminBIC  = 0.*MeV;
00081   eminQMD  = 100.*MeV;
00082   emaxQMD  = 10.*GeV;
00083   emaxLHEP = 1.*TeV;
00084   overlap  = 10*MeV;
00085   SetPhysicsType(bIons);
00086   if(verbose > 1) G4cout << "### G4IonQMDPhysics" << G4endl;
00087 }
00088 
00089 G4IonQMDPhysics::G4IonQMDPhysics(const G4String& name, 
00090                                                      G4int ver)
00091   :  G4VPhysicsConstructor(name), verbose(ver), wasActivated(false)
00092 {
00093   fLEDModel = 0;
00094   fLETModel = 0;
00095   fLEAModel = 0;
00096 //  fTripathi = 0;
00097 //  fTripathiLight = 0;
00098 //  fShen = 0;
00099   eminBIC  = 0.*MeV;
00100   eminQMD  = 100.*MeV;
00101   emaxQMD  = 10.*GeV;
00102   emaxLHEP = 1.*TeV;
00103   overlap  = 10*MeV;
00104   SetPhysicsType(bIons);
00105   if(verbose > 1) G4cout << "### G4IonQMDPhysics" << G4endl;
00106 }
00107 
00108 G4IonQMDPhysics::~G4IonQMDPhysics()
00109 {
00110   if(wasActivated) {
00111 //    delete fTripathi;
00112 //    delete fTripathiLight;
00113 //    delete fShen;
00114     delete fLEDModel;
00115     delete fLETModel;
00116     delete fLEAModel;
00117     G4int i;
00118     G4int n = p_list.size();
00119     for(i=0; i<n; i++) {delete p_list[i];}
00120     n = model_list.size();
00121     for(i=0; i<n; i++) {delete model_list[i];}
00122   }
00123 }
00124 
00125 void G4IonQMDPhysics::ConstructProcess()
00126 {
00127   if(wasActivated) return;
00128   wasActivated = true;
00129 
00130   G4BinaryLightIonReaction* fBC= new G4BinaryLightIonReaction();
00131   model_list.push_back(fBC);
00132   G4QMDReaction* fQMD= new G4QMDReaction();
00133   model_list.push_back(fQMD);
00134   
00135 //  fShen = new G4IonsShenCrossSection;
00136 //  fTripathi = new G4TripathiCrossSection
00137 //    fTripathiLight = new G4TripathiLightCrossSection;
00138 
00139   fLEDModel = new G4LEDeuteronInelastic();
00140   fLETModel = new G4LETritonInelastic();
00141   fLEAModel = new G4LEAlphaInelastic();
00142 
00143   AddProcess("dInelastic", G4Deuteron::Deuteron(), fBC, fQMD, fLEDModel );
00144   AddProcess("tInelastic",G4Triton::Triton(),      fBC, fQMD, fLETModel );
00145   AddProcess("He3Inelastic",G4He3::He3(),          fBC, fQMD, 0 );
00146   AddProcess("alphaInelastic", G4Alpha::Alpha(),   fBC, fQMD, fLEAModel );
00147   AddProcess("ionInelastic",G4GenericIon::GenericIon(), fBC, fQMD, 0);
00148 
00149 }
00150 
00151 void G4IonQMDPhysics::AddProcess(const G4String& name,
00152                                            G4ParticleDefinition* p, 
00153                                            G4BinaryLightIonReaction* BIC,
00154                                            G4QMDReaction* QMD,
00155                                            G4HadronicInteraction* LHEP)
00156 {
00157   G4HadronInelasticProcess* hadi = new G4HadronInelasticProcess(name, p);
00158   p_list.push_back(hadi);
00159   G4ProcessManager* pManager = p->GetProcessManager();
00160   pManager->AddDiscreteProcess(hadi);
00161   
00162 //  hadi->AddDataSet(fShen);
00163 //  hadi->AddDataSet(fTripathi);
00164 //  hadi->AddDataSet(fTripathiLight);
00165 
00166   hadi->AddDataSet(G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4GGNuclNuclCrossSection::Default_Name()));
00167     
00168   BIC->SetMinEnergy(eminBIC);
00169   BIC->SetMaxEnergy(emaxQMD);  //reset when QMD is present 
00170   hadi->RegisterMe(BIC);
00171 
00172   if(QMD) {
00173     QMD->SetMinEnergy(eminQMD);
00174     BIC->SetMaxEnergy(eminQMD+overlap);
00175     QMD->SetMaxEnergy(emaxQMD);
00176     hadi->RegisterMe(QMD);
00177   }  
00178 
00179   if(LHEP) {
00180     LHEP->SetMinEnergy(emaxQMD - overlap);
00181     LHEP->SetMaxEnergy(emaxLHEP);
00182     hadi->RegisterMe(LHEP);
00183   }  
00184   if(verbose > 1) {
00185     G4cout << "Register " << hadi->GetProcessName()
00186            << " for " << p->GetParticleName() << G4endl
00187            << "       Binary Cascade for E(MeV)= " << eminBIC << " - " 
00188            << (QMD==0 ? emaxQMD : (eminQMD-overlap)) ;
00189     if(QMD) {
00190       G4cout  << G4endl <<"       QMD for E(MeV)= " << eminQMD << " - " << emaxQMD;
00191     }
00192     if(LHEP) {
00193       G4cout << G4endl<< "       LHEP for E(MeV)= " << emaxQMD-overlap << " - " << emaxLHEP;
00194     }
00195     G4cout << G4endl;
00196   }
00197 }
00198 
00199 void G4IonQMDPhysics::ConstructParticle()
00200 {
00201   //  Construct light ions
00202   G4IonConstructor pConstructor;
00203   pConstructor.ConstructParticle();  
00204 }

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