rb::TPhoton Class Reference

#include <TPhoton_o.h>

Inheritance diagram for rb::TPhoton:

rb::TPhotonD List of all members.

Public Member Functions

 TPhoton ()
 TPhoton (double E)
 TPhoton (double E, double Emin, double Emax)
 ~TPhoton ()
void SetEnergyRange (double Emin, double Emax)
void SetThetaRange (double thmin, double thmax)
void SetCosThetaRange (double c1, double c2)
const TLorentzVector & GetPhoton ()
const TLorentzVector & GetNewPhoton ()
double GetPhotNorm ()
double GetEnergy ()
double GetENorm ()
double GetCosThetaF ()
double GetThNormF ()
double GetPhi ()
double GetPhiNorm ()

Protected Attributes

TLorentzVector fk
double fknorm
double fNorm
double fE
double fP0
double fP1
double fX
double fCosTheta
double fLnD
double fBetaI
double fiBetaI
double fLnD_n
double fBt

Detailed Description

Definition at line 7 of file TPhoton_o.h.


Constructor & Destructor Documentation

rb::TPhoton::TPhoton (  )  [inline]

Definition at line 23 of file TPhoton_o.h.

00023 {}

TPhoton::TPhoton ( double  E  ) 

Definition at line 4 of file TPhoton_o.C.

References fBetaI, fE, fiBetaI, rb::me, and SetCosThetaRange().

00004                         {
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 }

TPhoton::TPhoton ( double  E,
double  Emin,
double  Emax 
)

Definition at line 13 of file TPhoton_o.C.

References fBetaI, fE, fiBetaI, rb::me, SetCosThetaRange(), and SetEnergyRange().

00013                                                   {
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 }

rb::TPhoton::~TPhoton (  )  [inline]

Definition at line 26 of file TPhoton_o.h.

00026 {}


Member Function Documentation

double rb::TPhoton::GetCosThetaF (  )  [inline]

Definition at line 43 of file TPhoton_o.h.

References exp(), fBetaI, fBt, fCosTheta, and fLnD_n.

Referenced by GetNewPhoton().

00043                               {
00044     double d = fBt*exp(fLnD_n*gRandom->Rndm());
00045     fCosTheta = (d - 1)/(fBetaI*(d + 1));
00046     return fCosTheta;
00047   }

double rb::TPhoton::GetEnergy (  )  [inline]

Reimplemented in rb::TPhotonD.

Definition at line 38 of file TPhoton_o.h.

References exp(), fP0, fP1, and fX.

Referenced by GetNewPhoton(), and TCrossPart::GetValue().

00038                            {
00039     fX = fP0*exp(gRandom->Rndm()*fP1);
00040     return fX;
00041   }

double rb::TPhoton::GetENorm (  )  [inline]

Reimplemented in rb::TPhotonD.

Definition at line 42 of file TPhoton_o.h.

References fNorm, and fX.

Referenced by GetNewPhoton(), and TCrossPart::GetValue().

00042 {return fX*fNorm;}

const TLorentzVector & TPhoton::GetNewPhoton (  ) 

Definition at line 42 of file TPhoton_o.C.

References fE, fk, fknorm, GetCosThetaF(), GetEnergy(), GetENorm(), GetPhi(), GetPhiNorm(), GetThNormF(), and s.

Referenced by TCrossPart::GetValue().

00042                                            {
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 }

double rb::TPhoton::GetPhi (  )  [inline]

Definition at line 52 of file TPhoton_o.h.

References M_PI.

Referenced by GetNewPhoton().

00052                         {
00053     return 2*M_PI*gRandom->Rndm();
00054   }

double rb::TPhoton::GetPhiNorm (  )  [inline]

Definition at line 55 of file TPhoton_o.h.

References M_PI.

Referenced by GetNewPhoton().

00055 {return 2*M_PI;}

double rb::TPhoton::GetPhotNorm (  )  [inline]

Definition at line 37 of file TPhoton_o.h.

References fknorm.

Referenced by TCrossPart::GetValue().

00037 {return fknorm;}

const TLorentzVector& rb::TPhoton::GetPhoton (  )  [inline]

Definition at line 32 of file TPhoton_o.h.

References fk.

Referenced by TCrossPart::SetFinalParticles().

00032                                    {
00033     return fk;
00034   }

double rb::TPhoton::GetThNormF (  )  [inline]

Definition at line 48 of file TPhoton_o.h.

References fBetaI, fCosTheta, fiBetaI, and fLnD_n.

Referenced by GetNewPhoton().

00048                             {
00049     double k = fBetaI*fCosTheta;
00050     return 0.5*fiBetaI*fLnD_n*(1 - k*k);
00051   }

void TPhoton::SetCosThetaRange ( double  c1,
double  c2 
)

Definition at line 36 of file TPhoton_o.C.

References fBetaI, fBt, and fLnD_n.

Referenced by SetThetaRange(), and TPhoton().

00036                                                   {
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 }

void TPhoton::SetEnergyRange ( double  Emin,
double  Emax 
)

Definition at line 23 of file TPhoton_o.C.

References fE, fNorm, fP0, and fP1.

Referenced by T2piCrossPart::T2piCrossPart(), T3piCrossPart::T3piCrossPart(), T3piEtaCrossPart::T3piEtaCrossPart(), T4piCrossPart::T4piCrossPart(), T5piCrossPart::T5piCrossPart(), TKKEtaCrossPart::TKKEtaCrossPart(), TKKPCrossPart::TKKPCrossPart(), TPhoton(), and TRhoEtaCrossPart::TRhoEtaCrossPart().

00023                                                     {
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 }

void TPhoton::SetThetaRange ( double  thmin,
double  thmax 
)

Definition at line 31 of file TPhoton_o.C.

References cos(), and SetCosThetaRange().

Referenced by TCrossPart::TCrossPart().

00031                                                      {
00032   double c1 = cos(thmax), c2 = cos(thmin);
00033   SetCosThetaRange(c1,c2);
00034 }


Member Data Documentation

double rb::TPhoton::fBetaI [protected]

Definition at line 18 of file TPhoton_o.h.

Referenced by GetCosThetaF(), GetThNormF(), SetCosThetaRange(), and TPhoton().

double rb::TPhoton::fBt [protected]

Definition at line 21 of file TPhoton_o.h.

Referenced by GetCosThetaF(), and SetCosThetaRange().

double rb::TPhoton::fCosTheta [protected]

Definition at line 16 of file TPhoton_o.h.

Referenced by GetCosThetaF(), and GetThNormF().

double rb::TPhoton::fE [protected]

Definition at line 12 of file TPhoton_o.h.

Referenced by GetNewPhoton(), SetEnergyRange(), and TPhoton().

double rb::TPhoton::fiBetaI [protected]

Definition at line 19 of file TPhoton_o.h.

Referenced by GetThNormF(), and TPhoton().

TLorentzVector rb::TPhoton::fk [protected]

Definition at line 9 of file TPhoton_o.h.

Referenced by GetNewPhoton(), and GetPhoton().

double rb::TPhoton::fknorm [protected]

Definition at line 10 of file TPhoton_o.h.

Referenced by GetNewPhoton(), and GetPhotNorm().

double rb::TPhoton::fLnD [protected]

Definition at line 17 of file TPhoton_o.h.

double rb::TPhoton::fLnD_n [protected]

Definition at line 20 of file TPhoton_o.h.

Referenced by GetCosThetaF(), GetThNormF(), and SetCosThetaRange().

double rb::TPhoton::fNorm [protected]

Definition at line 11 of file TPhoton_o.h.

Referenced by rb::TPhotonD::GetENorm(), GetENorm(), rb::TPhotonD::Init(), and SetEnergyRange().

double rb::TPhoton::fP0 [protected]

Definition at line 13 of file TPhoton_o.h.

Referenced by rb::TPhotonD::GetEnergy(), GetEnergy(), rb::TPhotonD::Init(), and SetEnergyRange().

double rb::TPhoton::fP1 [protected]

Definition at line 14 of file TPhoton_o.h.

Referenced by rb::TPhotonD::GetEnergy(), GetEnergy(), rb::TPhotonD::Init(), and SetEnergyRange().

double rb::TPhoton::fX [protected]

Definition at line 15 of file TPhoton_o.h.

Referenced by rb::TPhotonD::GetEnergy(), GetEnergy(), and GetENorm().


Generated on Tue Nov 29 23:36:35 2016 for BOSS_7.0.2 by  doxygen 1.4.7