Berkeley Nuclear Data Software
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CompassPostProcBase Class Reference

#include <COMPASSFileManagement.h>

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

Public Member Functions

 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...
 

Protected Member Functions

void setTreeName ()
 sets the default tree name More...
 
void setBranchName ()
 not used but implementation is required. More...
 

Protected Attributes

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 as a base class for different analysis of data being produced by the CAEN CoMPASS program

Constructor & Destructor Documentation

◆ CompassPostProcBase() [1/2]

CompassPostProcBase::CompassPostProcBase ( )

default contstructor put the class into a commonly working state

Here is the call graph for this function:

◆ CompassPostProcBase() [2/2]

CompassPostProcBase::CompassPostProcBase ( std::string  a_writeMode)

used to construct the class with the appropriate tree name variable for switching between compass write mode. Current supports "Filt","Unfilt", "Raw"

Here is the call graph for this function:

Member Function Documentation

◆ addCoinsFromFile()

int CompassPostProcBase::addCoinsFromFile ( string  a_fileName,
double  a_coinWindow 
)
virtual

this function add the file, sorts the events, builds coincidences and the clears the sorted linear vector coincidence window units matched the buildCoincidences unit

this function add the file, sorts the events, builds coincidences and the clears the sorted linear vector

Here is the call graph for this function:

◆ addFile()

int CompassPostProcBase::addFile ( string  a_filename)
virtual

overloading defaul file loader to manage complex association of branches

Reimplemented from PostProcBase< compassEvStrct >.

Here is the caller graph for this function:

◆ buildClycTree()

void CompassPostProcBase::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 
)

◆ buildCoincidences()

int CompassPostProcBase::buildCoincidences ( double  a_coinWindow)
virtual

this function loops over the time sorted vector looking for neighboring events which fall within the specified coincidence window

loop over sorted events

Parameters
a_coinWindowcoincidence window in ns
Here is the call graph for this function:
Here is the caller graph for this function:

◆ buildCountRateHist()

TH1 * CompassPostProcBase::buildCountRateHist ( int  a_ch,
int  a_maxCountRate 
)

this function build the distribution of count rates out of the sorted time vector for a specified channel

Parameters
a_chchannel to build the count rate distribution
a_maxCountRatemaximum count rate in Hz

◆ buildDtHist()

TH1 * CompassPostProcBase::buildDtHist ( int  a_ch1,
int  a_ch2,
double  a_maxT,
int  a_maxMultiplicity = 2,
bool  enforceOrder = true 
)

◆ buildDtTrigVEHist()

TH1 * CompassPostProcBase::buildDtTrigVEHist ( int  a_evCh,
int  a_trigCh,
double  a_maxT 
)

builds a 2 dimesional histogram where the xAxis is time since the last event that occurs in a_trigCh in s, and the y axis the long integration window for a_evCh a_maxT sets the length of the x axis in seconds. Events that come before the first trigger observation will be neglected

set up the histogram binning first line is slow, but who cares?

◆ buildDtVEHist()

TH1 * CompassPostProcBase::buildDtVEHist ( int  a_ch1,
int  a_ch2,
double  a_maxT,
int  a_maxMultiplicity = 2,
bool  enforceOrder = false,
int  a_EchOrder = 0 
)

◆ buildInterEventTime()

TH1 * CompassPostProcBase::buildInterEventTime ( int  a_ch,
double  a_maxT 
)

this function build the interevent time out of the sorted time vector for a specified channel

set up the histogram binning first line is slow, but who cares?

Parameters
a_chchannel to build the interevent time plot
a_maxTmaximum interevent time in s

◆ buildPSDPlot()

TH2 * CompassPostProcBase::buildPSDPlot ( int  a_ch)

this function uses the fpga derived quantities to construct a pulse shape vs charge integral plot

Here is the call graph for this function:

◆ buildTimeSortedVector()

int CompassPostProcBase::buildTimeSortedVector ( int  a_startEvent = 0,
int  a_numToRead = -1 
)

used to read tree contents into memory and ensure they are time sorted

read the file and create a list of time sorted events

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

◆ buildTrigDTTree()

void CompassPostProcBase::buildTrigDTTree ( int  a_trigChannel,
std::string  a_fileName 
)

builds time differences between any given channel and a channel being used as a trigger for time marking an event.

◆ buildWallTimeVEnergy()

TH2 * CompassPostProcBase::buildWallTimeVEnergy ( int  a_ch)

set up the histogram binning first line is slow, but who cares?

◆ clearData()

void CompassPostProcBase::clearData ( )

clears sorted vector, coincidences and loaded file

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

◆ getCoins()

std::vector< compassCoin > CompassPostProcBase::getCoins ( )

probably no the best bet here from a memory management perspective but allows access to the constructed coincidences

◆ investigateCoins()

void CompassPostProcBase::investigateCoins ( )

this function takes user input to print coincidences in order out of the coincidence array

◆ printEvent()

std::ostream & CompassPostProcBase::printEvent ( int  a_eventID,
std::ostream &  a_stream = std::cout 
)
Here is the call graph for this function:

◆ printTimeSort()

std::ostream & CompassPostProcBase::printTimeSort ( std::ostream &  a_stream = std::cout,
int  a_num = -1 
)

◆ readCutFile()

void CompassPostProcBase::readCutFile ( std::string  a_fileName)

load cuts and sets CutManager m_cuts bool m_cutFileLoaded set to true

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

◆ setBranchName()

void CompassPostProcBase::setBranchName ( )
protectedvirtual

not used but implementation is required.

Implements PostProcBase< compassEvStrct >.

◆ setFileMode()

void CompassPostProcBase::setFileMode ( bool  a_hasWFs)

used to set whether the file is list mode or mixed mode.

Here is the caller graph for this function:

◆ setTreeName()

void CompassPostProcBase::setTreeName ( )
protectedvirtual

sets the default tree name

Implements PostProcBase< compassEvStrct >.

Here is the caller graph for this function:

◆ writeCoinsToDisk()

void CompassPostProcBase::writeCoinsToDisk ( std::string  a_outFileName = "coinFile.root")

this function writes a tree of the coincident events from the m_coins data member to disk in a file name specified. The tree format will match the original tree format

Member Data Documentation

◆ m_coins

std::vector<compassCoin> CompassPostProcBase::m_coins
protected

used to store compass coincidences

◆ m_cutFileLoaded

bool CompassPostProcBase::m_cutFileLoaded
protected

bool for cutmanager status

◆ m_cuts

CutManager CompassPostProcBase::m_cuts
protected

cut manager

◆ m_evArrayPtr

TArrayS* CompassPostProcBase::m_evArrayPtr
protected

◆ m_hasWFs

bool CompassPostProcBase::m_hasWFs
protected

used to signal whether the file is list or has wf's

◆ m_sortVector

std::vector<compassEvStrct> CompassPostProcBase::m_sortVector
protected

stores a time sorted vector


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