Berkeley Nuclear Data Software
|
#include <GenesisAnalysis.h>
Public Member Functions | |
GenesisAnalysis (string a_configFileName) | |
constructor for use with new config More... | |
void | readConfigFile (string a_configFileName) |
void | accumulateBasicQuantities (string a_outFileName="genEventBasicQuantities.root") |
void | buildRFCalibrationTree (string a_outFileName="rfCalibrationResults.root", double a_dsFraction=0.1) |
void | buildGammaSpectra (string a_outFileName="spec1.root", bool a_requireScint=false, bool a_integralCal=false, int a_maxE=8192) |
void | buildTOFHists (string a_outFileName="tofHists.root") |
void | buildPSDFHists (string a_outFileName="psdHists.root") |
get psd histo, apply cuts isNeutron, isGamma More... | |
void | findGammaGammaTimeOffset (string a_outFileNameRoot="gammaTimeOffset.root", string a_outFileNameTxt="gammaTimeOffset.txt", int a_doFit=1, std::array< double, 3 > a_offset={0, 0, 0}) |
void | buildOutgoingTOFHist (string a_outFileName="outgoingTOF.root") |
void | reduceToCalibratedTrees (string a_outFileName="calibrateEvents.root", int a_detOption=0) |
void | reduceToCloverTree (string a_outFileName="calibratedGamma.root") |
void | buildEfficiencyAnaTree (bool a_buildForNeutrons, string a_outFileName="", double a_enThreshold=.2) |
builds tree of PH, TOF, gamma energy for PSD-neutrons More... | |
void | buildEfficiencyAnaTreeScintScint (string a_outFileName, double a_enThreshold=.2, bool a_gammaGamma=false, std::array< double, 3 > a_offset={0, 0, 0}) |
void | makeRandomTOFHists (string a_outFileName="", double a_enThreshold=.2) |
build random n/g coincidences between EJ-309 detectors More... | |
void | buildGammaGammaCoins (string a_fileName="gammaGammaCoinHists.root") |
void | buildNeutronSinglesTree (string a_fileName="neutronSinglesTree.root") |
virtual std::ostream & | printEvent (std::ostream &a_stream=std::cout, int a_eventToPrint=-1) |
this is used for testing the internal state of events stored in the tree More... | |
Public Member Functions inherited from PostProcBase< GenesisEvent > | |
PostProcBase () | |
defualt constructor puts class into a working state More... | |
virtual int | addFile (string a_filename) |
virtual int | addFilesFromDirectory (string a_dir, string a_ext) |
virtual int | loadEvent (int a_eventNumber) |
loads a specified event into memory More... | |
virtual int | fileNotLoaded () |
tests if a file is loaded and prinst a message if not More... | |
virtual int | clearFileState () |
virtual std::ostream & | printState (std::ostream &a_stream=std::cout) |
virtual | ~PostProcBase () |
TChain * | getTrees () |
danger danger, use this if you know what you are doing. More... | |
Additional Inherited Members | |
Protected Attributes inherited from PostProcBase< GenesisEvent > | |
TChain * | m_trees |
for associating the trees from files More... | |
string | m_treeName |
for storing the name of the tree More... | |
string | m_branchName |
for storing the name of the branch More... | |
GenesisEvent * | m_currentEvent |
for storing the current event More... | |
vector< string > | m_loadedFiles |
for storing a list of loaded files More... | |
bool | m_hasFile |
flag for wheter a file has been loaded More... | |
class to do cursory analysis on GenesisEvent trees J. Gordon
GenesisAnalysis::GenesisAnalysis | ( | string | a_configFileName | ) |
constructor for use with new config
read in ExperimentConfig config into GENESISConfig
read in GENESISConfig specific parameters
void GenesisAnalysis::accumulateBasicQuantities | ( | string | a_outFileName = "genEventBasicQuantities.root" | ) |
creates histograms of basic coincidence quantities uses new config used to provide singles and coincidence histograms as sanity checks to data integrety generates an new file titled
mod id, channel: time since file start vs ADC
clover id, channel: leaf-leaf, leaf-bgo TDC diff
clover id
scint id
number of hits per event
lists of detector IDs to build histograms
void GenesisAnalysis::buildEfficiencyAnaTree | ( | bool | a_buildForNeutrons, |
string | a_outFileName = "" , |
||
double | a_enThreshold = .2 |
||
) |
builds tree of PH, TOF, gamma energy for PSD-neutrons
void GenesisAnalysis::buildEfficiencyAnaTreeScintScint | ( | string | a_outFileName, |
double | a_enThreshold = .2 , |
||
bool | a_gammaGamma = false , |
||
std::array< double, 3 > | a_offset = {0,0,0} |
||
) |
same as above for OrgScint/OrgScint n/g coincidences Also saves neutron time since RF for the 5 RFs
a_offset | this is used to offset the array to account for source offsets when doing timing calibrations |
void GenesisAnalysis::buildGammaGammaCoins | ( | string | a_fileName = "gammaGammaCoinHists.root" | ) |
builds clover-clover [add-back] gamma-gamma coincidences writes a file with N_clovers^N_clovers 2D histograms
void GenesisAnalysis::buildGammaSpectra | ( | string | a_outFileName = "spec1.root" , |
bool | a_requireScint = false , |
||
bool | a_integralCal = false , |
||
int | a_maxE = 8192 |
||
) |
For each gamma detector (Clover, Pop-top, LaBr):
clover-id mult = 2 events: big energy vs small energy
a_integralCal | if you don't have energy calibrations but want spectra this will set the full scale range correctly |
void GenesisAnalysis::buildNeutronSinglesTree | ( | string | a_fileName = "neutronSinglesTree.root" | ) |
void GenesisAnalysis::buildOutgoingTOFHist | ( | string | a_outFileName = "outgoingTOF.root" | ) |
uses time calibrations to construct outgoingTOF histograms: does TOF against gamma-ray (clover/HPGe, inorg) detectors
scint ID, TOF [ns] vs light
scint ID, TOF
scint ID, clover ID [not added-back], neutron TOF vs gamma energy
scint ID, neutron energy from TOF vs light
for testing trigger differences
get the hits
gamma det ID, {tof, gamma energy}
fill the histograms
void GenesisAnalysis::buildPSDFHists | ( | string | a_outFileName = "psdHists.root" | ) |
get psd histo, apply cuts isNeutron, isGamma
mod id, channel: time since file start vs ADC scint id
number of hits per event
lists of detector IDs to build histograms
void GenesisAnalysis::buildRFCalibrationTree | ( | string | a_outFileName = "rfCalibrationResults.root" , |
double | a_dsFraction = 0.1 |
||
) |
void GenesisAnalysis::buildTOFHists | ( | string | a_outFileName = "tofHists.root" | ) |
builds histograms of incoming TOF vs energy:
det ID, channels (for leafs/BGO)
singles neutron total TOF
!!!!NEED TO THINK ABOUT THIS!!!!
if the time offset of the clovers (calibration value ) is large this lead to extremely offset time since RF values,
void GenesisAnalysis::findGammaGammaTimeOffset | ( | string | a_outFileNameRoot = "gammaTimeOffset.root" , |
string | a_outFileNameTxt = "gammaTimeOffset.txt" , |
||
int | a_doFit = 1 , |
||
std::array< double, 3 > | a_offset = {0,0,0} |
||
) |
determines time calibrations to bring detectors into Real Time space for outgoing TOF analysis: builds gamma-gamma EJ-309 / LaBr+Pop-top+Clover time difference spectra Finds the mean of those spectra, prints out values uses new config Should be fixed needs testing Requires Config file update
scint ID, clover ID, leaf number
scint ID, HPGe ID
scint ID, inorgScint ID
scint ID
loop over orgScint events
gamma flight time from scattering target
building all time diffs. rel to Detector specified in config
write clones of the histograms to file before trying to fit
fit gaussians to time difference peaks for time calibration value
a_offset | this is used to offset the array to account for source offsets when doing timing calibrations |
void GenesisAnalysis::makeRandomTOFHists | ( | string | a_outFileName = "" , |
double | a_enThreshold = .2 |
||
) |
build random n/g coincidences between EJ-309 detectors
find neutrons and gammas in this event
pick random other events in tree
find neutrons and gammas in 2nd event
build coincidences between neutrons from event 1, gammas from event 2
build coincidences between neutrons from event 2, gammas from event 1
|
virtual |
this is used for testing the internal state of events stored in the tree
void GenesisAnalysis::readConfigFile | ( | string | a_configFileName | ) |
read in ExperimentConfig config into GENESISConfig
read in GENESISConfig specific parameters
void GenesisAnalysis::reduceToCalibratedTrees | ( | string | a_outFileName = "calibrateEvents.root" , |
int | a_detOption = 0 |
||
) |
reduces GENESISEvent trees to GenesisPhysEvent trees detOption of 0 gives you both scint and clover events detOption 1 gives scint only and detOption 2 is clover only
void GenesisAnalysis::reduceToCloverTree | ( | string | a_outFileName = "calibratedGamma.root" | ) |
!!!!!!!!!!!!!!!!!THIS NEEDS TO BE UPDATED!!!!!!!!!!!!!!!!!
assume the clovers define the axis? !!!!!!!!!!!!Fix THIS!!!!!!!!!!!!