Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-03-29 07:51:26

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 HadronPhysicsHIJING.cc
0027 /// \brief Implementation of the HadronPhysicsHIJING class
0028 
0029 //---------------------------------------------------------------------------
0030 //
0031 // ClassName:
0032 //
0033 // Author: 2012 A. Dotti
0034 //   created from HadronPhysicsHIJING
0035 //
0036 // Modified:
0037 //
0038 //----------------------------------------------------------------------------
0039 //
0040 #ifdef G4_USE_HIJING
0041 #  include "HadronPhysicsHIJING.hh"
0042 
0043 #  include "G4AntiBarionBuilder.hh"
0044 #  include "G4BaryonConstructor.hh"
0045 #  include "G4BertiniNeutronBuilder.hh"
0046 #  include "G4BertiniPiKBuilder.hh"
0047 #  include "G4BertiniProtonBuilder.hh"
0048 #  include "G4ChipsKaonMinusInelasticXS.hh"
0049 #  include "G4ChipsKaonPlusInelasticXS.hh"
0050 #  include "G4ChipsKaonZeroInelasticXS.hh"
0051 #  include "G4CrossSectionDataSetRegistry.hh"
0052 #  include "G4FTFPAntiBarionBuilder.hh"
0053 #  include "G4FTFPNeutronBuilder.hh"
0054 #  include "G4FTFPPiKBuilder.hh"
0055 #  include "G4FTFPProtonBuilder.hh"
0056 #  include "G4HyperonFTFPBuilder.hh"
0057 #  include "G4MesonConstructor.hh"
0058 #  include "G4NeutronBuilder.hh"
0059 #  include "G4ParticleDefinition.hh"
0060 #  include "G4ParticleTable.hh"
0061 #  include "G4PhysListUtil.hh"
0062 #  include "G4PiKBuilder.hh"
0063 #  include "G4ProcessManager.hh"
0064 #  include "G4ProtonBuilder.hh"
0065 #  include "G4QGSPNeutronBuilder.hh"
0066 #  include "G4QGSPPiKBuilder.hh"
0067 #  include "G4QGSPProtonBuilder.hh"
0068 #  include "G4ShortLivedConstructor.hh"
0069 #  include "G4ios.hh"
0070 #  include "globals.hh"
0071 
0072 #  include <iomanip>
0073 
0074 HadronPhysicsHIJING::HadronPhysicsHIJING(G4int) : G4VPhysicsConstructor("hInelastic HIJING")
0075 {
0076   fNeutrons = 0;
0077   fHIJINGNeutron = 0;
0078   fPiK = 0;
0079   fHIJINGPiK = 0;
0080   fPro = 0;
0081   fHIJINGPro = 0;
0082   fHyperon = 0;
0083   fFTFPHyperon = 0;
0084   fAntiBaryon = 0;
0085   fHIJINGAntiBaryon = 0;
0086   fCHIPSInelastic = 0;
0087 }
0088 
0089 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0090 
0091 void HadronPhysicsHIJING::CreateModels()
0092 {
0093   G4bool quasiElasFTF = false;
0094   G4bool quasiElasQGS = true;
0095   G4double minFTFP = 6 * GeV;
0096   G4double maxBERT = 8 * GeV;
0097   G4double minHIJING = 12 * GeV;
0098   G4double minQGSP = 12 * GeV;
0099   G4double maxFTFP = 25 * GeV;
0100 
0101   // Proton
0102   fPro = new G4ProtonBuilder;
0103   fHIJINGPro = new HIJINGProtonBuilder();
0104   fHIJINGPro->SetMinEnergy(minHIJING);
0105   fPro->RegisterMe(fHIJINGPro);
0106   G4FTFPProtonBuilder* FTFPPro = new G4FTFPProtonBuilder(quasiElasFTF);
0107   FTFPPro->SetMinEnergy(minFTFP);
0108   FTFPPro->SetMaxEnergy(maxFTFP);
0109   fPro->RegisterMe(FTFPPro);
0110   G4BertiniProtonBuilder* BertPro = new G4BertiniProtonBuilder();
0111   BertPro->SetMaxEnergy(maxBERT);
0112 
0113   fNeutrons = new G4NeutronBuilder;
0114   fHIJINGNeutron = new HIJINGNeutronBuilder();
0115   fHIJINGNeutron->SetMinEnergy(minHIJING);
0116   fNeutrons->RegisterMe(fHIJINGNeutron);
0117   // G4QGSPNeutronBuilder* QGSPNeu = new G4QGSPNeutronBuilder(quasiElasQGS);
0118   // QGSPNeu->SetMinEnergy(minQGSP);
0119   // fNeutrons->RegisterMe(QGSPNeu);
0120   G4FTFPNeutronBuilder* FTFPNeu = new G4FTFPNeutronBuilder(quasiElasFTF);
0121   FTFPNeu->SetMinEnergy(minFTFP);
0122   FTFPNeu->SetMaxEnergy(maxFTFP);
0123   fNeutrons->RegisterMe(FTFPNeu);
0124   G4BertiniNeutronBuilder* BertNeu = new G4BertiniNeutronBuilder();
0125   BertNeu->SetMaxEnergy(maxBERT);
0126 
0127   fPiK = new G4PiKBuilder;
0128   G4QGSPPiKBuilder* QGSPPiK = new G4QGSPPiKBuilder(quasiElasQGS);
0129   fPiK->RegisterMe(QGSPPiK);
0130   QGSPPiK->SetMinEnergy(minQGSP);
0131   G4FTFPPiKBuilder* FTFPPiK = new G4FTFPPiKBuilder(quasiElasFTF);
0132   fPiK->RegisterMe(FTFPPiK);
0133   FTFPPiK->SetMaxEnergy(maxFTFP);
0134   FTFPPiK->SetMinEnergy(minFTFP);
0135   G4BertiniPiKBuilder* BertiniPiK = new G4BertiniPiKBuilder();
0136   fPiK->RegisterMe(BertiniPiK);
0137   BertiniPiK->SetMaxEnergy(maxBERT);
0138 
0139   // For Hyperons use FTF model
0140   fHyperon = new G4HyperonBuilder;
0141   fFTFPHyperon = new G4HyperonFTFPBuilder;
0142   fHyperon->RegisterMe(fFTFPHyperon);
0143 
0144   fAntiBaryon = new G4AntiBarionBuilder;
0145   // FTFPAntiBaryon=new G4FTFPAntiBarionBuilder(quasiElasFTF);
0146   G4FTFPAntiBarionBuilder* FTFPAB = new G4FTFPAntiBarionBuilder(quasiElasFTF);
0147   fAntiBaryon->RegisterMe(FTFPAB);
0148 }
0149 
0150 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0151 
0152 HadronPhysicsHIJING::~HadronPhysicsHIJING()
0153 {
0154   delete fNeutrons;
0155   delete fHIJINGNeutron;
0156 
0157   delete fPiK;
0158   delete fHIJINGPiK;
0159 
0160   delete fPro;
0161   delete fHIJINGPro;
0162 
0163   delete fHyperon;
0164   delete fFTFPHyperon;
0165   delete fAntiBaryon;
0166   delete fHIJINGAntiBaryon;
0167 
0168   delete fCHIPSInelastic;
0169 }
0170 
0171 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0172 
0173 void HadronPhysicsHIJING::ConstructParticle()
0174 {
0175   G4MesonConstructor pMesonConstructor;
0176   pMesonConstructor.ConstructParticle();
0177 
0178   G4BaryonConstructor pBaryonConstructor;
0179   pBaryonConstructor.ConstructParticle();
0180 
0181   G4ShortLivedConstructor pShortLivedConstructor;
0182   pShortLivedConstructor.ConstructParticle();
0183 }
0184 
0185 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0186 
0187 void HadronPhysicsHIJING::ConstructProcess()
0188 {
0189   CreateModels();
0190   fNeutrons->Build();
0191   fPro->Build();
0192   fPiK->Build();
0193 
0194   // use CHIPS cross sections also for Kaons
0195   G4VCrossSectionDataSet* ChipsKaonMinus =
0196     G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(
0197       G4ChipsKaonMinusInelasticXS::Default_Name());
0198   G4VCrossSectionDataSet* ChipsKaonPlus =
0199     G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(
0200       G4ChipsKaonPlusInelasticXS::Default_Name());
0201   G4VCrossSectionDataSet* ChipsKaonZero =
0202     G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(
0203       G4ChipsKaonZeroInelasticXS::Default_Name());
0204   //
0205 
0206   G4PhysListUtil::FindInelasticProcess(G4KaonMinus::KaonMinus())->AddDataSet(ChipsKaonMinus);
0207   G4PhysListUtil::FindInelasticProcess(G4KaonPlus::KaonPlus())->AddDataSet(ChipsKaonPlus);
0208   G4PhysListUtil::FindInelasticProcess(G4KaonZeroShort::KaonZeroShort())->AddDataSet(ChipsKaonZero);
0209   G4PhysListUtil::FindInelasticProcess(G4KaonZeroLong::KaonZeroLong())->AddDataSet(ChipsKaonZero);
0210 
0211   fHyperon->Build();
0212   fAntiBaryon->Build();
0213 }
0214 
0215 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0216 
0217 G4HadronicProcess* HadronPhysicsHIJING::FindInelasticProcess(const G4ParticleDefinition* p)
0218 {
0219   G4HadronicProcess* had = 0;
0220   if (p) {
0221     G4ProcessVector* pvec = p->GetProcessManager()->GetProcessList();
0222     size_t n = pvec->size();
0223     if (0 < n) {
0224       for (size_t i = 0; i < n; ++i) {
0225         if (fHadronInelastic == ((*pvec)[i])->GetProcessSubType()) {
0226           had = static_cast<G4HadronicProcess*>((*pvec)[i]);
0227 
0228           break;
0229         }
0230       }
0231     }
0232   }
0233   return had;
0234 }
0235 
0236 #endif  // G4_USE_HIJING