Berkeley Nuclear Data Software
|
uncomment to time function More...
#include <STOFFluxMC.h>
Public Member Functions | |
STOFFluxMC () | |
void | readConfig (std::string a_fileName) |
void | readMCConfig (std::string a_fileName) |
void | addExpFile (std::string a_fileName) |
this function adds files from experiment More... | |
void | generateNewConfig () |
the following functions are used for the Monte Carlo of systematics More... | |
void | updateExperimentalData () |
void | runMonteCarlo (int a_trialNumber, int a_minSliceToFit, int a_maxSliceToFit, std::string a_outfile="testOutFile.root") |
void | runSingleIteration (int a_minSliceToFit, int a_maxSliceToFit) |
![]() | |
STOFFluxAna () | |
void | setExitTOF (bool a_useExitTOF) |
void | readConfig (std::string a_fileName) |
void | addExpFile (std::string a_fileName) |
this function adds files from experiment More... | |
void | clearExpFiles () |
this function clears the experiment data More... | |
void | addSimFile (std::string a_fileName) |
this function adds files from simulation of the experiment More... | |
void | addExpIncTimeDt (TH1 *a_hist) |
used to pass the incoming time of flight uncertainty hist to the class More... | |
void | addSimEnergyHist (TH1 *a_particleHistory) |
used to add the sim energy histogram to the class More... | |
void | setSimTOFSmearing (double a_exitTOFSmear, double a_incTOFSmear) |
void | setSimTOFSmearing (double a_exitTOFSmear, TH1 *a_incTOFGammaFlashHistogram) |
void | setCutState (std::string a_cutName, bool a_state) |
this sets the cuts for both classes More... | |
void | generateScatterLYCalibrationFiles (std::string a_outDataFileName, std::string a_outSimFileName, std::vector< std::pair< double, double > > a_ranges) |
void | generateTargetLYCalibrationFiles (std::string a_outDataFileName, std::string a_outSimFileName, bool a_incTOF, std::vector< std::pair< double, double > > a_ranges) |
void | setupModelDataComparisonPlotting () |
std::ostream & | printHistNames (std::ostream &a_stream=std::cout) |
TCanvas * | plotComparison (std::string a_histName, int a_binProjection=-1) |
void | setUpEffCalc () |
void | drawProjectionE (int a_binNumber, bool a_newCanvas=false) |
std::vector< double > | getGaussSeedE (int a_proj) |
void | checkGaussGuessE (int a_binNumber, bool a_newCanvas=false) |
void | fitSliceWithGaussE (int a_binNumber, bool a_draw) |
void | fitEfficiencySlices (int a_startBin, int a_stopBin) |
void | calcPeakAreaE (int a_startBin, int a_stopBin) |
TGraph * | plotPeakAreaE (int a_startBin, int a_stopBin) |
void | calcEfficiency (int a_startBin, int a_stopBin) |
basically calcuation of the efficiency needs the transport history More... | |
TGraph * | plotEff (int a_startBin, int a_stopBin) |
void | setUpICalc () |
!!!!!~~~~~~~~~~~~~end largely related to the efficiency caculation More... | |
void | drawProjectionI (int a_binNumber, bool a_newCanvas=false) |
std::vector< double > | getGaussSeedI (int a_proj) |
void | checkGaussGuessI (int a_binNumber, bool a_newCanvas=false) |
void | fitSliceWithGaussI (int a_binNumber, bool a_draw) |
void | fitSlicesI (int a_startBin, int a_stopBin) |
void | calcPeakAreaI (int a_startBin, int a_stopBin) |
TGraph * | plotPeakAreaI (int a_startBin, int a_stopBin) |
void | calcIntensity (int a_startBin, int a_stopBin) |
basically calcuation of the efficiency needs the transport history More... | |
TGraph * | plotI (int a_startBin, int a_stopBin) |
void | setupUncertaintyWeighting () |
!!!!!~~~~~~~~~~~~~end largely related to the intensity caculation More... | |
void | drawBinWeighting (int a_binNumber, bool a_newCanvas=false) |
std::pair< double, double > | getDEWeigthedEfficiency (int a_binNumber, bool a_fluxConsidered=false) |
void | calcFlux (int a_startBin, int a_stopBin) |
void | iterativeFlux (int a_startBin, int a_stopBin, double a_maxDifference=0.01, double a_maxIterations=1000) |
TGraph * | plotFlux () |
TGraph * | plotFluxPerSRmicroC () |
TH1 * | getFluxHistPerSRmicroC () |
std::vector< double > | getGaussSeed (TH1 *a_proj) |
void | checkGaussGuess (TH1 *a_hist, bool a_newCanvas=false) |
TFitResultPtr | fitSliceWithGauss (TH1 *a_hist, bool a_draw, bool a_rangeLimit=false) |
void | calcPeakArea (std::vector< TFitResultPtr > &a_fitResVec, std::vector< TH1 * > &a_sliceVec, std::vector< double > &a_areaVec, std::vector< double > &a_dAreaVec, int a_startBin, int a_stopBin) |
TGraph * | plotResVec (std::vector< double > &a_valVec, std::vector< double > &a_dValVec, int a_startBin, int a_stopBin) |
STOFAna & | getSimAna () |
STOFAna & | getExpAna () |
void | setConfig (STOFConfig a_config) |
STOFConfig | getConfig () |
get config class stored in FluxAna More... | |
void | clearState () |
clears histograms – to be used in-between MC trials More... | |
virtual std::ostream & | printVecsState (std::ostream &a_stream) const |
~STOFFluxAna () | |
Additional Inherited Members | |
![]() | |
STOFAna | m_simResults |
used to fetch results from the simulation of the experimental setup More... | |
STOFAna | m_expResults |
used to fetch results from the experimental data More... | |
STOFConfig | m_config |
std::map< std::string, TH2 * > | m_simHists |
std::map< std::string, TH2 * > | m_expHists |
std::vector< TH1 * > | m_effProj |
used to store projections of histograms More... | |
std::vector< std::pair< double, double > > | m_projEdges |
used to store the edges of projections More... | |
std::vector< TFitResultPtr > | m_effFitRes |
std::vector< double > | m_effPeakArea |
used a derived result from a fit More... | |
std::vector< double > | m_dEffPeakArea |
used to store the error onthe above value More... | |
std::vector< double > | m_eff |
used to store the efficiency calculation More... | |
std::vector< double > | m_dEff |
uncertainty on the efficiency More... | |
TH1 * | m_transportedNeutrons |
TF1 * | m_sliceFitFunc |
this function is a holder used for various slice fitting the efficiency More... | |
std::vector< TH1 * > | m_IProj |
!!!end eff calculation storage More... | |
std::vector< std::pair< double, double > > | m_IProjEdges |
used to store the edges of projections More... | |
std::vector< TFitResultPtr > | m_IFitRes |
std::vector< double > | m_IPeakArea |
used a derived result from a fit More... | |
std::vector< double > | m_dIPeakArea |
used to store the error onthe above value More... | |
std::vector< double > | m_I |
used to store the efficiency calculation More... | |
std::vector< double > | m_dI |
uncertainty on the efficiency More... | |
std::vector< double > | m_flux |
std::vector< double > | m_dFlux |
std::vector< double > | m_eFlux |
std::vector< double > | m_dEFlux |
std::vector< double > | m_originalFlux |
used to store first calculated flux before iteration More... | |
std::vector< double > | m_originalDFlux |
bool | m_binWeighHistPresent |
std::vector< TH1 * > | m_rEnVTEnProj |
std::vector< double > | m_binEdges |
used to store the edges of the bins generally? More... | |
double | m_charge |
TH1 * | m_incTimeDt |
bool | m_useExitTOF |
changes the loaded data types to be for the exit time of flight More... | |
bool | m_subtract |
uncomment to time function
this class is intended to manage the Monte Carlo of systematics of the flux from STOF Trials feed simulation and updated configFile and dataFile to STOFFluxAna and compiles results of flux values to extract a flux along with its covariance
STOFFluxMC::STOFFluxMC | ( | ) |
default constructor puts the class into a working but not that interesting state
void STOFFluxMC::addExpFile | ( | std::string | a_fileName | ) |
this function adds files from experiment
override the base class function creating 2 copies of the experimental results, one that will stay unchanged during MC
void STOFFluxMC::generateNewConfig | ( | ) |
the following functions are used for the Monte Carlo of systematics
generating new STOF config
updating target scintillators
generate new targetConfig
storing incTOF correction assuming single target
storing zcut update
for some reason rotations don't get copied
new OrgScintInfo as duplicate of org before update of values this will copy all the unchanged variables such as channel number, module ID, etc
no changes in target PMT position incoming distance will be changed instead
might need to add a check to make sure the a calib param is not <0
print to test that m_config has been properly changed
updating scatter scintillators
generate new scatterConfig
set coincident TOF corrections
new OrgScintInfo as duplicate of org before update of values this will copy all the unchanged variables such as channel number, module ID, etc
update zcuts
newZ is in m, cutZ is in mm
might need to add a check to make sure the a calib param is not <0
pushing to STOFFluxAna
print to test that m_config has been properly changed
assuming negative lower value for match window
void STOFFluxMC::readConfig | ( | std::string | a_fileName | ) |
override and extends base class function reads config file and makes 2 copies of STOFConfig, one of which will stay unchanged during the MC
this function reads the config file for both the simulation and the experiment accumulator class
void STOFFluxMC::readMCConfig | ( | std::string | a_fileName | ) |
this function reads the MonteCarlo config file used to generate a new configuration
void STOFFluxMC::runMonteCarlo | ( | int | a_trialNumber, |
int | a_minSliceToFit, | ||
int | a_maxSliceToFit, | ||
std::string | a_outfile = "testOutFile.root" |
||
) |
working on simulation data
working on experimental data
void STOFFluxMC::runSingleIteration | ( | int | a_minSliceToFit, |
int | a_maxSliceToFit | ||
) |
working on simulation data
working on experimental data
void STOFFluxMC::updateExperimentalData | ( | ) |
function to update the data given a new config file and uncertainties loaded in MCSetupFile
get original data tree
get coinID and set it same
STOF only has one target for now
since only one target
get scattering angle
unchanged PSD values
light values – calibrations are set in STOFAna while processing data
!!!!!EnTarLight is currently not used or set !!!delta time between target PMTs – not changed
exit TOF
incident neutron energy determined from exit time of flight and scattering angle – recalculated distance between target and scatter in cm
incomingTOF
potential incoming energies
best En Estimate