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

#include <G4INCLPiNToEtaChannel.hh>

+ Inheritance diagram for G4INCL::PiNToEtaChannel:

Public Member Functions

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

Detailed Description

Definition at line 47 of file G4INCLPiNToEtaChannel.hh.

Constructor & Destructor Documentation

◆ PiNToEtaChannel()

G4INCL::PiNToEtaChannel::PiNToEtaChannel ( Particle p1,
Particle p2 
)

Definition at line 47 of file G4INCLPiNToEtaChannel.cc.

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

◆ ~PiNToEtaChannel()

G4INCL::PiNToEtaChannel::~PiNToEtaChannel ( )
virtual

Definition at line 53 of file G4INCLPiNToEtaChannel.cc.

53 {
54
55 }

Member Function Documentation

◆ fillFinalState()

void G4INCL::PiNToEtaChannel::fillFinalState ( FinalState fs)
virtual

Implements G4INCL::IChannel.

Definition at line 57 of file G4INCLPiNToEtaChannel.cc.

57 {
58 Particle * nucleon;
59 Particle * pion;
60 if(particle1->isNucleon()) {
61 nucleon = particle1;
62 pion = particle2;
63 } else {
64 nucleon = particle2;
65 pion = particle1;
66 }
67
69// assert(iso == 1 || iso == -1);
70 if (iso == 1) {
71 nucleon->setType(Proton);
72 }
73 else if (iso == -1) {
74 nucleon->setType(Neutron);
75 }
76 pion->setType(Eta);
77
78 // Erase the parent resonance information of the nucleon and pion
79 nucleon->setParentResonancePDGCode(0);
80 nucleon->setParentResonanceID(0);
81 pion->setParentResonancePDGCode(0);
82 pion->setParentResonanceID(0);
83
84 G4double sh=nucleon->getEnergy()+pion->getEnergy();
85 G4double mn=nucleon->getMass();
86 G4double me=pion->getMass();
87 G4double en=(sh*sh+mn*mn-me*me)/(2*sh);
88 nucleon->setEnergy(en);
89 G4double ee=std::sqrt(en*en-mn*mn+me*me);
90 pion->setEnergy(ee);
91 G4double pn=std::sqrt(en*en-mn*mn);
92
93// real distribution (from PRC 78, 025204 (2008))
94
95
97
98 const G4double pi=std::acos(-1.0);
99 G4double x1;
100 G4double u1;
101 G4double fteta;
102 G4double teta;
103 G4double fi;
104
105 if (ECM < 1650.) {
106// below 1650 MeV - angular distribution (x=cos(theta): ax^2+bx+c
107
108 G4double f1= -0.0000288627*ECM*ECM+0.09155289*ECM-72.25436; // f(1) that is the maximum (fit on experimental data)
109 G4double b1=(f1-(f1/(1.5-0.5*std::pow((ECM-1580.)/95.,2))))/2.; // ideas: 1) f(-1)=0.5f(1); 2) "power term" flattens the distribution away from ECM=1580 MeV
110 G4double a1=2.5*b1; // minimum at cos(theta) = -0.2
111 G4double c1=f1-3.5*b1;
112
113 G4double interg1=2.*a1/3. +2.*c1; // (integral to normalize)
114
115 G4int passe1=0;
116 while (passe1==0) {
117 // Sample x from -1 to 1
118 x1=Random::shoot();
119 if (Random::shoot() > 0.5) x1=-x1;
120
121 // Sample u from 0 to 1
122 u1=Random::shoot();
123 fteta=(a1*x1*x1+b1*x1+c1)/interg1;
124 // The condition
125 if (u1*f1/interg1 < fteta) {
126 teta=std::acos(x1);
127 passe1=1;
128 }
129 }
130 }
131 else {
132// above 1650 MeV - angular distribution (x=cos(theta): (ax^2+bx+c)*(0.5+(arctan(10*(x+dev)))/pi) + vert
133
134 G4double a2=-0.29;
135 G4double b2=0.348; // ax^2+bx+c: around cos(theta)=0.6 with maximum at 0.644963 (value = 0.1872666)
136 G4double c2=0.0546;
137 G4double dev=-0.2; // tail close to zero from "dev" down to -1
138 G4double vert=0.04; // to avoid negative differential cross sections
139
140 G4double interg2=0.1716182902205207; // with the above given parameters! (integral to normalize)
141 const G4double f2=1.09118088; // maximum (integral taken into account)
142
143 G4int passe2=0;
144 while (passe2==0) {
145 // Sample x from -1 to 1
146 x1=Random::shoot();
147 if (Random::shoot() > 0.5) x1=-x1;
148
149 // Sample u from 0 to 1
150 u1=Random::shoot();
151 fteta=((a2*x1*x1+b2*x1+c2)*(0.5+(std::atan(10*(x1+dev)))/pi) + vert)/interg2;
152 // The condition
153 if (u1*f2 < fteta) {
154 teta=std::acos(x1);
155 passe2=1;
156 }
157 }
158 }
159
160 fi=(2.0*pi)*Random::shoot();
161
162 ThreeVector mom_nucleon(
163 pn*std::sin(teta)*std::cos(fi),
164 pn*std::sin(teta)*std::sin(fi),
165 pn*std::cos(teta)
166 );
167// end real distribution
168
169 nucleon->setMomentum(-mom_nucleon);
170 pion->setMomentum(mom_nucleon);
171
172 fs->addModifiedParticle(nucleon);
173 fs->addModifiedParticle(pion);
174 }
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
G4bool isNucleon() const
G4double totalEnergyInCM(Particle const *const p1, Particle const *const p2)
const G4double pi
G4int getIsospin(const ParticleType t)
Get the isospin of a particle.
G4double shoot()
Definition: G4INCLRandom.cc:93
G4bool pion(G4int ityp)
G4bool nucleon(G4int ityp)

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