Ignore:
Timestamp:
06/12/02 14:34:27 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/WuerzburgSoft/Thomas/mphys/MPairProduction.cc

    r1352 r1357  
    7171
    7272// --------------------------------------------------------------------------
    73 Bool_t MPairProduction::Process(MParticle *gamma, MParticle *phot, const Double_t theta, TList *list)
     73Bool_t MPairProduction::Process(MParticle *gamma, const Double_t Ep, const Double_t theta, TList *list)
    7474{
    7575    //
    7676    //  gamma: primary particle from source
    7777    //  phot:  infrared photon from background. (angle = interaction angle)
    78     //
     78    //  Ep: Energy photon [GeV]
     79    //  theta: interaction angle [rad]
     80    //
     81
     82
    7983    const Double_t E0     = 511e-6;              // [GeV]
    80 
    81     //const Double_t theta  = phot->GetAngle();    // [2pi]
    82     const Double_t Ep     = phot->GetEnergy();   // [GeV]
    8384    const Double_t Eg     = gamma->GetEnergy();  // [GeV]
    8485
    8586    const Double_t ctheta = cos(theta);
    8687
    87     const Double_t s      = (Ep*Eg/(2*E0*E0))*(1-ctheta); //[1]
    88     if (s<1)
     88    const Double_t s      = Ep*Eg*2*(1-ctheta); //[1]
     89    const Double_t S      = s/(E0*E0*4); //[1]
     90    if (S<1)
    8991        return kFALSE;
    9092
     93    const Double_t stheta = sin(theta);
     94
     95    const Double_t sqrbetah = s/((Eg+Ep)*(Eg+Ep)) + 1;
     96    const Double_t sqrbetae = 1.-1./S;
     97
     98    const Double_t GammaH = (Eg+Ep)/sqrt(s);
     99
     100    Double_t psi = stheta/(GammaH*(ctheta-sqrt(sqrbetah)));
     101
     102    fAngle->SetParameter(0, sqrt(sqrbetae));
     103
     104    const Double_t alpha = psi-acos(fAngle->GetRandom());
     105
     106    Double_t salpha = sin(alpha);
     107    Double_t calpha = cos(alpha);
     108
     109    const Double_t tphi = stheta/(Eg/Ep+ctheta); // tan(phi)
     110
     111    Double_t bb = sqrt(sqrbetah/sqrbetae);
     112
     113    Double_t s1 = calpha/GammaH;
     114    Double_t s2 = tphi*s1 - salpha - bb;
     115
     116    Double_t tan1 = ((salpha+bb)*tphi+s1)/s2;
     117    Double_t tan2 = ((salpha-bb)*tphi+s1)/s2;
     118
     119    const Double_t E = (Eg+Ep)/2;;
     120    const Double_t f = sqrt(sqrbetah*sqrbetae)*salpha;
     121
     122    cout << " {" << f << "," << E << "," << atan(tan1) << "," << atan(-tan2) << "} " << flush;
     123
     124    MElectron &p0 = *new MElectron(E*(1.-f), gamma->GetZ());
     125    MElectron &p1 = *new MElectron(E*(1.+f), gamma->GetZ());
     126    p0 = *gamma; // Set Position and direction
     127    p1 = *gamma; // Set Position and direction
     128
     129    static TRandom rand(0);
     130    Double_t rnd = rand.Uniform(TMath::Pi() * 2);
     131    p0.SetNewDirection(atan(+tan1), rnd);
     132    p1.SetNewDirection(atan(-tan2), rnd+TMath::Pi());
     133
     134    list->Add(&p0);
     135    list->Add(&p1);
     136
     137    /*
    91138    const Double_t Epg    = Ep/Eg; // 1+Epg ~ 1
    92139    const Double_t Egp    = Eg/Ep; // 1+Egp ~ Egp
     
    120167    const Double_t E = sqrt(s)*E0/gamma1;
    121168    const Double_t dE = E*Bcosd;
     169
     170    const Double_t E1 = E0/(E+dE);
     171    const Double_t E2 = E0/(E-dE);
     172
     173    const Double_t beta1 = sqrt(1.-E1*E1);
     174    const Double_t beta2 = sqrt(1.-E2*E2);
     175
     176    const Double_t Bscp = Bsind*cphi;
     177    const Double_t spg  = sphi/gamma1;
     178    const Double_t cpg  = cphi/gamma1;
     179
     180    const Double_t tan1 = (spg*(Bcosd+1) + Bscp)/((cpg*(Bcosd+1) - Bscp));
     181    const Double_t tan2 = (spg*(Bcosd-1) + Bscp)/((cpg*(Bcosd-1) - Bscp));
    122182
    123183    MElectron &p0 = *new MElectron(E+dE, gamma->GetZ());
     
    126186    p1 = *gamma; // Set Position and direction
    127187
    128     const Double_t E1 = E0/(E+dE);
    129     const Double_t E2 = E0/(E-dE);
    130 
    131     const Double_t beta1 = sqrt(1.-E1*E1);
    132     const Double_t beta2 = sqrt(1.-E2*E2);
    133 
    134188    p0.SetBeta(beta1);
    135189    p1.SetBeta(beta2);
    136 
    137     const Double_t Bscp = Bsind*cphi;
    138     const Double_t spg  = sphi/gamma1;
    139     const Double_t cpg  = cphi/gamma1;
    140 
    141     const Double_t tan1 = (spg*(Bcosd+1) + Bscp)/((cpg*(Bcosd+1) - Bscp));
    142     const Double_t tan2 = (spg*(Bcosd-1) + Bscp)/((cpg*(Bcosd-1) - Bscp));
    143190
    144191    static TRandom rand(0);
     
    149196    list->Add(&p0);
    150197    list->Add(&p1);
    151 
     198    */
    152199    return kTRUE;
    153200}
Note: See TracChangeset for help on using the changeset viewer.