Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4INCLCrossSectionsTruncatedMultiPions.cc
Go to the documentation of this file.
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//
26// INCL++ intra-nuclear cascade model
27// Alain Boudard, CEA-Saclay, France
28// Joseph Cugnon, University of Liege, Belgium
29// Jean-Christophe David, CEA-Saclay, France
30// Pekka Kaitaniemi, CEA-Saclay, France, and Helsinki Institute of Physics, Finland
31// Sylvie Leray, CEA-Saclay, France
32// Davide Mancusi, CEA-Saclay, France
33//
34#define INCLXX_IN_GEANT4_MODE 1
35
36#include "globals.hh"
37
38/** \file G4INCLCrossSectionsTruncatedMultiPions.cc
39 * \brief Truncated multipion cross sections
40 *
41 * \date 10th December 2014
42 * \author Davide Mancusi
43 */
44
46// #include <cassert>
47
48namespace G4INCL {
49
53
55// if(!p1->isPion() && !p2->isPion()) {
56 if((p1->isNucleon()||p1->isDelta()) && (p2->isNucleon()||p2->isDelta())){
57 return NNElastic(p1, p2);
58 }
59// else if (p1->isNucleon() || p2->isNucleon()) {
60 else if ((p1->isNucleon() && p2->isPion()) || (p2->isNucleon() && p1->isPion())){
61 G4double pielas = piNTot(p1,p2) - piNIne(p1,p2) - CrossSectionsMultiPions::piNToDelta(p1,p2);
62 if (pielas < 0.)
63 pielas = 0.;
64 return pielas;
65 } else
66 return 0.0;
67 }
68
69 G4double CrossSectionsTruncatedMultiPions::piNToDelta(Particle const * const particle1, Particle const * const particle2) {
70 G4double sum = CrossSectionsMultiPions::piNToDelta(particle1, particle2);
71 if(nMaxPi<=1) {
72 for(G4int i=nMaxPi+1; i<=nMaxPiPiN; ++i)
73 sum += CrossSectionsMultiPions::piNToxPiN(i, particle1, particle2);
74 }
75 return sum;
76 }
77
78 G4double CrossSectionsTruncatedMultiPions::NNToxPiNN(const G4int xpi, Particle const * const particle1, Particle const * const particle2) {
79 if(xpi<nMaxPi)
80 return CrossSectionsMultiPions::NNToxPiNN(xpi, particle1, particle2);
81 else if(xpi==nMaxPi) {
82 G4double sum = 0.;
83 for(G4int i=xpi; i<=nMaxPiNN; ++i)
84 sum += CrossSectionsMultiPions::NNToxPiNN(i, particle1, particle2);
85 return sum;
86 } else
87 return 0.;
88 }
89
90 G4double CrossSectionsTruncatedMultiPions::piNToxPiN(const G4int xpi, Particle const * const particle1, Particle const * const particle2) {
91 if(xpi<nMaxPi)
92 return CrossSectionsMultiPions::piNToxPiN(xpi, particle1, particle2);
93 else if(xpi==nMaxPi) {
94 G4double sum = 0.;
95 for(G4int i=xpi; i<=nMaxPiPiN; ++i)
96 sum += CrossSectionsMultiPions::piNToxPiN(i, particle1, particle2);
97 return sum;
98 } else
99 return 0.;
100 }
101
102} // namespace G4INCL
103
Truncated multipion cross sections.
double G4double
Definition G4Types.hh:83
int G4int
Definition G4Types.hh:85
virtual G4double piNToxPiN(const G4int xpi, Particle const *const p1, Particle const *const p2)
Cross section for X pion production - piN Channel.
G4double piNTot(Particle const *const p1, Particle const *const p2)
virtual G4double piNToDelta(Particle const *const p1, Particle const *const p2)
Cross section for Delta production - piN Channel.
static const G4int nMaxPiNN
Maximum number of outgoing pions in NN collisions.
static const G4int nMaxPiPiN
Maximum number of outgoing pions in piN collisions.
G4double piNIne(Particle const *const p1, Particle const *const p2)
G4double NNElastic(Particle const *const part1, Particle const *const part2)
Internal implementation of the NN elastic cross section.
virtual G4double NNToxPiNN(const G4int xpi, Particle const *const p1, Particle const *const p2)
Cross section for X pion production - NN Channel.
const G4int nMaxPi
Maximum number of pions produced in TruncatedMultiPion collisions.
virtual G4double piNToxPiN(const G4int xpi, Particle const *const p1, Particle const *const p2)
Cross section for X pion production - piN Channel.
virtual G4double elastic(Particle const *const p1, Particle const *const p2)
Elastic particle-particle cross section.
virtual G4double piNToDelta(Particle const *const p1, Particle const *const p2)
Cross section for Delta production - piN Channel.
virtual G4double NNToxPiNN(const G4int xpi, Particle const *const p1, Particle const *const p2)
Cross section for X pion production - NN Channel.
CrossSectionsTruncatedMultiPions(const G4int nPi=std::numeric_limits< G4int >::max())
G4bool isPion() const
Is this a pion?
G4bool isDelta() const
Is it a Delta?
G4bool isNucleon() const