| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Li9He8.h

Go to the documentation of this file.
00001 // This program generates Li9/He8 events.
00002 // Sep. 09,2009  qinghe@princeton.edu
00003 
00004 #ifndef Li9He8_H
00005 #define Li9He8_H
00006 
00007 #include <iostream>
00008 #include <fstream>
00009 #include <cstdlib>
00010 #include <TROOT.h>
00011 #include <TRandom.h>
00012 #include <cmath>
00013 #include <TVector3.h>
00014 
00015 #include <CLHEP/Units/PhysicalConstants.h>
00016 #include "CLHEP/Units/SystemOfUnits.h"
00017 #include "GaudiKernel/RndmGenerators.h"
00018 using namespace std;
00019 using namespace CLHEP;
00020 
00021 class Li9He8
00022 {
00023  public:  
00024   Li9He8(IRndmGenSvc *rgs);
00025   ~Li9He8() {};
00026 
00027   // For broad states, the final energy of the daughter nucleus is thrown according 
00028   // to a Breit-Wigner form
00029   //by default, only decays with neutrons are considered.
00030   //for complete decay, use the -complete_decay option
00031   void Li9Decay(TVector3 &pElectron, TVector3 &pNeutron,TVector3 &pAlpha1, 
00032                 TVector3 &pAlpha2, double alpha_mass, bool complete_decay );
00033   
00034   //He8 decay
00035   //by default, only decays with neutrons are considered.
00036   //for complete decay, use the -complete_decay option
00037   //ref. Nucler Physics A366 (1981) 461-468, Nuclear Physics A487 (1988) 269-278 
00038   void He8Decay(TVector3 &pElectron, TVector3 &pNeutron, TVector3 &pGamma,
00039                 bool complete_decay);
00040 
00041  private:
00042   IRndmGenSvc *m_rgs;
00043   Rndm::Numbers m_uni, m_breitwigner;
00044 
00045   void RandomVector(TVector3& aVec);
00046   
00047   //Generate Li9 alpha sepectrum according data 
00048   //Nuclear Physics A450(1990) 189-208  fig.4
00049   double GetLi9AlphaEnergy(int whichcase);
00050   
00051   //Generate He8 neutron sepectrum according data 
00052   //Nuclear Physics A366(1981) 461-468  fig.4
00053   double GetHe8NeutronEnergy();
00054   
00055   // Chooses an intermediate energy for decays with broad levels
00056   // by thowing according to a Breit-Wigner form.  It is constrained,
00057   // however, to be >0 and less than the maximum available energy
00058   double GetIntermediateEnergy(double peak, double width, double max);
00059   
00060   //This Fermi function is copyed from Geant4
00061   double FermiFunc(double T, double Z);
00062   
00063   // Unnormalized beta spectrum (allowed approximation, including fermi factor)
00064   // Z is for daughter nucleus, i.e. 3 for He-8, 4 for Li-9
00065   double BetaSpectrum(double E, double QOfDecay, double Z);
00066   
00067   //Get the spectrum max by sampling 100 events
00068   double GetSpectrumMax(double QOfDecay, int Z);
00069   
00070   // Uses accept/reject method to generate electron energy according to beta spectrum
00071   // the Z is for the daughter nucleus
00072   double GetElectronEnergy(double QOfDecay, int Z, double max);
00073   
00074   //This is the neutron spectrum line shape for Li9 2.43MeV state 
00075   //ref. Nuclear Physics A450(1990) 189-208 
00076   double Li9NeutronLineShape1(double x);
00077   
00078   //This is the neutron spectrum line shape for Li9 2.43MeV state 
00079   //ref. Nuclear Physics A450(1990) 189-208 
00080   double Li9NeutronLineShape2(double x);
00081   
00082   //This is the neutron spectrum line shape for Li9 2.78MeV state 
00083   //ref. Nuclear Physics A450(1990) 189-208 
00084   double Li9NeutronLineShape3(double x);
00085   
00086   //Get Li9 neutron spectrum from the above line shapes 
00087   double GetLi9NeutronEnergy(int whichshape, double max);
00088   
00089 };
00090 
00091 #endif  // Li9He8_H
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 21:05:22 2011 for Li9He8Decay by doxygen 1.4.7