#include <TEvent.h>
Public Member Functions | |
TEvent () | |
virtual | ~TEvent () |
void | Init () |
bool | MakeEvent (const double &, const double &, const double &, const double &, const double &, const double &, const double &, const double &) |
bool | MakeEvent (const double &, const double &, const double &) |
bool | MakeEventgg (const double &, const double &, const double &) |
bool | MakeEventN (const double &, const double &) |
bool | MakeEvent (const double &, const double &, const double &, const double &, const double &) |
bool | MakeEvent (const double &) |
bool | MakeEvent (const double &, TPhoton *, const unsigned int) |
bool | Select () |
bool | Selectgg () |
void | GetEvent (double &p0, double &t0, double &ph0, double &p1, double &t1, double &ph1) |
double | GetPhi () |
double | GetY (unsigned int i) |
void | Print () |
void | PrintSelectStat () |
double | GetCosPsi () |
void | GetPPar (unsigned int i, double &e, double &p, double &c) |
TLorentzVector | Get4Vector (unsigned int i) |
double | GetChiPrime (unsigned int i) |
double | GetSumComponent (unsigned int i) |
void | Swap () |
void | CosPrint () |
void | SetdPar (double *p) |
double | dDeltaTheta () |
double | dDeltaPhi () |
double | dATheta () |
void | GetEvent (double *, int &) |
Protected Attributes | |
double | fen [3] |
double | fp [3] |
double | fY [3] |
double | fth [3] |
double | fcth [3] |
double | fsth [3] |
double | fph [3] |
double | fcph [3] |
double | fsph [3] |
bool | fIsSmear |
double | fdPar [9] |
double | fxg [4] |
double | fCosPsi |
unsigned int | fNSelStat |
unsigned int * | fSelStat |
Definition at line 13 of file TEvent.h.
TEvent::TEvent | ( | ) |
TEvent::~TEvent | ( | ) | [virtual] |
void TEvent::CosPrint | ( | ) |
Definition at line 611 of file TEvent.C.
References fcph, fcth, fp, fsph, fsth, Ne, Ng1, and Np.
00611 { 00612 double pm[3],pp[3],pg[3]; 00613 00614 pm[0] = fp[Ne]*fcph[Ne]*fsth[Ne]; 00615 pm[1] = fp[Ne]*fsph[Ne]*fsth[Ne]; 00616 pm[2] = fp[Ne]*fcth[Ne]; 00617 00618 pp[0] = fp[Np]*fcph[Np]*fsth[Np]; 00619 pp[1] = fp[Np]*fsph[Np]*fsth[Np]; 00620 pp[2] = fp[Np]*fcth[Np]; 00621 00622 pg[0] = fp[Ng1]*fcph[Ng1]*fsth[Ng1]; 00623 pg[1] = fp[Ng1]*fsph[Ng1]*fsth[Ng1]; 00624 pg[2] = fp[Ng1]*fcth[Ng1]; 00625 00626 double cos_m = (pm[0]*pg[0] + pm[1]*pg[1] + pm[2]*pg[2])/(fp[Ne]*fp[Ng1]); 00627 double cos_p = (pp[0]*pg[0] + pp[1]*pg[1] + pp[2]*pg[2])/(fp[Np]*fp[Ng1]); 00628 00629 std::cout<<"cos "<<cos_m<<" "<<cos_p<<std::endl; 00630 00631 }
double TEvent::dATheta | ( | ) | [inline] |
double TEvent::dDeltaPhi | ( | ) | [inline] |
Definition at line 110 of file TEvent.h.
References fdPar, and fIsSmear.
Referenced by Select(), and Selectgg().
00110 { 00111 if ( !fIsSmear ) return 0; 00112 double sigma = 0; 00113 if(gRandom->Rndm()<fdPar[3]) 00114 sigma = fdPar[4]; 00115 else 00116 sigma = fdPar[5]; 00117 return gRandom->Gaus(0,sigma); 00118 }
double TEvent::dDeltaTheta | ( | ) | [inline] |
Definition at line 101 of file TEvent.h.
References fdPar, and fIsSmear.
Referenced by Select(), and Selectgg().
00101 { 00102 if ( !fIsSmear ) return 0; 00103 double sigma = 0; 00104 if(gRandom->Rndm()<fdPar[0]) 00105 sigma = fdPar[1]; 00106 else 00107 sigma = fdPar[2]; 00108 return gRandom->Gaus(0,sigma); 00109 }
TLorentzVector TEvent::Get4Vector | ( | unsigned int | i | ) | [inline] |
Definition at line 71 of file TEvent.h.
References fcph, fcth, fen, fp, fsph, and fsth.
Referenced by TGGCrossPart::R_3_Gamma(), TMuCrossPart::R_e_mu_Gamma_t(), TPiCrossPart::R_Gamma_kuraev_eidelman(), and TPiCrossPart::R_Gamma_t().
00071 { 00072 return TLorentzVector(fp[i]*fsth[i]*fcph[i],fp[i]*fsth[i]*fsph[i],fp[i]*fcth[i],fen[i]); 00073 }
double TEvent::GetChiPrime | ( | unsigned int | i | ) | [inline] |
double TEvent::GetCosPsi | ( | ) | [inline] |
Definition at line 67 of file TEvent.h.
References fCosPsi.
Referenced by TGGCrossPart::R_3_Gamma(), TMuCrossPart::R_e_Gamma(), TMuCrossPart::R_e_Gamma_t(), TMuCrossPart::R_e_mu_Gamma_t(), TMuCrossPart::R_f_Gamma(), TPiCrossPart::R_Gamma(), TPiCrossPart::R_Gamma_kuraev_eidelman(), TPiCrossPart::R_Gamma_t(), TEPCrossPart::RGamma(), and TEPCrossPart::RGamma_kuraev_eidelman().
00067 {return fCosPsi;};
void TEvent::GetEvent | ( | double * | , | |
int & | ||||
) |
Definition at line 633 of file TEvent.C.
References fcph, fcth, fen, fp, fsph, fsth, fxg, fY, TRadGlobal::Get_E(), gGlobal, Ne, Ng1, and Np.
00633 { 00634 const double MeV2GeV = 0.001; 00635 npart = 0; 00636 00637 mom[4*npart+0] = fsth[Ne]*fcph[Ne]; 00638 mom[4*npart+1] = fsth[Ne]*fsph[Ne]; 00639 mom[4*npart+2] = fcth[Ne]; 00640 mom[4*npart+3] = MeV2GeV*gGlobal->Get_E()*fp[Ne]; 00641 npart++; 00642 00643 mom[4*npart+0] = fsth[Np]*fcph[Np]; 00644 mom[4*npart+1] = fsth[Np]*fsph[Np]; 00645 mom[4*npart+2] = fcth[Np]; 00646 mom[4*npart+3] = MeV2GeV*gGlobal->Get_E()*fp[Np]; 00647 npart++; 00648 00649 if(fen[Ng1]>0){ 00650 mom[4*npart+0] = fsth[Ng1]*fcph[Ng1]; 00651 mom[4*npart+1] = fsth[Ng1]*fsph[Ng1]; 00652 mom[4*npart+2] = fcth[Ng1]; 00653 mom[4*npart+3] = MeV2GeV*gGlobal->Get_E()*fp[Ng1]; 00654 npart++; 00655 } else { 00656 if(fxg[0]>0){ 00657 mom[4*npart+0] = 0; 00658 mom[4*npart+1] = 0; 00659 mom[4*npart+2] = 0.999999; 00660 mom[4*npart+3] = MeV2GeV*gGlobal->Get_E()*fxg[0]; 00661 npart++; 00662 } 00663 if(fxg[1]>0){ 00664 mom[4*npart+0] = 0; 00665 mom[4*npart+1] = 0; 00666 mom[4*npart+2] = -0.999999; 00667 mom[4*npart+3] = MeV2GeV*gGlobal->Get_E()*fxg[1]; 00668 npart++; 00669 } 00670 if(fxg[2]>0){ 00671 mom[4*npart+0] = fsth[Ne]*fcph[Ne]; 00672 mom[4*npart+1] = fsth[Ne]*fsph[Ne]; 00673 mom[4*npart+2] = fcth[Ne]; 00674 mom[4*npart+3] = MeV2GeV*gGlobal->Get_E()*fY[Ne]*fxg[2]; 00675 npart++; 00676 } 00677 if(fxg[3]>0){ 00678 mom[4*npart+0] = fsth[Np]*fcph[Np]; 00679 mom[4*npart+1] = fsth[Np]*fsph[Np]; 00680 mom[4*npart+2] = fcth[Np]; 00681 mom[4*npart+3] = MeV2GeV*gGlobal->Get_E()*fY[Np]*fxg[3]; 00682 npart++; 00683 } 00684 } 00685 }
void TEvent::GetEvent | ( | double & | p0, | |
double & | t0, | |||
double & | ph0, | |||
double & | p1, | |||
double & | t1, | |||
double & | ph1 | |||
) | [inline] |
double TEvent::GetPhi | ( | ) | [inline] |
Definition at line 61 of file TEvent.h.
References gConst, and TConstants::Pi().
Referenced by MakeEvent(), and MakeEventgg().
void TEvent::GetPPar | ( | unsigned int | i, | |
double & | e, | |||
double & | p, | |||
double & | c | |||
) | [inline] |
Definition at line 68 of file TEvent.h.
Referenced by TPiCrossPart::BornShift(), TMuCrossPart::BornShift(), TMuCrossPart::R_e_Gamma(), TMuCrossPart::R_e_Gamma_t(), TMuCrossPart::R_f_Gamma(), TPiCrossPart::R_Gamma(), TEPCrossPart::RGamma(), and TEPCrossPart::RGamma_kuraev_eidelman().
double TEvent::GetSumComponent | ( | unsigned int | i | ) | [inline] |
Definition at line 77 of file TEvent.h.
References fcph, fcth, fen, fp, fsph, fsth, Ne, Ng1, and Np.
00077 { 00078 switch(i){ 00079 case 0: 00080 return fen[Ne] + fen[Np] + fen[Ng1]; 00081 break; 00082 case 1: 00083 return fp[Ne]*fsth[Ne]*fcph[Ne] + fp[Np]*fsth[Np]*fcph[Np] + fp[Ng1]*fsth[Ng1]*fcph[Ng1]; 00084 break; 00085 case 2: 00086 return fp[Ne]*fsth[Ne]*fsph[Ne] + fp[Np]*fsth[Np]*fsph[Np] + fp[Ng1]*fsth[Ng1]*fsph[Ng1]; 00087 break; 00088 case 3: 00089 return fp[Ne]*fcth[Ne] + fp[Np]*fcth[Np] + fp[Ng1]*fcth[Ng1]; 00090 break; 00091 } 00092 return 0; 00093 }
double TEvent::GetY | ( | unsigned int | i | ) | [inline] |
Definition at line 62 of file TEvent.h.
References fY.
Referenced by TEPCrossPart::BornShift(), and TEPCrossPart::GetValue().
void TEvent::Init | ( | ) |
Definition at line 19 of file TEvent.C.
References fdPar, fIsSmear, fNSelStat, fSelStat, and genRecEmupikp::i.
Referenced by TPiCrossPart::Init(), TMuCrossPart::Init(), TGGCrossPart::Init(), TEPCrossPart::Init(), and TEvent().
00019 { 00020 for(unsigned int i=0;i<fNSelStat;i++){ 00021 fSelStat[i] = 0; 00022 } 00023 fIsSmear = false; 00024 for(unsigned int i=0;i<6;i++){ 00025 fdPar[i] = 0; 00026 } 00027 }
Definition at line 247 of file TEvent.C.
References fCosPsi, fcph, fcth, fen, fp, fph, fsph, fsth, fth, TRadGlobal::Get_CosTheta0(), TRadGlobal::Get_CosThetaInt(), TRadGlobal::Get_CosThetaMin(), TRadGlobal::Get_MF2(), TRadGlobal::Get_XMin(), TPhoton::GetCosTheta(), TPhoton::GetCosThetaF(), TPhoton::GetEnergy(), GetPhi(), TPhoton::GetPhi(), gGlobal, INRANGE, Ne, Ng1, Np, Select(), Selectgg(), TPhoton::SetCosTheta(), TPhoton::SetEnergy(), and t().
00247 { 00248 #ifdef FIXP 00249 double c1g = 0.98; 00250 Ph->SetCosTheta(c1g); 00251 #else 00252 double c1g; 00253 if(SType == 0) 00254 c1g = Ph->GetCosThetaF(); 00255 else 00256 c1g = Ph->GetCosTheta(); 00257 #endif 00258 if( SType == 1 && fabs(c1g)<gGlobal->Get_CosThetaInt()) return false; 00259 double s1g = sqrt(1-c1g*c1g); 00260 00261 #ifdef FIXP 00262 double p1g = 1.2; 00263 #else 00264 double p1g = Ph->GetPhi(); 00265 #endif 00266 double cp1g, sp1g; 00267 // __sincos(p1g, &sp1g, &cp1g); 00268 sincos(p1g, &sp1g, &cp1g); 00269 00270 fcth[Ne] = c; 00271 fsth[Ne] = sqrt(1-fcth[Ne]*fcth[Ne]); 00272 00273 #ifdef FIXP 00274 fph[Ne] = 0.; 00275 #else 00276 fph[Ne] = GetPhi(); 00277 #endif 00278 // __sincos(fph[Ne], &fsph[Ne], &fcph[Ne]); 00279 sincos(fph[Ne], &fsph[Ne], &fcph[Ne]); 00280 double nx,ny,nz; 00281 if( SType == 0){ 00282 //singularities around final particles 00283 // cout<<fcth[Ne]<<" "<<c1g<<" "<<fsth[Ne]<<" "<<s1g<<" "<<cp1g<<endl; 00284 nz = fcth[Ne]*c1g + fsth[Ne]*s1g*cp1g; 00285 // cout<<DB(nz)<<endl; 00286 if ( fabs(nz) > gGlobal->Get_CosThetaInt() ) return false; 00287 fcth[Ng1] = nz; 00288 fsth[Ng1] = sqrt(1-fcth[Ng1]*fcth[Ng1]); 00289 00290 double nxp = fsth[Ne]*c1g - fcth[Ne]*s1g*cp1g; 00291 double nyp =-s1g*sp1g; 00292 nx = fcph[Ne]*nxp - fsph[Ne]*nyp; 00293 ny = fsph[Ne]*nxp + fcph[Ne]*nyp; 00294 // double norm = 1/sqrt(nx*nx + ny*ny); 00295 double norm = 1/fsth[Ng1]; 00296 fcph[Ng1] = nx*norm; 00297 fsph[Ng1] = ny*norm; 00298 // cout<<DB(nx)<<DB(ny)<<endl; 00299 fCosPsi = c1g; 00300 }else{ 00301 // singularities around initial particles; 00302 fcth[Ng1] = c1g; 00303 fsth[Ng1] = s1g; 00304 00305 fph[Ng1] = p1g; 00306 fcph[Ng1] = cp1g; 00307 fsph[Ng1] = sp1g; 00308 00309 nx = fsth[Ng1]*fcph[Ng1]; 00310 ny = fsth[Ng1]*fsph[Ng1]; 00311 nz = fcth[Ng1]; 00312 fCosPsi = (nx*fcph[Ne]+ny*fsph[Ne])*fsth[Ne] + nz*fcth[Ne]; 00313 if(SType == 1){ // if Bhabha Excluding theta0 cone around final electron 00314 if ( fCosPsi > gGlobal->Get_CosTheta0() ) return false; 00315 } 00316 } 00317 00318 #ifdef FIXP 00319 fen[Ng1] = fp[Ng1] = 0.1; 00320 Ph->SetEnergy(fen[Ng1]); 00321 #else 00322 fen[Ng1] = fp[Ng1] = Ph->GetEnergy(); 00323 if (SType == 3 && fen[Ng1] > 0.5 ) return false; 00324 #endif 00325 00326 double k2 = fen[Ng1]*fen[Ng1]; 00327 double t = 2 - fen[Ng1]; 00328 double b = t*t - k2; 00329 // to build real final electro-positron system we must have enough 00330 // energy 00331 // cout<<fen[Ng1]<<" "<<t<<" "<<k2<<" "<<gGlobal->Get_MF2()<<endl; 00332 if ( b<4*gGlobal->Get_MF2() ) return false; 00333 00334 double kcospsi = fen[Ng1]*fCosPsi; 00335 double ap = kcospsi*kcospsi-t*t; 00336 double d = 4*gGlobal->Get_MF2()*ap + b*b; 00337 // cout<<"kuku0 "<<b<<endl; 00338 if ( d < 0 ) return false; // equation must have real roots 00339 // (determinant>=0) 00340 00341 fen[Ne] = 0.5*( -t*b + kcospsi*sqrt(d) )/ap; 00342 fen[Np] = t - fen[Ne]; 00343 if(SType == 3 && fen[Ne] < gGlobal->Get_XMin()) return false; 00344 if(SType == 3 && fen[Np] < gGlobal->Get_XMin()) return false; 00345 00346 fp[Ne] = sqrt(fen[Ne]*fen[Ne] - gGlobal->Get_MF2()); 00347 fp[Np] = sqrt(fen[Np]*fen[Np] - gGlobal->Get_MF2()); 00348 00349 fcth[Np] = -(fen[Ng1]*nz + fp[Ne]*fcth[Ne])/fp[Np]; 00350 // cout<<"kuku1 "<<fcth[Np]<<endl; 00351 00352 // if(SType<3){ 00353 // positron must be in detector volume 00354 if ( SType != 3 && fabs(fcth[Np]) > gGlobal->Get_CosThetaMin() ) return false; 00355 if ( SType == 3 && fabs(fcth[Np]) > gGlobal->Get_CosTheta0() ) return false; 00356 // } else { 00357 // outside narrow cone of initial particles 00358 // if ( fabs(fcth[Np]) > gGlobal->Get_CosTheta0() ) return false; 00359 // } 00360 00361 fsth[Np] = sqrt(1-fcth[Np]*fcth[Np]); 00362 00363 double inv = 1/(fp[Np]*fsth[Np]); 00364 fcph[Np] = -(fp[Ne]*fsth[Ne]*fcph[Ne] + fen[Ng1]*nx)*inv; 00365 // cout<<"kuku2 "<<fabs(fcph[Np])-1<<endl; 00366 if ( fabs(fcph[Np]) > 1 + 1e-10 ) return false; 00367 fsph[Np] = -(fp[Ne]*fsth[Ne]*fsph[Ne] + fen[Ng1]*ny)*inv; 00368 // cout<<"kuku3 "<<fabs(fsph[Np])-1<<endl; 00369 if ( fabs(fsph[Np]) > 1 + 1e-10 ) return false; 00370 00371 if(SType == 1 || SType == 0){ // if Bhabha Excluding theta0 cone 00372 // around final positron 00373 double cos_psi_p = (nx*fcph[Np]+ny*fsph[Np])*fsth[Np] + nz*fcth[Np]; 00374 // cout<<"kuku4 "<<cos_psi_p<<endl; 00375 if ( cos_psi_p > gGlobal->Get_CosTheta0() ) { 00376 // cout<<DB(cos_psi_p)<<endl; 00377 return false; 00378 } 00379 } 00380 00381 fth[Ne] = acos(fcth[Ne]); 00382 fth[Np] = acos(fcth[Np]); 00383 fth[Ng1] = acos(fcth[Ng1]); 00384 00385 fph[Np] = atan2(fsph[Np],fcph[Np]); 00386 fph[Ng1] = atan2(fsph[Ng1],fcph[Ng1]); 00387 00388 // cout<<DB(fph[Np])<<endl; 00389 INRANGE(fph[Np]); 00390 // Print(); 00391 return (SType<3)?Select():Selectgg(); 00392 }
bool TEvent::MakeEvent | ( | const double & | ) |
Definition at line 561 of file TEvent.C.
References cos(), fcph, fcth, fen, fp, fph, fsph, fsth, fth, fxg, fY, gConst, TRadGlobal::Get_BetaF(), GetPhi(), gGlobal, INRANGE, Ne, Ng1, Np, TConstants::Pi(), Select(), and sin().
00561 { 00562 // draw kinematic for elastic collision 00563 fen[Ng1] = 0; 00564 fxg[0] = 0; 00565 fxg[1] = 0; 00566 fxg[2] = 0; 00567 fxg[3] = 0; 00568 00569 fY[Ne] = 1; 00570 fen[Ne] = 1; 00571 fp[Ne] = gGlobal->Get_BetaF(); 00572 fcth[Ne] = c; 00573 fsth[Ne] = sqrt(1-fcth[Ne]*fcth[Ne]); 00574 fth[Ne] = acos(fcth[Ne]); 00575 fph[Ne] = GetPhi(); 00576 fcph[Ne] = cos(fph[Ne]); 00577 fsph[Ne] = sin(fph[Ne]); 00578 00579 fY[Np] = 1; 00580 fen[Np] = 1; 00581 fp[Np] = gGlobal->Get_BetaF(); 00582 fcth[Np] = -fcth[Ne]; 00583 fsth[Np] = fsth[Ne]; 00584 fth[Np] = gConst->Pi() - fth[Ne]; 00585 fph[Np] = fph[Ne] + gConst->Pi(); 00586 INRANGE(fph[Np]); 00587 fcph[Np] = -fcph[Ne]; 00588 fsph[Np] = -fsph[Ne]; 00589 00590 return Select(); 00591 }
bool TEvent::MakeEvent | ( | const double & | , | |
const double & | , | |||
const double & | , | |||
const double & | , | |||
const double & | ||||
) |
Definition at line 482 of file TEvent.C.
References cos(), fcph, fcth, fen, fIsSmear, fp, fph, fsph, fsth, fth, fxg, fY, gConst, GetPhi(), INRANGE, Ne, Ng1, Np, TConstants::Pi(), Select(), and sin().
00484 { 00485 // kinematics in massless approach for final and initial particles. 00486 fen[Ng1] = 0; 00487 fxg[0] = x1g; 00488 fxg[1] = x2g; 00489 fxg[2] = x3g; 00490 fxg[3] = x4g; 00491 00492 fcth[Ne] = c; 00493 00494 double e = 2 - x1g - x2g; 00495 fY[Ne] = 2*(1-x1g)*(1-x2g)/(e-fcth[Ne]*(x2g-x1g)); 00496 fY[Np] = e - fY[Ne]; 00497 00498 fen[Ne] = fY[Ne]*(1 - x3g); 00499 fen[Np] = fY[Np]*(1 - x4g); 00500 00501 if( fen[Ne] < 0 || fen[Np] < 0 ) return false; 00502 fp[Ne] = fen[Ne]; 00503 fp[Np] = fen[Np]; 00504 00505 fsth[Ne] = sqrt(1-fcth[Ne]*fcth[Ne]); 00506 fth[Ne] = acos(fcth[Ne]); 00507 00508 fph[Ne] = GetPhi(); 00509 fcph[Ne] = cos(fph[Ne]); 00510 fsph[Ne] = sin(fph[Ne]); 00511 00512 double inv = 1/fY[Np]; 00513 fcth[Np] = (x2g-x1g-fY[Ne]*fcth[Ne])*inv; 00514 fsth[Np] = fsth[Ne]*fY[Ne]*inv; 00515 fth[Np] = acos(fcth[Np]); 00516 00517 fph[Np] = fph[Ne] + gConst->Pi(); 00518 00519 INRANGE(fph[Np]); 00520 00521 fcph[Np] = -fcph[Ne]; 00522 fsph[Np] = -fsph[Ne]; 00523 00524 if(fIsSmear) 00525 return 1; 00526 else 00527 return Select(); 00528 }
bool TEvent::MakeEvent | ( | const double & | , | |
const double & | , | |||
const double & | ||||
) |
Definition at line 394 of file TEvent.C.
References fcph, fcth, fen, fp, fph, fsph, fsth, fth, fxg, fY, gConst, TRadGlobal::Get_CosThetaMin(), TRadGlobal::Get_MF2(), GetPhi(), gGlobal, INRANGE, Ne, Ng1, Np, TConstants::Pi(), Select(), and t().
00394 { 00395 // kinematics in collinear region for initial particles, final 00396 // particles have non-zero mass. 00397 00398 fen[Ng1] = 0; 00399 fxg[0] = x1g; 00400 fxg[1] = x2g; 00401 fxg[2] = 0; 00402 fxg[3] = 0; 00403 00404 fcth[Ne] = c; 00405 fsth[Ne] = sqrt(1-fcth[Ne]*fcth[Ne]); 00406 00407 double pz = x1g - x2g; 00408 double kcospsi = pz*fcth[Ne]; 00409 double t = 2 - x1g - x2g; 00410 double ap = kcospsi*kcospsi-t*t; 00411 double b = t*t - pz*pz; 00412 double d = 4*gGlobal->Get_MF2()*ap + b*b; 00413 00414 if ( d < 0 ) return false; 00415 00416 fY[Ne] = fen[Ne] = 0.5*( -t*b + kcospsi*sqrt(d) )/ap; 00417 fY[Np] = fen[Np] = t - fen[Ne]; 00418 00419 fp[Ne] = sqrt(fen[Ne]*fen[Ne]-gGlobal->Get_MF2()); 00420 fp[Np] = sqrt(fen[Np]*fen[Np]-gGlobal->Get_MF2()); 00421 00422 fcth[Np] = -(pz + fp[Ne]*fcth[Ne])/fp[Np]; 00423 if ( fabs(fcth[Np]) > gGlobal->Get_CosThetaMin() ) return false; 00424 00425 fsth[Np] = sqrt(1-fcth[Np]*fcth[Np]); 00426 fth[Ne] = acos(fcth[Ne]); 00427 fth[Np] = acos(fcth[Np]); 00428 00429 fph[Ne] = GetPhi(); 00430 // __sincos(fph[Ne], &fsph[Ne], &fcph[Ne]); 00431 sincos(fph[Ne], &fsph[Ne], &fcph[Ne]); 00432 00433 fcph[Np] = -fcph[Ne]; 00434 fsph[Np] = -fsph[Ne]; 00435 fph[Np] = fph[Ne] + gConst->Pi(); 00436 INRANGE(fph[Np]); 00437 00438 return Select(); 00439 }
bool TEvent::MakeEvent | ( | const double & | , | |
const double & | , | |||
const double & | , | |||
const double & | , | |||
const double & | , | |||
const double & | , | |||
const double & | , | |||
const double & | ||||
) |
Definition at line 186 of file TEvent.C.
References cos(), fcph, fcth, fen, fp, fph, fsph, fsth, fth, TRadGlobal::Get_MF2(), gGlobal, INRANGE, Ne, Np, pphi1, pphi2, Select(), sin(), and t().
Referenced by TVCrossPart::BornCrossSection(), TPiCrossPart::GetValue(), TMuCrossPart::GetValue(), TGGCrossPart::GetValue(), and TEPCrossPart::GetValue().
00189 { 00190 double pen1 = x1g; 00191 double pcosth1 = cos1g; 00192 double psinth1 = sqrt(1-pcosth1*pcosth1); 00193 double pphi1 = phi1g; 00194 double pcosph1 = cos(pphi1); 00195 double psinph1 = sin(pphi1); 00196 00197 double pen2 = x2g; 00198 double pcosth2 = cos2g; 00199 double psinth2 = sqrt(1-pcosth2*pcosth2); 00200 double pphi2 = phi2g; 00201 double pcosph2 = cos(pphi2); 00202 double psinph2 = sin(pphi2); 00203 00204 double px = pen1*psinth1*pcosph1 + pen2*psinth2*pcosph2; 00205 double py = pen1*psinth1*psinph1 + pen2*psinth2*psinph2; 00206 double pz = pen1*pcosth1 + pen2*pcosth2; 00207 double k2 = px*px+py*py+pz*pz; 00208 00209 fcth[Ne] = c; 00210 fth[Ne] = acos(fcth[Ne]); 00211 fsth[Ne] = sqrt(1-c*c); 00212 00213 fph[Ne] = phi; 00214 fcph[Ne] = cos(fph[Ne]); 00215 fsph[Ne] = sin(fph[Ne]); 00216 00217 double kcospsi = (px*fcph[Ne]+py*fsph[Ne])*fsth[Ne] + pz*fcth[Ne]; 00218 double t = 2 - pen1 - pen2; 00219 double ap = kcospsi*kcospsi-t*t; 00220 double b = t*t - k2; 00221 double d = 4*gGlobal->Get_MF2()*ap + b*b; 00222 if ( d > 0 ) { 00223 00224 fen[Ne] = 0.5*( -t*b + kcospsi*sqrt(d) )/ap; 00225 fen[Np] = t - fen[Ne]; 00226 00227 fp[Ne] = sqrt(fen[Ne]*fen[Ne]-gGlobal->Get_MF2()); 00228 fp[Np] = sqrt(fen[Np]*fen[Np]-gGlobal->Get_MF2()); 00229 00230 fcth[Np] = -(pz + fp[Ne]*fcth[Ne])/fp[Np]; 00231 if ( fabs(fcth[Np]) <= 1){ 00232 fsth[Np] = sqrt(1-fcth[Np]*fcth[Np]); 00233 fth[Np] = acos(fcth[Np]); 00234 fcph[Np] = -(fp[Ne]*fsth[Ne]*fcph[Ne]+px)/(fp[Np]*fsth[Np]); 00235 fsph[Np] = -(fp[Ne]*fsth[Ne]*fsph[Ne]+py)/(fp[Np]*fsth[Np]); 00236 fph[Np] = atan2(fsph[Np],fcph[Np]); 00237 INRANGE(fph[Np]); 00238 } else 00239 return false; 00240 } else 00241 return false; 00242 00243 return Select(); 00244 }
bool TEvent::MakeEventgg | ( | const double & | , | |
const double & | , | |||
const double & | ||||
) |
Definition at line 441 of file TEvent.C.
References fcph, fcth, fen, fp, fph, fsph, fsth, fth, fxg, fY, gConst, TRadGlobal::Get_CosThetaMin(), GetPhi(), gGlobal, INRANGE, Ne, Ng1, Np, TConstants::Pi(), Selectgg(), and t().
Referenced by TGGCrossPart::GetValue().
00441 { 00442 // kinematics in collinear region for initial particles, final 00443 // particles are photons. 00444 00445 fen[Ng1] = 0; 00446 fxg[0] = x1g; 00447 fxg[1] = x2g; 00448 fxg[2] = 0; 00449 fxg[3] = 0; 00450 00451 fcth[Ne] = c; 00452 fsth[Ne] = sqrt(1-fcth[Ne]*fcth[Ne]); 00453 00454 double pz = x1g - x2g; 00455 double kcospsi = pz*fcth[Ne]; 00456 double t = 2 - x1g - x2g; 00457 double ap = kcospsi*kcospsi-t*t; 00458 double b = t*t - pz*pz; 00459 00460 fp[Ne] = fY[Ne] = fen[Ne] = 0.5*b*(kcospsi - t)/ap; 00461 fp[Np] = fY[Np] = fen[Np] = t - fen[Ne]; 00462 00463 fcth[Np] = -(pz + fp[Ne]*fcth[Ne])/fp[Np]; 00464 if ( fabs(fcth[Np]) > gGlobal->Get_CosThetaMin() ) return false; 00465 00466 fsth[Np] = sqrt(1-fcth[Np]*fcth[Np]); 00467 fth[Ne] = acos(fcth[Ne]); 00468 fth[Np] = acos(fcth[Np]); 00469 00470 fph[Ne] = GetPhi(); 00471 // __sincos(fph[Ne], &fsph[Ne], &fcph[Ne]); 00472 sincos(fph[Ne], &fsph[Ne], &fcph[Ne]); 00473 00474 fcph[Np] = -fcph[Ne]; 00475 fsph[Np] = -fsph[Ne]; 00476 fph[Np] = fph[Ne] + gConst->Pi(); 00477 INRANGE(fph[Np]); 00478 00479 return Selectgg(); 00480 }
bool TEvent::MakeEventN | ( | const double & | , | |
const double & | ||||
) |
Definition at line 530 of file TEvent.C.
References fen, fp, fxg, fY, Ne, Ng1, Np, and Select().
Referenced by TEPCrossPart::GetValue().
00530 { 00531 // kinematics in massless approach for final particles radiation. 00532 fen[Ng1] = 0; 00533 fxg[2] = x3g; 00534 fxg[3] = x4g; 00535 00536 fen[Ne] = fY[Ne]*(1 - x3g); 00537 fen[Np] = fY[Np]*(1 - x4g); 00538 00539 fp[Ne] = fen[Ne]; 00540 fp[Np] = fen[Np]; 00541 /* 00542 if ( fen[Ne] < gCut->EMin() || fen[Np] < gCut->EMin() ) {fSelStat[2]++; return false;} 00543 00544 if ( (fp[Ne]*fsth[Ne] < gCut->PCross() ) || (fp[Np]*fsth[Np] < gCut->PCross() )) {fSelStat[5]++; return false;} 00545 00546 if ( 0.5*(fp[Ne] + fp[Np]) < gCut->PAverage() ) {fSelStat[7]++; return false;} 00547 */ 00548 return Select(); 00549 }
void TEvent::Print | ( | ) |
Definition at line 551 of file TEvent.C.
References cos(), fen, fp, fph, fth, Ne, Ng1, Np, and sin().
Referenced by TEPCrossPart::GetValue(), and TVCrossPart::PrintEvent().
00551 { 00552 printf("Electron en=%f, p=%f, th=%f, phi=%f\n",fen[Ne],fp[Ne],fth[Ne],fph[Ne]); 00553 printf("Positron en=%f, p=%f, th=%f, phi=%f\n",fen[Np],fp[Np],fth[Np],fph[Np]); 00554 printf("Gamma en=%f, p=%f, th=%f, phi=%f\n",fen[Ng1],fp[Ng1],fth[Ng1],fph[Ng1]); 00555 printf("Sum en=%g, px=%g, py=%g, pz=%g\n",fen[Ne]+fen[Np]+fen[Ng1], 00556 fp[Ne]*sin(fth[Ne])*cos(fph[Ne])+fp[Np]*sin(fth[Np])*cos(fph[Np])+fp[Ng1]*sin(fth[Ng1])*cos(fph[Ng1]), 00557 fp[Ne]*sin(fth[Ne])*sin(fph[Ne])+fp[Np]*sin(fth[Np])*sin(fph[Np])+fp[Ng1]*sin(fth[Ng1])*sin(fph[Ng1]), 00558 fp[Ne]*cos(fth[Ne])+fp[Np]*cos(fth[Np])+fp[Ng1]*cos(fth[Ng1])); 00559 }
void TEvent::PrintSelectStat | ( | ) | [inline] |
bool TEvent::Select | ( | ) |
Definition at line 79 of file TEvent.C.
References TKinemCut::AverageThetaMax(), TKinemCut::CosPsi(), dATheta(), dDeltaPhi(), dDeltaTheta(), TKinemCut::DeltaPhi(), TKinemCut::DeltaTheta(), TKinemCut::EMin(), fcph, fcth, fen, fp, fph, fSelStat, fsph, fsth, fth, gConst, gCut, Ne, Np, TKinemCut::PAverage(), TKinemCut::PCross(), TConstants::Pi(), TKinemCut::ThetaMaxM(), TKinemCut::ThetaMaxP(), TKinemCut::ThetaMinM(), and TKinemCut::ThetaMinP().
Referenced by MakeEvent(), and MakeEventN().
00079 { 00080 00081 // if ( gGlobal->Get_E()*(2 - fen[Ne] - fen[Np]) < 10 ) return false; 00082 00083 if ( fth[Np] < gCut->ThetaMinP() || fth[Np] > gCut->ThetaMaxP() ) {fSelStat[0]++; return false;} 00084 00085 double theta_aver = 0.5*(fth[Ne] + gConst->Pi() - fth[Np]) + dATheta(); 00086 if ( theta_aver < gCut->AverageThetaMin() || theta_aver > gCut->AverageThetaMax() ) {fSelStat[6]++; return false;} 00087 double delta_theta = fth[Ne] + fth[Np] - gConst->Pi() + dDeltaTheta(); 00088 if ( fabs( delta_theta ) > gCut->DeltaTheta() ) {fSelStat[3]++; return false;} 00089 00090 if ( fen[Ne] < gCut->EMin() || fen[Np] < gCut->EMin() ) {fSelStat[2]++; return false;} 00091 00092 double delta_phi = fabs(fph[Ne]-fph[Np]) - gConst->Pi() + dDeltaPhi(); 00093 if ( fabs( delta_phi ) > gCut->DeltaPhi() ) {fSelStat[4]++; return false;} 00094 00095 if ( (fp[Ne]*fsth[Ne] < gCut->PCross() ) || (fp[Np]*fsth[Np] < gCut->PCross() )) {fSelStat[5]++; return false;} 00096 00097 if ( fth[Ne] < gCut->ThetaMinM() || fth[Ne] > gCut->ThetaMaxM() ) {fSelStat[1]++; return false;} 00098 00099 if ( fth[Np] < gCut->ThetaMinP() || fth[Np] > gCut->ThetaMaxP() ) {fSelStat[1]++; return false;} 00100 00101 if ( 0.5*(fp[Ne] + fp[Np]) < gCut->PAverage() ) {fSelStat[7]++; return false;} 00102 00104 // Old CMD cut on momenta difference 00105 // if ( fabs((fp[Ne] - fp[Np])/(fp[Ne] + fp[Np])) > 0.15 ) {fSelStat[7]++; return false;} 00107 00108 double cos_psi = (fsth[Ne]*fsth[Np]*(fcph[Ne]*fcph[Np] + fsph[Ne]*fsph[Np]) + fcth[Ne]*fcth[Np]); 00109 // std::cout<<cos_psi<<" "<<gCut->CosPsi()<<std::endl; 00110 if ( cos_psi > gCut->CosPsi() ) {fSelStat[8]++; return false;} 00111 00112 /* 00113 // Assymetry calculation selection 00114 if ( fp[Ne]*gGlobal->Get_E() < 400 ) return false; 00115 if ( fp[Np]*gGlobal->Get_E() < 400 ) return false; 00116 double pmod1 = fp[Ne]*gGlobal->Get_E(); 00117 double pmod2 = fp[Np]*gGlobal->Get_E(); 00118 00119 double ppion = sqrt(0.25*gGlobal->Get_s() - gConst->Mpi2()); 00120 if ( pow(pmod1 - ppion, 2) + pow(pmod2 - ppion, 2) < 9. ) return false; 00121 00122 double pmuon = sqrt(0.25*gGlobal->Get_s() - gConst->Mmu2()); 00123 if ((pmod1 > pmuon-3. && pmod1 < pmuon+3.) && (fcth[Ne] > 0.65 && fcth[Ne] < 0.75)) return false; 00124 if ((pmod2 > pmuon-3. && pmod2 < pmuon+3.) && (fcth[Np] >-0.75 && fcth[Np] <-0.65)) return false; 00125 00126 double pcm1[4], pcm2[4]; 00127 pcm1[0] = fp[Ne]*fsth[Ne]*fcph[Ne]; 00128 pcm1[1] = fp[Ne]*fsth[Ne]*fsph[Ne]; 00129 pcm1[2] = fp[Ne]*fcth[Ne]; 00130 pcm1[3] = fen[Ne]; 00131 00132 pcm2[0] = fp[Np]*fsth[Np]*fcph[Np]; 00133 pcm2[1] = fp[Np]*fsth[Np]*fsph[Np]; 00134 pcm2[2] = fp[Np]*fcth[Np]; 00135 pcm2[3] = fen[Np]; 00136 00137 for(int i=0;i<4;i++){ 00138 pcm1[i] *= gGlobal->Get_E(); 00139 pcm2[i] *= gGlobal->Get_E(); 00140 } 00141 00142 double Px = pcm1[0] + pcm2[0]; 00143 double Py = pcm1[1] + pcm2[1]; 00144 double Pz = pcm1[2] + pcm2[2]; 00145 double Xm = pow(2*gGlobal->Get_E() - (pcm1[3]+pcm2[3]), 2) - Px*Px - Py*Py - Pz*Pz; 00146 if ( sqrt(fabs(Xm)) > 150. ) return false; 00147 00148 double corr = 00149 (fsth[Ne]+fsth[Np] - fabs(fsth[Ne]*fcth[Np]+fsth[Np]*fcth[Ne]))/ 00150 (fsth[Ne]+fsth[Np] + fabs(fsth[Ne]*fcth[Np]+fsth[Np]*fcth[Ne])); 00151 if ( sqrt(corr) < 0.93 ) return false; 00152 00153 double rtsp = 2*gGlobal->Get_E()*sqrt(corr); 00154 double eisr = 2*gGlobal->Get_E() - rtsp; 00155 double pisr[4]; 00156 pisr[0] = 0.; 00157 pisr[1] = 0.; 00158 pisr[2] = -eisr*(pcm1[2] + pcm2[2])/fabs(pcm1[2] + pcm2[2]); 00159 pisr[3] = sqrt(rtsp*rtsp + eisr*eisr); 00160 00161 double pcc1[4], pcc2[4]; 00162 lorbck(pisr,pcm1,pcc1); 00163 lorbck(pisr,pcm2,pcc2); 00164 00165 double the1 = acos(pcc1[2]/sqrt(pcc1[0]*pcc1[0]+pcc1[1]*pcc1[1]+pcc1[2]*pcc1[2])); 00166 double the2 = acos(pcc2[2]/sqrt(pcc2[0]*pcc2[0]+pcc2[1]*pcc2[1]+pcc2[2]*pcc2[2])); 00167 00168 double theave = (the1-(the2-gConst->Pi()))/2. ; 00169 if(theave < gConst->Pi()/2 ) return false; 00170 if(theave < gCut->AverageThetaMin() || theave > gCut->AverageThetaMax()) return false; 00171 00172 double xprod = 0.; 00173 double p1 = 0.; 00174 double p2 = 0.; 00175 for(int i=0;i<3;i++){ 00176 xprod += pcc1[i]*pcc2[i]; 00177 p1 += pcc1[i]*pcc1[i]; 00178 p2 += pcc2[i]*pcc2[i]; 00179 } 00180 xprod = xprod/sqrt(p1*p2); 00181 if (xprod > -0.997) return false; 00182 */ 00183 return true; 00184 }
bool TEvent::Selectgg | ( | ) |
Definition at line 46 of file TEvent.C.
References TKinemCut::AverageThetaMax(), TKinemCut::AverageThetaMin(), TKinemCut::CosPsi(), dDeltaPhi(), dDeltaTheta(), TKinemCut::DeltaPhi(), TKinemCut::DeltaTheta(), fcph, fcth, fen, fph, fsph, fsth, fth, gConst, gCut, genRecEmupikp::i, ganga-rec::j, TConstants::Pi(), and t().
Referenced by MakeEvent(), and MakeEventgg().
00046 { 00047 // selecting two energetic photons in fiducial volume 00048 int in[] = { 0, 1, 2}; 00049 for(int i=0;i<3;i++) 00050 for(int j=i+1;j<3;j++) 00051 if(fen[in[i]]<fen[in[j]]){ 00052 int t = in[i]; 00053 in[i] = in[j]; 00054 in[j] = t; 00055 } 00056 00057 int i0 = in[0], i1 = in[1]; 00058 00059 if ( fth[i0] < gCut->AverageThetaMin() ) return false; 00060 if ( fth[i0] > gCut->AverageThetaMax() ) return false; 00061 00062 if ( fth[i1] < gCut->AverageThetaMin() ) return false; 00063 if ( fth[i1] > gCut->AverageThetaMax() ) return false; 00064 00065 double delta_theta = fth[i0] + fth[i1] - gConst->Pi() + dDeltaTheta(); 00066 if ( fabs( delta_theta ) > gCut->DeltaTheta() ) return false; 00067 00068 double delta_phi = fabs(fph[i0]-fph[i1]) - gConst->Pi() + dDeltaPhi(); 00069 if ( fabs( delta_phi ) > gCut->DeltaPhi() ) return false; 00070 00071 double cos_psi = fsth[i0]*fsth[i1]*(fcph[i0]*fcph[i1] + fsph[i0]*fsph[i1]) + 00072 fcth[i0]*fcth[i1]; 00073 if ( cos_psi > gCut->CosPsi() ) return false; 00074 00075 // if(fabs(gConst->Pi()-fth[in[0]]-fth[in[1]])>0.2) return false; 00076 return true; 00077 }
void TEvent::SetdPar | ( | double * | p | ) | [inline] |
void TEvent::Swap | ( | ) |
Definition at line 594 of file TEvent.C.
References fcph, fcth, fen, fp, fph, fsph, fsth, fth, fY, and swap.
00594 { 00595 swap(fen); 00596 swap(fp); 00597 swap(fY); 00598 00599 swap(fth); 00600 swap(fcth); 00601 swap(fsth); 00602 00603 swap(fph); 00604 swap(fcph); 00605 swap(fsph); 00606 00607 // fCosPsi = (fcph[Ng1]*fcph[Ne]+fsph[Ng1]*fsph[Ne])*fsth[Ne] + fcth[Ng1]*fcth[Ne]; 00608 }
double TEvent::fCosPsi [protected] |
double TEvent::fcph[3] [protected] |
Definition at line 25 of file TEvent.h.
Referenced by CosPrint(), Get4Vector(), GetChiPrime(), GetEvent(), GetSumComponent(), MakeEvent(), MakeEventgg(), Select(), Selectgg(), and Swap().
double TEvent::fcth[3] [protected] |
Definition at line 21 of file TEvent.h.
Referenced by CosPrint(), Get4Vector(), GetChiPrime(), GetEvent(), GetPPar(), GetSumComponent(), MakeEvent(), MakeEventgg(), Select(), Selectgg(), and Swap().
double TEvent::fdPar[9] [protected] |
Definition at line 28 of file TEvent.h.
Referenced by dATheta(), dDeltaPhi(), dDeltaTheta(), Init(), and SetdPar().
double TEvent::fen[3] [protected] |
Definition at line 15 of file TEvent.h.
Referenced by Get4Vector(), GetChiPrime(), GetEvent(), GetPPar(), GetSumComponent(), MakeEvent(), MakeEventgg(), MakeEventN(), Print(), Select(), Selectgg(), and Swap().
bool TEvent::fIsSmear [protected] |
Definition at line 27 of file TEvent.h.
Referenced by dATheta(), dDeltaPhi(), dDeltaTheta(), Init(), MakeEvent(), and SetdPar().
unsigned int TEvent::fNSelStat [protected] |
double TEvent::fp[3] [protected] |
Definition at line 16 of file TEvent.h.
Referenced by CosPrint(), Get4Vector(), GetChiPrime(), GetEvent(), GetPPar(), GetSumComponent(), MakeEvent(), MakeEventgg(), MakeEventN(), Print(), Select(), and Swap().
double TEvent::fph[3] [protected] |
Definition at line 24 of file TEvent.h.
Referenced by GetEvent(), MakeEvent(), MakeEventgg(), Print(), Select(), Selectgg(), and Swap().
unsigned int* TEvent::fSelStat [protected] |
double TEvent::fsph[3] [protected] |
Definition at line 26 of file TEvent.h.
Referenced by CosPrint(), Get4Vector(), GetChiPrime(), GetEvent(), GetSumComponent(), MakeEvent(), MakeEventgg(), Select(), Selectgg(), and Swap().
double TEvent::fsth[3] [protected] |
Definition at line 22 of file TEvent.h.
Referenced by CosPrint(), Get4Vector(), GetChiPrime(), GetEvent(), GetSumComponent(), MakeEvent(), MakeEventgg(), Select(), Selectgg(), and Swap().
double TEvent::fth[3] [protected] |
Definition at line 20 of file TEvent.h.
Referenced by GetEvent(), MakeEvent(), MakeEventgg(), Print(), Select(), Selectgg(), and Swap().
double TEvent::fxg[4] [protected] |
Definition at line 29 of file TEvent.h.
Referenced by GetEvent(), MakeEvent(), MakeEventgg(), and MakeEventN().
double TEvent::fY[3] [protected] |
Definition at line 17 of file TEvent.h.
Referenced by GetEvent(), GetY(), MakeEvent(), MakeEventgg(), MakeEventN(), and Swap().