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

#include <G4INCLNNbarElasticChannel.hh>

+ Inheritance diagram for G4INCL::NNbarElasticChannel:

Public Member Functions

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

Detailed Description

Definition at line 47 of file G4INCLNNbarElasticChannel.hh.

Constructor & Destructor Documentation

◆ NNbarElasticChannel()

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

Definition at line 49 of file G4INCLNNbarElasticChannel.cc.

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

◆ ~NNbarElasticChannel()

G4INCL::NNbarElasticChannel::~NNbarElasticChannel ( )
virtual

Definition at line 53 of file G4INCLNNbarElasticChannel.cc.

53{}

Member Function Documentation

◆ fillFinalState()

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

Implements G4INCL::IChannel.

Definition at line 55 of file G4INCLNNbarElasticChannel.cc.

55 {
56
57 //brief ppbar
58 // p pbar -> p pbar (BFMM 2)
59 //
60 //brief npbar
61 // n pbar -> n pbar (BFMM 472)
62 //
63 //brief nnbar
64 // n nbar -> n nbar (same as BFMM 2)
65 //
66 //brief pnbar
67 // p nbar -> p nbar (same as BFMM 472)
68 //
69 //
70
71
72
73 Particle *nucleon;
74 Particle *antinucleon;
75
76 if(particle1->isNucleon()){
77 nucleon = particle1;
78 antinucleon = particle2;
79 }
80 else{
81 nucleon = particle2;
82 antinucleon = particle1;
83 }
84
85 const G4double sqrtS = KinematicsUtils::totalEnergyInCM(nucleon, antinucleon);
86
87 G4double mn=nucleon->getMass();
88 G4double my=antinucleon->getMass();
89
90 G4double ey=(sqrtS*sqrtS+my*my-mn*mn)/(2*sqrtS);
91 G4double en=std::sqrt(ey*ey-my*my+mn*mn);
92 nucleon->setEnergy(en);
93 antinucleon->setEnergy(ey);
94 G4double py=std::sqrt(ey*ey-my*my);
95
96 ThreeVector mom_antinucleon = Random::normVector(py);
97
98 antinucleon->setMomentum(mom_antinucleon);
99 nucleon->setMomentum(-mom_antinucleon);
100
101 fs->addModifiedParticle(nucleon);
102 fs->addModifiedParticle(antinucleon);
103 }
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: