EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
spectrum Class Reference

#include <estarlight/blob/master/include/spectrum.h>

+ Inheritance diagram for spectrum:
+ Collaboration diagram for spectrum:

Public Member Functions

 spectrum (const randomGenerator &randy, beamBeamSystem *bbs)
 
int generateKsingle ()
 
int generateKdouble ()
 
double drawKsingle ()
 
void drawKdouble (float &egamma1, float &egamma2)
 
void setBeamBeamSystem (beamBeamSystem *bbs)
 
void setMinGammaEnergy (double energy)
 
void setMaxGammaEnergy (double energy)
 
void setBmin (double bmin)
 
void setBmax (double bmax)
 

Protected Member Functions

virtual bool generateBreakupProbabilities ()
 
virtual double getSigma (double) const
 
virtual double getTransformedNofe (double egamma, double b)
 

Protected Attributes

double _bMin
 
double _bMax
 
int _nBbins
 
std::vector< double > _probOfBreakup
 
beamBeamSystem_beamBeamSystem
 

Private Member Functions

double getFnSingle (double egamma) const
 
double getFnDouble (double egamma1, double egamma2) const
 
 spectrum ()
 

Private Attributes

int _nK
 
std::vector< double > _fnSingle
 
std::vector< std::vector
< double > > 
_fnDouble
 
std::vector< double > _fnSingleCumulative
 
std::vector< std::vector
< double > > 
_fnDoubleCumulative
 
std::vector< double > _fnDoubleInt
 
std::vector< double > _fnDoubleIntCumulative
 
std::vector< double > _eGamma
 
double _eGammaMin
 
double _eGammaMax
 
int _zTarget
 
int _aTarget
 
bool _hadBreakProbCalculated
 
randomGenerator _randy
 

Detailed Description

Definition at line 29 of file spectrum.h.

View newest version in sPHENIX GitHub at line 29 of file spectrum.h

Constructor & Destructor Documentation

spectrum::spectrum ( const randomGenerator randy,
beamBeamSystem bbs 
)

Spectrum must be constructed with beam-beam system, default constructor disallowed

Definition at line 27 of file spectrum.cpp.

View newest version in sPHENIX GitHub at line 27 of file spectrum.cpp

References _eGamma, _nBbins, _nK, and _probOfBreakup.

spectrum::spectrum ( )
private

Default constructed disallowed (not implemented)

Member Function Documentation

void spectrum::drawKdouble ( float &  egamma1,
float &  egamma2 
)

Get the energy of a single gamma

Parameters
egamma1variable passed by reference to get the energy of the frst gamma
egamma2variable passed by reference to get the energy of the second gamma
Returns
energy of the gamma

Definition at line 265 of file spectrum.cpp.

View newest version in sPHENIX GitHub at line 265 of file spectrum.cpp

References _eGamma, _fnDouble, _fnDoubleIntCumulative, _nK, _randy, and randomGenerator::Rndom().

+ Here is the call graph for this function:

double spectrum::drawKsingle ( )

Get the energy of a single gamma

Returns
energy of the gamma

Definition at line 226 of file spectrum.cpp.

View newest version in sPHENIX GitHub at line 226 of file spectrum.cpp

References _eGamma, _fnSingleCumulative, _nK, _randy, and randomGenerator::Rndom().

Referenced by starlightPythia::produceEvent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool spectrum::generateBreakupProbabilities ( )
protectedvirtual

Generate the hadron breakup probability table

Reimplemented in spectrumProtonNucleus.

Definition at line 354 of file spectrum.cpp.

View newest version in sPHENIX GitHub at line 354 of file spectrum.cpp

References _beamBeamSystem, _bMax, _bMin, _nBbins, _probOfBreakup, and beamBeamSystem::probabilityOfBreakup().

Referenced by generateKdouble(), and generateKsingle().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int spectrum::generateKdouble ( )

Generate a 2-D table of photon energy probabilities Use NK+1 x NK+1 logarithmic steps between Et_min and Eg_max

Definition at line 128 of file spectrum.cpp.

View newest version in sPHENIX GitHub at line 128 of file spectrum.cpp

References _bMax, _bMin, _eGamma, _eGammaMax, _eGammaMin, _fnDouble, _fnDoubleCumulative, _fnDoubleInt, _fnDoubleIntCumulative, _hadBreakProbCalculated, _nBbins, _nK, _probOfBreakup, f2(), generateBreakupProbabilities(), getSigma(), getTransformedNofe(), k, and starlightConstants::pi.

Referenced by starlightPythia::init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int spectrum::generateKsingle ( )

Generate a table of photon energy probabilities Use NK+1 logarithmic steps between Et_min and Eg_max

Definition at line 52 of file spectrum.cpp.

View newest version in sPHENIX GitHub at line 52 of file spectrum.cpp

References _bMax, _bMin, _eGamma, _eGammaMax, _eGammaMin, _fnSingle, _fnSingleCumulative, _hadBreakProbCalculated, _nBbins, _nK, _probOfBreakup, f2(), generateBreakupProbabilities(), getSigma(), getTransformedNofe(), and starlightConstants::pi.

Referenced by starlightPythia::init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double spectrum::getFnDouble ( double  egamma1,
double  egamma2 
) const
private

Definition at line 404 of file spectrum.cpp.

View newest version in sPHENIX GitHub at line 404 of file spectrum.cpp

References _eGamma, _eGammaMax, _eGammaMin, _fnDouble, and _nK.

double spectrum::getFnSingle ( double  egamma) const
private

Definition at line 377 of file spectrum.cpp.

View newest version in sPHENIX GitHub at line 377 of file spectrum.cpp

References _eGamma, _eGammaMax, _eGammaMin, _fnSingle, and _nK.

virtual double spectrum::getSigma ( double  ) const
inlineprotectedvirtual

Needs some explanation

Reimplemented in spectrumProtonNucleus.

Definition at line 85 of file spectrum.h.

View newest version in sPHENIX GitHub at line 85 of file spectrum.h

Referenced by generateKdouble(), and generateKsingle().

+ Here is the caller graph for this function:

double spectrum::getTransformedNofe ( double  egamma,
double  b 
)
protectedvirtual

Definition at line 455 of file spectrum.cpp.

View newest version in sPHENIX GitHub at line 455 of file spectrum.cpp

References _beamBeamSystem, and beamBeamSystem::beamLorentzGamma().

Referenced by generateKdouble(), and generateKsingle().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void spectrum::setBeamBeamSystem ( beamBeamSystem bbs)
inline

Set the beam beam system

Definition at line 63 of file spectrum.h.

View newest version in sPHENIX GitHub at line 63 of file spectrum.h

References _beamBeamSystem.

void spectrum::setBmax ( double  bmax)
inline

Set maximum impact parameter

Definition at line 77 of file spectrum.h.

View newest version in sPHENIX GitHub at line 77 of file spectrum.h

References _bMax.

void spectrum::setBmin ( double  bmin)
inline

Set minimum impact parameter

Definition at line 74 of file spectrum.h.

View newest version in sPHENIX GitHub at line 74 of file spectrum.h

References _bMin.

void spectrum::setMaxGammaEnergy ( double  energy)
inline

Set the maximum gamma energy

Definition at line 71 of file spectrum.h.

View newest version in sPHENIX GitHub at line 71 of file spectrum.h

References _eGammaMax.

Referenced by starlightPythia::init().

+ Here is the caller graph for this function:

void spectrum::setMinGammaEnergy ( double  energy)
inline

Set the minimum gamma energy

Definition at line 68 of file spectrum.h.

View newest version in sPHENIX GitHub at line 68 of file spectrum.h

References _eGammaMin.

Referenced by starlightPythia::init().

+ Here is the caller graph for this function:

Member Data Documentation

int spectrum::_aTarget
private

A of target

Definition at line 145 of file spectrum.h.

View newest version in sPHENIX GitHub at line 145 of file spectrum.h

beamBeamSystem* spectrum::_beamBeamSystem
protected

Beam beam system

Definition at line 104 of file spectrum.h.

View newest version in sPHENIX GitHub at line 104 of file spectrum.h

Referenced by spectrumProtonNucleus::generateBreakupProbabilities(), generateBreakupProbabilities(), getTransformedNofe(), and setBeamBeamSystem().

double spectrum::_bMax
protected

Maximum impact parameter

Definition at line 95 of file spectrum.h.

View newest version in sPHENIX GitHub at line 95 of file spectrum.h

Referenced by spectrumProtonNucleus::generateBreakupProbabilities(), generateBreakupProbabilities(), generateKdouble(), generateKsingle(), and setBmax().

double spectrum::_bMin
protected

Minimum impact parameter

Definition at line 92 of file spectrum.h.

View newest version in sPHENIX GitHub at line 92 of file spectrum.h

Referenced by spectrumProtonNucleus::generateBreakupProbabilities(), generateBreakupProbabilities(), generateKdouble(), generateKsingle(), setBmin(), and spectrumProtonNucleus::spectrumProtonNucleus().

std::vector<double> spectrum::_eGamma
private

Vecotr of gamma energies

Definition at line 133 of file spectrum.h.

View newest version in sPHENIX GitHub at line 133 of file spectrum.h

Referenced by drawKdouble(), drawKsingle(), generateKdouble(), generateKsingle(), getFnDouble(), getFnSingle(), and spectrum().

double spectrum::_eGammaMax
private

Max gamma energy

Definition at line 139 of file spectrum.h.

View newest version in sPHENIX GitHub at line 139 of file spectrum.h

Referenced by generateKdouble(), generateKsingle(), getFnDouble(), getFnSingle(), and setMaxGammaEnergy().

double spectrum::_eGammaMin
private

Min gamma energy

Definition at line 136 of file spectrum.h.

View newest version in sPHENIX GitHub at line 136 of file spectrum.h

Referenced by generateKdouble(), generateKsingle(), getFnDouble(), getFnSingle(), and setMinGammaEnergy().

std::vector<std::vector<double> > spectrum::_fnDouble
private

Contains the 2 photon probabilities

Definition at line 118 of file spectrum.h.

View newest version in sPHENIX GitHub at line 118 of file spectrum.h

Referenced by drawKdouble(), generateKdouble(), and getFnDouble().

std::vector<std::vector<double> > spectrum::_fnDoubleCumulative
private

Contains the cumulative distribution

Definition at line 124 of file spectrum.h.

View newest version in sPHENIX GitHub at line 124 of file spectrum.h

Referenced by generateKdouble().

std::vector<double> spectrum::_fnDoubleInt
private

Definition at line 127 of file spectrum.h.

View newest version in sPHENIX GitHub at line 127 of file spectrum.h

Referenced by generateKdouble().

std::vector<double> spectrum::_fnDoubleIntCumulative
private

Definition at line 130 of file spectrum.h.

View newest version in sPHENIX GitHub at line 130 of file spectrum.h

Referenced by drawKdouble(), and generateKdouble().

std::vector<double> spectrum::_fnSingle
private

Contains the 1 photon probabilities

Definition at line 115 of file spectrum.h.

View newest version in sPHENIX GitHub at line 115 of file spectrum.h

Referenced by generateKsingle(), and getFnSingle().

std::vector<double> spectrum::_fnSingleCumulative
private

Contains the cumulative distribution

Definition at line 121 of file spectrum.h.

View newest version in sPHENIX GitHub at line 121 of file spectrum.h

Referenced by drawKsingle(), and generateKsingle().

bool spectrum::_hadBreakProbCalculated
private

Hadron breakup probability is calculated

Definition at line 148 of file spectrum.h.

View newest version in sPHENIX GitHub at line 148 of file spectrum.h

Referenced by generateKdouble(), and generateKsingle().

int spectrum::_nBbins
protected

Number of bins in impact parameter

Definition at line 98 of file spectrum.h.

View newest version in sPHENIX GitHub at line 98 of file spectrum.h

Referenced by spectrumProtonNucleus::generateBreakupProbabilities(), generateBreakupProbabilities(), generateKdouble(), generateKsingle(), and spectrum().

int spectrum::_nK
private

NK

Definition at line 112 of file spectrum.h.

View newest version in sPHENIX GitHub at line 112 of file spectrum.h

Referenced by drawKdouble(), drawKsingle(), generateKdouble(), generateKsingle(), getFnDouble(), getFnSingle(), and spectrum().

std::vector<double> spectrum::_probOfBreakup
protected

Vector containing the probability of breakup

Definition at line 101 of file spectrum.h.

View newest version in sPHENIX GitHub at line 101 of file spectrum.h

Referenced by spectrumProtonNucleus::generateBreakupProbabilities(), generateBreakupProbabilities(), generateKdouble(), generateKsingle(), and spectrum().

randomGenerator spectrum::_randy
private

random number generator

Definition at line 151 of file spectrum.h.

View newest version in sPHENIX GitHub at line 151 of file spectrum.h

Referenced by drawKdouble(), and drawKsingle().

int spectrum::_zTarget
private

Z of target

Definition at line 142 of file spectrum.h.

View newest version in sPHENIX GitHub at line 142 of file spectrum.h


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