ESgen Class Reference
|
Ratpac-two
|
Implements the generation of a neutrino-electron elastic scattering event. More...
#include <ESgen.hh>
Public Member Functions | |
| void | GenerateEvent (const G4ThreeVector &nu_dir, G4LorentzVector &neutrino, G4LorentzVector &electron) |
| void | SetNuType (const G4String &nutype) |
| const G4String & | GetNuType () const |
| void | SetNuFlavor (const G4String &nuflavor) |
| const G4String & | GetNuFlavor () const |
| G4double | GetTotalFlux () |
| Getter for the total neutrino flux. More... | |
| G4double | GetRatePerTarget () |
| Getter for the SSM event rate per target for this flux. More... | |
| const G4String | GetDBName () const |
| void | SetDBName (const G4String name) |
Protected Member Functions | |
| G4bool | GetGenLoaded () |
Protected Attributes | |
| G4String | fGenType |
| G4String | fNuType |
| G4String | fNuFlavor |
| ESCrossSec * | fXS |
| TGraph * | fNuSpectrum |
| Spectrum shape to be sampled. More... | |
| std::vector< double > | fEnuTbl |
| std::vector< double > | fFluxTbl |
| G4double | fEmax |
| G4double | fEmin |
| G4double | fEnuMax |
| G4double | fEnuMin |
| G4double | fFluxMax |
| G4bool | fGenLoaded |
| G4double | fMassElectron |
| G4double | fTotalFlux |
| CLHEP::RandGeneral * | fSpectrumRndm |
| G4String | fDBName |
Detailed Description
Implements the generation of a neutrino-electron elastic scattering event.
Code contributed by the SNO+ collaboration
- Date
- 15-Dec-2010
This class is the workhorse of the generator, separating the Geant4 specific methods from a more physics oriented structure. It is based on the original implementation by Joe Formaggio and the following adaptation by Bill Seligman. However the whole class was re-written later to adapt it for the final use of solar neutrino generation.
REVISION HISTORY:
- 02-Sep-2005 J. Formaggio (UW):
- Original implementation.
- Generates an neutrino-elastic scattering event, based on the cross-section as function of neutrino energy and the electron's recoil energy. Allow for variations in the weak mixing angle and the possibility of a neutrino magnetic moment.
- 07-Feb-2006 Bill Seligman:
- Converted to Geant4+GLG4Sim+RAT.
- I'm following the code structure of the IBD classes: RATVertexGen_ES handles the G4-related tasks of constructing an event, while this class deals with the physics of the cross-section. Some of the code (the flux in particular) is copied from IBDgen.
- 15-Dec-2010 N. Barros (LIP)
- Strongly re-wrote this class to accommodate a solar neutrino generator. (solar). The original implementation was generating ES events from reactor anti-nus (ibd).
- The code has been strongly refactored so that the original code is still running. The choice is passed through the macro file or the command line.
- 18-Feb-2011 N. Barros:
- Improved the code for speed.
- Solved a minor bug in the calculation of the direction of the outgoing electron.
- Moved Geant4-related calculations into the parent vertex generator RAT::VertexGen_ES.
- 14-Dec-2011 N. Barros:
- Improved usage of the incoming neutrino direction and corresponding calculation of outgoing electron.
- 10-Jan-2012 N. Barros:
- Solved a problem with the rotation applied to get the outgoing electron direction.
- Improved speed in the determination of the electron momentum.
- 22-Jun-2012 N. Barros:
- Refactored code and cleaned up to prepare for pull request.
- Improved speed on random sampling over the spectrum and cross sections.
- 02-Jul-2012 N. Barros:
- Removed now superfluous SetXSecMax(). Now using CLHEP random sampler.
- Solved problem in the determination of the rater per target for continuous spectra.
- Removed dependency on ESMessenger. Its functionality was moved to upper level classes.
- 14-Aug-2012 N. Barros:
- Solved some issues with the compatibility with the combo generator.
- If the direction is set to 0,0,0 the generator now produces a random direction at each event.
- Added a new flag to customize the name of the database to draw the spectrum from (allows ad-hoc entries).
- 17-Jul-2017 R. Bonventre:
- Modified for RAT-PAC
Member Function Documentation
◆ GenerateEvent()
| void RAT::ESgen::GenerateEvent | ( | const G4ThreeVector & | nu_dir, |
| G4LorentzVector & | neutrino, | ||
| G4LorentzVector & | electron | ||
| ) |
Generate random event vectors.
Pass in the neutrino direction (unit vector).
- Parameters
-
[in] nu_dir Incoming neutrino direction (lab coordinates). [out] neutrino Outgoing neutrino direction (lab coordinates. Not used). [out] electron Outgoing electron direction (lab coordinates).
- Returns
- 4-momentum vectors for resulting electron.
! Have to be careful with the line neutrino types (pep) and even more careful with the double line (be7)
◆ GetDBName()
|
inline |
◆ GetGenLoaded()
|
inlineprotected |
Private method to check if generator is loaded.
◆ GetNuFlavor()
|
inline |
Getter for neutrino flavor
◆ GetNuType()
|
inline |
Getter for the spectrum being used
◆ GetRatePerTarget()
| G4double RAT::ESgen::GetRatePerTarget | ( | ) |
Getter for the SSM event rate per target for this flux.
The SSM event rate is obtained from the product of the cross section and the flux: ![]()
- Returns
- The event Rate predicted by the SSM (in Hz)
◆ GetTotalFlux()
|
inline |
Getter for the total neutrino flux.
- Returns
- total neutrino flux in
◆ SetDBName()
| void RAT::ESgen::SetDBName | ( | const G4String | name | ) |
Setter of the DB name. Defaults to \'SOLAR\'
- Parameters
-
[in] name of the database entry to look at.
◆ SetNuFlavor()
| void RAT::ESgen::SetNuFlavor | ( | const G4String & | nuflavor | ) |
Setter for the neutrino flavor being generated.
This parameter is passed down into the cross-section to calculate the correct shape.
- Parameters
-
nuflavor Flavor of the neutrino being calculated. Can be one of ( nue,numu,nuebar,numubar).
- Attention
◆ SetNuType()
| void RAT::ESgen::SetNuType | ( | const G4String & | nutype | ) |
Setter for the flux to use.
- Parameters
-
[in] nutype Key to the database to load the flux.
Member Data Documentation
◆ fDBName
|
protected |
Name of the database entry to read the input spectrum from. Defaults to SOLAR.
◆ fEmax
|
protected |
Recoil upper limit for the electron.
◆ fEmin
|
protected |
Recoil lower limit for the electron.
◆ fEnuMax
|
protected |
Recoil upper limit for the electron.
◆ fEnuMin
|
protected |
Recoil lower limit for the electron.
◆ fEnuTbl
|
protected |
vector of neutrino energy points in the neutrino spectrum shape.
◆ fFluxMax
|
protected |
Maximum flux in spectrum shape
◆ fFluxTbl
|
protected |
Normalized flux in the neutrino spectrum shape.
◆ fGenLoaded
|
protected |
Generator loaded flag.
◆ fGenType
|
protected |
Generator type
◆ fMassElectron
|
protected |
electron mass
◆ fNuFlavor
|
protected |
Neutrino flavor
◆ fNuSpectrum
|
protected |
Spectrum shape to be sampled.
Using ROOT TGraph to make use of it's nice evaluator.
◆ fNuType
|
protected |
Neutrino type
◆ fSpectrumRndm
|
protected |
Random number generator for the nu spectrum sampler
◆ fTotalFlux
|
protected |
Total neutrino flux
◆ fXS
|
protected |
Instance of cross-section class
The documentation for this class was generated from the following files:
- /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/gen/include/RAT/ESgen.hh
- /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/gen/src/ESgen.cc
Generated by