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

#include <CLYCSpecPostProcessing.h>

Inheritance diagram for CLYCSpecPostProcessing:
Inheritance graph
[legend]
Collaboration diagram for CLYCSpecPostProcessing:
Collaboration graph
[legend]

Public Member Functions

 CLYCSpecPostProcessing ()
 defualt constructor puts the class into an empty but working state More...
 
 CLYCSpecPostProcessing (std::string a_writeMode)
 allows setting the file type see base class constructor of same signature More...
 
void reduceToCLYCEvents (std::string a_outfile="clycEvents.root", bool a_doFit=false, double a_ampThreshold=20, double a_minSamplesOver=20, int a_daqEvStartSample=50, int a_totalIntegralOffset=2, int a_intP1=30, int a_intP2=50, int a_intP3=2000, int a_intP4=3000, int a_smearingWindow=20, int a_numIterations=0)
 
void buildWaveformHist (std::string a_outFile, bool a_writeFile=false, double a_ampThreshold=15, double a_minSamplesOver=20, int a_daqEvStartSample=50, int a_totalIntegralOffset=4, int a_intP1=6, int a_intP2=10, int a_intP3=34, int a_intP4=154)
 
void doGatePIDSearch (std::map< int, int > a_chSelect, std::string a_outfile="clycEvents.root", int a_shortGateStart=5, int a_shortGateStop=50, int a_shortGateStep=5, int a_longGateStart=20, int a_longGateStop=300, int a_longGateStep=20, int a_offsetStart=0, int a_offsetStop=50, int a_offsetStep=10, double a_ampThreshold=20, double a_minSamplesOver=20, int a_daqEvStartSample=50, int a_totalIntegralOffset=2)
 
std::vector< double > getCDF (std::string a_processedFile, int a_evNum, std::string a_treeName="procEvents")
 CDF Capabilities. More...
 
TGraph * drawSingleCDF (std::string a_processedFile, int a_evNum, std::string a_treeName="procEvents", bool a_draw=false)
 
TH2 * drawMultiCDF (std::string a_processedFile, std::string a_treeName="procEvents")
 
- Public Member Functions inherited from COMPASSWFAna
 COMPASSWFAna ()
 
 COMPASSWFAna (std::string a_writeMode)
 
void drawTrace (int a_evNum, bool a_clearGraph=true)
 
void drawSmoothedTrace (std::vector< int > a_evNums, bool a_clearGraph=true)
 
void drawInvertedTrace (int a_evNum, bool a_clearGraph=true)
 
void viewOverflowEvents ()
 
void drawNextTrace (int a_chNum, bool a_invert=false, bool a_clearGraph=true)
 
void testBaselineEstimation (int a_ch, int a_numSamples)
 
std::vector< TH1 * > getBaselineStastics (int a_ch, int a_numSamples)
 
TArrayS getTrace (int a_entry)
 
std::vector< double > getTraceDbl (int a_entry)
 
std::vector< double > getTraceDbl (int a_entry, int a_eraseFront, int a_eraseEnd)
 
TH1 * getPulseIntegralHistogram (int a_ch, int a_threshold, int a_numBSLSamples, int a_integrationLength, bool a_invert=false)
 this function creates a 1D energy histogram More...
 
- Public Member Functions inherited from CompassPostProcBase
 CompassPostProcBase ()
 default contstructor put the class into a commonly working state More...
 
 CompassPostProcBase (std::string a_writeMode)
 
virtual int addFile (string a_filename)
 overloading defaul file loader to manage complex association of branches More...
 
virtual int addCoinsFromFile (string a_fileName, double a_coinWindow)
 
void setFileMode (bool a_hasWFs)
 used to set whether the file is list mode or mixed mode. More...
 
int buildTimeSortedVector (int a_startEvent=0, int a_numToRead=-1)
 used to read tree contents into memory and ensure they are time sorted More...
 
virtual int buildCoincidences (double a_coinWindow)
 
TH1 * buildDtHist (int a_ch1, int a_ch2, double a_maxT, int a_maxMultiplicity=2, bool enforceOrder=true)
 
void buildClycTree (int a_ch1, int a_ch2, double a_maxT, int a_maxMultiplicity=2, bool enforceOrder=true, int psdType=1, double a_slope=243, double a_offset=-2.3)
 
void buildTrigDTTree (int a_trigChannel, std::string a_fileName)
 
TH1 * buildDtVEHist (int a_ch1, int a_ch2, double a_maxT, int a_maxMultiplicity=2, bool enforceOrder=false, int a_EchOrder=0)
 
TH1 * buildInterEventTime (int a_ch, double a_maxT)
 
TH1 * buildCountRateHist (int a_ch, int a_maxCountRate)
 
TH1 * buildDtTrigVEHist (int a_evCh, int a_trigCh, double a_maxT)
 
TH2 * buildWallTimeVEnergy (int a_ch)
 
TH2 * buildPSDPlot (int a_ch)
 
std::vector< compassCoingetCoins ()
 
void writeCoinsToDisk (std::string a_outFileName="coinFile.root")
 
void investigateCoins ()
 
std::ostream & printEvent (int a_eventID, std::ostream &a_stream=std::cout)
 
std::ostream & printTimeSort (std::ostream &a_stream=std::cout, int a_num=-1)
 
void readCutFile (std::string a_fileName)
 
void clearData ()
 clears sorted vector, coincidences and loaded file More...
 
- Public Member Functions inherited from PostProcBase< compassEvStrct >
 PostProcBase ()
 defualt constructor puts class into a working state More...
 
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 Member Functions inherited from CompassPostProcBase
void setTreeName ()
 sets the default tree name More...
 
void setBranchName ()
 not used but implementation is required. More...
 
- Protected Attributes inherited from CompassPostProcBase
TArrayS * m_evArrayPtr
 
bool m_hasWFs
 used to signal whether the file is list or has wf's More...
 
std::vector< compassEvStrctm_sortVector
 stores a time sorted vector More...
 
std::vector< compassCoinm_coins
 used to store compass coincidences More...
 
CutManager m_cuts
 cut manager More...
 
bool m_cutFileLoaded
 bool for cutmanager status More...
 
- Protected Attributes inherited from PostProcBase< compassEvStrct >
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...
 
compassEvStrctm_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...
 

Detailed Description

this class is intended to store analysis routines used for turning experimental data from the Scattered Time Of Flight detector into neutron spectra the routines in this class assume that the data has been taken in pulse ampklitude mode. all routines require that you load a config file so that the output of them can be

Constructor & Destructor Documentation

◆ CLYCSpecPostProcessing() [1/2]

CLYCSpecPostProcessing::CLYCSpecPostProcessing ( )

defualt constructor puts the class into an empty but working state

◆ CLYCSpecPostProcessing() [2/2]

CLYCSpecPostProcessing::CLYCSpecPostProcessing ( std::string  a_writeMode)

allows setting the file type see base class constructor of same signature

Member Function Documentation

◆ buildWaveformHist()

void CLYCSpecPostProcessing::buildWaveformHist ( std::string  a_outFile,
bool  a_writeFile = false,
double  a_ampThreshold = 15,
double  a_minSamplesOver = 20,
int  a_daqEvStartSample = 50,
int  a_totalIntegralOffset = 4,
int  a_intP1 = 6,
int  a_intP2 = 10,
int  a_intP3 = 34,
int  a_intP4 = 154 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ doGatePIDSearch()

void CLYCSpecPostProcessing::doGatePIDSearch ( std::map< int, int >  a_chSelect,
std::string  a_outfile = "clycEvents.root",
int  a_shortGateStart = 5,
int  a_shortGateStop = 50,
int  a_shortGateStep = 5,
int  a_longGateStart = 20,
int  a_longGateStop = 300,
int  a_longGateStep = 20,
int  a_offsetStart = 0,
int  a_offsetStop = 50,
int  a_offsetStep = 10,
double  a_ampThreshold = 20,
double  a_minSamplesOver = 20,
int  a_daqEvStartSample = 50,
int  a_totalIntegralOffset = 2 
)

this function requires that timing calibrations are present in the config file along with detector locations. The source location is (0,0,0) It loops over all events in the coincidence vector and calculates all possible quantities for an event in the system producing a tree with TTOFEvent structs stored

loop over events and calculate quantities

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

◆ drawMultiCDF()

TH2 * CLYCSpecPostProcessing::drawMultiCDF ( std::string  a_processedFile,
std::string  a_treeName = "procEvents" 
)

◆ drawSingleCDF()

TGraph * CLYCSpecPostProcessing::drawSingleCDF ( std::string  a_processedFile,
int  a_evNum,
std::string  a_treeName = "procEvents",
bool  a_draw = false 
)
Here is the call graph for this function:

◆ getCDF()

std::vector< double > CLYCSpecPostProcessing::getCDF ( std::string  a_processedFile,
int  a_evNum,
std::string  a_treeName = "procEvents" 
)

CDF Capabilities.

Here is the caller graph for this function:

◆ reduceToCLYCEvents()

void CLYCSpecPostProcessing::reduceToCLYCEvents ( std::string  a_outfile = "clycEvents.root",
bool  a_doFit = false,
double  a_ampThreshold = 20,
double  a_minSamplesOver = 20,
int  a_daqEvStartSample = 50,
int  a_totalIntegralOffset = 2,
int  a_intP1 = 30,
int  a_intP2 = 50,
int  a_intP3 = 2000,
int  a_intP4 = 3000,
int  a_smearingWindow = 20,
int  a_numIterations = 0 
)

this function requires that timing calibrations are present in the config file along with detector locations. The source location is (0,0,0) It loops over all events in the coincidence vector and calculates all possible quantities for an event in the system producing a tree with TTOFEvent structs stored

loop over events and calculate quantities

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

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