MollerPrimaryGenAction Class Reference

#include <MollerPrimaryGenAction.hh>

Collaboration diagram for MollerPrimaryGenAction:
Collaboration graph
[legend]

Public Member Functions

 MollerPrimaryGenAction ()
 ~MollerPrimaryGenAction ()
void GeneratePrimaries (G4Event *anEvent)
void GeneratePrimaries_moller_dustin (G4Event *anEvent)
void GeneratePrimaries_elasticep_dustin (G4Event *anevent)
void GeneratePrimaries_inelasticep_dustin (G4Event *anevent)
void GeneratePrimaries_phasespace_mollers (G4Event *anevent)
void GeneratePrimaries_phasespace_motts (G4Event *anevent)
void GeneratePrimaries_pion (G4Event *anevent)
void SetGenerator (G4int val)
G4int GetGenerator ()
double EnergNumInt (double btt, double a0, double b0)
double RadProfile (double eloss, double btt)
void setSeedValue (G4bool value)
Double_t wiser_sigma (Double_t ebeam, Double_t pf, Double_t thf, Double_t rl, Int_t type)

Static Public Member Functions

static Double_t wiser_all_fit (Double_t *x, Double_t *par)

Private Attributes

G4ParticleGun * particleGun
MollerPrimaryGeneratorMessengergunMessenger
G4int GeneratorNumber
G4int eventnumber
cms_cross_section_t XStable [nbin]
double_differential_t DDtable [nbinIneEP][nbinIneEP]
const G4double ebeam
const G4double mp
const G4double bremcut
const G4double me
G4bool fSetSeedConst

Static Private Attributes

static const G4int nbin = 1000
static const G4int nbinIneEP = 100

Detailed Description

Definition at line 28 of file MollerPrimaryGenAction.hh.


Constructor & Destructor Documentation

MollerPrimaryGenAction::MollerPrimaryGenAction (  ) 

Definition at line 13 of file MollerPrimaryGenAction.cc.

References eventnumber, gunMessenger, and particleGun.

00013                                                : ebeam(11.000), mp(0.9382796), bremcut(1.0e-6), me(0.511E-3)
00014 {
00015 
00016   //create a messenger for this class
00017   gunMessenger = new MollerPrimaryGeneratorMessenger(this);
00018 
00019   eventnumber=0; // used only in optics generator?
00020 
00021   G4int n_particle = 1;
00022   particleGun = new G4ParticleGun(n_particle);
00023 
00024   //set particle
00025   //G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
00026   G4ParticleDefinition* particle = G4Electron::ElectronDefinition();
00027   
00028   G4cout << "Electron gun created!!\n" << G4endl;
00029 
00030   particleGun->SetParticleDefinition(particle);
00031   particleGun->SetParticleMomentumDirection(G4ThreeVector(0.,0.,1.));
00032   particleGun->SetParticleEnergy(11.0*GeV);
00033   particleGun->SetParticlePosition(G4ThreeVector(0.*cm, 0.*cm, -125.*cm));
00034 }

MollerPrimaryGenAction::~MollerPrimaryGenAction (  ) 

Definition at line 36 of file MollerPrimaryGenAction.cc.

References gunMessenger, and particleGun.

00037 {
00038   delete particleGun;
00039   delete gunMessenger;
00040 }


Member Function Documentation

double MollerPrimaryGenAction::EnergNumInt ( double  btt,
double  a0,
double  b0 
)

Definition at line 101 of file MollerPrimaryGenAction.cc.

References bremcut, nbin, and RadProfile().

Referenced by GeneratePrimaries_elasticep_dustin().

00102 {
00103     //double de = (ebeam-bremcut)/((double) nbin);
00104     double sum = 0.0;
00105 
00106     int j;
00107     double boolc[5] = {7.0, 32.0, 12.0, 32.0, 7.0};
00108 
00109     double a, b, thissum;
00110 
00111     for(int i =0;i<nbin;i++) {
00112   // Integrate over sample spacings that are logarithmic
00113   a = bremcut*pow(b0/a0, (((double) i)/nbin));
00114   b = bremcut*pow(b0/a0, (((double) i+1.0)/nbin));
00115 
00116   // Boole's rule
00117   thissum = 0.0;
00118   for( j = 0; j < 5; j++ ){
00119       thissum +=  boolc[j]*RadProfile( (b-a)*j*0.25 + a, btt);
00120   }
00121   sum += thissum*(b-a)/90.0;
00122     }
00123 
00124     return sum;
00125 }

Here is the call graph for this function:

Here is the caller graph for this function:

void MollerPrimaryGenAction::GeneratePrimaries ( G4Event *  anEvent  ) 

Definition at line 42 of file MollerPrimaryGenAction.cc.

References fSetSeedConst, GeneratePrimaries_elasticep_dustin(), GeneratePrimaries_inelasticep_dustin(), GeneratePrimaries_moller_dustin(), GeneratePrimaries_phasespace_mollers(), GeneratePrimaries_phasespace_motts(), and GeneratorNumber.

00043 {
00044   if(anEvent->GetEventID()==0){
00045   TRandom2 *random_num = new TRandom2(0);
00046   long particle_seed = (long) random_num->GetSeed();
00047   particle_seed += time(0);
00048 
00049   if (!fSetSeedConst) {
00050     G4cout<<"Setting the seed to a random value..."<<anEvent->GetEventID()<<G4endl;
00051     CLHEP::HepRandom::setTheSeed(particle_seed);
00052   }
00053   if (fSetSeedConst) {
00054     G4cout<<"Setting the seed to a constant value..."<<anEvent->GetEventID()<<G4endl;
00055     //CLHEP::HepRandom::setTheSeed(194738798457);  //First event too low angle
00056     //CLHEP::HepRandom::setTheSeed(734687698678); //First event too high angle
00057     CLHEP::HepRandom::setTheSeed(94528347598798); 
00058   }
00059 
00060   }
00061   // To add an additional generator:
00062   // 1. add an extra case statement here
00063   // 2. create another generator method in a separate file
00064   // 3. edit the GenCmd by altering the SetGuidance and SetRange method calls
00065   switch(GeneratorNumber) {
00066   case 0:
00067     GeneratePrimaries_moller_dustin(anEvent);
00068     break;
00069   case 1:
00070     GeneratePrimaries_elasticep_dustin(anEvent);
00071     break;
00072   case 2:
00073     GeneratePrimaries_inelasticep_dustin(anEvent);
00074     break;
00075   case 3:
00076     GeneratePrimaries_phasespace_mollers(anEvent);
00077     break;
00078   case 4:
00079     GeneratePrimaries_phasespace_motts(anEvent);
00080     break;
00081   default:
00082     G4cerr << "Generator number " << GeneratorNumber << " does not exist!\n";
00083     G4cerr << "Choose which generator to use.\n";
00084     G4cerr << "  Choice : 0. Moller electrons (Dustin) [default]\n";
00085     G4cerr << "           1. Elastic ep electrons (Dustin)\n";
00086     G4cerr << "           2. Inelastic ep electrons (Dustin)\n";
00087     G4cerr << "           3. Optics rays electrons (Moller scattering)\n";
00088     G4cerr << "           4. Optics rays electrons (Mott scattering)\n";
00089     G4cerr << "Running with default.\n";
00090     GeneratePrimaries_moller_dustin(anEvent);
00091     break;
00092   }
00093 }

Here is the call graph for this function:

void MollerPrimaryGenAction::GeneratePrimaries_elasticep_dustin ( G4Event *  anevent  ) 

Definition at line 41 of file MollerPrimaryGenAction_elasticep.cc.

References alpha, bremcut, d2r, ebeam, EnergNumInt(), Euler, gevfm, gRootAnalysis, me, mp, nbin, NINTERVAL, particleGun, pi, pmu, RadProfile(), RootAnalysis::SetMomentum0(), RootAnalysis::SetMomentum1(), RootAnalysis::SetRate(), RootAnalysis::SetTotXS(), cms_cross_section_t::theta, cms_cross_section_t::xs, XStable, and cms_cross_section_t::y.

Referenced by GeneratePrimaries().

00042 {
00043   //----------------------
00044   // GenerateEvent
00045   //----------------------
00046   
00047   double initial_x = 0.0;//*cm;
00048   double initial_y = 0.0;//*cm;
00049   double initial_z = 0.0;//*cm;
00050 
00051   double initial_px = 0.0;//*GeV;
00052   double initial_py = 0.0;//*GeV;
00053   double initial_pz = 0.0;//*GeV;
00054 
00055   //Find the scattering point in the target
00056   double vertex; //scattering point in target (cm) measured from the upstream end of target
00057   double tt = 150.0; // t = thickness of target in cm
00058   double rho = 0.0715; // rho = density of target in g/cm**3 (from KK)
00059   double radiationLength = 63.04; // g/cm**2 (from PDG)
00060   double t_rad = radiationLength/rho; // t_rad = radiation length in cm
00061   double z = G4UniformRand();
00062   vertex = z*tt;//just do this for now
00063   
00064   double Evertex = ebeam;
00065   //Now we know how mush material the beam travels through before moller interaction
00066   //Use this to calculate energy loss
00067   double  Ekin = ebeam - me;
00068   double fracrl = vertex/t_rad; //total radiation lenght fraction travelled through
00069   double bt = fracrl*4./3.;
00070 
00071   double prob, prob_sample, sample, eloss, value;
00072   //Calculation of probability to have bremsstrahlung effect above 1 keV
00073   prob = 1.- pow(bremcut/Ekin,bt) - bt/(bt+1.)*(1.- pow(bremcut/Ekin,bt+1.))
00074     + 0.75*bt/(2.+bt)*(1.- pow(bremcut/Ekin,bt+2.));
00075   prob = prob/(1.- bt*Euler + bt*bt/2.*(Euler*Euler+pi*pi/6.)); /* Gamma function */
00076   prob_sample = G4UniformRand();  /* Random sampling */
00077 
00078   value = 1.0;
00079 
00080   double colEcut = 0.080;  // Expected cutoff for collimator
00081 
00082   double Evlo[NINTERVAL] = {
00083       bremcut,
00084       (ebeam-bremcut-colEcut)*1.0/(11.0-colEcut-bremcut),
00085       (ebeam-bremcut-colEcut)*8.0/(11.0-colEcut-bremcut),
00086       (ebeam-bremcut-colEcut)*(ebeam-colEcut)/(11.0-colEcut-bremcut),
00087   };
00088 
00089   double Evhi[NINTERVAL] = {
00090       (ebeam-bremcut-colEcut)*1.0/(11.0-colEcut-bremcut),
00091       (ebeam-bremcut-colEcut)*8.0/(11.0-colEcut-bremcut),
00092       (ebeam-bremcut-colEcut)*(ebeam-colEcut)/(11.0-colEcut-bremcut),
00093       (ebeam-bremcut-colEcut)*ebeam/(11.0-colEcut-bremcut)
00094   };
00095 
00096   double Eprob[NINTERVAL]  = { 0.07, 0.05, 0.875, 0.005};
00097 
00098   double Enorm[NINTERVAL];
00099   // Interval normalization
00100   for( int idx = 0; idx < NINTERVAL; idx++ ){
00101       Enorm[idx]  = ((Evhi[idx]-Evlo[idx])/(Evhi[NINTERVAL-1]-Evlo[0]))
00102     /Eprob[idx];
00103   }
00104 
00105   int Evidx;
00106   double evsum = 0.0;
00107 
00108   // Averages over the intervals
00109   double vweight = 1.0;
00110   double vavg[4] = {
00111       log(Evhi[0]/Evlo[0])/(Evhi[0]-Evlo[0]),
00112       1.0,
00113       log((ebeam-Evlo[2])/(ebeam-Evhi[2]))/(Evhi[2]-Evlo[2]),
00114       1.0};
00115 
00116   if (prob_sample <= prob) {//Bremsstrahlung has taken place!
00117       //  We break this into 4 seperate energy loss intervals
00118       //  with total integrals roughly the size of
00119       //  what the ep product looks like with 11 GeV beam
00120       //   cut  -  1000 MeV, 1/x, 7%
00121       //   1000 -  8000 MeV, flat 5%
00122       //   8000 - 10920 MeV, 1/(E-x), 87.5%
00123       //  10920 - 11000 MeV, flat, 0.5%
00124 
00125       sample = G4UniformRand();
00126 
00127       // Identify our region
00128       //
00129       // based on the probability distribution
00130       Evidx = 0;
00131       evsum  = Eprob[Evidx];
00132       while( evsum < sample ){
00133     Evidx++;
00134     evsum += Eprob[Evidx];
00135       }
00136 
00137       sample = G4UniformRand();
00138 
00139       if( Evidx == 1 || Evidx == 3 ){
00140     // sample energy flat
00141     eloss = (Evhi[Evidx]-Evlo[Evidx])*sample + Evlo[Evidx];
00142     vweight = 1.0;
00143       }
00144 
00145       if( Evidx == 0 ){
00146     eloss = Evlo[Evidx]*pow(Evhi[Evidx]/Evlo[Evidx],sample);
00147     vweight = eloss;
00148       }
00149 
00150       if( Evidx == 2 ){
00151     eloss = ebeam - (ebeam-Evhi[Evidx])*
00152         pow((ebeam-Evlo[Evidx])/(ebeam-Evhi[Evidx]),sample);
00153     vweight = (ebeam-eloss);
00154       }
00155 
00156       vweight *= vavg[Evidx];
00157       //  mult by ebeam-bremcut for proper normalization
00158       value = RadProfile(eloss, bt)*
00159     ((Evhi[NINTERVAL-1]-Evlo[0])/EnergNumInt(bt, Evlo[0], Evhi[NINTERVAL-1])) // average of RadProfile
00160     *vweight // sampling weighting (flat or ) / average value for normalization
00161     *Enorm[Evidx]; //  Weight given the region
00162 
00163       Evertex = ebeam - eloss;
00164   }
00165 
00166   if( Evertex < me ) return;
00167 
00168   double vertex_x = (-0.25 + (0.5*(G4UniformRand())));
00169   double vertex_y = (-0.25 + (0.5*(G4UniformRand())));
00170   initial_x = vertex_x;
00171   initial_y = vertex_y;
00172   initial_z = vertex - tt/2.; //cm  
00173   
00174   //Make realistic beam angle (Not yet)
00175   //double theta_div = 0.000125*((double)random()/(double)RAND_MAX);
00176   //double phi_div = 2.0*M_PI*((double)random()/(double)RAND_MAX);
00177   ////double theta_div = 0.0;
00178   ////double phi_div = 0.0;
00179   ////cout << "theta = "<<theta_div*180/M_PI<<", phi = "<<phi_div*180/M_PI<<endl;
00180     
00181   initial_px = 0.0;
00182   initial_py = 0.0;
00183   initial_pz = Evertex; // GeV
00184   //cout <<"-------------elastic ep Event-------------------"<<endl;
00185   //cout <<" vertex = "<<vertex<<" , Evertex = "<<Evertex<<endl;
00186 
00187   //Lab System
00188   double thetaMott[2];
00189   thetaMott[0] = 0.1;//degree in lab
00190   thetaMott[1] = 2.0;//degree in lab
00191     
00192   double p0 = sqrt(Evertex*Evertex - me*me);
00193 
00194   for(int i =0;i<nbin;i++) {
00195     double theta = thetaMott[0] + i*(thetaMott[1]-thetaMott[0])/(nbin-1);
00196     double costh = cos(theta*d2r);
00197     double sinth = sin(theta*d2r);
00198     double sin2 = (1. - costh)/2.;
00199     double cos2 = 1. - sin2;
00200     double p = mp*Evertex/(Evertex*(1. - costh) + mp);
00201     double e = sqrt(p*p+me*me);
00202     double q2 = -2.*(me*me - Evertex*e + p0*p*costh);
00203     double t = q2/4./(mp*mp);
00204     double ge = 1./pow((1. + q2/0.71),2);
00205     double gm = ge*pmu;
00206     double cang = (ge*ge + t*gm*gm)/(1. + t) + t*t*gm*gm*sin2/cos2;
00207     double crmott = alpha*alpha*cos2/4./(p0*p0)/(sin2*sin2)/(1. + 2.*p0/mp*sin2)*gevfm*gevfm/100.;
00208     double cross = crmott*cang;
00209     double csmott = cross*sinth;
00210     XStable[i].y = theta;
00211     XStable[i].theta = theta;
00212     XStable[i].xs = csmott;
00213   }
00214 
00215   cms_cross_section_t *mott = XStable;
00216     
00217   //---- Convert cross section table to integral fractions ----
00218   // First, numerically integrate
00219   double Im=0.0;
00220   double save = mott[0].xs;
00221   mott[0].xs = 0.0;
00222 
00223   for(int j = 1;j<nbin-1;j++) {
00224     Im += (save+mott[j].xs)/2.0;
00225     save = mott[j].xs;
00226     mott[j].xs = Im;
00227   }
00228   // Next, normalize tables
00229   mott = XStable;
00230 
00231   assert( Im > 0.0 );
00232 
00233   for(int k=0;k<nbin;k++){
00234     mott[k].xs /= Im;
00235   }
00236   double totXS = Im*(thetaMott[1]-thetaMott[0])*d2r/(nbin-1.0)*2*pi;
00237   double factor = 6.0221415*0.1*1.0E-6/1.602176487E-19;
00238   double rate = totXS*tt*rho/1.008*1.0*factor; //Event rate/sec/ uA
00239   rate *= value; //mult by value to renorm rate to uneven energy distribution
00240   gRootAnalysis->SetTotXS(totXS);
00241   gRootAnalysis->SetRate(rate);
00242     
00243   // Determine mott cms scattering angle using ss
00244   double ss = (G4UniformRand());
00245     
00246   //cms_cross_section_t *c=XStable;
00247   int index;
00248   double slope, b;
00249   for(index=0;index<nbin-1;index++) if(ss <= mott[index+1].xs) break;
00250   assert( index < nbin-1 );
00251   slope = (mott[index+1].xs - mott[index].xs)/(mott[index+1].theta - mott[index].theta);
00252   b = mott[index].xs;
00253     
00254   double lab_theta = mott[index].theta + (ss - b)/slope;
00255   double lab_phi = (2.0*pi*(G4UniformRand())) - pi;
00256     
00257   //Now add unknown beam divergence
00258   //pi0_theta += theta_div;
00259   //pi0_phi += phi_div;
00260         
00261   // Define kinematic conditions in lab
00262   double costh = cos(lab_theta*d2r);
00263   double sinth = sin(lab_theta*d2r);
00264   double p = mp*Evertex/(Evertex*(1. - costh) + mp);    
00265   double e = sqrt(p*p + me*me);
00266   double ep = Evertex + mp - e;
00267   //double ep_alt = sqrt(mp*mp+p0*p0+p*p-2*p0*p*costh);
00268   double pp = sqrt(ep*ep - mp*mp);
00269   double sinp = p*sinth/pp;
00270   //double thetp = asin(sinp);
00271   double cosp = sqrt(1.- sinp*sinp);
00272   double cosphie = cos( lab_phi );
00273   double sinphie = sin( lab_phi );
00274   double cosphip = cos( lab_phi - pi);
00275   double sinphip = sin( lab_phi - pi);
00276 
00277   //G4cout <<"Evertex + mp = "<<(Evertex+mp)<<", theta = "<<lab_theta<<", p = "<<p<<", e = "<<e<<", pp = "<<pp<<", ep = "<<ep<<", e+ep = "<<(e+ep)<<"\n";
00278 
00279   double e1, p1[3], e2, p2[3];
00280   e1 = e;
00281   e2 = ep;
00282   for(int i=0;i<3;i++) {
00283     p1[i] = 0.0;
00284     p2[i] = 0.0;
00285   }
00286     
00287   p1[2] = p*costh;
00288   p2[2] = pp*cosp;
00289   p1[0] = p*sinth*cosphie;
00290   p1[1] = p*sinth*sinphie;
00291   p2[0] = pp*sinp*cosphip;
00292   p2[1] = pp*sinp*sinphip;
00293     
00294   double pmag1 = p;//sqrt(p1[0]*p1[0]+p1[1]*p1[1]+p1[2]*p1[2]);
00295   //double pmag2 = pp;//sqrt(p2[0]*p2[0]+p2[1]*p2[1]+p2[2]*p2[2]);
00296   double pmag0 = sqrt(initial_px*initial_px+initial_py*initial_py+initial_pz*initial_pz);
00297     
00298   // ------------ Final state particles ---------------
00299     
00300   //G4int n_particle = 1;
00301   //particleGun = new G4ParticleGun(n_particle);
00302     
00303   G4ParticleDefinition* particle = G4Electron::ElectronDefinition();
00304   //We will only throw the electron for now
00305 
00306   assert( pmag1 > 0.0 );
00307 
00308   particleGun->SetParticleDefinition(particle);
00309   particleGun->SetParticleMomentumDirection(G4ThreeVector(p1[0]/pmag1,p1[1]/pmag1,p1[2]/pmag1));
00310   particleGun->SetParticleEnergy(e1*1000);
00311   particleGun->SetParticlePosition(G4ThreeVector(initial_x*10, initial_y*10, initial_z*10));
00312   particleGun->GeneratePrimaryVertex(anEvent);
00313 
00314   gRootAnalysis->SetMomentum0(Evertex*1000,initial_px/pmag0,initial_py/pmag0,initial_pz/pmag0);
00315   gRootAnalysis->SetMomentum1(e1*1000,p1[0]/pmag1,p1[1]/pmag1,p1[2]/pmag1);
00316 
00317   //anEvent->SetEventID(0);
00318   anEvent->GetPrimaryVertex(0)->GetPrimary(0);//->SetTrackID(99999);
00319 
00320 }

Here is the call graph for this function:

Here is the caller graph for this function:

void MollerPrimaryGenAction::GeneratePrimaries_inelasticep_dustin ( G4Event *  anevent  ) 

Definition at line 41 of file MollerPrimaryGenAction_inelasticep.cc.

References alpha, d2r, DDtable, ebeam, double_differential_t::Eprime, Euler, gRootAnalysis, me, mp, nbinIneEP, particleGun, pi, RootAnalysis::SetMomentum0(), RootAnalysis::SetMomentum1(), RootAnalysis::SetRate(), RootAnalysis::SetTotXS(), SigT(), double_differential_t::theta, and double_differential_t::xs.

Referenced by GeneratePrimaries().

00042 {
00043   //----------------------
00044   // GenerateEvent
00045   //----------------------
00046   
00047   double initial_x = 0.0;//*cm;
00048   double initial_y = 0.0;//*cm;
00049   double initial_z = 0.0;//*cm;
00050 
00051   double initial_px = 0.0;//*GeV;
00052   double initial_py = 0.0;//*GeV;
00053   double initial_pz = 0.0;//*GeV;
00054 
00055   //Find the scattering point in the target
00056   double vertex; //scattering point in target (cm) measured from the upstream end of target
00057   double t = 150.0; // t = thickness of target in cm
00058   double rho = 0.0715; // rho = density of target in g/cm**3 (from KK)
00059   double radiationLength = 63.04; // g/cm**2 (from PDG)
00060   double t_rad = radiationLength/rho; // t_rad = radiation length in cm
00061   double z = G4UniformRand();
00062   vertex = z*t;//just do this for now
00063   
00064   double Evertex = ebeam;
00065   //Now we know how mush material the beam travels through before moller interaction
00066   //Use this to calculate energy loss
00067   double cut=0.000001; //lower limit of bremsstrahlung (1 keV)
00068   double  Ekin = ebeam - me;
00069   double fracrl = vertex/t_rad; //total radiation lenght fraction travelled through
00070   double bt = fracrl*4./3.;
00071 
00072   double prob, prob_sample, sample, eloss, env, value, ref;
00073   //Calculation of probability to have bremsstrahlung effect above 1 keV
00074   prob = 1.- pow(cut/Ekin,bt) - bt/(bt+1.)*(1.- pow(cut/Ekin,bt+1.))
00075     + 0.75*bt/(2.+bt)*(1.- pow(cut/Ekin,bt+2.));
00076   prob = prob/(1.- bt*Euler + bt*bt/2.*(Euler*Euler+pi*pi/6.)); /* Gamma function */
00077 
00078   prob_sample = G4UniformRand();  /* Random sampling */
00079 
00080   if (prob_sample <= prob) {//Bremsstrahlung has taken place!
00081     //Generate photon energy with sample and reject using 1/x as envelope 
00082     do {
00083       sample = G4UniformRand();
00084       eloss = cut*pow(Ekin/cut,sample);
00085       
00086       env = 1./eloss;
00087       value = 1./eloss*(1.-eloss/Ekin+0.75*pow(eloss/Ekin,2))*pow(eloss/Ekin,bt);
00088       
00089       sample = G4UniformRand();
00090       ref = value/env;
00091     } while (sample > ref);
00092     
00093     Evertex = ebeam - eloss;
00094   }
00095 
00096   if( Evertex < me ) return;
00097 
00098   double vertex_x = (-0.25 + (0.5*(G4UniformRand())));
00099   double vertex_y = (-0.25 + (0.5*(G4UniformRand())));
00100   initial_x = vertex_x;
00101   initial_y = vertex_y;
00102   initial_z = vertex - t/2.; //cm  
00103   
00104   //Make realistic beam angle (Not yet)
00105   //double theta_div = 0.000125*((double)random()/(double)RAND_MAX);
00106   //double phi_div = 2.0*M_PI*((double)random()/(double)RAND_MAX);
00107   ////double theta_div = 0.0;
00108   ////double phi_div = 0.0;
00109   ////cout << "theta = "<<theta_div*180/M_PI<<", phi = "<<phi_div*180/M_PI<<endl;
00110     
00111   initial_px = 0.0;
00112   initial_py = 0.0;
00113   initial_pz = Evertex; // GeV
00114   //cout <<"------------inelastic ep Event-------------------"<<endl;
00115   //cout <<" vertex = "<<vertex<<" , Evertex = "<<Evertex<<endl;
00116     
00117   /*based in fit to sigma_T and assuming R=sig_L/sig_T=q2 (good to q2=0.2 or so) */
00118 
00119   //Lab System
00120   double thetaIneEP[2];
00121   thetaIneEP[0] = 0.1;//0.2578;//degree in lab
00122   thetaIneEP[1] = 2.0;//0.5157;//degree in lab
00123 
00124   double e = Evertex;
00125   double eprime_max = e - 0.150;
00126   double eprime_min = eprime_max/nbinIneEP;
00127   if(Evertex<eprime_min) G4cout <<"Evertex is less than eprime_min..."<<"\n";
00128   else if(Evertex<eprime_max) eprime_max = Evertex;
00129 
00130   if( eprime_min < me ){
00131       eprime_min = me;
00132   }
00133 
00134   for(int i=0;i<nbinIneEP;i++) {//loop over theta
00135     for (int j=0;j<nbinIneEP;j++) {//loop over eprime
00136       double theta = (thetaIneEP[1] - thetaIneEP[0])/(nbinIneEP-1)*i + thetaIneEP[0];
00137       double costh = cos(theta*d2r/2.);//Note theta/2 here
00138       double sinth = sin(theta*d2r/2.);//and here
00139       double sin2 = sinth*sinth;//(1. - costh)/2.;
00140       double cos2 = costh*costh;//1. - sin2;
00141       double eprime = (eprime_max - eprime_min)/(nbinIneEP-1)*j + eprime_min;
00142       double q2 = 4.*e*eprime*sin2;
00143       double x = q2/2./mp/(e-eprime);
00144       double nu = q2/2./mp/x;
00145       //double wsq = mp*mp + 2.*mp*(e-eprime) - q2;
00146       double k = nu - q2/2./mp;
00147       double sigt=SigT(k);/* get sigma_T */
00148       /* Get F_1 using virtual photon flux */
00149       double f1 = (nu - q2 / 2. / mp) * mp / 4. / (pi*pi) / alpha * sigt /0.389 ;
00150       //Note that 0.389 = (hbar*c)^2 in GeV^2 mbarn, a conversion constant
00151       /* calculate f_2 using R=q2 */
00152       double r = q2;
00153       double f2 = f1 / ( (1. + (2. * mp * x) * (2. * mp * x) /q2) / 2. / x / (1. + r )) ; 
00154       /* sig is in barns/GeV/sr */
00155       double sig=5.2E-9/e/e/sin2/sin2* (cos2 * f2 / nu + sin2 * 2. * f1 / mp); 
00156       sig *= sin(theta*d2r);//with phase space factor 
00157       DDtable[i][j].Eprime = eprime;
00158       DDtable[i][j].theta = theta;
00159       DDtable[i][j].xs = sig;
00160     }
00161   }
00162 
00163   double_differential_t XStable_theta[nbinIneEP];
00164   double_differential_t XStable_Eprime[nbinIneEP];
00165   //---- Convert cross section table to integral fractions ----
00166   // First, numerically integrate
00167   double Im=0.0;
00168   double save;
00169 
00170   for(int i = 0;i<nbinIneEP; i++) {
00171     XStable_theta[i].xs   = 0.0;
00172     XStable_theta[i].theta = (thetaIneEP[1] - thetaIneEP[0])/(nbinIneEP-1)*i + thetaIneEP[0];
00173     for(int j = 0;j<nbinIneEP-1;j++){
00174   XStable_theta[i].xs += (DDtable[i][j].xs + DDtable[i][j+1].xs)/2.0;
00175     }//Integrate over Eprime
00176     if( i == 0 ){ 
00177   save = XStable_theta[i].xs;
00178   XStable_theta[i].xs = 0.0;
00179     } else {
00180   Im += (save+XStable_theta[i].xs)/2.0;
00181   save = XStable_theta[i].xs;
00182   XStable_theta[i].xs = Im;
00183     }
00184   }
00185   double totXS = Im*(thetaIneEP[1]-thetaIneEP[0])*d2r*(eprime_max - eprime_min)/(nbinIneEP-1.0)/(nbinIneEP-1.0)*2*pi;
00186   double factor = 6.0221415*0.1*1.0E-6/1.602176487E-19;
00187   double rate = totXS*t*rho/1.008*1.0*factor; //Event rate/sec/ uA
00188   gRootAnalysis->SetTotXS(totXS);
00189   gRootAnalysis->SetRate(rate);
00190 
00191   if( !(Im > 0.0) ){
00192       // Cross section is zero
00193       // just abort
00194 
00195       return;
00196   }
00197 
00198   assert( Im > 0.0 );
00199 
00200   // Next, normalize tables
00201   for(int k=0;k<nbinIneEP;k++){
00202     XStable_theta[k].xs /= Im;
00203   }
00204 
00205   // Determine scattering angle using ss
00206   double ss = (G4UniformRand());
00207   int index;
00208   double slope, b;
00209   for(index=0;index<nbinIneEP-1;index++) if(ss <= XStable_theta[index+1].xs) break;
00210   assert( index < nbinIneEP-1 );
00211 
00212   slope = (XStable_theta[index+1].xs - XStable_theta[index].xs)/(XStable_theta[index+1].theta - XStable_theta[index].theta);
00213   b = XStable_theta[index].xs;
00214   double lab_theta = XStable_theta[index].theta + (ss - b)/slope;
00215   int theIndex  = index;
00216   // Dimensionless quantity on how far we are to the next bin
00217   // This is for our bilinear interpolation
00218   double intpar = (ss - b)/(XStable_theta[index+1].xs - XStable_theta[index].xs);
00219 
00220   assert( 0.0 <= intpar && intpar < 1.0 );
00221 
00222   //Now do the Eprime 
00223   //For this, simply use the array of the selected theta
00224   double Im2=0.0;
00225   // Binlinear interpolation
00226   save =  DDtable[theIndex][0].xs*(1.0-intpar) + DDtable[theIndex+1][0].xs*intpar;
00227   XStable_Eprime[0].xs = 0.0;
00228   XStable_Eprime[0].Eprime = eprime_min;
00229 
00230   for(int j = 1;j<nbinIneEP;j++) {
00231       // Binlinear interpolation
00232     Im2 += (save + DDtable[theIndex][j].xs*(1.0-intpar) + DDtable[theIndex+1][j].xs*intpar)/2.0;
00233     save = DDtable[theIndex][j].xs*(1.0-intpar) + DDtable[theIndex+1][j].xs*intpar;
00234     XStable_Eprime[j].xs = Im2;
00235     XStable_Eprime[j].Eprime = (eprime_max - eprime_min)/(nbinIneEP-1)*j + eprime_min;
00236   }
00237 
00238   assert( Im2 > 0.0 );
00239 
00240   //double_differential_t *ineEP_Eprime = XStable_Eprime;
00241   // Next, normalize tables
00242   for(int k=0;k<nbinIneEP;k++){
00243     XStable_Eprime[k].xs /= Im2;
00244   }
00245   // Determine Eprime using ss2
00246   double ss2 = (G4UniformRand());
00247   int index2;
00248   double slope2, b2;
00249   for(index2=0;index2<nbinIneEP-1;index2++) if(ss2 <= XStable_Eprime[index2+1].xs) break;
00250   assert( index2 < nbinIneEP-1 );
00251 
00252   slope2 = (XStable_Eprime[index2+1].xs - XStable_Eprime[index2].xs)/(XStable_Eprime[index2+1].Eprime - XStable_Eprime[index2].Eprime);
00253   b2 = XStable_Eprime[index2].xs;
00254   double lab_Eprime = XStable_Eprime[index2].Eprime + (ss2 - b2)/slope2;
00255 
00256   //Now do phi
00257   double lab_phi = (2.0*pi*(G4UniformRand())) - pi;
00258     
00259   //Now add unknown beam divergence
00260   //pi0_theta += theta_div;
00261   //pi0_phi += phi_div;
00262 
00263   // Define kinematic conditions in lab
00264   double costh = cos(lab_theta*d2r);
00265   double sinth = sin(lab_theta*d2r);
00266   e = lab_Eprime;
00267   assert( e > 0.0 );
00268   double p = sqrt(e*e - me*me);
00269   assert( p > 0.0 );
00270   //double ep = Evertex + mp - e;
00271   double cosphie = cos( lab_phi );
00272   double sinphie = sin( lab_phi );
00273   //double cosphip = cos( lab_phi - pi);
00274   //double sinphip = sin( lab_phi - pi);
00275 
00276   //G4cout <<"Evertex + mp = "<<(Evertex+mp)<<", theta = "<<lab_theta<<", p = "<<p<<", e = "<<e<<", pp = "<<pp<<", ep = "<<ep<<", e+ep = "<<(e+ep)<<"\n";
00277   //G4cout <<"Evertex = "<<(Evertex)<<", theta = "<<lab_theta<<", p = "<<p<<", e = "<<e<<"\n";
00278 
00279   double e1, p1[3];
00280   e1 = e;
00281   for(int i=0;i<3;i++) {
00282     p1[i] = 0.0;
00283   }
00284     
00285   p1[2] = p*costh;
00286   p1[0] = p*sinth*cosphie;
00287   p1[1] = p*sinth*sinphie;
00288     
00289   double pmag1 = p;//sqrt(p1[0]*p1[0]+p1[1]*p1[1]+p1[2]*p1[2]);
00290   double pmag0 = sqrt(initial_px*initial_px+initial_py*initial_py+initial_pz*initial_pz);
00291     
00292   // ------------ Final state particles ---------------
00293     
00294   //G4int n_particle = 1;
00295   //particleGun = new G4ParticleGun(n_particle);
00296     
00297   G4ParticleDefinition* particle_e = G4Electron::ElectronDefinition();
00298   //We will only throw the electron for now    
00299   particleGun->SetParticleDefinition(particle_e);
00300   particleGun->SetParticleMomentumDirection(G4ThreeVector(p1[0]/pmag1,p1[1]/pmag1,p1[2]/pmag1));
00301   particleGun->SetParticleEnergy(e1*1000);
00302   particleGun->SetParticlePosition(G4ThreeVector(initial_x*10, initial_y*10, initial_z*10));
00303   particleGun->GeneratePrimaryVertex(anEvent);
00304     
00305   gRootAnalysis->SetMomentum0(Evertex*1000,initial_px/pmag0,initial_py/pmag0,initial_pz/pmag0);
00306   gRootAnalysis->SetMomentum1(e1*1000,p1[0]/pmag1,p1[1]/pmag1,p1[2]/pmag1);
00307 
00308   //anEvent->SetEventID(0);
00309   anEvent->GetPrimaryVertex(0)->GetPrimary(0);//->SetTrackID(99999);
00310     
00311 }

Here is the call graph for this function:

Here is the caller graph for this function:

void MollerPrimaryGenAction::GeneratePrimaries_moller_dustin ( G4Event *  anEvent  ) 

Definition at line 38 of file MollerPrimaryGenAction_moller.cc.

References d2r, ebeam, Euler, gRootAnalysis, me, nbin, particleGun, pi, r0, RootAnalysis::SetMomentum0(), RootAnalysis::SetMomentum1(), RootAnalysis::SetMomentum2(), RootAnalysis::SetRate(), RootAnalysis::SetTotXS(), cms_cross_section_t::theta, cms_cross_section_t::xs, XStable, and cms_cross_section_t::y.

Referenced by GeneratePrimaries().

00039 {
00040   //----------------------
00041   // GenerateEvent
00042   //----------------------
00043   
00044   double initial_x = 0.0;//*cm;
00045   double initial_y = 0.0;//*cm;
00046   double initial_z = 0.0;//*cm;
00047 
00048   double initial_px = 0.0;//*GeV;
00049   double initial_py = 0.0;//*GeV;
00050   double initial_pz = 0.0;//*GeV;
00051 
00052   //Find the scattering point in the target
00053   double vertex; //scattering point in target (cm) measured from the upstream end of target
00054   double t = 150.0; // t = thickness of target in cm
00055   double rho = 0.0715; // rho = density of target in g/cm**3 (from KK)
00056   double radiationLength = 63.04; // g/cm**2 (from PDG)
00057   double t_rad = radiationLength/rho; // t_rad = radiation length in cm
00058   double z = G4UniformRand();
00059   vertex = z*t;//just do this for now
00060   
00061   double Evertex = ebeam;
00062   //Now we know how mush material the beam travels through before moller interaction
00063   //Use this to calculate energy loss
00064   double cut=0.000001; //lower limit of bremsstrahlung (1 keV)
00065   double  Ekin = ebeam - me;
00066   double fracrl = vertex/t_rad; //total radiation lenght fraction travelled through
00067   double bt = fracrl*4./3.;
00068 
00069   double prob, prob_sample, sample, eloss, env, value, ref;
00070   //Calculation of probability to have bremsstrahlung effect above 1 keV
00071   prob = 1.- pow(cut/Ekin,bt) - bt/(bt+1.)*(1.- pow(cut/Ekin,bt+1.))
00072     + 0.75*bt/(2.+bt)*(1.- pow(cut/Ekin,bt+2.));
00073   prob = prob/(1.- bt*Euler + bt*bt/2.*(Euler*Euler+pi*pi/6.)); /* Gamma function */
00074 
00075   prob_sample = G4UniformRand();  /* Random sampling */
00076 
00077   if (prob_sample <= prob) {//Bremsstrahlung has taken place!
00078     //Generate photon energy with sample and reject using 1/x as envelope 
00079     do {
00080       sample = G4UniformRand();
00081       eloss = cut*pow(Ekin/cut,sample);
00082       
00083       env = 1./eloss;
00084       value = 1./eloss*(1.-eloss/Ekin+0.75*pow(eloss/Ekin,2))*pow(eloss/Ekin,bt);
00085       
00086       sample = G4UniformRand();
00087       ref = value/env;
00088     } while (sample > ref);
00089     
00090     Evertex = ebeam - eloss;
00091   }
00092 
00093   if( Evertex < me ) return;
00094 
00095   double vertex_x = (-0.25 + (0.5*(G4UniformRand())));
00096   double vertex_y = (-0.25 + (0.5*(G4UniformRand())));
00097   initial_x = vertex_x;
00098   initial_y = vertex_y;
00099   initial_z = vertex - t/2.; //cm  
00100   
00101   //Make realistic beam angle (Not yet)
00102   //double theta_div = 0.000125*((double)random()/(double)RAND_MAX);
00103   //double phi_div = 2.0*M_PI*((double)random()/(double)RAND_MAX);
00104   ////double theta_div = 0.0;
00105   ////double phi_div = 0.0;
00106   ////cout << "theta = "<<theta_div*180/M_PI<<", phi = "<<phi_div*180/M_PI<<endl;
00107     
00108   initial_px = 0.0;
00109   initial_py = 0.0;
00110   initial_pz = Evertex; // GeV
00111   
00112   //cout <<"-------------Moller Event-------------------"<<endl;
00113   //cout <<" vertex = "<<vertex<<" , Evertex = "<<Evertex<<endl;
00114         
00115   //Center of Mass System
00116   double thetaMoller[2];
00117   thetaMoller[0] = 53.13010;//costheta_cm = +0.6
00118   thetaMoller[1] = 126.8699;//costheta_cm = -0.6
00119   double x1 = cos(thetaMoller[1]*d2r);
00120   double x2 = cos(thetaMoller[0]*d2r);
00121   double y2 = (1 - x1)/2.;
00122   double y1 = (1 - x2)/2.;
00123   double ds = me*me+me*me+2.*me*Evertex;
00124   double ecm = sqrt(ds);
00125   double decm[2];
00126   decm[0] = ds/2./ecm;
00127   double dps = pow(decm[0],2)-me*me;
00128   double dp = sqrt(dps);
00129   decm[1] = sqrt(dps+me*me);
00130 
00131   for(int i =0;i<nbin;i++) {
00132     double y = y1 + ((y2 - y1)/nbin*i)+(y2 - y1)/nbin/2.;
00133     double dt = -1.*y*ds;
00134     double ct = (dt-me*me-me*me+2.*pow(decm[0],2))/(2.*pow(dp,2));
00135     if( !( -1.0 < ct && ct < 1.0 )){ 
00136   // SPR 9/20/12
00137   // Something's wrong here for very low beam energies
00138   // Not sure how to handle it, but at least this point
00139   // is kinematically forbidden
00140   return;
00141     }
00142     double ct2 = pow(ct,2);
00143     double st2 = 1. - ct2;
00144     double st = sqrt(st2);
00145     double th = acos(ct);
00146       
00147     double ecmp = ecm/2.;
00148     double vcmp = sqrt(pow(ecmp,2)-me*me)/ecmp;
00149     double dsig = 0.;
00150       
00151     double eom = ecmp/me;
00152     double eom2 = pow(eom,2);
00153     double d1 = pow(r0,2)*pow((2.*eom2-1.),2)/4./pow(vcmp,4)/pow(eom2,3);
00154     double d2 = 4./pow(st2,2)-3./st2+pow((eom2-1.),2)/pow((2.*eom2-1),2)*(1+4./pow(st,2));
00155       
00156     dsig = d1*d2;
00157 
00158     assert( dsig > 0.0 );
00159 
00160     dsig = dsig*2.; //Convert from dsigma/dOmega to dsigma/dy/dphi
00161     dsig = dsig/100; //Convert from fm**2 to Barns
00162     XStable[i].y = y;
00163     XStable[i].theta = th;
00164     XStable[i].xs = dsig;
00165   }
00166 
00167   cms_cross_section_t *moller = XStable;
00168     
00169   //---- Convert cross section table to integral fractions ----
00170   // First, numerically integrate
00171   double Im=0.0;
00172   double save = moller[0].xs;
00173   moller[0].xs = Im;
00174 
00175   for(int j = 1;j<nbin;j++) {
00176       Im += (save + moller[j].xs)/2.0;
00177       save = moller[j].xs;
00178       moller[j].xs = Im;
00179   }
00180 
00181   double totXS = Im*(y2-y1)/(nbin-1.0)*2*pi;
00182   double factor = 6.0221415*0.1*1.0E-6/1.602176487E-19;
00183   double rate = totXS*t*rho/1.008*1.0*factor; //Event rate/sec/ uA
00184   gRootAnalysis->SetTotXS(totXS);
00185   gRootAnalysis->SetRate(rate);
00186 
00187   if( !(Im > 0.0) ){ 
00188       printf("Im = %f, Evertex = %f\n", Im, Evertex);
00189   }
00190   assert( Im > 0.0 ); // idiot check
00191 
00192   // Next, normalize tables
00193   moller = XStable;
00194   for(int k=0;k<nbin;k++){
00195     moller[k].xs /= Im;
00196   }
00197     
00198   // Determine moller cms scattering angle using ss
00199   double ss = (G4UniformRand());
00200     
00201   //cms_cross_section_t *c=XStable;
00202   int index;
00203   double slope, b;
00204   for(index=0;index<nbin-1;index++) if(ss <= moller[index+1].xs) break;
00205   assert( index < nbin-1 ); // idiot check
00206   slope = (moller[index+1].xs - moller[index].xs)/(moller[index+1].theta - moller[index].theta);
00207   b = moller[index].xs;
00208     
00209   double cms_theta = moller[index].theta + (ss - b)/slope;
00210 
00211   double cms_phi = (2.0*pi*(G4UniformRand())) - pi;
00212     
00213   //Now add unknown beam divergence
00214   //pi0_theta += theta_div;
00215   //pi0_phi += phi_div;
00216         
00217   // Define kinematic conditions in cms
00218   double gammap = Evertex/ecm;
00219   double betap = 1/gammap*sqrt(pow(gammap,2)-1);
00220     
00221   double e1cm = gammap*me;
00222   double e2cm = e1cm;
00223     
00224   //Primary (beam) electron
00225   double costheta1 = cos( cms_theta );
00226   double sintheta1 = sin( cms_theta );
00227     
00228   double cosphi1 = cos( cms_phi );
00229   double sinphi1 = sin( cms_phi );
00230     
00231   double p1cm[3];
00232 
00233 
00234   p1cm[0] = e1cm * sintheta1 * cosphi1;
00235   p1cm[1] = e1cm * sintheta1 * sinphi1;
00236   p1cm[2] = e1cm * costheta1;
00237     
00238   //Secondary (target) electron
00239   double costheta2 = cos( pi - cms_theta );
00240   double sintheta2 = sin( pi - cms_theta );
00241     
00242   double cosphi2 = cos( cms_phi - pi);
00243   double sinphi2 = sin( cms_phi - pi);
00244   if (cms_phi<0.0){
00245     cosphi2 = cos( cms_phi + pi);
00246     sinphi2 = sin( cms_phi + pi);
00247   } else {
00248       
00249   }
00250     
00251   double p2cm[3];  
00252   p2cm[0] = e2cm * sintheta2 * cosphi2;
00253   p2cm[1] = e2cm * sintheta2 * sinphi2;
00254   p2cm[2] = e2cm * costheta2;
00255     
00256     
00257   // Transform to the lab frame.
00258   double e1, p1[3], e2, p2[3];
00259   e1 = 0.0;
00260   e2 = 0.0;
00261   for(int i=0;i<3;i++) {
00262     p1[i] = 0.0;
00263     p2[i] = 0.0;
00264   }
00265     
00266   p1[2] = gammap * (p1cm[2] + betap*e1cm);
00267   p2[2] = gammap * (p2cm[2] + betap*e2cm);
00268   p1[0] = p1cm[0];
00269   p1[1] = p1cm[1];
00270   p2[0] = p2cm[0];
00271   p2[1] = p2cm[1];
00272     
00273   double pmag1 = sqrt(p1[0]*p1[0]+p1[1]*p1[1]+p1[2]*p1[2]);
00274   double pmag2 = sqrt(p2[0]*p2[0]+p2[1]*p2[1]+p2[2]*p2[2]);
00275   double pmag0 = sqrt(initial_px*initial_px+initial_py*initial_py+initial_pz*initial_pz);
00276     
00277   e1 = gammap * ( e1cm + betap*p1cm[2] );
00278   e2 = gammap * ( e2cm + betap*p2cm[2] );
00279     
00280   // Calculate the laboratory polar angles for moller electrons.  
00281   //double th1 = acos( p1[2] / e1 );
00282   //double ph1 = atan2( p1[1], p1[0] );
00283     
00284   //double th2 = acos( p2[2] / e2 );
00285   //double ph2 = atan2( p2[1], p2[0] );
00286     
00287     
00288   // ------------ Final state electrons ---------------
00289     
00290   //G4int n_particle = 1;
00291   //particleGun = new G4ParticleGun(n_particle);
00292     
00293   G4ParticleDefinition* particle = G4Electron::ElectronDefinition();
00294 
00295   assert( pmag1 > 0.0 && pmag2 > 0.0 && pmag0 > 0.0 );
00296 
00297   assert( e1 > 0.0 && e2 > 0.0 );
00298     
00299   if(e1>=e2) {
00300     particleGun->SetParticleDefinition(particle);
00301     particleGun->SetParticleMomentumDirection(G4ThreeVector(p1[0]/pmag1,p1[1]/pmag1,p1[2]/pmag1));
00302     particleGun->SetParticleEnergy(e1*1000);
00303     particleGun->SetParticlePosition(G4ThreeVector(initial_x*10, initial_y*10, initial_z*10));
00304     particleGun->GeneratePrimaryVertex(anEvent);
00305       
00306     particleGun->SetParticleDefinition(particle);
00307     particleGun->SetParticleMomentumDirection(G4ThreeVector(p2[0]/pmag2,p2[1]/pmag2,p2[2]/pmag2));
00308     particleGun->SetParticleEnergy(e2*1000);
00309     particleGun->SetParticlePosition(G4ThreeVector(initial_x*10, initial_y*10, initial_z*10));
00310     particleGun->GeneratePrimaryVertex(anEvent);
00311       
00312     gRootAnalysis->SetMomentum0(Evertex*1000,initial_px/pmag0,initial_py/pmag0,initial_pz/pmag0);
00313     gRootAnalysis->SetMomentum1(e1*1000,p1[0]/pmag1,p1[1]/pmag1,p1[2]/pmag1);
00314     gRootAnalysis->SetMomentum2(e2*1000,p2[0]/pmag2,p2[1]/pmag2,p2[2]/pmag2);
00315   } else {
00316     particleGun->SetParticleDefinition(particle);
00317     particleGun->SetParticleMomentumDirection(G4ThreeVector(p2[0]/pmag2,p2[1]/pmag2,p2[2]/pmag2));
00318     particleGun->SetParticleEnergy(e2*1000);
00319     particleGun->SetParticlePosition(G4ThreeVector(initial_x*10, initial_y*10, initial_z*10));
00320     particleGun->GeneratePrimaryVertex(anEvent);
00321       
00322     particleGun->SetParticleDefinition(particle);
00323     particleGun->SetParticleMomentumDirection(G4ThreeVector(p1[0]/pmag1,p1[1]/pmag1,p1[2]/pmag1));
00324     particleGun->SetParticleEnergy(e1*1000);
00325     particleGun->SetParticlePosition(G4ThreeVector(initial_x*10, initial_y*10, initial_z*10));
00326     particleGun->GeneratePrimaryVertex(anEvent);    
00327       
00328     gRootAnalysis->SetMomentum0(Evertex*1000,initial_px/pmag0,initial_py/pmag0,initial_pz/pmag0);
00329     gRootAnalysis->SetMomentum2(e1*1000,p1[0]/pmag1,p1[1]/pmag1,p1[2]/pmag1);
00330     gRootAnalysis->SetMomentum1(e2*1000,p2[0]/pmag2,p2[1]/pmag2,p2[2]/pmag2);
00331   }
00332   //anEvent->SetEventID(0);
00333   anEvent->GetPrimaryVertex(0)->GetPrimary(0);//->SetTrackID(99999);
00334 
00335 }

Here is the call graph for this function:

Here is the caller graph for this function:

void MollerPrimaryGenAction::GeneratePrimaries_phasespace_mollers ( G4Event *  anevent  ) 

Definition at line 13 of file MollerPrimaryGenAction_phasespace.cc.

References ebeam, eventnumber, gRootAnalysis, particleGun, pi, RootAnalysis::SetMomentum0(), RootAnalysis::SetMomentum1(), RootAnalysis::SetMomentum2(), and RootAnalysis::SetProcess().

Referenced by GeneratePrimaries().

00014 {
00015   //This generator throws events in phase space
00016 
00017   G4int numsectors = 7; 
00018   G4double sectorhalfopeningangle = pi/numsectors/2.;
00019   G4double etheta=0., ephi=0., zpos=0.;
00020 
00021   G4int numthetas=17, numphis=13, numzpos=2, numphicentre=7;
00022   G4double thetamin=0.004, thetamax=0.020;
00023   G4double zposmin=-0.75, zposmax=0.75;
00024   G4double phicentre=0;
00025   G4double phimin=0, phimax=2*pi;
00026   G4double phicentremin=0, phicentremax=12./7*pi;
00027 
00028   int thetanum, ephinum, zposnum, phicentrenum;
00029   double thetafrac, ephifrac, zposfrac, phicentrefrac;
00030   // step through theta then phi then target position z then sector   
00031   thetanum = eventnumber%(numthetas);  // % gives remainder after division
00032   ephinum = (eventnumber/(numthetas))%(numphis);
00033   zposnum = (eventnumber/(numthetas*numphis))%(numzpos);
00034   phicentrenum = (eventnumber/(numthetas*numphis*numzpos))%(numphicentre);
00035 
00036   thetafrac = ((double)thetanum)/(numthetas-1);
00037   ephifrac = ((double)ephinum)/(numphis-1);
00038   zposfrac = ((double)zposnum)/(numzpos-1);
00039   phicentrefrac = ((double)phicentrenum)/(numphicentre-1);
00040 
00041   etheta = thetamin + thetafrac*(thetamax-thetamin);
00042   phicentre = phicentremin + phicentrefrac*(phicentremax-phicentremin);
00043   phimin = phicentre - sectorhalfopeningangle*0.999;
00044   phimax = phicentre + sectorhalfopeningangle*0.999;
00045   ephi = phimin + ephifrac*(phimax-phimin);
00046   zpos = zposmin + zposfrac*(zposmax-zposmin);
00047 
00048   G4double eenergy;
00049   eenergy = (2*ebeam*0.000511)/(ebeam*(etheta*etheta) + 2*0.000511); // Moller electrons
00050 
00051   G4double xdir = sin(etheta)*cos(ephi);
00052   G4double ydir = sin(etheta)*sin(ephi);
00053   G4double zdir = cos(etheta);
00054   printf("Primaries:%5i phi:%2i %.2f zpos:%2i %.2f; phicentre:%2i %.2f; theta:%2i %.2f =%.3f deg =%4.1f mrad  eenergy=%.3f GeV  phi=%6.1f deg, xdir=%.3f, ydir=%.3f, zdir=%.3f\n", 
00055        eventnumber, ephinum, ephifrac, zposnum, zposfrac, phicentrenum, phicentrefrac, 
00056        thetanum, thetafrac, etheta/degree, etheta/rad*1000, eenergy, ephi/degree, xdir, ydir, zdir);
00057   
00058   particleGun->SetParticleEnergy(eenergy*GeV);
00059   particleGun->SetParticleMomentumDirection(G4ThreeVector(xdir,ydir,zdir));
00060   particleGun->SetParticlePosition(G4ThreeVector(0.*cm, 0.*cm, zpos*m));
00061   particleGun->GeneratePrimaryVertex(anEvent);
00062   eventnumber++;
00063 
00064   gRootAnalysis->SetMomentum0(11000,0,0,11000);
00065   gRootAnalysis->SetMomentum2(eenergy*MeV,eenergy*MeV*xdir,eenergy*MeV*ydir,eenergy*MeV*zdir);
00066   gRootAnalysis->SetMomentum1(eenergy*MeV,eenergy*MeV*xdir,eenergy*MeV*ydir,eenergy*MeV*zdir);
00067   gRootAnalysis->SetProcess(1);
00068 
00069   if (eventnumber==(numphis*numthetas*numzpos*7)) {
00070     printf("\nFully completed one set of optics rays.\n\n");
00071   }
00072 }

Here is the call graph for this function:

Here is the caller graph for this function:

void MollerPrimaryGenAction::GeneratePrimaries_phasespace_motts ( G4Event *  anevent  ) 

Definition at line 13 of file MollerPrimaryGenAction_phasespace_motts.cc.

References ebeam, eventnumber, gRootAnalysis, mp, particleGun, pi, RootAnalysis::SetMomentum0(), RootAnalysis::SetMomentum1(), RootAnalysis::SetMomentum2(), and RootAnalysis::SetProcess().

Referenced by GeneratePrimaries().

00014 {
00015   //This generator throws events in phase space
00016 
00017   G4int numsectors = 7; 
00018   G4double sectorhalfopeningangle = pi/numsectors/2.;
00019   G4double etheta=0., ephi=0., zpos=0.;
00020 
00021   G4int numthetas=17, numphis=13, numzpos=2, numphicentre=7;
00022   G4double thetamin=0.004, thetamax=0.020;
00023   G4double zposmin=-0.75, zposmax=0.75;
00024   G4double phicentre=0;
00025   G4double phimin=0, phimax=2*pi;
00026   G4double phicentremin=0, phicentremax=12./7*pi;
00027 
00028   int thetanum, ephinum, zposnum, phicentrenum;
00029   double thetafrac, ephifrac, zposfrac, phicentrefrac;
00030   // step through theta then phi then target position z then sector   
00031   thetanum = eventnumber%(numthetas);  // % gives remainder after division
00032   ephinum = (eventnumber/(numthetas))%(numphis);
00033   zposnum = (eventnumber/(numthetas*numphis))%(numzpos);
00034   phicentrenum = (eventnumber/(numthetas*numphis*numzpos))%(numphicentre);
00035 
00036   thetafrac = ((double)thetanum)/(numthetas-1);
00037   ephifrac = ((double)ephinum)/(numphis-1);
00038   zposfrac = ((double)zposnum)/(numzpos-1);
00039   phicentrefrac = ((double)phicentrenum)/(numphicentre-1);
00040 
00041   etheta = thetamin + thetafrac*(thetamax-thetamin);
00042   phicentre = phicentremin + phicentrefrac*(phicentremax-phicentremin);
00043   phimin = phicentre - sectorhalfopeningangle*0.999;
00044   phimax = phicentre + sectorhalfopeningangle*0.999;
00045   ephi = phimin + ephifrac*(phimax-phimin);
00046   zpos = zposmin + zposfrac*(zposmax-zposmin);
00047 
00048   G4double eenergy;
00049     eenergy = ebeam - ebeam/(1 + mp/(2*ebeam*sin(etheta/2.)*sin(etheta/2.))); // ep elastic electrons
00050 
00051   G4double xdir = sin(etheta)*cos(ephi);
00052   G4double ydir = sin(etheta)*sin(ephi);
00053   G4double zdir = cos(etheta);
00054   printf("Primaries:%5i phi:%2i %.2f zpos:%2i %.2f; phicentre:%2i %.2f; theta:%2i %.2f =%.3f deg =%4.1f mrad  eenergy=%.3f GeV  phi=%6.1f deg, xdir=%.3f, ydir=%.3f, zdir=%.3f\n", 
00055        eventnumber, ephinum, ephifrac, zposnum, zposfrac, phicentrenum, phicentrefrac, 
00056        thetanum, thetafrac, etheta/degree, etheta/rad*1000, eenergy, ephi/degree, xdir, ydir, zdir);
00057   
00058   particleGun->SetParticleEnergy(eenergy*GeV);
00059   particleGun->SetParticleMomentumDirection(G4ThreeVector(xdir,ydir,zdir));
00060   particleGun->SetParticlePosition(G4ThreeVector(0.*cm, 0.*cm, zpos*m));
00061   particleGun->GeneratePrimaryVertex(anEvent);
00062   eventnumber++;
00063 
00064   gRootAnalysis->SetMomentum0(11000,0,0,11000);
00065   gRootAnalysis->SetMomentum2(eenergy*MeV,eenergy*MeV*xdir,eenergy*MeV*ydir,eenergy*MeV*zdir);
00066   gRootAnalysis->SetMomentum1(eenergy*MeV,eenergy*MeV*xdir,eenergy*MeV*ydir,eenergy*MeV*zdir);
00067   gRootAnalysis->SetProcess(1);
00068 
00069   if (eventnumber==(numphis*numthetas*numzpos*7)) {
00070     printf("\nFully completed one set of optics rays.\n\n");
00071   }
00072 }

Here is the call graph for this function:

Here is the caller graph for this function:

void MollerPrimaryGenAction::GeneratePrimaries_pion ( G4Event *  anevent  ) 

Definition at line 16 of file MollerPrimaryGenAction_pion.cc.

References alpha, ebeam, gRootAnalysis, me, particleGun, pi, RootAnalysis::SetMomentum0(), RootAnalysis::SetMomentum1(), RootAnalysis::SetRate(), RootAnalysis::SetTotXS(), and wiser_sigma().

00017 {
00018     const double max_pi_ang_deg = 5.0; // [deg] basic limit on what the spectrometer
00019                                        //       will accept in lab frame
00020     const double max_pi_ang = max_pi_ang_deg*pi/180.0;
00021     const double costhrange = 1.0 - cos(max_pi_ang);
00022 
00023     //Find the scattering point in the target
00024     double vertex_z; //scattering point in target (cm) measured from the upstream end of target
00025     double t = 150.0; // t = thickness of target in cm
00026     double rho = 0.0715; // rho = density of target in g/cm**3 (from KK)
00027     double radiationLength = 63.04; // g/cm**2 (from PDG)
00028     double t_rad = radiationLength/rho; // t_rad = radiation length in cm
00029     double z = G4UniformRand();
00030     vertex_z = z*t;//just do this for now
00031 
00032     double fracrl = vertex_z/t_rad; //total radiation lenght fraction travelled through
00033     double bt = fracrl*4./3.;
00034 
00035     double intrad = 2.0*log(ebeam/me)*alpha/pi;
00036 
00037     double vertex_x = (-0.25 + (0.5*(G4UniformRand())));
00038     double vertex_y = (-0.25 + (0.5*(G4UniformRand())));
00039 
00040     // Generate pi- angles and energy
00041 
00042     double pimass = 0.139;
00043 
00044     double pip  = G4UniformRand()*(ebeam-pimass);
00045     double pien = sqrt(pip*pip + pimass*pimass);
00046     double pith = acos( 1.0 - G4UniformRand()*costhrange );
00047     double piph = 2.0*pi*G4UniformRand();
00048 
00049     // 1e-7 is to get ub -> cm2 (10^-30) and 10^23 from Avagadro
00050     double factor = 6.0221415*1e-7*1.0E-6/1.602176487E-19;
00051 
00052 
00053     double xs = wiser_sigma(ebeam, pip, pith, bt + intrad, 1 )*1e-3; // ubarn
00054 
00055     // 2pi*cosrange*(Ebeam-pimass) is the phase space for such and event
00056     // and needs to be included
00057     double rate = xs*t*rho/1.008*1.0*factor*2.0*pi*costhrange*(ebeam-pimass); //Event rate/sec/ uA
00058 
00059 
00060     gRootAnalysis->SetTotXS(xs);
00061     gRootAnalysis->SetRate(rate);
00062 
00063     G4ParticleDefinition* particle = G4PionMinus::PionMinusDefinition();
00064 
00065     G4ThreeVector pipdir(sin(pith)*cos(piph), sin(pith)*sin(piph), cos(pith));
00066 
00067     particleGun->SetParticleDefinition(particle);
00068     particleGun->SetParticleMomentumDirection(pipdir);
00069     particleGun->SetParticleEnergy(pien*GeV);
00070     particleGun->SetParticlePosition(G4ThreeVector(vertex_x*cm, vertex_y*cm, vertex_z*cm));
00071     particleGun->GeneratePrimaryVertex(anEvent);
00072 
00073     gRootAnalysis->SetMomentum0(ebeam*GeV, 0.0, 0.0, 1.0);
00074     gRootAnalysis->SetMomentum1(pip*GeV, pipdir.x(), pipdir.y(), pipdir.z());
00075 
00076     anEvent->GetPrimaryVertex(0)->GetPrimary(0);
00077 
00078 }

Here is the call graph for this function:

G4int MollerPrimaryGenAction::GetGenerator (  )  [inline]

Definition at line 44 of file MollerPrimaryGenAction.hh.

References GeneratorNumber.

Referenced by MollerPrimaryGeneratorMessenger::GetCurrentValue().

00044 {return GeneratorNumber;}

Here is the caller graph for this function:

double MollerPrimaryGenAction::RadProfile ( double  eloss,
double  btt 
)

Definition at line 95 of file MollerPrimaryGenAction.cc.

References ebeam, and me.

Referenced by EnergNumInt(), and GeneratePrimaries_elasticep_dustin().

00095                                                                  {
00096     double Ekin = ebeam - me;
00097     return 1./eloss*(1.-eloss/Ekin+0.75*pow(eloss/Ekin,2))*pow(eloss/Ekin,btt);
00098 }

Here is the caller graph for this function:

void MollerPrimaryGenAction::SetGenerator ( G4int  val  )  [inline]

Definition at line 43 of file MollerPrimaryGenAction.hh.

References GeneratorNumber.

Referenced by MollerPrimaryGeneratorMessenger::SetNewValue().

00043 { GeneratorNumber = val;}

Here is the caller graph for this function:

void MollerPrimaryGenAction::setSeedValue ( G4bool  value  )  [inline]

Definition at line 48 of file MollerPrimaryGenAction.hh.

References fSetSeedConst.

Referenced by MollerPrimaryGeneratorMessenger::SetNewValue().

00048                                    { fSetSeedConst = value; 
00049     G4cout<<"Setting fSetSeedConst"<<G4endl;};

Here is the caller graph for this function:

Double_t MollerPrimaryGenAction::wiser_all_fit ( Double_t *  x,
Double_t *  par 
) [static]

Definition at line 216 of file MollerPrimaryGenAction_pion.cc.

Referenced by wiser_sigma().

00216                                                                         {
00217     // Primary variable x[0] is photon energy in [GeV]
00218     
00219     // Parameters are:
00220     // par[0]    Beam energy [GeV]
00221     Double_t Ebeam = par[0];
00222     // par[1]    Final particle momentum [GeV/c]
00223     Double_t pf    = par[1];
00224     // par[2]    Final particle angle [rad]
00225     Double_t thf   = par[2];
00226     // par[3]    Type (as defined in wiser_all_sig)
00227     Int_t type  = (Int_t) par[3];
00228     // par[4]    Minimum invariant mass of the residual system [GeV]
00229     Double_t M_X   = par[4];
00230 
00231 
00232     const Double_t mass_p  = 0.9383;
00233     const Double_t mass_p2 = mass_p*mass_p;
00234     const Double_t mass_pi = 0.1396;
00235     const Double_t mass_K  = 0.4973;
00236 
00237     Double_t mass[] = {mass_pi, mass_pi, mass_K, mass_K, mass_p, mass_p};
00238 
00239     Double_t E_gamma = x[0];
00240 
00241     double s = mass_p2 + 2.0*E_gamma*mass_p;
00242 
00243     /*  Wiser's fit    pi+     pi-    k+     k-     p+       p-  */
00244     Double_t A1[] =  {566.,  486.,   368., 18.2,  1.33E5,  1.63E3 };
00245     Double_t A2[] =  {829.,  115.,   1.91, 307.,  5.69E4, -4.30E3};
00246     Double_t A3[] =  {1.79,  1.77,   1.91, 0.98,  1.41,    1.79 };
00247     Double_t A4[] =  {2.10,  2.18,   1.15, 1.83,   .72,    2.24 };
00248     Double_t A6 =  1.90;
00249     Double_t A7 = -.0117;
00250 
00251 
00252     // Boost to CoM
00253     double beta_cm = E_gamma/(E_gamma+mass_p);
00254     double gamma_cm = 1.0/sqrt(1.0 - beta_cm*beta_cm);
00255 
00256     double p_cm_z = -gamma_cm*beta_cm*sqrt(pf*pf+mass[type]*mass[type])
00257               +gamma_cm*pf*cos(thf);
00258 
00259     double pT   = pf*sin(thf);
00260     double p_cm = sqrt( pT*pT + p_cm_z*p_cm_z );
00261     double Ef = sqrt( p_cm*p_cm + mass[type]*mass[type] );
00262 
00263     double p_cm_max = sqrt(s +pow(M_X*M_X - mass[type]*mass[type],2.0)/s -
00264      2.0*(M_X*M_X + mass[type]*mass[type]) )/2.0;
00265 
00266     double X_R = p_cm/p_cm_max;
00267 
00268     if( X_R > 1.0 ){ return 0.0; } // Kinematically forbidden
00269 
00270 
00271     if( type != 4 ){ // Everything but proton
00272   return ( A1[type] + A2[type]/sqrt(s) )*
00273       pow(1.0 - X_R + A3[type]*A3[type]/s, A4[type])/E_gamma;
00274     } else {
00275   Double_t U_MAN = abs(2.0*mass_p2 - 2.0*mass_p*Ef);
00276 
00277   return ( A1[type] + A2[type]/sqrt(s) )*
00278       pow(1.0 - X_R + A3[type]*A3[type]/s, A4[type])/pow(1.0 + U_MAN,A6+A7*s)/E_gamma;
00279     }
00280 
00281     return 0.0;
00282 }

Here is the caller graph for this function:

Double_t MollerPrimaryGenAction::wiser_sigma ( Double_t  ebeam,
Double_t  pf,
Double_t  thf,
Double_t  rl,
Int_t  type 
)

Definition at line 82 of file MollerPrimaryGenAction_pion.cc.

References wiser_all_fit().

Referenced by GeneratePrimaries_pion().

00082                                                                                                                    {
00083     /*
00084         Adapted from the infamous Wiser code from Peter Bosted
00085 
00086   Seamus Riordan
00087   riordan@jlab.org
00088   September 4, 2012
00089        
00090       type = 0 pi+
00091          1 pi-
00092          2 K+
00093          3 K-
00094          4 p
00095          5 p-bar
00096       
00097   type defines the type of particle produced
00098         Ebeam and pf are the beam energy in GeV and final particle momentum 
00099   in GeV/c respectively thf is the lab angle relative to the beam of 
00100   the produced particle in radians
00101 
00102   rad_len is the *effective* *total* radiator. [not in percent, typically 
00103   called bt in the literature]  This means put in the effective radiator for 
00104   internal radiation BEFORE and AFTER the vertex (total 0.05 for JLab kinematics)
00105         on top of real radiation lengths from ext brem times 4/3
00106 
00107   Returns the cross section in units of nanobarns/GeV/str
00108      */
00109 
00110     const int ntype = 6;
00111 
00112     Double_t A5[] = {-5.49,  -5.23, -5.91, -4.45, -6.77,  -6.53 };
00113     Double_t A6[] = {-1.73,  -1.82, -1.74, -3.23,  1.90,  -2.45 };
00114 
00115     const Double_t mass_p  = 0.9383;
00116     const Double_t mass_p2 = mass_p*mass_p;
00117     const Double_t mass_pi = 0.1396;
00118     const Double_t mass_K  = 0.4973;
00119     const Double_t mass_Lambda  = 1.116;
00120 
00121     Double_t mass[] = {mass_pi, mass_pi, mass_K, mass_K, mass_p, mass_p};
00122     Double_t *mass2 = new Double_t[ntype];
00123 
00124     int i;
00125     for( i = 0; i < 6; i++ ){
00126   mass2[i] = mass[i]*mass[i];
00127     }
00128 
00129     // Calculate minimum photon energy required to produce such a system
00130     // with the particle of transverse momentum pf*sin(thf)
00131     // This is the case where in the CoM frame, the particle and the
00132     // residual system are going back to back, transverse to the incoming particles
00133     // and all components of the residual system are at rest relative to one another
00134 
00135     double M_X;// invariant mass of the minimum residual system
00136 
00137     switch( type ){
00138   // pi+ can just be N
00139   case 0:
00140       M_X = mass_p;
00141       break;
00142   // pi- needs a pi+ N
00143   case 1:
00144       M_X = mass_p + mass_pi;
00145       break;
00146   // K+ can be created with just a Lambda, final state
00147   // NOTE:  This is different from the original Wiser
00148   // code!  They had just proton mass, but you still have
00149   // to have an additional strange quark lying around
00150   // The lowest energy configuration you can have like this
00151   // is the Lambda
00152   case 2:
00153       M_X = mass_Lambda;
00154       break;
00155   // p/p-bar production is twice the mass of the proton
00156   case 4:
00157   case 5:
00158       M_X = 2.0*mass_p;
00159       break;
00160   default:
00161       fprintf(stderr, "%s: %s line %d - Forbidden type passed to Wiser parameterization\n",
00162         __PRETTY_FUNCTION__, __FILE__, __LINE__ );
00163       exit(1);
00164       break;
00165     }
00166 
00167     double MX2  = M_X*M_X;
00168     double Ef = sqrt(pf*pf + mass2[type]);
00169 
00170     Double_t E_gamma_min = ( MX2 - mass2[type] - mass_p2 + 2.0*mass_p*Ef )/
00171              ( 2.0*( mass_p - Ef + pf*cos(thf) ) );
00172 
00173     // Parameterization parameters
00174     double pT = pf*sin(thf);
00175     double ML = sqrt(pT*pT + mass2[type]);
00176 
00177     double sigma, sig_e;
00178     double fitres;
00179 
00180 
00181     if( E_gamma_min > 0.0 && E_gamma_min < Ebeam ){
00182 
00183   TF1 *wiserfit = new TF1("wiserfit", wiser_all_fit, E_gamma_min, Ebeam, 5);
00184   wiserfit->SetParameter(0, Ebeam);
00185   wiserfit->SetParameter(1, pf);
00186   wiserfit->SetParameter(2, thf);
00187   wiserfit->SetParameter(3, (Double_t) type);
00188   wiserfit->SetParameter(4, M_X);
00189 
00190   fitres = wiserfit->Integral(E_gamma_min, Ebeam);
00191 
00192   delete wiserfit;
00193 
00194   if( type != 4 ){
00195       sig_e = fitres*exp(A5[type]*ML)*exp(A6[type]*pT*pT/Ef);
00196   } else {
00197       sig_e = fitres*exp(A5[type]*ML);
00198   }
00199 
00200   // Factor of 1000 is required for units
00201   sigma = pf*pf*sig_e*rad_len*1000.0/Ef;
00202 
00203   delete mass2;
00204   return sigma;
00205     } else {
00206   // Kinematically forbidden
00207   delete mass2;
00208   return 0.0;
00209     }
00210 
00211     delete mass2;
00212     return 0.0;
00213 }

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

const G4double MollerPrimaryGenAction::bremcut [private]

Definition at line 66 of file MollerPrimaryGenAction.hh.

Referenced by EnergNumInt(), and GeneratePrimaries_elasticep_dustin().

Definition at line 63 of file MollerPrimaryGenAction.hh.

Referenced by GeneratePrimaries_inelasticep_dustin().

const G4double MollerPrimaryGenAction::ebeam [private]

Definition at line 70 of file MollerPrimaryGenAction.hh.

Referenced by GeneratePrimaries(), and setSeedValue().

Definition at line 58 of file MollerPrimaryGenAction.hh.

Referenced by GeneratePrimaries(), GetGenerator(), and SetGenerator().

Definition at line 57 of file MollerPrimaryGenAction.hh.

Referenced by MollerPrimaryGenAction(), and ~MollerPrimaryGenAction().

const G4double MollerPrimaryGenAction::me [private]
const G4double MollerPrimaryGenAction::mp [private]
const G4int MollerPrimaryGenAction::nbin = 1000 [static, private]
const G4int MollerPrimaryGenAction::nbinIneEP = 100 [static, private]

Definition at line 61 of file MollerPrimaryGenAction.hh.

Referenced by GeneratePrimaries_inelasticep_dustin().

G4ParticleGun* MollerPrimaryGenAction::particleGun [private]

The documentation for this class was generated from the following files:

Generated on 16 Jun 2013 for mollersim by  doxygen 1.6.1