Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4INCLAntinucleiAtrestEntryChannel.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/*
39 * G4INCLAntinucleiAtrestEntryChannel.cc
40 *
41 *
42 * \author Olivier Lourgo
43 */
48
49
50namespace G4INCL{
51
53 :theNucleus(n), theantiComposite(ac), Posnbar(pos1), Pospbar(pos2){}
54
56
58
59 ThreeVector AntinucleiAtrestEntryChannel::getAnnihilationPosition(ThreeVector nbarPos, ThreeVector pbarPos){ //Choose between the pbar or nbar annihilation position
60 if((nbarPos - pbarPos).mag2() <= ParticleTable::getLargestNuclearRadius(-theantiComposite->getA(),- theantiComposite->getZ())){
61 //If the annihilions positions are close (the radius of a deuteron) then we have 2 sources for the meson star
62 return ThreeVector(999.,999.,999.);
63 }
64 if(nbarPos.mag2() <= pbarPos.mag2())
65 return nbarPos;
66 else
67 return pbarPos;
68 }
69
71 ParticleList Antiparticles = theantiComposite->getParticles();
72 Particle *nbar=nullptr;
73 Particle *pbar=nullptr;
74 for(ParticleIter p =Antiparticles.begin(), e=Antiparticles.end(); p!=e; ++p){
75 if((*p)->getType()==antiProton)
76 pbar = *p;
77 else if((*p)->getType()==antiNeutron)
78 nbar = *p;
79 else
80 INCL_ERROR("ERROR : something else than antiNeutron or antiProton in antiComposite");
81 }
82 PbarAtrestEntryChannel *pbarChannel = new PbarAtrestEntryChannel(theNucleus, pbar);
83 NbarAtrestEntryChannel *nbarChannel = new NbarAtrestEntryChannel(theNucleus, nbar);
84
85 ParticleList TotalStarList = pbarChannel->makeMesonStar(); //pbar in first because polarisation of the dbar (Coulomb)
86 ParticleList nbarMesonStar = nbarChannel->makeMesonStar();
87 pbarListSize = (G4int)TotalStarList.size();
88
89 for(ParticleIter p=nbarMesonStar.begin(), e=nbarMesonStar.end(); p!=e; ++p){
90 TotalStarList.push_back(*p);
91 }
92 Pospbar = pbarChannel->getAnnihilationPosition();
93 Posnbar = nbarChannel->getAnnihilationPosition();
94
95 G4double EnergyofFinalMesonStar = 0;
96 G4int a=theNucleus->getA();
97 G4int z=theNucleus->getZ();
98 G4int stra=theNucleus->getS();
99 if(theNucleus->getAnnihilationType()==DNbarPPbarPType){
100 EnergyofFinalMesonStar = theantiComposite->getMass() + (ParticleTable::getTableMass(a+2,z+2,stra)- ParticleTable::getTableMass(a,z+1,stra));
101 }
102 else if(theNucleus->getAnnihilationType()==DNbarPPbarNType || theNucleus->getAnnihilationType()==DNbarNPbarPType){
103 //Correction for all but they all cancel out !
104 EnergyofFinalMesonStar = theantiComposite->getMass() + (ParticleTable::getTableMass(a+2,z+1,stra)- ParticleTable::getTableMass(a,z,stra));
105
106 }
107 else if(theNucleus->getAnnihilationType()==DNbarNPbarNType){
108 EnergyofFinalMesonStar = theantiComposite->getMass() + (ParticleTable::getTableMass(a+2,z,stra) - ParticleTable::getTableMass(a,z-1,stra));
109 }
110 PhaseSpaceGenerator::generate(EnergyofFinalMesonStar, TotalStarList);
111
112 return TotalStarList;
113 }
114
116 ThreeVector ann_position = getAnnihilationPosition(Posnbar,Pospbar);
117 IAvatarList theAvatarList;
118 G4int cnt=1;
119 if (ann_position.getX() == 999. && ann_position.getY() == 999. && ann_position.getZ() == 999.){
120 INCL_DEBUG("Particle are close to each other : 2 sources of annihilation "<< '\n');
121 for(ParticleIter p=pL.begin(), e=pL.end(); p!=e; ++p){
122 if(cnt <= pbarListSize){
123 (*p)->setPosition(Pospbar);
124 }
125 else
126 (*p)->setPosition(Posnbar);
127 theAvatarList.push_back(new ParticleEntryAvatar(0.0, n, *p, ADAR));
128 cnt++;
129 }
130 }
131 else{
132 for(ParticleIter p=pL.begin(), e=pL.end(); p!=e; ++p){
133 (*p)->setPosition(ann_position);
134 theAvatarList.push_back(new ParticleEntryAvatar(0.0, n, *p, ADAR));
135 }
136 }
137 return theAvatarList;
138 }
139
141 const G4double energyBefore = Meson->getEnergy();
142 fs->addEnteringParticle(Meson);
143 INCL_DEBUG("Entering antiComposite annihilation product added " << '\n');
144 fs->setTotalEnergyBeforeInteraction(energyBefore);
145 }
146}
147
#define INCL_ERROR(x)
#define INCL_DEBUG(x)
double G4double
Definition G4Types.hh:83
int G4int
Definition G4Types.hh:85
AntinucleiAtrestEntryChannel(Nucleus *n, Cluster *ac, ThreeVector pos1, ThreeVector pos2)
IAvatarList bringMesonStar(ParticleList const &pL, Nucleus *const n)
ThreeVector getAnnihilationPosition(ThreeVector nbarPos, ThreeVector pbarPos)
void addEnteringParticle(Particle *p)
void setTotalEnergyBeforeInteraction(G4double E)
G4double getY() const
G4double getZ() const
G4double mag2() const
G4double getX() const
G4ThreadLocal NuclearMassFn getTableMass
Static pointer to the mass function for nuclei.
G4double getLargestNuclearRadius(const G4int A, const G4int Z)
void generate(const G4double sqrtS, ParticleList &particles)
Generate an event in the CM system.
ParticleList::const_iterator ParticleIter
UnorderedVector< IAvatar * > IAvatarList
@ DNbarNPbarNType
@ DNbarNPbarPType
@ DNbarPPbarPType
@ DNbarPPbarNType