00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #include "G4SingleDiffractiveExcitation.hh"
00039 #include "globals.hh"
00040 #include "G4PhysicalConstants.hh"
00041 #include "G4SystemOfUnits.hh"
00042 #include "Randomize.hh"
00043 #include "G4LorentzRotation.hh"
00044 #include "G4ThreeVector.hh"
00045 #include "G4ParticleDefinition.hh"
00046 #include "G4VSplitableHadron.hh"
00047 #include "G4ExcitedString.hh"
00048
00049 G4SingleDiffractiveExcitation::G4SingleDiffractiveExcitation(G4double sigmaPt, G4double minextraMass,G4double x0mass)
00050 :
00051 widthOfPtSquare(-2*sqr(sigmaPt)) , minExtraMass(minextraMass),
00052 minmass(x0mass)
00053 {}
00054
00055 G4SingleDiffractiveExcitation::~G4SingleDiffractiveExcitation()
00056 {}
00057
00058 G4bool G4SingleDiffractiveExcitation::
00059 ExciteParticipants(G4VSplitableHadron *projectile, G4VSplitableHadron *target) const
00060 {
00061
00062 G4LorentzVector Pprojectile=projectile->Get4Momentum();
00063 G4double Mprojectile2=sqr(projectile->GetDefinition()->GetPDGMass() + minExtraMass);
00064
00065 G4LorentzVector Ptarget=target->Get4Momentum();
00066 G4double Mtarget2=sqr(target->GetDefinition()->GetPDGMass() + minExtraMass);
00067
00068
00069
00070 G4bool KeepProjectile= G4UniformRand() > 0.5;
00071
00072
00073 if ( KeepProjectile )
00074 {
00075
00076 Mprojectile2 = sqr(projectile->GetDefinition()->GetPDGMass() * (1-perCent) );
00077 } else {
00078
00079 Mtarget2=sqr(target->GetDefinition()->GetPDGMass() * (1-perCent) );
00080 }
00081
00082
00083
00084 G4LorentzVector Psum;
00085 Psum=Pprojectile+Ptarget;
00086
00087 G4LorentzRotation toCms(-1*Psum.boostVector());
00088
00089 G4LorentzVector Ptmp=toCms*Pprojectile;
00090
00091 if ( Ptmp.pz() <= 0. )
00092 {
00093
00094
00095 return false;
00096 }
00097
00098 toCms.rotateZ(-1*Ptmp.phi());
00099 toCms.rotateY(-1*Ptmp.theta());
00100
00101
00102
00103
00104
00105
00106 G4LorentzRotation toLab(toCms.inverse());
00107
00108 Pprojectile.transform(toCms);
00109 Ptarget.transform(toCms);
00110
00111 G4LorentzVector Qmomentum;
00112 G4int whilecount=0;
00113 do {
00114
00115
00116 G4double maxPtSquare=sqr(Ptarget.pz());
00117 if (whilecount++ >= 500 && (whilecount%100)==0)
00118
00119
00120
00121 if (whilecount > 1000 )
00122 {
00123 Qmomentum=G4LorentzVector(0.,0.,0.,0.);
00124
00125 return false;
00126 }
00127 Qmomentum=G4LorentzVector(GaussianPt(widthOfPtSquare,maxPtSquare),0);
00128
00129
00130
00131 G4double Xmin = minmass / ( Pprojectile.e() + Ptarget.e() );
00132 G4double Xmax=1.;
00133 G4double Xplus =ChooseX(Xmin,Xmax);
00134 G4double Xminus=ChooseX(Xmin,Xmax);
00135
00136 G4double pt2=G4ThreeVector(Qmomentum.vect()).mag2();
00137 G4double Qplus =-1 * pt2 / Xminus/Ptarget.minus();
00138 G4double Qminus= pt2 / Xplus /Pprojectile.plus();
00139
00140 if ( KeepProjectile )
00141 {
00142 Qminus = (sqr(projectile->GetDefinition()->GetPDGMass()) + pt2 )
00143 / (Pprojectile.plus() + Qplus )
00144 - Pprojectile.minus();
00145 } else
00146 {
00147 Qplus = Ptarget.plus()
00148 - (sqr(target->GetDefinition()->GetPDGMass()) + pt2 )
00149 / (Ptarget.minus() - Qminus );
00150 }
00151
00152 Qmomentum.setPz( (Qplus-Qminus)/2 );
00153 Qmomentum.setE( (Qplus+Qminus)/2 );
00154
00155
00156
00157
00158
00159
00160
00161 } while ( (Ptarget-Qmomentum).mag2() <= Mtarget2
00162 || (Pprojectile+Qmomentum).mag2() <= Mprojectile2
00163 || (Ptarget-Qmomentum).e() < 0.
00164 || (Pprojectile+Qmomentum).e() < 0. );
00165
00166
00167
00168
00169 Pprojectile += Qmomentum;
00170
00171 Ptarget -= Qmomentum;
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186 Pprojectile.transform(toLab);
00187 Ptarget.transform(toLab);
00188
00189
00190
00191
00192 target->Set4Momentum(Ptarget);
00193 projectile->Set4Momentum(Pprojectile);
00194
00195
00196 return true;
00197 }
00198
00199
00200
00201
00202
00203
00204 G4double G4SingleDiffractiveExcitation::ChooseX(G4double Xmin, G4double Xmax) const
00205 {
00206
00207
00208
00209
00210 G4double range=Xmax-Xmin;
00211
00212 if ( Xmin <= 0. || range <=0. )
00213 {
00214 G4cout << " Xmin, range : " << Xmin << " , " << range << G4endl;
00215 throw G4HadronicException(__FILE__, __LINE__, "G4SingleDiffractiveExcitation::ChooseX : Invalid arguments ");
00216 }
00217
00218 G4double x;
00219 do {
00220 x=Xmin + G4UniformRand() * range;
00221 } while ( Xmin/x < G4UniformRand() );
00222
00223
00224 return x;
00225 }
00226
00227 G4ThreeVector G4SingleDiffractiveExcitation::GaussianPt(G4double widthSquare, G4double maxPtSquare) const
00228 {
00229
00230 G4double pt2;
00231
00232 do {
00233 pt2=widthSquare * std::log( G4UniformRand() );
00234 } while ( pt2 > maxPtSquare);
00235
00236 pt2=std::sqrt(pt2);
00237
00238 G4double phi=G4UniformRand() * twopi;
00239
00240 return G4ThreeVector (pt2*std::cos(phi), pt2*std::sin(phi), 0.);
00241 }
00242
00243
00244
00245
00246