ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IonCRMCPhysics.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file IonCRMCPhysics.cc
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
28 //
29 //
30 //---------------------------------------------------------------------------
31 //
32 // Class: IonCRMCPhysics
33 //
34 // Author: 2018 Alberto Ribon
35 //
36 // Modified:
37 //
38 // ------------------------------------------------------------
39 //
40 #ifdef G4_USE_CRMC
41 
42 #include "IonCRMCPhysics.hh"
43 #include "G4IonPhysics.hh"
44 #include "G4SystemOfUnits.hh"
45 #include "G4ParticleDefinition.hh"
46 #include "G4ProcessManager.hh"
47 #include "G4Deuteron.hh"
48 #include "G4Triton.hh"
49 #include "G4He3.hh"
50 #include "G4Alpha.hh"
51 #include "G4GenericIon.hh"
52 #include "G4IonConstructor.hh"
57 #include "G4PreCompoundModel.hh"
58 #include "G4ExcitationHandler.hh"
59 #include "G4FTFBuilder.hh"
60 #include "G4HadronicInteraction.hh"
61 #include "G4BuilderType.hh"
63 #include "G4CRMCModel.hh"
64 #include "G4HadronicParameters.hh"
65 
66 using namespace std;
67 
68 // factory
70 //
72 
80 
81 
82 IonCRMCPhysics::IonCRMCPhysics( G4int ver ) : G4VPhysicsConstructor( "ionInelasticCRMC"),
83  verbose( ver ) {
84  SetPhysicsType( bIons );
85  if ( verbose > 1 ) G4cout << "### G4IonPhysics" << G4endl;
86 }
87 
88 
90  // Explictly setting pointers to zero is actually needed.
91  // These are static variables, in case we restart threads we need to re-create objects
92  delete theCRMC; theCRMC = 0;
93  delete theBuilder; theBuilder = 0;
94  delete theGGNuclNuclXS; theGGNuclNuclXS = 0;
95  delete theNuclNuclData; theNuclNuclData = 0;
96  delete theIonBC; theIonBC = 0;
97  delete theFTFP; theFTFP = 0;
98 }
99 
100 
102  // Construct ions
103  G4IonConstructor pConstructor;
104  pConstructor.ConstructParticle();
105 }
106 
107 
109  if ( wasActivated ) return;
110  wasActivated = true;
112  G4PreCompoundModel* thePreCompound = static_cast< G4PreCompoundModel* >( p );
113  if ( ! thePreCompound ) thePreCompound = new G4PreCompoundModel;
114  // Transition energies per nucleon
115  const G4double minCRMC = 100.0*GeV;
116  const G4double maxFTFP = 110.0*GeV;
117  const G4double minFTFP = 2.0*GeV;
118  const G4double maxBIC = 4.0*GeV;
119  const G4double minBIC = 0.0*GeV;
120  // Binary Cascade
121  theIonBC = new G4BinaryLightIonReaction( thePreCompound );
122  theIonBC->SetMinEnergy( minBIC );
123  theIonBC->SetMaxEnergy( maxBIC );
124  // FTFP
125  theBuilder = new G4FTFBuilder( "FTFP", thePreCompound );
127  theFTFP->SetMinEnergy( minFTFP );
128  theFTFP->SetMaxEnergy( maxFTFP );
129  // CRMC
130  theCRMC = new G4CRMCModel;
131  theCRMC->SetMinEnergy( minCRMC );
133  // Cross section
135  // Processes
136  AddProcess( "dInelastic", G4Deuteron::Deuteron(), false );
137  AddProcess( "tInelastic", G4Triton::Triton(), false );
138  AddProcess( "He3Inelastic", G4He3::He3(), true );
139  AddProcess( "alphaInelastic", G4Alpha::Alpha(), true );
140  AddProcess( "ionInelastic", G4GenericIon::GenericIon(), true );
141  if ( verbose > 1 ) G4cout << "G4IonPhysics::ConstructProcess done! " << G4endl;
142 }
143 
144 
146  G4HadronInelasticProcess* hadi = new G4HadronInelasticProcess( name, part );
147  G4ProcessManager* pManager = part->GetProcessManager();
148  pManager->AddDiscreteProcess( hadi );
149  hadi->AddDataSet( theNuclNuclData );
150  hadi->RegisterMe( theIonBC );
151  hadi->RegisterMe( theFTFP );
152  hadi->RegisterMe( theCRMC );
153 }
154 
155 #endif //G4_USE_CRMC
156