Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-04-04 08:05:12

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 /// \file hadronic/Hadr02/src/HadronPhysicsHIJING.cc
0027 /// \brief Implementation of the HadronPhysicsHIJING class
0028 //
0029 //
0030 //---------------------------------------------------------------------------
0031 //
0032 // ClassName:
0033 //
0034 // Author: 2012 A. Dotti
0035 //   created from HadronPhysicsHIJING
0036 //
0037 // Modified:
0038 //
0039 //----------------------------------------------------------------------------
0040 //
0041 #ifdef G4_USE_HIJING
0042 #  include "HadronPhysicsHIJING.hh"
0043 
0044 #  include "G4AntiBarionBuilder.hh"
0045 #  include "G4BaryonConstructor.hh"
0046 #  include "G4BertiniNeutronBuilder.hh"
0047 #  include "G4BertiniPiKBuilder.hh"
0048 #  include "G4BertiniProtonBuilder.hh"
0049 #  include "G4ChipsKaonMinusInelasticXS.hh"
0050 #  include "G4ChipsKaonPlusInelasticXS.hh"
0051 #  include "G4ChipsKaonZeroInelasticXS.hh"
0052 #  include "G4CrossSectionDataSetRegistry.hh"
0053 #  include "G4FTFPAntiBarionBuilder.hh"
0054 #  include "G4FTFPNeutronBuilder.hh"
0055 #  include "G4FTFPPiKBuilder.hh"
0056 #  include "G4FTFPProtonBuilder.hh"
0057 #  include "G4HyperonFTFPBuilder.hh"
0058 #  include "G4MesonConstructor.hh"
0059 #  include "G4NeutronBuilder.hh"
0060 #  include "G4ParticleDefinition.hh"
0061 #  include "G4ParticleTable.hh"
0062 #  include "G4PhysListUtil.hh"
0063 #  include "G4PiKBuilder.hh"
0064 #  include "G4ProcessManager.hh"
0065 #  include "G4ProtonBuilder.hh"
0066 #  include "G4QGSPNeutronBuilder.hh"
0067 #  include "G4QGSPPiKBuilder.hh"
0068 #  include "G4QGSPProtonBuilder.hh"
0069 #  include "G4ShortLivedConstructor.hh"
0070 #  include "G4ios.hh"
0071 #  include "globals.hh"
0072 
0073 #  include <iomanip>
0074 
0075 HadronPhysicsHIJING::HadronPhysicsHIJING(G4int) : G4VPhysicsConstructor("hInelastic HIJING")
0076 {
0077   fNeutrons = 0;
0078   fHIJINGNeutron = 0;
0079   fPiK = 0;
0080   fHIJINGPiK = 0;
0081   fPro = 0;
0082   fHIJINGPro = 0;
0083   fHyperon = 0;
0084   fFTFPHyperon = 0;
0085   fAntiBaryon = 0;
0086   fHIJINGAntiBaryon = 0;
0087   fCHIPSInelastic = 0;
0088 }
0089 
0090 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0091 
0092 void HadronPhysicsHIJING::CreateModels()
0093 {
0094   G4bool quasiElasFTF = false;
0095   G4bool quasiElasQGS = true;
0096   G4double minFTFP = 6 * GeV;
0097   G4double maxBERT = 8 * GeV;
0098   G4double minHIJING = 12 * GeV;
0099   G4double minQGSP = 12 * GeV;
0100   G4double maxFTFP = 25 * GeV;
0101 
0102   // Proton
0103   fPro = new G4ProtonBuilder;
0104   fHIJINGPro = new HIJINGProtonBuilder();
0105   fHIJINGPro->SetMinEnergy(minHIJING);
0106   fPro->RegisterMe(fHIJINGPro);
0107   G4FTFPProtonBuilder* FTFPPro = new G4FTFPProtonBuilder(quasiElasFTF);
0108   FTFPPro->SetMinEnergy(minFTFP);
0109   FTFPPro->SetMaxEnergy(maxFTFP);
0110   fPro->RegisterMe(FTFPPro);
0111   G4BertiniProtonBuilder* BertPro = new G4BertiniProtonBuilder();
0112   BertPro->SetMaxEnergy(maxBERT);
0113 
0114   fNeutrons = new G4NeutronBuilder;
0115   fHIJINGNeutron = new HIJINGNeutronBuilder();
0116   fHIJINGNeutron->SetMinEnergy(minHIJING);
0117   fNeutrons->RegisterMe(fHIJINGNeutron);
0118   // G4QGSPNeutronBuilder* QGSPNeu = new G4QGSPNeutronBuilder(quasiElasQGS);
0119   // QGSPNeu->SetMinEnergy(minQGSP);
0120   // fNeutrons->RegisterMe(QGSPNeu);
0121   G4FTFPNeutronBuilder* FTFPNeu = new G4FTFPNeutronBuilder(quasiElasFTF);
0122   FTFPNeu->SetMinEnergy(minFTFP);
0123   FTFPNeu->SetMaxEnergy(maxFTFP);
0124   fNeutrons->RegisterMe(FTFPNeu);
0125   G4BertiniNeutronBuilder* BertNeu = new G4BertiniNeutronBuilder();
0126   BertNeu->SetMaxEnergy(maxBERT);
0127 
0128   fPiK = new G4PiKBuilder;
0129   G4QGSPPiKBuilder* QGSPPiK = new G4QGSPPiKBuilder(quasiElasQGS);
0130   fPiK->RegisterMe(QGSPPiK);
0131   QGSPPiK->SetMinEnergy(minQGSP);
0132   G4FTFPPiKBuilder* FTFPPiK = new G4FTFPPiKBuilder(quasiElasFTF);
0133   fPiK->RegisterMe(FTFPPiK);
0134   FTFPPiK->SetMaxEnergy(maxFTFP);
0135   FTFPPiK->SetMinEnergy(minFTFP);
0136   G4BertiniPiKBuilder* BertiniPiK = new G4BertiniPiKBuilder();
0137   fPiK->RegisterMe(BertiniPiK);
0138   BertiniPiK->SetMaxEnergy(maxBERT);
0139 
0140   // For Hyperons use FTF model
0141   fHyperon = new G4HyperonBuilder;
0142   fFTFPHyperon = new G4HyperonFTFPBuilder;
0143   fHyperon->RegisterMe(fFTFPHyperon);
0144 
0145   fAntiBaryon = new G4AntiBarionBuilder;
0146   // FTFPAntiBaryon=new G4FTFPAntiBarionBuilder(quasiElasFTF);
0147   G4FTFPAntiBarionBuilder* FTFPAB = new G4FTFPAntiBarionBuilder(quasiElasFTF);
0148   fAntiBaryon->RegisterMe(FTFPAB);
0149 }
0150 
0151 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0152 
0153 HadronPhysicsHIJING::~HadronPhysicsHIJING()
0154 {
0155   delete fNeutrons;
0156   delete fHIJINGNeutron;
0157 
0158   delete fPiK;
0159   delete fHIJINGPiK;
0160 
0161   delete fPro;
0162   delete fHIJINGPro;
0163 
0164   delete fHyperon;
0165   delete fFTFPHyperon;
0166   delete fAntiBaryon;
0167   delete fHIJINGAntiBaryon;
0168 
0169   delete fCHIPSInelastic;
0170 }
0171 
0172 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0173 
0174 void HadronPhysicsHIJING::ConstructParticle()
0175 {
0176   G4MesonConstructor pMesonConstructor;
0177   pMesonConstructor.ConstructParticle();
0178 
0179   G4BaryonConstructor pBaryonConstructor;
0180   pBaryonConstructor.ConstructParticle();
0181 
0182   G4ShortLivedConstructor pShortLivedConstructor;
0183   pShortLivedConstructor.ConstructParticle();
0184 }
0185 
0186 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0187 
0188 void HadronPhysicsHIJING::ConstructProcess()
0189 {
0190   CreateModels();
0191   fNeutrons->Build();
0192   fPro->Build();
0193   fPiK->Build();
0194 
0195   // use CHIPS cross sections also for Kaons
0196   G4VCrossSectionDataSet* ChipsKaonMinus =
0197     G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(
0198       G4ChipsKaonMinusInelasticXS::Default_Name());
0199   G4VCrossSectionDataSet* ChipsKaonPlus =
0200     G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(
0201       G4ChipsKaonPlusInelasticXS::Default_Name());
0202   G4VCrossSectionDataSet* ChipsKaonZero =
0203     G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(
0204       G4ChipsKaonZeroInelasticXS::Default_Name());
0205   //
0206 
0207   G4PhysListUtil::FindInelasticProcess(G4KaonMinus::KaonMinus())->AddDataSet(ChipsKaonMinus);
0208   G4PhysListUtil::FindInelasticProcess(G4KaonPlus::KaonPlus())->AddDataSet(ChipsKaonPlus);
0209   G4PhysListUtil::FindInelasticProcess(G4KaonZeroShort::KaonZeroShort())->AddDataSet(ChipsKaonZero);
0210   G4PhysListUtil::FindInelasticProcess(G4KaonZeroLong::KaonZeroLong())->AddDataSet(ChipsKaonZero);
0211 
0212   fHyperon->Build();
0213   fAntiBaryon->Build();
0214 }
0215 
0216 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0217 
0218 G4HadronicProcess* HadronPhysicsHIJING::FindInelasticProcess(const G4ParticleDefinition* p)
0219 {
0220   G4HadronicProcess* had = 0;
0221   if (p) {
0222     G4ProcessVector* pvec = p->GetProcessManager()->GetProcessList();
0223     size_t n = pvec->size();
0224     if (0 < n) {
0225       for (size_t i = 0; i < n; ++i) {
0226         if (fHadronInelastic == ((*pvec)[i])->GetProcessSubType()) {
0227           had = static_cast<G4HadronicProcess*>((*pvec)[i]);
0228 
0229           break;
0230         }
0231       }
0232     }
0233   }
0234   return had;
0235 }
0236 
0237 #endif  // G4_USE_HIJING