/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Generator/Mcgpj/Mcgpj-00-01-04/src/code3pi/src/TPhoton_o.C

Go to the documentation of this file.
00001 #include "TPhoton_o.h"
00002 #include "TConstant.h"
00003 using namespace rb;
00004 TPhoton::TPhoton(double E){
00005   double gamma = E/me;
00006   fE = E;
00007   fBetaI = sqrt(gamma-1)*sqrt(gamma+1)/gamma;
00008   fiBetaI = 1/fBetaI;
00009   double c1 = -1, c2 = 1;
00010   SetCosThetaRange(c1,c2);
00011 }
00012 
00013 TPhoton::TPhoton(double E, double Emin, double Emax){
00014   double gamma = E/me;
00015   fE = E;
00016   fBetaI = sqrt(gamma-1)*sqrt(gamma+1)/gamma;
00017   fiBetaI = 1/fBetaI;
00018   double c1 = -1, c2 = 1;
00019   SetCosThetaRange(c1,c2);
00020   SetEnergyRange(Emin,Emax);
00021 }
00022 
00023 void TPhoton::SetEnergyRange(double Emin, double Emax){
00024   fP0 = Emin/fE;
00025   fP1 = Emax/fE/fP0;
00026   fNorm = log(fP1);
00027   fP1 = fNorm; // to increase speed of exponent in GetEnergy
00028   //    cout<<fP0<<" "<<fP1<<" "<<fNorm<<" "<<fLnD_n<<" "<<fBt<<endl;
00029 }
00030 
00031 void TPhoton::SetThetaRange(double thmin, double thmax){
00032   double c1 = cos(thmax), c2 = cos(thmin);
00033   SetCosThetaRange(c1,c2);
00034 }
00035 
00036 void TPhoton::SetCosThetaRange(double c1, double c2){
00037   fLnD_n = log((1-fBetaI*c1)/(1+fBetaI*c1)*(1+fBetaI*c2)/(1-fBetaI*c2));
00038   fBt = (1+fBetaI*c1)/(1-fBetaI*c1);
00039     //    cout<<c1<<" "<<c2<<" "<<fLnD_n<<" "<<fBt<<endl;
00040 }
00041 
00042 const TLorentzVector &TPhoton::GetNewPhoton(){
00043   double E = fE*GetEnergy();
00044   double c = GetCosThetaF();
00045   double s = sqrt(1-c*c);
00046   double phi = GetPhi();
00047   double cp,sp;
00048   sincos(phi,&sp,&cp);
00049   //    cout<<E<<" "<<c<<" "<<phi<<endl;
00050   fk.SetPxPyPzE(E*cp*s,E*sp*s,E*c,E);
00051   fknorm = GetENorm()*GetThNormF()*GetPhiNorm();
00052   return fk;
00053 }

Generated on Tue Nov 29 23:12:42 2016 for BOSS_7.0.2 by  doxygen 1.4.7