Berkeley Nuclear Data Software
Public Member Functions | List of all members
FluxAna Class Reference

#include <FluxMatrixAna.h>

Public Member Functions

 FluxAna ()
 Default constructor puts the class into working state. More...
 
void setRFPeriod (double a_RFPeriod)
 
void setTimeResolution (double a_timeResolution)
 
void setReqTimeBinWidth (double a_reqTimeBinWidth)
 
void setFlightPath (double a_flightPath)
 
void setEMin (double a_eMin)
 
void setEMax (double a_eMax)
 
double getRFPeriod ()
 
double getTimeResolution ()
 
double getReqTimeBinWidth ()
 
double getFlightPath ()
 
double getEMin ()
 
double getEMax ()
 
void readBinWiseFluxCSV (std::string a_fileName)
 
void loadFluxHist (std::string a_fileName, std::string a_histName)
 
void loadFluxHistCovMat (std::string a_fileName, std::string a_histName)
 
void setFlxHist (TH1 *a_fluxHist)
 
TH1 * getFluxHist ()
 this returns a clone of the internal flux hist as originally loaded or read More...
 
vector< double > readDeutronTimeProfile (TH1 *a_rfHist, double a_distToBreakup, double a_distToDet, double a_timeResolution=-1)
 
vector< double > getEnergySpecLowerBinEdges ()
 
std::vector< double > buildTimeSinceRFAxis ()
 builds the time since RF axis More...
 
void setTimeSinceRFAxis (std::vector< double > a_binEdges)
 
std::vector< double > buildEnergyAxis ()
 
std::pair< int, int > findRFPeriodPlusBinIndex (double a_En)
 
TH1 * generateNew1DFlux ()
 creates new 1D flux from covariance matrix More...
 
TH1 * rebinFluxHist ()
 
TH1 * getRebinnedFluxHistPerMeV ()
 
TH2 * buildFluxMatrix ()
 
TH2F * smearFluxMatrix ()
 
TH2 * getSmearFluxMatrix ()
 
vector< Eigen::MatrixXf > getFluxMatrix ()
 returns the eigen interpretation of the flux and error matrix More...
 
vector< Eigen::MatrixXf > getSmearedFluxMatrix ()
 returns smeared eigen interpretation of the flux and error matrix More...
 
std::vector< double > getEnBinCenters ()
 
std::pair< double, double > getFluxAndError (double a_en)
 
std::pair< double, double > getFluxAndError (double a_lowEn, double a_highEn)
 
vector< vector< double > > getFluxAtTimeSinceRFBin (int a_tofBin)
 
 ~FluxAna ()
 

Detailed Description

this class is intended to store and share information regarding neutron flux for an experiment in the form of a rank 2 matrix where the collums are energy bins corresponding to the rows, which are TOF bins. This allow for tracking energy degeneracy resulting from frame overlap in a an experiment !!!!!!!!!!!!!!This class isn't currently in the safest state !!!!!!!!!!!!!! !!!!!!!!!!!!!!Many functions need to be called in order etc !!!!!!!!!!!!!!

Constructor & Destructor Documentation

◆ FluxAna()

FluxAna::FluxAna ( )

Default constructor puts the class into working state.

Here is the call graph for this function:

◆ ~FluxAna()

FluxAna::~FluxAna ( )

Member Function Documentation

◆ buildEnergyAxis()

std::vector< double > FluxAna::buildEnergyAxis ( )

this function builds the energy axis considering the time since RF axis and the min and max energy specified

Here is the call graph for this function:
Here is the caller graph for this function:

◆ buildFluxMatrix()

TH2 * FluxAna::buildFluxMatrix ( )

constructs the 2D flux matrix with the Y axis in time since RF in ns using the specified bin width and the X axis being the corresponding energy bins aligned with the time since RF axis for the range of energies specified as both a TH2 and Eigen matrix requires a rebinned flux hist,bin width request and energy ranges

Here is the call graph for this function:
Here is the caller graph for this function:

◆ buildTimeSinceRFAxis()

std::vector< double > FluxAna::buildTimeSinceRFAxis ( )

builds the time since RF axis

Here is the caller graph for this function:

◆ findRFPeriodPlusBinIndex()

std::pair< int, int > FluxAna::findRFPeriodPlusBinIndex ( double  a_En)

returns a pair corresponding to number of rf periods from zero and the bin within the that rf period in the time since RF axis

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generateNew1DFlux()

TH1 * FluxAna::generateNew1DFlux ( )

creates new 1D flux from covariance matrix

Here is the call graph for this function:

◆ getEMax()

double FluxAna::getEMax ( )

◆ getEMin()

double FluxAna::getEMin ( )

◆ getEnBinCenters()

std::vector< double > FluxAna::getEnBinCenters ( )
Here is the caller graph for this function:

◆ getEnergySpecLowerBinEdges()

vector< double > FluxAna::getEnergySpecLowerBinEdges ( )
Here is the caller graph for this function:

◆ getFlightPath()

double FluxAna::getFlightPath ( )
Here is the caller graph for this function:

◆ getFluxAndError() [1/2]

std::pair< double, double > FluxAna::getFluxAndError ( double  a_en)

get flux and error from the rebinned histogram this return the counts in the bin that corresponds to the energy specified, ie it is most useful in the case of something like a loop over the centroids

Here is the caller graph for this function:

◆ getFluxAndError() [2/2]

std::pair< double, double > FluxAna::getFluxAndError ( double  a_lowEn,
double  a_highEn 
)

this function returns the number of observed neutrons between the specified energy range

Here is the call graph for this function:

◆ getFluxAtTimeSinceRFBin()

vector< vector< double > > FluxAna::getFluxAtTimeSinceRFBin ( int  a_tofBin)

evaluates flux matrix to look return flux from each wrap in a give time since last RF bin for all wraps, returns: {mean energy, lower energy,upper energy,flux, flux unc.}

Here is the call graph for this function:

◆ getFluxHist()

TH1 * FluxAna::getFluxHist ( )

this returns a clone of the internal flux hist as originally loaded or read

◆ getFluxMatrix()

vector< Eigen::MatrixXf > FluxAna::getFluxMatrix ( )

returns the eigen interpretation of the flux and error matrix

Here is the caller graph for this function:

◆ getRebinnedFluxHistPerMeV()

TH1 * FluxAna::getRebinnedFluxHistPerMeV ( )

◆ getReqTimeBinWidth()

double FluxAna::getReqTimeBinWidth ( )
Here is the caller graph for this function:

◆ getRFPeriod()

double FluxAna::getRFPeriod ( )
Here is the caller graph for this function:

◆ getSmearedFluxMatrix()

vector< Eigen::MatrixXf > FluxAna::getSmearedFluxMatrix ( )

returns smeared eigen interpretation of the flux and error matrix

Here is the caller graph for this function:

◆ getSmearFluxMatrix()

TH2 * FluxAna::getSmearFluxMatrix ( )
Here is the caller graph for this function:

◆ getTimeResolution()

double FluxAna::getTimeResolution ( )

◆ loadFluxHist()

void FluxAna::loadFluxHist ( std::string  a_fileName,
std::string  a_histName 
)

this loads a flux histogram from a file units need to be per MeV

◆ loadFluxHistCovMat()

void FluxAna::loadFluxHistCovMat ( std::string  a_fileName,
std::string  a_histName 
)
Here is the call graph for this function:

◆ readBinWiseFluxCSV()

void FluxAna::readBinWiseFluxCSV ( std::string  a_fileName)

this function reads a file containing bin edges and contents the last line will be the upper edge of the last bin we should prefer TH1 to csv

Here is the caller graph for this function:

◆ readDeutronTimeProfile()

vector< double > FluxAna::readDeutronTimeProfile ( TH1 *  a_rfHist,
double  a_distToBreakup,
double  a_distToDet,
double  a_timeResolution = -1 
)

function to help smear flux matrix non-parameterically by gamma-flash a_rfHist --> gamma flash in RF_calib detector a_distToBreakup --> cm distance from scattering target to breakup target a_distToDet --> cm dist from scattering target to RF_calib detector a_timeResolution --> same as above (by default uses m_timeResolution)

calculate where the center of gamma flash should be

will look from gamma flash +/- 75 ns

to estimate background

simultaneously rebinning to match expected time bin structure and setting t=0 as gamma arrival time and subtract background

need to time reverse this

Here is the call graph for this function:

◆ rebinFluxHist()

TH1 * FluxAna::rebinFluxHist ( )

rebin flux histogram into the energy axis with correspondence of the flux matrix !!!!THIS ASSUMES THE SPECIFIED HIST IN IN 1/MEV !!!!!!!!!!! requires you have loaded a flux hist

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setEMax()

void FluxAna::setEMax ( double  a_eMax)
Here is the caller graph for this function:

◆ setEMin()

void FluxAna::setEMin ( double  a_eMin)
Here is the caller graph for this function:

◆ setFlightPath()

void FluxAna::setFlightPath ( double  a_flightPath)
Here is the caller graph for this function:

◆ setFlxHist()

void FluxAna::setFlxHist ( TH1 *  a_fluxHist)

this will set the internal flux hist if you have one externally constructed in memory

◆ setReqTimeBinWidth()

void FluxAna::setReqTimeBinWidth ( double  a_reqTimeBinWidth)
Here is the caller graph for this function:

◆ setRFPeriod()

void FluxAna::setRFPeriod ( double  a_RFPeriod)
Here is the caller graph for this function:

◆ setTimeResolution()

void FluxAna::setTimeResolution ( double  a_timeResolution)
Here is the caller graph for this function:

◆ setTimeSinceRFAxis()

void FluxAna::setTimeSinceRFAxis ( std::vector< double >  a_binEdges)

this function takes a vector of doubles to use as the time since rf axis this can lead to undefined behavior and should be relied upon sparingly

◆ smearFluxMatrix()

TH2F * FluxAna::smearFluxMatrix ( )

smears flux matrix with m_timeSmearing if no m_timeSmearing, just smears by m_timeResolution gaussian need to call buildFluxMatrix first (assumes m_fluxMat exists);

some code need to figure out how many time bins represents 5 sigma

to ease calculation

loop over the bins that are influenced by the convolution

Here is the caller graph for this function:

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