Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4INCL::NNbarCEXChannel Class Reference

#include <G4INCLNNbarCEXChannel.hh>

+ Inheritance diagram for G4INCL::NNbarCEXChannel:

Public Member Functions

 NNbarCEXChannel (Particle *, Particle *)
 
virtual ~NNbarCEXChannel ()
 
void fillFinalState (FinalState *fs)
 
- Public Member Functions inherited from G4INCL::IChannel
 IChannel ()
 
virtual ~IChannel ()
 
FinalStategetFinalState ()
 

Detailed Description

Definition at line 47 of file G4INCLNNbarCEXChannel.hh.

Constructor & Destructor Documentation

◆ NNbarCEXChannel()

G4INCL::NNbarCEXChannel::NNbarCEXChannel ( Particle * p1,
Particle * p2 )

Definition at line 49 of file G4INCLNNbarCEXChannel.cc.

50 : particle1(p1), particle2(p2)
51 {}

◆ ~NNbarCEXChannel()

G4INCL::NNbarCEXChannel::~NNbarCEXChannel ( )
virtual

Definition at line 53 of file G4INCLNNbarCEXChannel.cc.

53{}

Member Function Documentation

◆ fillFinalState()

void G4INCL::NNbarCEXChannel::fillFinalState ( FinalState * fs)
virtual

Implements G4INCL::IChannel.

Definition at line 55 of file G4INCLNNbarCEXChannel.cc.

55 {
56
57 //brief ppbar
58 // p pbar -> n nbar (BFMM 204)
59 //
60 //brief nnbar
61 // n nbar -> p pbar (same as BFMM 204, but no threshold)
62 //
63
64 Particle *nucleon;
65 Particle *antinucleon;
66
67 if(particle1->isNucleon()){
68 nucleon = particle1;
69 antinucleon = particle2;
70 }
71 else{
72 nucleon = particle2;
73 antinucleon = particle1;
74 }
75
76 const G4double sqrtS = KinematicsUtils::totalEnergyInCM(nucleon, antinucleon);
77
78 //setting types of new particles
79 if(nucleon->getType()==Proton){
80 if(antinucleon->getType()==antiProton){ //ppbar case
81 nucleon->setType(Neutron);
82 antinucleon->setType(antiNeutron);
83 }
84 else{ //pnbar case
85 //no CEX for pnbar
86 INCL_ERROR("We should not be in this channel " << '\n');
87 }
88 }
89 else{ // neutron
90 if(antinucleon->getType()==antiNeutron){ //nnbar case
91 nucleon->setType(Proton);
92 antinucleon->setType(antiProton);
93 }
94 else{ //npbar case
95 //no CEX for npbar
96 INCL_ERROR("We should not be in this channel " << '\n');
97 }
98 }
99
100 G4double mn=nucleon->getMass();
101 G4double my=antinucleon->getMass();
102
103 G4double ey=(sqrtS*sqrtS+my*my-mn*mn)/(2*sqrtS);
104 G4double en=std::sqrt(ey*ey-my*my+mn*mn);
105 nucleon->setEnergy(en);
106 antinucleon->setEnergy(ey);
107 G4double py=std::sqrt(ey*ey-my*my);
108
109
110 ThreeVector mom_antinucleon = Random::normVector(py);
111
112 antinucleon->setMomentum(mom_antinucleon);
113 nucleon->setMomentum(-mom_antinucleon);
114
115 fs->addModifiedParticle(nucleon);
116 fs->addModifiedParticle(antinucleon);
117
118 }
#define INCL_ERROR(x)
double G4double
Definition G4Types.hh:83
G4bool isNucleon() const
G4double totalEnergyInCM(Particle const *const p1, Particle const *const p2)
ThreeVector normVector(G4double norm=1.)
G4bool antinucleon(G4int ityp)
G4bool nucleon(G4int ityp)

The documentation for this class was generated from the following files: