00001 #include <iostream>
00002 #include "TGGCrossPart.h"
00003 #include "TRadGlobal.h"
00004 #include "TKinemCut.h"
00005
00006 using namespace std;
00007
00008 #define DB(x) #x<<"="<<x<<", "
00009
00010 TGGCrossPart::TGGCrossPart():TVCrossPart(){
00011 fNPart = 5;
00012
00013 fD = new TDFun();
00014 fEvent = new TEvent();
00015
00016
00017 fPhD1 = new TPhotonD();
00018 fPhD2 = new TPhotonD();
00019
00020
00021 fPhI1 = new TPhotonI();
00022 fPhI2 = new TPhotonI();
00023
00024 fHardPhoton = true;
00025 fNoFSR = false;
00026 fThetaLocked = false;
00027 }
00028
00029 void TGGCrossPart::SetThetaMin(const double &th){
00030 if(fThetaLocked)return;
00031
00032 fCosMin = cos(th);
00033 fMax = (1 + fCosMin*fCosMin)/(1 - fCosMin*fCosMin);
00034 double cmax = fCosMin, cmin = -fCosMin;
00035 fNorm = (cmin-cmax - log((1-cmax)/(1-cmin))+log((1+cmax)/(1+cmin))) *
00036 2*gConst->Pi();
00037
00038 }
00039
00040 double TGGCrossPart::MakeCosTheta(){
00041
00042 double c,c2;
00043 do{
00044 c = (2*gRandom->Rndm()-1)*fCosMin;
00045 c2 = c*c;
00046 }while( (1+c2) < (1-c2)*fMax*gRandom->Rndm());
00047 fNormTheta = fNorm*(1-c2)/(1+c2);
00048 return c;
00049 }
00050
00051 double TGGCrossPart::GetCNorm(){
00052 return fNormTheta;
00053 }
00054
00055 void TGGCrossPart::Init(){
00056 SetThetaMin(gGlobal->Get_ThetaMin());
00057
00058
00059
00060 fD->Init();
00061 fEvent->Init();
00062
00063 fPhD1->Init();
00064 fPhD2->Init();
00065
00066 fPhI1->Init();
00067 fPhI2->Init();
00068 }
00069
00070 TGGCrossPart::~TGGCrossPart(){
00071 delete fD;
00072 delete fEvent;
00073
00074 delete fPhD1;
00075 delete fPhD2;
00076
00077 delete fPhI1;
00078 delete fPhI2;
00079 }
00080
00081 double TGGCrossPart::BornShift(const double &z1, const double &z2,
00082 const double &c){
00083 double cs = 2*(pow(z1*(1-c), 2) + pow(z2*(1+c), 2))/
00084 ((1-c*c)*pow(z1+z2+(z2-z1)*c, 2)*z1*z2);
00085 return 0.5*cs;
00086 }
00087
00088
00089 #define COMP_I(x) AP*(-(1/x-1+0.5*x)*gGlobal->Get_LnD()+0.5*x)
00090
00091
00092 double TGGCrossPart::GetValue(const unsigned int ipart){
00093 bool IsSoftIE, IsSoftIP;
00094 IsSoftIE = IsSoftIP = true;
00095
00096 bool CompSV, CompIE, CompIP;
00097 CompSV = CompIE = CompIP = false;
00098 double AP = gConst->AlphaPi();
00099
00100 double c = MakeCosTheta();
00101
00102 switch(ipart){
00103 case 0:
00104 IsSoftIE = IsSoftIP = true;
00105 CompSV = true;
00106 break;
00107 case 1:
00108 IsSoftIP = false;
00109 CompIP = true;
00110 break;
00111 case 2:
00112 IsSoftIE = false;
00113 CompIE = true;
00114 break;
00115 case 3:
00116 IsSoftIE = IsSoftIP = false;
00117 break;
00118 case 4:
00119
00120 if(fHardPhoton && fEvent->MakeEvent(c,fPhI1,3)){
00121 double r3g = R_3_Gamma();
00122 double t1 = gConst->Alpha()/(2*gConst->Pi2())*r3g;
00123 double norm = fPhI1->GetENorm()*fPhI1->GetThNorm()*
00124 fPhI1->GetPhiNorm()*GetCNorm();
00125 double res = t1*norm;
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137 res *= 3;
00138
00139 return 0.5*res;
00140 }
00141 return 0;
00142 break;
00143 case 5:
00144
00145 if(fEvent->MakeEventgg(c, (double)0, (double)0)){
00146 double lde = gGlobal->Get_LnDelta();
00147 double Ae = (gGlobal->Get_L()-1)*(lde + 3./4.);
00148 return BornShift(1,1,c)*(1 + AP*(2*Ae + K_SV(c)))*GetCNorm();
00149 }
00150 return 0;
00151 break;
00152 default:
00153 return 0;
00154 break;
00155 }
00156
00157 if(!fHardPhoton) CompSV = CompIE = CompIP = false;
00158
00159 double x1g, x2g;
00160 x1g = x2g = 0;
00161
00162 double z1, z2;
00163 z1 = z2 = 1;
00164
00165 if(IsSoftIE)
00166 x1g = fPhD1->GetEnergy();
00167 else
00168 x1g = fPhI1->GetEnergy();
00169 z1 = 1 - x1g;
00170
00171 if(IsSoftIP)
00172 x2g = fPhD2->GetEnergy();
00173 else
00174 x2g = fPhI2->GetEnergy();
00175 z2 = 1 - x2g;
00176
00177 if(fEvent->MakeEventgg(c, x1g, x2g)){
00178
00179 double D1, D2, t2 = 0;
00180
00181 if(IsSoftIE)
00182 D1 = fD->EvalSoft(x1g)*fPhD1->GetENorm();
00183 else{
00184 double norm = fPhI1->GetENorm();
00185 D1 = fD->Eval(z1)*norm;
00186 if(CompIE) t2 = COMP_I(x1g)*norm;
00187 }
00188
00189 if(IsSoftIP)
00190 D2 = fD->EvalSoft(x2g)*fPhD2->GetENorm();
00191 else{
00192 double norm = fPhI2->GetENorm();
00193 D2 = fD->Eval(z2)*norm;
00194 if(CompIP) t2 = COMP_I(x2g)*norm;
00195 }
00196
00197 if(CompSV){
00198 t2 = 0;
00199 }
00200
00201 double t1 = (1 + AP*K_SV(c))*D1*D2;
00202
00203 return BornShift(z1,z2,c)*(t1 + t2)*GetCNorm();
00204
00205 }
00206 return 0;
00207 }
00208
00209 double TGGCrossPart::R_3_Gamma(){
00210 TLorentzVector q[3];
00211 for(int i=0;i<3;i++) {
00212 q[i] = fEvent->Get4Vector(i);
00213
00214 }
00215 TLorentzVector pm(0,0, gGlobal->Get_BetaI(),1.);
00216 TLorentzVector pp(0,0,-gGlobal->Get_BetaI(),1.);
00217 double chi[3], chi_p[3];
00218 for(int i=0;i<3;i++){
00219 chi[i] = q[i]*pm;
00220 chi_p[i] = q[i]*pp;
00221
00222 }
00223
00224 double res = 0;
00225 double s = 4;
00226 double me2 = gGlobal->Get_MI2();
00227 double cycper[3];
00228 for(int i=0;i<3;i++){
00229 int i0 = (0 + i)%3, i1 = (1 + i)%3, i2 = (2 + i)%3;
00230
00231 double chi22 = pow(chi[i2],2);
00232 double chi_p22 = pow(chi_p[i2],2);
00233 cycper[i] = s*(chi22 + chi_p22)/(chi[i0]*chi[i1]*chi_p[i0]*chi_p[i1]);
00234 cycper[i] -= 2*me2*
00235 ((pow(chi[i0],2)+pow(chi[i1],2))/(chi[i0]*chi[i1]*chi_p22)+
00236 (pow(chi_p[i0],2)+pow(chi_p[i1],2))/(chi_p[i0]*chi_p[i1]*chi22));
00237 res += cycper[i];
00238
00239
00240 }
00241
00242 double CosPsi = fEvent->GetCosPsi();
00243 double gamma = q[2].E()*q[0].P()/(2 - q[2].E()*(1-CosPsi));
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254 return res/3*gamma*0.25;
00255 }
00256
00257 double TGGCrossPart::K_SV(const double &c){
00258 double R = (1+c)/(1-c);
00259 double iR = 1/R;
00260 double lmc = log(0.5*(1-c));
00261 double lpc = log(0.5*(1+c));
00262 return gConst->Pi2()/3 + (1-c*c)/(2*(1+c*c))*
00263 ( (1 + 1.5*R)*lmc + (1 + iR + 0.5*R)*lmc*lmc +
00264 (1 + 1.5*iR)*lpc + (1 + R + 0.5*iR)*lpc*lpc );
00265 }